Removing a troublesome argument from organ/Remove() in favor or using the 'owner' variable

This commit is contained in:
Ghommie
2020-02-02 03:39:49 +01:00
parent 133da9bdef
commit 8de11845d5
55 changed files with 203 additions and 193 deletions
+18 -17
View File
@@ -47,17 +47,19 @@
M.update_tint()
owner.update_sight()
/obj/item/organ/eyes/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/eyes/Remove(special = FALSE)
clear_eye_trauma()
. = ..()
if(ishuman(M) && eye_color)
var/mob/living/carbon/human/H = M
H.eye_color = old_eye_color
var/mob/living/carbon/C = .
if(C)
if(ishuman(C) && eye_color)
var/mob/living/carbon/human/H = C
H.eye_color = old_eye_color
if(!special)
H.dna.species.handle_body()
if(!special)
H.dna.species.handle_body()
if(!special)
M.update_tint()
M.update_sight()
C.update_tint()
C.update_sight()
/obj/item/organ/eyes/on_life()
..()
@@ -185,13 +187,13 @@
eye.update_brightness(M)
M.become_blind("flashlight_eyes")
/obj/item/organ/eyes/robotic/flashlight/Remove(var/mob/living/carbon/M, special = FALSE)
eye.on = FALSE
eye.update_brightness(M)
eye.forceMove(src)
M.cure_blind("flashlight_eyes")
..()
/obj/item/organ/eyes/robotic/flashlight/Remove(special = FALSE)
if(!QDELETED(owner))
eye.on = FALSE
eye.update_brightness(owner)
eye.forceMove(src)
owner.cure_blind("flashlight_eyes")
return ..()
// Welding shield implant
/obj/item/organ/eyes/robotic/shield
@@ -227,7 +229,7 @@
terminate_effects()
. = ..()
/obj/item/organ/eyes/robotic/glow/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/eyes/robotic/glow/Remove(special = FALSE)
terminate_effects()
. = ..()
@@ -236,7 +238,6 @@
deactivate(TRUE)
active = FALSE
clear_visuals(TRUE)
STOP_PROCESSING(SSfastprocess, src)
/obj/item/organ/eyes/robotic/glow/ui_action_click(owner, action)
if(istype(action, /datum/action/item_action/organ_action/toggle))