Merge pull request #1341 from crystallpunk-14/ed-31-05-2025-web

Spider content update
This commit is contained in:
Red
2025-05-31 14:31:44 +03:00
committed by GitHub
parent 381e556a8d
commit 71527bb4eb
38 changed files with 589 additions and 31 deletions

View File

@@ -68,7 +68,7 @@
</BoxContainer>
<PanelContainer Margin="10 10 10 10" HorizontalExpand="True" VerticalExpand="True" RectClipContent="True">
<parallax:ParallaxControl Name="ParallaxBackground" ScaleX="4" ScaleY="4"
ParallaxPrototype="CP14Astral" Access="Public" SpeedX="10" SpeedY="5" />
ParallaxPrototype="KettleStation" Access="Public" SpeedX="10" SpeedY="5" />
<BoxContainer Margin="10 10 10 10" Orientation="Horizontal" HorizontalExpand="True"
VerticalExpand="True">
<nodeTree:CP14NodeTreeGraphControl Name="GraphControl" HorizontalAlignment="Stretch"

View File

@@ -0,0 +1,34 @@
using Robust.Shared.Map;
using Robust.Shared.Prototypes;
namespace Content.Shared._CP14.MagicSpell.Spells;
public sealed partial class CP14SpellSpawnEntitiesOnTargetInRadius : CP14SpellEffect
{
[DataField]
public EntProtoId Spawn = new();
public override void Effect(EntityManager entManager, CP14SpellEffectBaseArgs args)
{
EntityCoordinates? targetPoint = null;
if (args.Position is not null)
targetPoint = args.Position.Value;
if (args.Target is not null && entManager.TryGetComponent<TransformComponent>(args.Target.Value, out var transformComponent))
targetPoint = transformComponent.Coordinates;
if (targetPoint is null)
return;
// Spawn in center
entManager.SpawnAtPosition(Spawn, targetPoint.Value);
//Spawn in other directions
for (var i = 0; i < 4; i++)
{
var direction = (DirectionFlag) (1 << i);
var coords = targetPoint.Value.Offset(direction.AsDir().ToVec());
entManager.SpawnAtPosition(Spawn, coords);
}
}
}

View File

@@ -1,27 +1,25 @@
using Content.Shared._CP14.DayCycle;
using Content.Shared.Random.Rules;
using Robust.Shared.Map.Components;
namespace Content.Shared._CP14.Random.Rules;
/// <summary>
/// Checks whether there is a time of day on the current map, and whether the current time of day corresponds to the specified periods.
/// </summary>
public sealed partial class CP14TimePeriod : RulesRule
public sealed partial class CP14IsNight : RulesRule
{
[DataField]
public float Threshold = 100f;
public override bool Check(EntityManager entManager, EntityUid uid)
{
var transform = entManager.System<SharedTransformSystem>();
var dayCycle = entManager.System<CP14DayCycleSystem>();
var map = transform.GetMap(uid);
if (!entManager.TryGetComponent<MapLightComponent>(map, out var light))
if (map is null)
return false;
var lightColor = light.AmbientLightColor;
var medium = lightColor.R + lightColor.G + lightColor.B / 3f;
var lightLevel = dayCycle.GetLightLevel(map.Value);
return medium > Threshold;
return Inverted ? lightLevel < 0.5 : lightLevel >= 0.5;
}
}

View File

@@ -11,4 +11,14 @@
- files: ["cave.ogg"]
license: "CC-BY-4.0"
copyright: 'by EminYILDIRIM of Freesound.org.'
source: "https://freesound.org/people/EminYILDIRIM/sounds/711956/"
source: "https://freesound.org/people/EminYILDIRIM/sounds/711956/"
- files: ["ambiforest_day.ogg"]
license: "CC0-1.0"
copyright: 'by kvgarlic of Freesound.org.'
source: "https://freesound.org/people/kvgarlic/sounds/135834/"
- files: ["ambiforest_night.ogg"]
license: "CC-BY-4.0"
copyright: 'by Moulaythami of Freesound.org.'
source: "https://freesound.org/people/Moulaythami/sounds/536930/"

View File

@@ -24,6 +24,7 @@ cp14-modifier-chasm = bottomless chasms
cp14-modifier-air-lily = air lilies
cp14-modifier-shadow-kudzu = spreading astral haze
cp14-modifier-night = darkness
cp14-modifier-spiders = spider's web
cp14-modifier-storm = storm
cp14-modifier-fire-storm = fire storm

View File

@@ -24,6 +24,7 @@ cp14-modifier-chasm = бездонные пропасти
cp14-modifier-air-lily = воздушные лилии
cp14-modifier-shadow-kudzu = поглощающий астральный мрак
cp14-modifier-night = темнота
cp14-modifier-spiders = паучье логово
cp14-modifier-storm = гроза
cp14-modifier-fire-storm = огненный шторм

View File

@@ -0,0 +1,47 @@
- type: entity
id: CP14ActionSpiderTrap
name: web trap
description: You wrap a web around the target, slowing its movement.
components:
- type: CP14MagicEffectCastSlowdown
speedMultiplier: 0.3
- type: CP14MagicEffect
telegraphyEffects:
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactSpiderTrap
effects:
- !type:CP14SpellSpawnEntitiesOnTargetInRadius
spawn: CP14SpiderWeb
- !type:CP14SpellSpawnEntityOnTarget
spawns:
- CP14ImpactSpiderTrap
- type: EntityWorldTargetAction
useDelay: 20
range: 10
checkCanAccess: false
itemIconStyle: BigAction
sound: !type:SoundPathSpecifier
path: /Audio/Animals/snake_hiss.ogg
icon:
sprite: _CP14/Structures/Dungeon/floor_web.rsi
state: full
event: !type:CP14DelayedEntityWorldTargetActionEvent
hidden: true
breakOnMove: false
breakOnDamage: false
cooldown: 20
castDelay: 0.5
raiseOnUser: true
- type: entity
id: CP14ImpactSpiderTrap
parent: CP14BaseMagicImpact
categories: [ HideSpawnMenu ]
save: false
components:
- type: Sprite
layers:
- state: circle_increase
- sprite: _CP14/Effects/Magic/area_impact.rsi
state: area_impact_out

View File

@@ -0,0 +1,145 @@
- type: entity
parent:
- CP14SimpleMobBase
- MobCombat
abstract: true
id: CP14MobSpiderBase
categories: [ ForkFiltered ]
components:
- type: HTN
rootTask:
task: CP14MonsterCompound
blackboard:
NavSmash: !type:Bool
true
VisionRadius: !type:Single
16
AggroVisionRadius: !type:Single
12
- type: Physics
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.35
density: 130
mask:
- MobMask
layer:
- MobLayer
- type: Butcherable
spawned:
- id: CP14FoodMeatMole #TODO
amount: 2
- id: CP14FoodMeatMoleLeg #TODO
amount: 1
prob: 0.6
- type: CombatMode
- type: MeleeWeapon
angle: 0
animation: WeaponArcBite
damage:
types:
Slash: 3
Piercing: 3
Structural: 3
- type: Body
prototype: AnimalHemocyanin
- type: MobThresholds
thresholds:
0: Alive
90: Dead
#- type: SolutionContainerManager
# solutions:
# melee:
# maxVol: 30
#- type: SolutionRegeneration
# solution: melee
# generated:
# reagents:
# - ReagentId: Mechanotoxin #TODO
# Quantity: 1
- type: MeleeChemicalInjector
transferAmount: 0.75
solution: melee
- type: ReplacementAccent
accent: xeno
- type: InteractionPopup
successChance: 0.5
interactSuccessString: petting-success-tarantula
interactFailureString: petting-failure-generic
interactSuccessSpawn: EffectHearts
interactSuccessSound:
path: /Audio/Animals/snake_hiss.ogg
- type: NoSlip
- type: IgnoreSpiderWeb
- type: Bloodstream
bloodMaxVolume: 150
bloodReagent: CP14BloodAnimal
- type: Speech
speechVerb: Arachnid
speechSounds: Arachnid
allowedEmotes: ['Click', 'Chitter']
- type: Vocal
sounds:
Male: UnisexArachnid
Female: UnisexArachnid
Unsexed: UnisexArachnid
- type: TypingIndicator
proto: spider
- type: Tag
tags:
- FootstepSound
- type: PassiveDamage # Slight passive regen. Assuming one damage type, comes out to about 4 damage a minute from base.yml.
allowedStates:
- Alive
damageCap: 89
damage:
types:
Poison: -0.07
groups:
Brute: -0.07
Burn: -0.07
- type: NPCUseActionOnTarget
actionId: CP14ActionSpiderTrap
- type: NpcFactionMember
factions:
- CP14Monster
- type: entity
parent: CP14MobSpiderBase
id: CP14MobSpiderBlackHunter
name: black hunter
description: A giant predatory spider eager to eat your flesh.
components:
- type: Sprite
drawdepth: Mobs
layers:
- map: ["enum.DamageStateVisualLayers.Base", "movement"]
state: nurse
sprite: Mobs/Animals/spider.rsi
- type: SpriteMovement
movementLayers:
movement:
state: nurse-moving
noMovementLayers:
movement:
state: nurse
- type: DamageStateVisuals
states:
Alive:
Base: nurse
Critical:
Base: nurse_dead
Dead:
Base: nurse_dead
- type: MeleeWeapon
altDisarm: false
angle: 0
animation: WeaponArcBite
soundHit:
path: /Audio/Effects/bite.ogg
damage:
types:
Piercing: 6

View File

@@ -11,6 +11,30 @@
sprite: _CP14/Objects/Materials/string.rsi
state: icon
- type: entity
id: CP14Web
parent: BaseItem
name: web
description: A lump of nasty cobweb. If done correctly, this can be turned into threads.
categories: [ ForkFiltered ]
components:
- type: Item
size: Tiny
- type: Sprite
sprite: _CP14/Objects/Materials/web.rsi
state: icon
layers:
- state: icon
map: ["random"]
- type: Appearance
- type: RandomSprite
available:
- random:
icon: ""
icon2: ""
icon3: ""
icon4: ""
- type: entity
id: CP14Cloth1
parent: BaseItem

View File

@@ -130,6 +130,9 @@
tree04: ""
tree05: ""
tree06: ""
- type: Tag
tags:
- CP14AmbientForest
- type: entity
parent: CP14BaseTree
@@ -209,6 +212,9 @@
treelarge04: ""
treelarge05: ""
treelarge06: ""
- type: Tag
tags:
- CP14AmbientForest
- type: entity
id: CP14BaseLucensTree

View File

@@ -0,0 +1,128 @@
- type: entity
id: CP14SpiderWeb
name: spider web
parent: CP14BaseFlammableSpreadingStrong
description: It's stringy and sticky.
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: MeleeSound
soundGroups:
Brute:
path:
"/Audio/Weapons/slash.ogg"
- type: Sprite
drawdepth: FloorTiles
sprite: _CP14/Structures/Dungeon/floor_web.rsi
color: "#ffffffdd"
- type: Icon
sprite: _CP14/Structures/Dungeon/floor_web.rsi
state: full
- type: IconSmooth
key: full
additionalKeys:
- CP14wall
base: carpet_
- type: Clickable
- type: Transform
anchored: true
- type: Physics
- type: Fixtures
fixtures:
fix1:
hard: false
density: 7
shape:
!type:PhysShapeAabb
bounds: "-0.5,-0.5,0.5,0.5"
layer:
- MidImpassable
- type: Damageable
damageModifierSet: Wood
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 25
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:SpawnEntitiesBehavior
spawn:
CP14Web:
min: 0
max: 1
- type: SpiderWebObject
- type: SpeedModifierContacts
walkSpeedModifier: 0.5
sprintSpeedModifier: 0.5
ignoreWhitelist:
components:
- IgnoreSpiderWeb
- type: entity
id: CP14WebCocoon
parent:
- BaseStructure
- CP14BaseFlammableSpreadingStrong
categories: [ ForkFiltered ]
name: cocoon
components:
- type: Transform
anchored: True
- type: Clickable
- type: Physics
bodyType: Static
- type: Climbable
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeCircle
radius: 0.4
density: 500
layer:
- HalfWallLayer
- Opaque
- type: Sprite
drawdepth: Mobs
snapCardinals: true
sprite: _CP14/Structures/dungeon/web_cocoon.rsi
layers:
- state: full
map: ["random"]
- type: RandomSprite
available:
- random:
full: ""
full2: ""
full3: ""
full4: ""
- type: Damageable
damageModifierSet: Wood
- type: GlassTable
climberDamage:
types:
Blunt: 1
tableDamage:
types:
Blunt: 65
tableMassLimit: 60
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 30
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/gib1.ogg
- !type:SpawnEntitiesBehavior
spawn:
CP14Web:
min: 4
max: 5

View File

@@ -228,3 +228,31 @@
minGroupSize: 2
maxGroupSize: 3
- type: cp14DemiplaneModifier
id: MobSpiders
levels:
min: 1
max: 10
name: cp14-modifier-spiders
categories:
Danger: 0.3
blacklistTags:
- CP14DemiplaneHot
layers:
- !type:CP14OreDunGen
entity: CP14MobSpiderBlackHunter
count: 8
minGroupSize: 2
maxGroupSize: 3
- !type:CP14OreDunGen
entity: CP14WebCocoon
count: 10
minGroupSize: 1
maxGroupSize: 3
- !type:CP14OreDunGen
entity: CP14SpiderWeb
count: 10
minGroupSize: 5
maxGroupSize: 15

View File

@@ -28,6 +28,16 @@
count: 2
result: CP14Cloth1
- type: CP14Recipe
id: CP14StringFromWeb
tag: CP14RecipeSewing
craftTime: 1
requirements:
- !type:ProtoIdResource
protoId: CP14Web
count: 2
result: CP14String
- type: CP14Recipe
id: CP14StringCottonCloth
tag: CP14RecipeSewing

View File

@@ -31,6 +31,22 @@
collection: CP14LoopCave
rules: CaveFloor
- type: ambientLoop
id: NightGrass
sound:
params:
volume: 2
collection: CP14LoopNightGrass
rules: GrassNight
- type: ambientLoop
id: ForestDay
sound:
params:
volume: 2
collection: CP14LoopForestDay
rules: DayForest
# Sound collections
- type: soundCollection
id: CP14LoopWinds
@@ -47,6 +63,16 @@
files:
- /Audio/_CP14/Ambience/Loops/cave.ogg
- type: soundCollection
id: CP14LoopNightGrass
files:
- /Audio/_CP14/Ambience/Loops/ambiforest_night.ogg
- type: soundCollection
id: CP14LoopForestDay
files:
- /Audio/_CP14/Ambience/Loops/ambiforest_day.ogg
# Rules
- type: rules
id: OpenWinds
@@ -62,6 +88,30 @@
- CP14FloorSand
range: 5
- type: rules
id: GrassNight
rules:
- !type:CP14IsNight
- !type:NearbyTilesPercentRule
ignoreAnchored: true
percent: 0.5
tiles:
- CP14FloorGrass
- CP14FloorGrassLight
- CP14FloorGrassTall
range: 5
- type: rules
id: DayForest
rules:
- !type:CP14IsNight
inverted: true
- !type:NearbyEntitiesRule
count: 3
whitelist:
tags:
- CP14AmbientForest
- type: rules
id: CaveFloor
rules:

View File

@@ -18,7 +18,7 @@
params:
volume: -6
collection: CP14NightForest
rules: NightForest
rules: GrassNight
priority: 2
## Fallback if nothing else found
@@ -86,22 +86,3 @@
- CP14MagicRitual
- CP14DemiplanPassway
range: 6
- type: rules
id: NightForest
rules:
- !type:CP14TimePeriod
#periods:
#- Night
#- Evening
- !type:NearbyTilesPercentRule
ignoreAnchored: true
percent: 0.5
tiles:
- CP14FloorGrass
- CP14FloorGrassLight
- CP14FloorGrassTall
- CP14FloorDirt
- CP14FloorSand
range: 5

View File

@@ -28,6 +28,9 @@
- type: Tag
id: CP14AmbientWater
- type: Tag
id: CP14AmbientForest
- type: Tag
id: CP14AmbientLurker

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 236 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

View File

@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "icon"
},
{
"name": "icon2"
},
{
"name": "icon3"
},
{
"name": "icon4"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 987 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 752 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 653 B

View File

@@ -0,0 +1,46 @@
{
"version": 1,
"license": "CC-BY-SA-3.0",
"copyright": "Made by TheShuEd (github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "full"
},
{
"name": "carpet_0",
"directions": 4
},
{
"name": "carpet_1",
"directions": 4
},
{
"name": "carpet_2",
"directions": 4
},
{
"name": "carpet_3",
"directions": 4
},
{
"name": "carpet_4",
"directions": 4
},
{
"name": "carpet_5",
"directions": 4
},
{
"name": "carpet_6",
"directions": 4
},
{
"name": "carpet_7",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 596 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 603 B

View File

@@ -0,0 +1,23 @@
{
"version": 1,
"license": "CC-BY-SA-4.0",
"copyright": "Created by TheShuEd (Github)",
"size": {
"x": 32,
"y": 32
},
"states": [
{
"name": "full"
},
{
"name": "full2"
},
{
"name": "full3"
},
{
"name": "full4"
}
]
}