mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
[MIRROR] Fixes borgs not being able to unabsorb (#10965)
Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
committed by
GitHub
parent
868d64c45f
commit
872634f5fe
@@ -29,7 +29,7 @@
|
|||||||
//When procs are used
|
//When procs are used
|
||||||
RegisterSignal(owner, COMSIG_CHECK_SILK_AMOUNT, PROC_REF(check_silk_amount))
|
RegisterSignal(owner, COMSIG_CHECK_SILK_AMOUNT, PROC_REF(check_silk_amount))
|
||||||
RegisterSignal(owner, COMSIG_WEAVE_STRUCTURE, PROC_REF(weave_structure))
|
RegisterSignal(owner, COMSIG_WEAVE_STRUCTURE, PROC_REF(weave_structure))
|
||||||
RegisterSignal(owner, COMSIG_TOGGLE_SILK_PRODUCTION, PROC_REF(weave_item))
|
RegisterSignal(owner, COMSIG_TOGGLE_SILK_PRODUCTION, PROC_REF(toggle_silk_production))
|
||||||
RegisterSignal(owner, COMSIG_WEAVE_ITEM, PROC_REF(weave_item))
|
RegisterSignal(owner, COMSIG_WEAVE_ITEM, PROC_REF(weave_item))
|
||||||
RegisterSignal(owner, COMSIG_SET_SILK_COLOR, PROC_REF(set_silk_color))
|
RegisterSignal(owner, COMSIG_SET_SILK_COLOR, PROC_REF(set_silk_color))
|
||||||
|
|
||||||
|
|||||||
@@ -124,10 +124,16 @@ GLOBAL_LIST_INIT(digest_modes, list())
|
|||||||
id = DM_UNABSORB
|
id = DM_UNABSORB
|
||||||
|
|
||||||
/datum/digest_mode/unabsorb/process_mob(obj/belly/B, mob/living/L)
|
/datum/digest_mode/unabsorb/process_mob(obj/belly/B, mob/living/L)
|
||||||
if(L.absorbed && B.owner.nutrition >= 100)
|
if(L.absorbed)
|
||||||
B.owner.adjust_nutrition(-100)
|
if(B.owner.nutrition >= 100)
|
||||||
B.unabsorb_living(L)
|
B.owner.adjust_nutrition(-100)
|
||||||
return list("to_update" = TRUE)
|
B.unabsorb_living(L)
|
||||||
|
return list("to_update" = TRUE)
|
||||||
|
else if(isrobot(B.owner))
|
||||||
|
var/mob/living/silicon/robot/robot_owner = B.owner
|
||||||
|
if(robot_owner.cell_use_power(100))
|
||||||
|
B.unabsorb_living(L)
|
||||||
|
return list("to_update" = TRUE)
|
||||||
|
|
||||||
/datum/digest_mode/drain
|
/datum/digest_mode/drain
|
||||||
id = DM_DRAIN
|
id = DM_DRAIN
|
||||||
|
|||||||
Reference in New Issue
Block a user