mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Fix human charging
This commit is contained in:
@@ -242,6 +242,7 @@
|
||||
charge_guns = TRUE
|
||||
|
||||
// A 'human stand-in' cell for recharging 'nutrition' on synthetic humans (wow this is terrible! \o/)
|
||||
#define NUTRITION_COEFF 0.05 // 1000 charge = 50 nutrition at 0.05
|
||||
/obj/item/weapon/cell/standin
|
||||
name = "don't spawn this"
|
||||
desc = "this is for weird code use, don't spawn it!!!"
|
||||
@@ -259,12 +260,14 @@
|
||||
|
||||
QDEL_IN(src, 20 SECONDS)
|
||||
|
||||
|
||||
/obj/item/weapon/cell/standin/give(var/amount)
|
||||
amount *= 0.05 // So 1000 becomes 50
|
||||
..(amount)
|
||||
hume.nutrition += amount
|
||||
. = ..(amount * NUTRITION_COEFF) //Shrink amount to store
|
||||
hume.nutrition += . //Add the amount we really stored
|
||||
. /= NUTRITION_COEFF //Inflate amount to take from the giver
|
||||
|
||||
// Various sideways-defined get_cells
|
||||
/obj/mecha/get_cell()
|
||||
return cell
|
||||
|
||||
#undef NUTRITION_COEFF
|
||||
Reference in New Issue
Block a user