From f70fc983612cfd9fb98bca3ed5e8ce291a2289e9 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:34:57 +0100 Subject: [PATCH] [MIRROR] Fixes crank weapons never charging using the crank. Fixes stun batons having functionally infinite charge. (#27026) * Fixes crank weapons never charging using the crank. Fixes stun batons having functionally infinite charge. (#82189) ## About The Pull Request https://github.com/tgstation/tgstation/pull/81579 overlooked some areas. I suspect there are others. We'll find them eventually I'm sure. ## Why It's Good For The Game These values weren't utilizing any define, so when power itself was changed to use not only a define but one with a value immensely disproportionate to the magic numbers added to these items, well...you get these problems. ## Changelog :cl: fix: Crank weapons now can actually be charged using their crank. fix: Stun batons and their variants now actually meaningfully consume charge when used. /:cl: --------- Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@ users.noreply.github.com> * Fixes crank weapons never charging using the crank. Fixes stun batons having functionally infinite charge. --------- Co-authored-by: necromanceranne <40847847+necromanceranne@users.noreply.github.com> Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@ users.noreply.github.com> --- code/game/objects/items/melee/baton.dm | 6 +++--- code/modules/projectiles/guns/energy/crank_guns.dm | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/code/game/objects/items/melee/baton.dm b/code/game/objects/items/melee/baton.dm index 907176bc9b9..295a2c32945 100644 --- a/code/game/objects/items/melee/baton.dm +++ b/code/game/objects/items/melee/baton.dm @@ -437,7 +437,7 @@ var/throw_stun_chance = 35 var/obj/item/stock_parts/cell/cell var/preload_cell_type //if not empty the baton starts with this type of cell - var/cell_hit_cost = 1000 + var/cell_hit_cost = STANDARD_CELL_CHARGE var/can_remove_cell = TRUE var/convertible = TRUE //if it can be converted with a conversion kit @@ -694,7 +694,7 @@ w_class = WEIGHT_CLASS_HUGE force = 3 throwforce = 5 - cell_hit_cost = 2000 + cell_hit_cost = STANDARD_CELL_CHARGE * 2 throw_stun_chance = 10 slot_flags = ITEM_SLOT_BACK convertible = FALSE @@ -758,7 +758,7 @@ force = 5 throwforce = 5 throw_range = 5 - cell_hit_cost = 2000 + cell_hit_cost = STANDARD_CELL_CHARGE * 2 throw_stun_chance = 99 //Have you prayed today? convertible = FALSE custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 5, /datum/material/glass = SHEET_MATERIAL_AMOUNT*2, /datum/material/silver = SHEET_MATERIAL_AMOUNT*5, /datum/material/gold = SHEET_MATERIAL_AMOUNT) diff --git a/code/modules/projectiles/guns/energy/crank_guns.dm b/code/modules/projectiles/guns/energy/crank_guns.dm index 5faaf3ea015..64ffa86f360 100644 --- a/code/modules/projectiles/guns/energy/crank_guns.dm +++ b/code/modules/projectiles/guns/energy/crank_guns.dm @@ -17,7 +17,7 @@ AddComponent( \ /datum/component/crank_recharge, \ charging_cell = get_cell(), \ - charge_amount = 500, \ + charge_amount = STANDARD_CELL_CHARGE * 0.5, \ cooldown_time = 2 SECONDS, \ charge_sound = 'sound/weapons/laser_crank.ogg', \ charge_sound_cooldown_time = 1.8 SECONDS, \ @@ -50,7 +50,7 @@ AddComponent( \ /datum/component/crank_recharge, \ charging_cell = get_cell(), \ - charge_amount = 1000, \ + charge_amount = STANDARD_CELL_CHARGE, \ cooldown_time = 2 SECONDS, \ charge_sound = 'sound/weapons/laser_crank.ogg', \ charge_sound_cooldown_time = 1.8 SECONDS, \ @@ -97,7 +97,7 @@ /datum/component/crank_recharge, \ charging_cell = get_cell(), \ spin_to_win = TRUE, \ - charge_amount = 125, \ + charge_amount = LASER_SHOTS(8, STANDARD_CELL_CHARGE), \ cooldown_time = 0.8 SECONDS, \ charge_sound = 'sound/weapons/kinetic_reload.ogg', \ charge_sound_cooldown_time = 0.8 SECONDS, \