Borgs can now use nutrition to recharge. (#6715)

This commit is contained in:
Verkister
2023-08-05 08:20:08 +03:00
committed by GitHub
parent 569f1d5abf
commit ae8d9a853f
3 changed files with 14 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
/mob/living/silicon/robot
nutrition = 0 //No starter nutrition to overcharge the cell with.
/mob/living/silicon/robot/updateicon() //TODO - Make the belly stuff resting sprite stuff into feature flags and replace dogborg var - 7/19/23
vr_sprite_check()
@@ -79,3 +81,10 @@
else if (vis_height != module_sprites[icontype][SKIN_HEIGHT])
vis_height = module_sprites[icontype][SKIN_HEIGHT]
update_transform()
/mob/living/silicon/robot/use_power()
if(cell && cell.charge < cell.maxcharge)
if(nutrition >= 20)
nutrition -= 20
cell.charge += 200
..()