Use cell defined constants for various stuff (#82594)

## About The Pull Request
This re writes most cell power usage cases with 2 defines
`STANDARD_CELL_CHARGE`(Joules) & `STANDARD_CELL_RATE`(Watts) so changing
cell capacity values in the future won't cause discrepancies.

## Changelog
🆑
code: most cell power usages are scaled with defined constants to help
adapt to future changes
/🆑
This commit is contained in:
SyncIt21
2024-04-19 02:59:21 +05:30
committed by GitHub
parent 98872af784
commit 635b7fa66c
46 changed files with 125 additions and 107 deletions
+3 -3
View File
@@ -82,6 +82,6 @@
if(!parent?.cell)
return
var/obj/item/gun/energy/fired_gun = source
var/totransfer = min(100 KILO JOULES, parent.cell.charge)
var/transferred = fired_gun.cell.give(totransfer)
parent.cell.use(transferred)
var/transferred = fired_gun.cell.give(min(0.1 * STANDARD_CELL_CHARGE, parent.cell.charge))
if(transferred)
parent.cell.use(transferred, force = TRUE)