mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-29 11:32:13 +00:00
Borgs can now use nutrition to recharge. (#6715)
This commit is contained in:
@@ -1315,9 +1315,9 @@
|
||||
items_preserved |= item
|
||||
else
|
||||
owner.adjust_nutrition((nutrition_percent / 100) * 5 * digested)
|
||||
if(isrobot(owner))
|
||||
var/mob/living/silicon/robot/R = owner
|
||||
R.cell.charge += ((nutrition_percent / 100) * 50 * digested)
|
||||
// if(isrobot(owner)) //CHOMPEdit: Borgos can now use nutrition too.
|
||||
// var/mob/living/silicon/robot/R = owner
|
||||
// R.cell.charge += ((nutrition_percent / 100) * 50 * digested)
|
||||
digested = TRUE //CHOMPEdit
|
||||
return digested
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ GLOBAL_LIST_INIT(digest_modes, list())
|
||||
var/difference = B.owner.size_multiplier / L.size_multiplier
|
||||
if(B.health_impacts_size) //CHOMPEdit - Health probably changed so...
|
||||
B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
|
||||
if(isrobot(B.owner))
|
||||
/*if(isrobot(B.owner)) //CHOMPEdit: Borgos can now use nutrition too
|
||||
if(B.reagent_mode_flags & DM_FLAG_REAGENTSDIGEST && B.reagents.total_volume < B.reagents.maximum_volume) //digestion producing reagents
|
||||
var/mob/living/silicon/robot/R = B.owner
|
||||
R.cell.charge += 20*damage_gain
|
||||
@@ -94,7 +94,7 @@ GLOBAL_LIST_INIT(digest_modes, list())
|
||||
B.GenerateBellyReagents_digesting()
|
||||
else
|
||||
var/mob/living/silicon/robot/R = B.owner
|
||||
R.cell.charge += 25*damage_gain
|
||||
R.cell.charge += 25*damage_gain */
|
||||
if(offset && damage_gain > 0) // If any different than default weight, multiply the % of offset.
|
||||
if(B.reagent_mode_flags & DM_FLAG_REAGENTSDIGEST && B.reagents.total_volume < B.reagents.maximum_volume) //digestion producing reagents
|
||||
B.owner.adjust_nutrition(offset * (3 * damage_gain / difference) * L.get_digestion_nutrition_modifier() * B.owner.get_digestion_efficiency_modifier()) //Uncertain if balanced fairly, can adjust by multiplier for the cost of reagent, dont go below 1 or else it will result in more nutrition than normal - Jack
|
||||
|
||||
@@ -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
|
||||
..()
|
||||
Reference in New Issue
Block a user