mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
[MIRROR] fix shadekin nutrition gains (#11835)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
cdc08ed220
commit
a0cfc31eaa
@@ -212,14 +212,17 @@
|
||||
return //No
|
||||
shadekin_set_energy(dark_energy + amount)
|
||||
|
||||
/datum/component/shadekin/proc/handle_nutrition_conversion(dark_gains)
|
||||
/datum/component/shadekin/proc/handle_nutrition_conversion(current_gains)
|
||||
if(!nutrition_energy_conversion)
|
||||
return
|
||||
if(shadekin_get_energy() == 100 && dark_gains > 0)
|
||||
owner.nutrition += dark_gains * 5 * nutrition_conversion_scaling
|
||||
else if(shadekin_get_energy() < 50 && owner.nutrition > 500)
|
||||
return current_gains
|
||||
if(shadekin_get_energy() == 100 && current_gains > 0)
|
||||
owner.nutrition += current_gains * 5 * nutrition_conversion_scaling
|
||||
return current_gains
|
||||
|
||||
if(shadekin_get_energy() < 50 && owner.nutrition > 500)
|
||||
owner.nutrition -= nutrition_conversion_scaling * 50
|
||||
dark_gains += nutrition_conversion_scaling
|
||||
current_gains += nutrition_conversion_scaling
|
||||
return current_gains
|
||||
|
||||
/datum/component/shadekin/proc/attack_dephase(var/turf/T = null, atom/dephaser)
|
||||
// no assigned dephase-target, just use our own
|
||||
|
||||
@@ -191,7 +191,7 @@
|
||||
else
|
||||
dark_gains = energy_light
|
||||
|
||||
handle_nutrition_conversion(dark_gains)
|
||||
dark_gains = handle_nutrition_conversion(dark_gains)
|
||||
|
||||
shadekin_adjust_energy(dark_gains)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user