mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Surgery refactors (#18183)
* Remove dead code * Refactor magic numbers to defines
This commit is contained in:
@@ -51,7 +51,7 @@
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/emag_act()
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/internal/cyberimp/arm/emp_act(severity)
|
||||
if(emp_proof)
|
||||
|
||||
@@ -139,16 +139,16 @@
|
||||
//Gets blood from mob to a container or other mob, preserving all data in it.
|
||||
/mob/living/proc/transfer_blood_to(atom/movable/AM, amount, forced)
|
||||
if(!blood_volume || !AM.reagents)
|
||||
return 0
|
||||
return FALSE
|
||||
if(blood_volume < BLOOD_VOLUME_BAD && !forced)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(blood_volume < amount)
|
||||
amount = blood_volume
|
||||
|
||||
var/blood_id = get_blood_id()
|
||||
if(!blood_id)
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
blood_volume -= amount
|
||||
|
||||
|
||||
@@ -147,9 +147,9 @@
|
||||
|
||||
/obj/item/organ/external/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
|
||||
if(parent_organ != parent.limb_name)
|
||||
return 0
|
||||
return FALSE
|
||||
replaced(H)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
/****************************************************
|
||||
DAMAGE PROCS
|
||||
@@ -666,7 +666,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
status &= ~ORGAN_INT_BLEEDING
|
||||
perma_injury = 0
|
||||
|
||||
/obj/item/organ/external/robotize(company, make_tough = 0, convert_all = 1)
|
||||
/obj/item/organ/external/robotize(company, make_tough = FALSE, convert_all = TRUE)
|
||||
..()
|
||||
//robot limbs take reduced damage
|
||||
if(!make_tough)
|
||||
@@ -781,7 +781,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(isnull(O))
|
||||
O = owner
|
||||
if(!istype(O)) // You're not the primary organ of ANYTHING, bucko
|
||||
return 0
|
||||
return FALSE
|
||||
return src == O.bodyparts_by_name[limb_name]
|
||||
|
||||
/obj/item/organ/external/proc/infection_check()
|
||||
|
||||
@@ -114,9 +114,9 @@
|
||||
|
||||
/obj/item/organ/internal/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H)
|
||||
if(parent_organ != parent.limb_name)
|
||||
return 0
|
||||
return FALSE
|
||||
insert(H)
|
||||
return 1
|
||||
return TRUE
|
||||
|
||||
// Rendering!
|
||||
/obj/item/organ/internal/proc/render()
|
||||
|
||||
@@ -61,11 +61,11 @@
|
||||
/obj/item/organ/internal/lantern/proc/toggle_biolum(statoverride)
|
||||
if(!statoverride && owner.incapacitated())
|
||||
to_chat(owner, "<span class='warning'>You cannot alter your bioluminescence in your current state.</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!statoverride && owner.nutrition < KIDAN_LANTERN_MINHUNGER)
|
||||
to_chat(owner, "<span class='warning'>You're too hungry to be bioluminescent!</span>")
|
||||
return 0
|
||||
return FALSE
|
||||
|
||||
if(!colour)
|
||||
colour = BlendRGB(owner.m_colours["head"], owner.m_colours["body"], 0.65)
|
||||
|
||||
Reference in New Issue
Block a user