diff --git a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs index 91ba2d6f28..dc18cbd09a 100644 --- a/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/WelderComponent.cs @@ -1,4 +1,4 @@ -using System; +using System; using Content.Server.GameObjects.Components.Chemistry; using Content.Server.GameObjects.EntitySystems; using Content.Server.Interfaces; @@ -126,10 +126,13 @@ namespace Content.Server.GameObjects.Components.Interactable /// private bool ToggleWelderStatus(IEntity user = null) { + var item = Owner.GetComponent(); + if (WelderLit) { WelderLit = false; // Layer 1 is the flame. + item.EquippedPrefix = "off"; _spriteComponent.LayerSetVisible(1, false); PlaySoundCollection("WelderOff", -5); _welderSystem.Unsubscribe(this); @@ -143,6 +146,7 @@ namespace Content.Server.GameObjects.Components.Interactable } WelderLit = true; + item.EquippedPrefix = "on"; _spriteComponent.LayerSetVisible(1, true); PlaySoundCollection("WelderOn", -5); _welderSystem.Subscribe(this); diff --git a/Resources/Prototypes/Entities/Items/tools.yml b/Resources/Prototypes/Entities/Items/tools.yml index 0541cee087..342ddf0dd0 100644 --- a/Resources/Prototypes/Entities/Items/tools.yml +++ b/Resources/Prototypes/Entities/Items/tools.yml @@ -82,6 +82,10 @@ - type: Icon sprite: Objects/Tools/welder.rsi state: welder + - type: Item + Size: 10 + sprite: Objects/Tools/welder.rsi + HeldPrefix: off - type: ItemCooldown - type: MeleeWeapon - type: ItemStatus @@ -92,6 +96,7 @@ reagents: - ReagentId: chem.WeldingFuel Quantity: 100 + - type: Welder useSoundCollection: Welder @@ -102,9 +107,13 @@ description: A common tool for assembly and disassembly, righty tighty lefty loosey components: - type: Sprite - texture: Objects/Tools/wrench.png + sprite: Objects/Tools/wrench.rsi + state: icon - type: Icon - texture: Objects/Tools/wrench.png + sprite: Objects/Tools/wrench.rsi + state: icon + - type: Item + sprite: Objects/Tools/wrench.rsi - type: ItemCooldown - type: MeleeWeapon - type: Tool @@ -119,9 +128,35 @@ description: A multipurpose tool to pry open doors and fight interdimensional invaders components: - type: Sprite - texture: Objects/Tools/crowbar.png + sprite: Objects/Tools/crowbar.rsi + state: icon - type: Icon - texture: Objects/Tools/crowbar.png + sprite: Objects/Tools/crowbar.rsi + state: icon + - type: Item + sprite: Objects/Tools/crowbar.rsi + - type: ItemCooldown + - type: MeleeWeapon + - type: Tool + qualities: + - Prying + useSound: /Audio/items/crowbar.ogg + - type: TilePrying + +- type: entity + name: Emergency Crowbar + parent: BaseItem + id: CrowbarRed + description: A multipurpose tool to pry open doors and fight interdimensional invaders + components: + - type: Sprite + sprite: Objects/Tools/crowbar_red.rsi + state: icon + - type: Icon + sprite: Objects/Tools/crowbar_red.rsi + state: icon + - type: Item + sprite: Objects/Tools/crowbar_red.rsi - type: ItemCooldown - type: MeleeWeapon - type: Tool diff --git a/Resources/Textures/Objects/Tools/crowbar.rsi/icon.png b/Resources/Textures/Objects/Tools/crowbar.rsi/icon.png new file mode 100644 index 0000000000..a8c6cb3f8d Binary files /dev/null and b/Resources/Textures/Objects/Tools/crowbar.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-left.png b/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-left.png new file mode 100644 index 0000000000..b54166f10c Binary files /dev/null and b/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-right.png b/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-right.png new file mode 100644 index 0000000000..70a2be67c1 Binary files /dev/null and b/Resources/Textures/Objects/Tools/crowbar.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/crowbar.rsi/meta.json b/Resources/Textures/Objects/Tools/crowbar.rsi/meta.json new file mode 100644 index 0000000000..6b1b30d612 --- /dev/null +++ b/Resources/Textures/Objects/Tools/crowbar.rsi/meta.json @@ -0,0 +1,54 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/crowbar.png b/Resources/Textures/Objects/Tools/crowbar_red.rsi/icon.png similarity index 100% rename from Resources/Textures/Objects/Tools/crowbar.png rename to Resources/Textures/Objects/Tools/crowbar_red.rsi/icon.png diff --git a/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-left.png b/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-left.png new file mode 100644 index 0000000000..79cada41ce Binary files /dev/null and b/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-right.png b/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-right.png new file mode 100644 index 0000000000..328dfe02b3 Binary files /dev/null and b/Resources/Textures/Objects/Tools/crowbar_red.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/crowbar_red.rsi/meta.json b/Resources/Textures/Objects/Tools/crowbar_red.rsi/meta.json new file mode 100644 index 0000000000..6b1b30d612 --- /dev/null +++ b/Resources/Textures/Objects/Tools/crowbar_red.rsi/meta.json @@ -0,0 +1,54 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/drill.rsi/meta.json b/Resources/Textures/Objects/Tools/drill.rsi/meta.json index 02956e15aa..8ad8570034 100644 --- a/Resources/Textures/Objects/Tools/drill.rsi/meta.json +++ b/Resources/Textures/Objects/Tools/drill.rsi/meta.json @@ -1 +1,65 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC BY-SA 3.0", "copyright": "Taken from https://github.com/tgstation/tgstation at commit ea59fb4b810decbb5996b36d8876614b57c3d189", "states": [{"name": "drill_bolt", "directions": 1, "delays": [[1.0]]}, {"name": "drill_screw", "directions": 1, "delays": [[1.0]]}, {"name": "inhand-left", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "inhand-right", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}]} \ No newline at end of file +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC BY-SA 3.0", + "copyright": "Taken from https://github.com/tgstation/tgstation at commit ea59fb4b810decbb5996b36d8876614b57c3d189", + "states": [ + { + "name": "drill_bolt", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "drill_screw", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/multitool.rsi/meta.json b/Resources/Textures/Objects/Tools/multitool.rsi/meta.json index cc203b4248..17ee736389 100644 --- a/Resources/Textures/Objects/Tools/multitool.rsi/meta.json +++ b/Resources/Textures/Objects/Tools/multitool.rsi/meta.json @@ -1 +1,54 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "inhand-left", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "inhand-right", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "multitool", "directions": 1, "delays": [[1.0]]}]} \ No newline at end of file +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "multitool", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/welder.rsi/meta.json b/Resources/Textures/Objects/Tools/welder.rsi/meta.json index bf6c257c06..a000fa54c8 100644 --- a/Resources/Textures/Objects/Tools/welder.rsi/meta.json +++ b/Resources/Textures/Objects/Tools/welder.rsi/meta.json @@ -27,6 +27,86 @@ 0.1 ] ] + }, + { + "name": "on-inhand-left", + "directions": 4, + "delays": [ + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "on-inhand-right", + "directions": 4, + "delays": [ + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "off-inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "off-inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] } ] } diff --git a/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-left.png b/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-left.png new file mode 100644 index 0000000000..3b949b63b3 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-right.png b/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-right.png new file mode 100644 index 0000000000..9aa9548cce Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder.rsi/off-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-left.png b/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-left.png new file mode 100644 index 0000000000..4f3d279d5a Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-right.png b/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-right.png new file mode 100644 index 0000000000..a03c058690 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder.rsi/on-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/wrench.png b/Resources/Textures/Objects/Tools/wrench.rsi/icon.png similarity index 100% rename from Resources/Textures/Objects/Tools/wrench.png rename to Resources/Textures/Objects/Tools/wrench.rsi/icon.png diff --git a/Resources/Textures/Objects/Tools/wrench.rsi/inhand-left.png b/Resources/Textures/Objects/Tools/wrench.rsi/inhand-left.png new file mode 100644 index 0000000000..9c2d9ad6d8 Binary files /dev/null and b/Resources/Textures/Objects/Tools/wrench.rsi/inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/wrench.rsi/inhand-right.png b/Resources/Textures/Objects/Tools/wrench.rsi/inhand-right.png new file mode 100644 index 0000000000..3011d88618 Binary files /dev/null and b/Resources/Textures/Objects/Tools/wrench.rsi/inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/wrench.rsi/meta.json b/Resources/Textures/Objects/Tools/wrench.rsi/meta.json new file mode 100644 index 0000000000..6b1b30d612 --- /dev/null +++ b/Resources/Textures/Objects/Tools/wrench.rsi/meta.json @@ -0,0 +1,54 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +}