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
🆑
fix: Crank weapons now can actually be charged using their crank.
fix: Stun batons and their variants now actually meaningfully consume
charge when used.
/🆑

---------

Co-authored-by: Pickle-Coding <58013024+Pickle-Coding@users.noreply.github.com>
This commit is contained in:
necromanceranne
2024-03-25 12:51:57 +11:00
committed by GitHub
parent 4ce81553d7
commit 01dce512a3
2 changed files with 6 additions and 6 deletions

View File

@@ -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)

View File

@@ -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, \