Spider web visuals update (#38175)
* web update * Update Resources/Prototypes/Entities/Structures/spider_web.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * Update Resources/Prototypes/Entities/Structures/spider_web.yml Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> * review --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
@@ -1,31 +1,20 @@
|
|||||||
using Content.Shared.Actions;
|
using Content.Shared.Actions;
|
||||||
using Robust.Shared.Network;
|
|
||||||
using Robust.Shared.Random;
|
|
||||||
|
|
||||||
namespace Content.Shared.Spider;
|
namespace Content.Shared.Spider;
|
||||||
|
|
||||||
public abstract class SharedSpiderSystem : EntitySystem
|
public abstract class SharedSpiderSystem : EntitySystem
|
||||||
{
|
{
|
||||||
[Dependency] private readonly SharedActionsSystem _action = default!;
|
[Dependency] private readonly SharedActionsSystem _action = default!;
|
||||||
[Dependency] private readonly IRobustRandom _robustRandom = default!;
|
|
||||||
[Dependency] private readonly SharedAppearanceSystem _appearance = default!;
|
|
||||||
|
|
||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
SubscribeLocalEvent<SpiderComponent, MapInitEvent>(OnInit);
|
SubscribeLocalEvent<SpiderComponent, MapInitEvent>(OnInit);
|
||||||
SubscribeLocalEvent<SpiderWebObjectComponent, ComponentStartup>(OnWebStartup);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInit(EntityUid uid, SpiderComponent component, MapInitEvent args)
|
private void OnInit(EntityUid uid, SpiderComponent component, MapInitEvent args)
|
||||||
{
|
{
|
||||||
_action.AddAction(uid, ref component.Action, component.WebAction, uid);
|
_action.AddAction(uid, ref component.Action, component.WebAction, uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnWebStartup(EntityUid uid, SpiderWebObjectComponent component, ComponentStartup args)
|
|
||||||
{
|
|
||||||
// TODO dont use this. use some general random appearance system
|
|
||||||
_appearance.SetData(uid, SpiderWebVisuals.Variant, _robustRandom.Next(1, 3));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
using Robust.Shared.Serialization;
|
|
||||||
|
|
||||||
namespace Content.Shared.Spider;
|
|
||||||
|
|
||||||
[Serializable, NetSerializable]
|
|
||||||
public enum SpiderWebVisuals
|
|
||||||
{
|
|
||||||
Variant
|
|
||||||
}
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
- type: entity
|
|
||||||
id: SpiderWeb
|
|
||||||
name: spider web
|
|
||||||
description: It's stringy and sticky.
|
|
||||||
placement:
|
|
||||||
mode: SnapgridCenter
|
|
||||||
snap:
|
|
||||||
- Wall
|
|
||||||
components:
|
|
||||||
- type: MeleeSound
|
|
||||||
soundGroups:
|
|
||||||
Brute:
|
|
||||||
path:
|
|
||||||
"/Audio/Weapons/slash.ogg"
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Objects/Misc/spiderweb.rsi
|
|
||||||
layers:
|
|
||||||
- state: spider_web_1
|
|
||||||
map: ["spiderWebLayer"]
|
|
||||||
drawdepth: WallMountedItems
|
|
||||||
- type: Appearance
|
|
||||||
- type: GenericVisualizer
|
|
||||||
visuals:
|
|
||||||
enum.SpiderWebVisuals.Variant:
|
|
||||||
spiderWebLayer:
|
|
||||||
1: {state: spider_web_1}
|
|
||||||
2: {state: spider_web_2}
|
|
||||||
- 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: # Excess damage, don't spawn entities
|
|
||||||
!type:DamageTrigger
|
|
||||||
damage: 50
|
|
||||||
behaviors:
|
|
||||||
- !type:DoActsBehavior
|
|
||||||
acts: ["Destruction"]
|
|
||||||
- trigger:
|
|
||||||
!type:DamageTrigger
|
|
||||||
damage: 10
|
|
||||||
behaviors:
|
|
||||||
- !type:DoActsBehavior
|
|
||||||
acts: [ "Destruction" ]
|
|
||||||
- !type:SpawnEntitiesBehavior
|
|
||||||
spawn:
|
|
||||||
MaterialWebSilk:
|
|
||||||
min: 0
|
|
||||||
max: 1
|
|
||||||
- type: Temperature
|
|
||||||
heatDamage:
|
|
||||||
types:
|
|
||||||
Heat: 5
|
|
||||||
coldDamage: {}
|
|
||||||
coldDamageThreshold: 0
|
|
||||||
- type: Flammable
|
|
||||||
fireSpread: true
|
|
||||||
damage:
|
|
||||||
types:
|
|
||||||
Heat: 5
|
|
||||||
- type: Reactive
|
|
||||||
groups:
|
|
||||||
Flammable: [Touch]
|
|
||||||
Extinguish: [Touch]
|
|
||||||
- type: SpiderWebObject
|
|
||||||
- type: SpeedModifierContacts
|
|
||||||
walkSpeedModifier: 0.5
|
|
||||||
sprintSpeedModifier: 0.5
|
|
||||||
ignoreWhitelist:
|
|
||||||
components:
|
|
||||||
- IgnoreSpiderWeb
|
|
||||||
|
|
||||||
- type: entity
|
|
||||||
id: SpiderWebClown
|
|
||||||
name: clown spider web
|
|
||||||
description: It's stringy and slippy.
|
|
||||||
placement:
|
|
||||||
mode: SnapgridCenter
|
|
||||||
snap:
|
|
||||||
- Wall
|
|
||||||
components:
|
|
||||||
- type: MeleeSound
|
|
||||||
soundGroups:
|
|
||||||
Brute:
|
|
||||||
path:
|
|
||||||
"/Audio/Weapons/slash.ogg"
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Objects/Misc/spiderweb.rsi
|
|
||||||
layers:
|
|
||||||
- state: spider_web_clown_1
|
|
||||||
map: ["spiderWebLayer"]
|
|
||||||
drawdepth: WallMountedItems
|
|
||||||
- type: Appearance
|
|
||||||
- type: GenericVisualizer
|
|
||||||
visuals:
|
|
||||||
enum.SpiderWebVisuals.Variant:
|
|
||||||
spiderWebLayer:
|
|
||||||
1: {state: spider_web_clown_1}
|
|
||||||
2: {state: spider_web_clown_2}
|
|
||||||
- type: Clickable
|
|
||||||
- type: Transform
|
|
||||||
anchored: true
|
|
||||||
- type: Slippery
|
|
||||||
- type: StepTrigger
|
|
||||||
intersectRatio: 0.2
|
|
||||||
- type: Physics
|
|
||||||
- type: Fixtures
|
|
||||||
fixtures:
|
|
||||||
slips:
|
|
||||||
shape:
|
|
||||||
!type:PhysShapeAabb
|
|
||||||
bounds: "-0.4,-0.3,0.4,0.3"
|
|
||||||
hard: false
|
|
||||||
layer:
|
|
||||||
- SlipLayer
|
|
||||||
fix1:
|
|
||||||
shape:
|
|
||||||
!type:PhysShapeAabb
|
|
||||||
bounds: "-0.4,-0.3,0.4,0.3"
|
|
||||||
density: 1000
|
|
||||||
mask:
|
|
||||||
- ItemMask
|
|
||||||
- type: Damageable
|
|
||||||
damageModifierSet: Wood
|
|
||||||
- type: Destructible
|
|
||||||
thresholds:
|
|
||||||
- trigger:
|
|
||||||
!type:DamageTrigger
|
|
||||||
damage: 10
|
|
||||||
behaviors:
|
|
||||||
- !type:DoActsBehavior
|
|
||||||
acts: [ "Destruction" ]
|
|
||||||
- type: Temperature
|
|
||||||
heatDamage:
|
|
||||||
types:
|
|
||||||
Heat: 5
|
|
||||||
coldDamage: {}
|
|
||||||
coldDamageThreshold: 0
|
|
||||||
- type: Flammable
|
|
||||||
fireSpread: true
|
|
||||||
damage:
|
|
||||||
types:
|
|
||||||
Heat: 5
|
|
||||||
- type: Reactive
|
|
||||||
groups:
|
|
||||||
Flammable: [Touch]
|
|
||||||
Extinguish: [Touch]
|
|
||||||
- type: SpiderWebObject
|
|
||||||
- type: FlavorProfile
|
|
||||||
flavors:
|
|
||||||
- sweet
|
|
||||||
- type: Food
|
|
||||||
delay: 2
|
|
||||||
- type: SolutionContainerManager
|
|
||||||
solutions:
|
|
||||||
food:
|
|
||||||
reagents:
|
|
||||||
- ReagentId: Sugar
|
|
||||||
Quantity: 2
|
|
||||||
137
Resources/Prototypes/Entities/Structures/spider_web.yml
Normal file
@@ -0,0 +1,137 @@
|
|||||||
|
- type: entity
|
||||||
|
id: SpiderWebBase
|
||||||
|
abstract: true
|
||||||
|
placement:
|
||||||
|
mode: SnapgridCenter
|
||||||
|
snap:
|
||||||
|
- Wall
|
||||||
|
components:
|
||||||
|
- type: PlacementReplacement
|
||||||
|
key: web
|
||||||
|
- type: MeleeSound
|
||||||
|
soundGroups:
|
||||||
|
Brute:
|
||||||
|
path:
|
||||||
|
"/Audio/Weapons/slash.ogg"
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Structures/floor_web.rsi
|
||||||
|
drawdepth: WallMountedItems
|
||||||
|
- type: Appearance
|
||||||
|
- type: Clickable
|
||||||
|
- type: Transform
|
||||||
|
anchored: true
|
||||||
|
- type: Physics
|
||||||
|
- type: Damageable
|
||||||
|
damageModifierSet: Wood
|
||||||
|
- type: Temperature
|
||||||
|
heatDamage:
|
||||||
|
types:
|
||||||
|
Heat: 5
|
||||||
|
coldDamage: {}
|
||||||
|
coldDamageThreshold: 0
|
||||||
|
- type: Flammable
|
||||||
|
fireSpread: true
|
||||||
|
damage:
|
||||||
|
types:
|
||||||
|
Heat: 5
|
||||||
|
- type: Reactive
|
||||||
|
groups:
|
||||||
|
Flammable: [Touch]
|
||||||
|
Extinguish: [Touch]
|
||||||
|
- type: SpiderWebObject
|
||||||
|
- type: IconSmooth
|
||||||
|
key: web
|
||||||
|
additionalKeys:
|
||||||
|
- walls
|
||||||
|
base: web_
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: SpiderWeb
|
||||||
|
parent: SpiderWebBase
|
||||||
|
name: spider web
|
||||||
|
description: It's stringy and sticky.
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
color: "#ffffffdd"
|
||||||
|
- type: Fixtures
|
||||||
|
fixtures:
|
||||||
|
fix1:
|
||||||
|
hard: false
|
||||||
|
density: 7
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.5,-0.5,0.5,0.5"
|
||||||
|
layer:
|
||||||
|
- MidImpassable
|
||||||
|
- type: Destructible
|
||||||
|
thresholds:
|
||||||
|
- trigger: # Excess damage, don't spawn entities
|
||||||
|
!type:DamageTrigger
|
||||||
|
damage: 50
|
||||||
|
behaviors:
|
||||||
|
- !type:DoActsBehavior
|
||||||
|
acts: ["Destruction"]
|
||||||
|
- trigger:
|
||||||
|
!type:DamageTrigger
|
||||||
|
damage: 10
|
||||||
|
behaviors:
|
||||||
|
- !type:DoActsBehavior
|
||||||
|
acts: [ "Destruction" ]
|
||||||
|
- !type:SpawnEntitiesBehavior
|
||||||
|
spawn:
|
||||||
|
MaterialWebSilk:
|
||||||
|
min: 0
|
||||||
|
max: 1
|
||||||
|
- type: SpeedModifierContacts
|
||||||
|
walkSpeedModifier: 0.5
|
||||||
|
sprintSpeedModifier: 0.5
|
||||||
|
ignoreWhitelist:
|
||||||
|
components:
|
||||||
|
- IgnoreSpiderWeb
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: SpiderWebClown
|
||||||
|
parent: SpiderWebBase
|
||||||
|
name: clown spider web
|
||||||
|
description: It's stringy and slippy.
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
color: "#ffa3fc"
|
||||||
|
- type: Slippery
|
||||||
|
- type: StepTrigger
|
||||||
|
intersectRatio: 0.2
|
||||||
|
- type: Fixtures
|
||||||
|
fixtures:
|
||||||
|
slips:
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.4,-0.4,0.4,0.4"
|
||||||
|
hard: false
|
||||||
|
layer:
|
||||||
|
- SlipLayer
|
||||||
|
fix1:
|
||||||
|
shape:
|
||||||
|
!type:PhysShapeAabb
|
||||||
|
bounds: "-0.4,-0.4,0.4,0.4"
|
||||||
|
density: 1000
|
||||||
|
mask:
|
||||||
|
- ItemMask
|
||||||
|
- type: Destructible
|
||||||
|
thresholds:
|
||||||
|
- trigger:
|
||||||
|
!type:DamageTrigger
|
||||||
|
damage: 10
|
||||||
|
behaviors:
|
||||||
|
- !type:DoActsBehavior
|
||||||
|
acts: [ "Destruction" ]
|
||||||
|
- type: FlavorProfile
|
||||||
|
flavors:
|
||||||
|
- sweet
|
||||||
|
- type: Food
|
||||||
|
delay: 2
|
||||||
|
- type: SolutionContainerManager
|
||||||
|
solutions:
|
||||||
|
food:
|
||||||
|
reagents:
|
||||||
|
- ReagentId: Sugar
|
||||||
|
Quantity: 2
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
{
|
|
||||||
"version": 1,
|
|
||||||
"license": "CC-BY-SA-3.0",
|
|
||||||
"copyright": "Taken from https://github.com/tgstation/tgstation/commit/788b2576cd9511ced86e74222b6395fd3ef9affe",
|
|
||||||
"size": {
|
|
||||||
"x": 32,
|
|
||||||
"y": 32
|
|
||||||
},
|
|
||||||
"states": [
|
|
||||||
{
|
|
||||||
"name": "spider_web_1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spider_web_clown_1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spider_web_clown_2"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "spider_web_2"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.2 KiB |
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 15 KiB |
BIN
Resources/Textures/Structures/floor_web.rsi/full.png
Normal file
|
After Width: | Height: | Size: 653 B |
46
Resources/Textures/Structures/floor_web.rsi/meta.json
Normal 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": "web_0",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_1",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_2",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_3",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_4",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_5",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_6",
|
||||||
|
"directions": 4
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "web_7",
|
||||||
|
"directions": 4
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
Resources/Textures/Structures/floor_web.rsi/web_0.png
Normal file
|
After Width: | Height: | Size: 752 B |
BIN
Resources/Textures/Structures/floor_web.rsi/web_1.png
Normal file
|
After Width: | Height: | Size: 987 B |
BIN
Resources/Textures/Structures/floor_web.rsi/web_2.png
Normal file
|
After Width: | Height: | Size: 752 B |
BIN
Resources/Textures/Structures/floor_web.rsi/web_3.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/Structures/floor_web.rsi/web_4.png
Normal file
|
After Width: | Height: | Size: 800 B |
BIN
Resources/Textures/Structures/floor_web.rsi/web_5.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/Structures/floor_web.rsi/web_6.png
Normal file
|
After Width: | Height: | Size: 813 B |
BIN
Resources/Textures/Structures/floor_web.rsi/web_7.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |