diff --git a/Content.Server/Damage/Systems/DamageOnToolInteractSystem.cs b/Content.Server/Damage/Systems/DamageOnToolInteractSystem.cs index c72a260123..002404c6ba 100644 --- a/Content.Server/Damage/Systems/DamageOnToolInteractSystem.cs +++ b/Content.Server/Damage/Systems/DamageOnToolInteractSystem.cs @@ -29,7 +29,8 @@ namespace Content.Server.Damage.Systems if (component.WeldingDamage is {} weldingDamage && EntityManager.TryGetComponent(args.Used, out var welder) - && welder.Lit) + && welder.Lit + && !welder.TankSafe) { var dmg = _damageableSystem.TryChangeDamage(args.Target, weldingDamage); diff --git a/Content.Server/Tools/Components/WelderComponent.cs b/Content.Server/Tools/Components/WelderComponent.cs index 048ee3816d..1eaf4bf6c3 100644 --- a/Content.Server/Tools/Components/WelderComponent.cs +++ b/Content.Server/Tools/Components/WelderComponent.cs @@ -60,5 +60,12 @@ namespace Content.Server.Tools.Components /// [DataField("litMeleeDamageBonus")] public DamageSpecifier LitMeleeDamageBonus = new(); + + /// + /// Whether the item is safe to refill while lit without exploding the tank. + /// + [DataField("tankSafe")] + public bool TankSafe = false; //I have no idea what I'm doing + } } diff --git a/Resources/Audio/Items/lighter3.ogg b/Resources/Audio/Items/lighter3.ogg new file mode 100644 index 0000000000..839cb81211 Binary files /dev/null and b/Resources/Audio/Items/lighter3.ogg differ diff --git a/Resources/Audio/Items/lighter_off.ogg b/Resources/Audio/Items/lighter_off.ogg new file mode 100644 index 0000000000..6b0138ab40 Binary files /dev/null and b/Resources/Audio/Items/lighter_off.ogg differ diff --git a/Resources/Locale/en-US/tools/components/welder-component.ftl b/Resources/Locale/en-US/tools/components/welder-component.ftl index d27cae5318..dc18272bd3 100644 --- a/Resources/Locale/en-US/tools/components/welder-component.ftl +++ b/Resources/Locale/en-US/tools/components/welder-component.ftl @@ -9,4 +9,4 @@ welder-component-suicide-lit-others-message = {$victim} welds their every orific welder-component-suicide-lit-message = You weld your every orifice closed! welder-component-suicide-unlit-others-message = {$victim} bashes themselves with the unlit welding torch! welder-component-suicide-unlit-message = You bash yourself with the unlit welding torch! -welder-component-after-interact-refueled-message = Welder refueled +welder-component-after-interact-refueled-message = Refueled! diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/cigs.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/cigs.yml index 60612d08a1..3c19d7d2b7 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/cigs.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/cigs.yml @@ -11,3 +11,5 @@ CigarCase: 1 Matchbox: 5 PackPaperRollingFilters: 3 + CheapLighter: 4 + Lighter: 1 diff --git a/Resources/Prototypes/Entities/Objects/Tools/lighters.yml b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml new file mode 100644 index 0000000000..98a6412611 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Tools/lighters.yml @@ -0,0 +1,95 @@ +- type: entity + name: basic lighter + parent: BaseItem + id: Lighter + description: "A simple plastic cigarette lighter." + components: + - type: RandomSpriteState #this has to be before sprite component for the flame to toggle right because weldercomponent behaves weird (and i dont trust myself to fix it right) + spriteStates: + - basic_icon_base-1 + - basic_icon_base-2 + - basic_icon_base-3 + - basic_icon_base-4 + - basic_icon_base-5 + - basic_icon_base-6 + - basic_icon_base-7 + - basic_icon_base-8 + - basic_icon_base-9 + - basic_icon_base-10 + - basic_icon_base-11 + - type: Sprite + sprite: Objects/Tools/lighters.rsi + layers: + - state: icon_map + - state: lighter_flame + shader: unshaded + visible: false + - state: basic_icon_top + - type: Item + size: 3 + sprite: Objects/Tools/lighters.rsi + HeldPrefix: off + - type: ItemCooldown + - type: ItemStatus + - type: RefillableSolution + solution: Welder + - type: SolutionContainerManager + solutions: + Welder: + reagents: + - ReagentId: WeldingFuel + Quantity: 8 + maxVol: 8 #uses less fuel than a welder, so this isnt as bad as it looks + - type: MeleeWeapon + damage: + types: + Blunt: 0 #this feels hacky, but is needed for burn damage while active (i think) + - type: Welder + fuelConsumption: 0.01 + litMeleeDamageBonus: + types: + Heat: 1 + tankSafe: true + welderOnSounds: + collection: lighterOnSounds + welderOffSounds: + collection: lighterOffSounds + - type: PointLight + enabled: false + radius: 1.1 #smallest possible + color: orange + + +- type: entity + name: cheap lighter + parent: Lighter + id: CheapLighter + description: "A dangerously inexpensive plastic lighter, don't burn your thumb!" + components: + - type: RandomSpriteColor + state: cheap_icon_base + colors: + blue: "#1861d5" + red: "#951710" + pink: "#d5188d" + brown: "#a05212" + green: "#0e7f1b" + cyan: "#18a2d5" + yellow: "#d58c18" #all colours proudly stolen from wirecutters + - type: Sprite + sprite: Objects/Tools/lighters.rsi + layers: + - state: icon_map + - state: lighter_flame + shader: unshaded + visible: false + - state: cheap_icon_top + - type: SolutionContainerManager + solutions: + Welder: + reagents: + - ReagentId: WeldingFuel + Quantity: 4 + maxVol: 4 #uses less fuel than a welder, so this isnt as bad as it looks + + #TODO: zippos diff --git a/Resources/Prototypes/SoundCollections/lighter_sounds.yml b/Resources/Prototypes/SoundCollections/lighter_sounds.yml new file mode 100644 index 0000000000..06fbbb2929 --- /dev/null +++ b/Resources/Prototypes/SoundCollections/lighter_sounds.yml @@ -0,0 +1,11 @@ +- type: soundCollection + id: lighterOnSounds + files: + - /Audio/Items/lighter1.ogg + - /Audio/Items/lighter2.ogg + - /Audio/Items/lighter3.ogg + +- type: soundCollection + id: lighterOffSounds + files: + - /Audio/Items/lighter_off.ogg diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-1.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-1.png new file mode 100644 index 0000000000..b1c045bda5 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-1.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-10.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-10.png new file mode 100644 index 0000000000..8a08880db5 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-10.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-11.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-11.png new file mode 100644 index 0000000000..7abbd81bf5 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-11.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-2.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-2.png new file mode 100644 index 0000000000..279b94fb23 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-2.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-3.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-3.png new file mode 100644 index 0000000000..aca6aa1e82 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-3.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-4.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-4.png new file mode 100644 index 0000000000..1e7158797d Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-4.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-5.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-5.png new file mode 100644 index 0000000000..b66d51903e Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-5.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-6.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-6.png new file mode 100644 index 0000000000..636eb213de Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-6.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-7.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-7.png new file mode 100644 index 0000000000..26a62c38c4 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-7.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-8.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-8.png new file mode 100644 index 0000000000..da79468908 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-8.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-9.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-9.png new file mode 100644 index 0000000000..79c7d0d6de Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_base-9.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_top.png b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_top.png new file mode 100644 index 0000000000..db7bd8d5c2 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/basic_icon_top.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_base.png b/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_base.png new file mode 100644 index 0000000000..86c9026a8e Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_base.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_top.png b/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_top.png new file mode 100644 index 0000000000..e2a911f953 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/cheap_icon_top.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/icon_map.png b/Resources/Textures/Objects/Tools/lighters.rsi/icon_map.png new file mode 100644 index 0000000000..06ff24d0a1 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/icon_map.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/lighter_flame.png b/Resources/Textures/Objects/Tools/lighters.rsi/lighter_flame.png new file mode 100644 index 0000000000..ed6e9ffd86 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/lighter_flame.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/meta.json b/Resources/Textures/Objects/Tools/lighters.rsi/meta.json new file mode 100644 index 0000000000..e1c6d6e749 --- /dev/null +++ b/Resources/Textures/Objects/Tools/lighters.rsi/meta.json @@ -0,0 +1,91 @@ +{ + "version": 1, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at https://github.com/tgstation/tgstation/commit/a28b24f149702527f3eb22f5c686f06c836f2f99; sprite has been edited", + "size": { + "x": 32, + "y": 32 + }, + "states": [ + { + "name": "icon_map" + }, + { + "name": "cheap_icon_base" + }, + { + "name": "lighter_flame", + "delays": [ + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "basic_icon_base-1" + }, + { + "name": "basic_icon_base-2" + }, + { + "name": "basic_icon_base-3" + }, + { + "name": "basic_icon_base-4" + }, + { + "name": "basic_icon_base-5" + }, + { + "name": "basic_icon_base-6" + }, + { + "name": "basic_icon_base-7" + }, + { + "name": "basic_icon_base-8" + }, + { + "name": "basic_icon_base-9" + }, + { + "name": "basic_icon_base-10" + }, + { + "name": "basic_icon_base-11" + }, + { + "name": "basic_icon_top" + }, + { + "name": "cheap_icon_top" + }, + { + "name": "zippo_icon_base" + }, + { + "name": "zippo_open" + }, + { + "name": "zippo_top" + }, + { + "name": "off-inhand-left", + "directions": 4 + }, + { + "name": "off-inhand-right", + "directions": 4 + }, + { + "name": "on-inhand-left", + "directions": 4 + }, + { + "name": "on-inhand-right", + "directions": 4 + } + + ] +} diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-left.png b/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-left.png new file mode 100644 index 0000000000..791c7732e2 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-right.png b/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-right.png new file mode 100644 index 0000000000..9ced14f852 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/off-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-left.png b/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-left.png new file mode 100644 index 0000000000..2226cfc4fb Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-right.png b/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-right.png new file mode 100644 index 0000000000..7d858e50d7 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/on-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/zippo_icon_base.png b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_icon_base.png new file mode 100644 index 0000000000..87ded8a13c Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_icon_base.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/zippo_open.png b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_open.png new file mode 100644 index 0000000000..d77f048d81 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_open.png differ diff --git a/Resources/Textures/Objects/Tools/lighters.rsi/zippo_top.png b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_top.png new file mode 100644 index 0000000000..9f61acc831 Binary files /dev/null and b/Resources/Textures/Objects/Tools/lighters.rsi/zippo_top.png differ