Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into Ghommie-cit229
This commit is contained in:
@@ -27,10 +27,11 @@
|
||||
icon_state = "appendix"
|
||||
name = "appendix"
|
||||
|
||||
/obj/item/organ/appendix/Remove(mob/living/carbon/M, special = 0)
|
||||
for(var/datum/disease/appendicitis/A in M.diseases)
|
||||
A.cure()
|
||||
inflamed = TRUE
|
||||
/obj/item/organ/appendix/Remove(special = FALSE)
|
||||
if(owner)
|
||||
for(var/datum/disease/appendicitis/A in owner.diseases)
|
||||
A.cure()
|
||||
inflamed = TRUE
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
to_chat(user, "<span class='notice'>You modify [src] to be installed on the [zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.</span>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/organ/cyberimp/arm/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/cyberimp/arm/Remove(special = FALSE)
|
||||
Retract()
|
||||
..()
|
||||
|
||||
|
||||
@@ -147,10 +147,10 @@
|
||||
ion_trail = new
|
||||
ion_trail.set_up(M)
|
||||
|
||||
/obj/item/organ/cyberimp/chest/thrusters/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/cyberimp/chest/thrusters/Remove(special = FALSE)
|
||||
if(on)
|
||||
toggle(silent = TRUE)
|
||||
..()
|
||||
toggle(TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/cyberimp/chest/thrusters/ui_action_click()
|
||||
toggle()
|
||||
@@ -170,10 +170,11 @@
|
||||
to_chat(owner, "<span class='notice'>You turn your thrusters set on.</span>")
|
||||
else
|
||||
ion_trail.stop()
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
||||
owner.remove_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>You turn your thrusters set off.</span>")
|
||||
if(!QDELETED(owner))
|
||||
UnregisterSignal(owner, COMSIG_MOVABLE_MOVED)
|
||||
owner.remove_movespeed_modifier(MOVESPEED_ID_CYBER_THRUSTER)
|
||||
if(!silent)
|
||||
to_chat(owner, "<span class='notice'>You turn your thrusters set off.</span>")
|
||||
on = FALSE
|
||||
update_icon()
|
||||
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
var/datum/atom_hud/H = GLOB.huds[HUD_type]
|
||||
H.add_hud_to(M)
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/hud/Remove(var/mob/living/carbon/M, var/special = 0)
|
||||
if(HUD_type)
|
||||
/obj/item/organ/cyberimp/eyes/hud/Remove(special = FALSE)
|
||||
if(!QDELETED(owner) && HUD_type)
|
||||
var/datum/atom_hud/H = GLOB.huds[HUD_type]
|
||||
H.remove_hud_from(M)
|
||||
..()
|
||||
H.remove_hud_from(owner)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/cyberimp/eyes/hud/medical
|
||||
name = "Medical HUD implant"
|
||||
|
||||
@@ -89,10 +89,10 @@
|
||||
stored_items = list()
|
||||
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_drop/Remove(var/mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/cyberimp/brain/anti_drop/Remove(special = FALSE)
|
||||
if(active)
|
||||
ui_action_click()
|
||||
..()
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/organ/cyberimp/brain/anti_stun
|
||||
|
||||
@@ -104,13 +104,14 @@
|
||||
H.dna.features["ears"] = "Cat"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/ears/cat/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(istype(H))
|
||||
/obj/item/organ/ears/cat/Remove(special = FALSE)
|
||||
if(!QDELETED(owner) && ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
color = H.hair_color
|
||||
H.dna.features["ears"] = "None"
|
||||
H.dna.species.mutant_bodyparts -= "ears"
|
||||
H.update_body()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/ears/bronze
|
||||
name = "tin ears"
|
||||
|
||||
@@ -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))
|
||||
@@ -255,6 +256,8 @@
|
||||
if(!C || QDELETED(src) || QDELETED(user) || QDELETED(owner) || owner != user)
|
||||
return
|
||||
var/range = input(user, "Enter range (0 - [max_light_beam_distance])", "Range Select", 0) as null|num
|
||||
if(!isnum(range))
|
||||
return
|
||||
|
||||
set_distance(CLAMP(range, 0, max_light_beam_distance))
|
||||
assume_rgb(C)
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
else
|
||||
icon_state = "[icon_base]-off"
|
||||
|
||||
/obj/item/organ/heart/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
/obj/item/organ/heart/Remove(special = FALSE)
|
||||
if(!special)
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 120)
|
||||
addtimer(CALLBACK(src, .proc/stop_if_unowned), 12 SECONDS)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/heart/proc/stop_if_unowned()
|
||||
if(!owner)
|
||||
@@ -145,9 +145,9 @@ obj/item/organ/heart/slime
|
||||
if(owner)
|
||||
to_chat(owner, "<span class ='userdanger'>Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!</span>")
|
||||
|
||||
/obj/item/organ/heart/cursed/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
M.remove_client_colour(/datum/client_colour/cursed_heart_blood)
|
||||
/obj/item/organ/heart/cursed/Remove(special = FALSE)
|
||||
owner.remove_client_colour(/datum/client_colour/cursed_heart_blood)
|
||||
return ..()
|
||||
|
||||
/datum/action/item_action/organ_action/cursed_heart
|
||||
name = "Pump your blood"
|
||||
|
||||
@@ -58,12 +58,12 @@
|
||||
return S
|
||||
|
||||
//Just in case
|
||||
/obj/item/organ/liver/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(!QDELETED(M))
|
||||
M.remove_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY)
|
||||
M.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret.
|
||||
sizeMoveMod(1, M)
|
||||
/obj/item/organ/liver/Remove(special = FALSE)
|
||||
if(!QDELETED(owner))
|
||||
owner.remove_movespeed_modifier(LIVER_SWELLING_MOVE_MODIFY)
|
||||
owner.ResetBloodVol() //At the moment, this shouldn't allow application twice. You either have this OR a thirsty ferret.
|
||||
sizeMoveMod(1, owner)
|
||||
return ..()
|
||||
|
||||
//Applies some of the effects to the patient.
|
||||
/obj/item/organ/liver/proc/pharmacokinesis()
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
var/obj/item/organ/replaced = M.getorganslot(slot)
|
||||
if(replaced)
|
||||
replaced.Remove(M, special = 1)
|
||||
replaced.Remove(TRUE)
|
||||
if(drop_if_replaced)
|
||||
replaced.forceMove(get_turf(M))
|
||||
else
|
||||
@@ -54,21 +54,20 @@
|
||||
return TRUE
|
||||
|
||||
//Special is for instant replacement like autosurgeons
|
||||
/obj/item/organ/proc/Remove(mob/living/carbon/M, special = FALSE)
|
||||
/obj/item/organ/proc/Remove(special = FALSE)
|
||||
if(owner)
|
||||
owner.internal_organs -= src
|
||||
if(owner.internal_organs_slot[slot] == src)
|
||||
owner.internal_organs_slot.Remove(slot)
|
||||
if((organ_flags & ORGAN_VITAL) && !special && !(owner.status_flags & GODMODE))
|
||||
owner.death()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(owner)
|
||||
. = owner //for possible subtypes specific post-removal code.
|
||||
owner = null
|
||||
if(M)
|
||||
M.internal_organs -= src
|
||||
if(M.internal_organs_slot[slot] == src)
|
||||
M.internal_organs_slot.Remove(slot)
|
||||
if((organ_flags & ORGAN_VITAL) && !special && !(M.status_flags & GODMODE))
|
||||
M.death()
|
||||
for(var/X in actions)
|
||||
var/datum/action/A = X
|
||||
A.Remove(M)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/proc/on_find(mob/living/finder)
|
||||
return
|
||||
|
||||
@@ -185,7 +184,7 @@
|
||||
if(owner)
|
||||
// The special flag is important, because otherwise mobs can die
|
||||
// while undergoing transformation into different mobs.
|
||||
Remove(owner, TRUE)
|
||||
Remove(TRUE)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/attack(mob/living/carbon/M, mob/user)
|
||||
@@ -338,7 +337,7 @@
|
||||
T = new dna.species.mutanttongue()
|
||||
else
|
||||
T = new()
|
||||
oT.Remove(src)
|
||||
oT.Remove()
|
||||
qdel(oT)
|
||||
T.Insert(src)
|
||||
|
||||
|
||||
@@ -80,9 +80,9 @@
|
||||
H.throw_alert("disgust", /obj/screen/alert/disgusted)
|
||||
SEND_SIGNAL(H, COMSIG_ADD_MOOD_EVENT, "disgust", /datum/mood_event/disgusted)
|
||||
|
||||
/obj/item/organ/stomach/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/stomach/Remove(special = FALSE)
|
||||
var/mob/living/carbon/human/H = owner
|
||||
if(istype(H))
|
||||
if(H && istype(H))
|
||||
H.clear_alert("disgust")
|
||||
SEND_SIGNAL(H, COMSIG_CLEAR_MOOD_EVENT, "disgust")
|
||||
..()
|
||||
|
||||
@@ -8,10 +8,10 @@
|
||||
slot = ORGAN_SLOT_TAIL
|
||||
var/tail_type = "None"
|
||||
|
||||
/obj/item/organ/tail/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(H && H.dna && H.dna.species)
|
||||
H.dna.species.stop_wagging_tail(H)
|
||||
/obj/item/organ/tail/Remove(special = FALSE)
|
||||
if(owner?.dna?.species)
|
||||
owner.dna.species.stop_wagging_tail(owner)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/tail/cat
|
||||
name = "cat tail"
|
||||
@@ -26,13 +26,14 @@
|
||||
H.dna.features["tail_human"] = tail_type
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/tail/cat/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(istype(H))
|
||||
/obj/item/organ/tail/cat/Remove(special = FALSE)
|
||||
if(!QDELETED(owner) && ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.dna.features["tail_human"] = "None"
|
||||
H.dna.species.mutant_bodyparts -= "tail_human"
|
||||
color = H.hair_color
|
||||
H.update_body()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/tail/lizard
|
||||
name = "lizard tail"
|
||||
@@ -54,12 +55,13 @@
|
||||
H.dna.species.mutant_bodyparts |= "spines"
|
||||
H.update_body()
|
||||
|
||||
/obj/item/organ/tail/lizard/Remove(mob/living/carbon/human/H, special = 0)
|
||||
..()
|
||||
if(istype(H))
|
||||
/obj/item/organ/tail/lizard/Remove(special = FALSE)
|
||||
if(!QDELETED(owner) && ishuman(owner))
|
||||
var/mob/living/carbon/human/H = owner
|
||||
H.dna.species.mutant_bodyparts -= "tail_lizard"
|
||||
H.dna.species.mutant_bodyparts -= "spines"
|
||||
color = "#" + H.dna.features["mcolor"]
|
||||
tail_type = H.dna.features["tail_lizard"]
|
||||
spines = H.dna.features["spines"]
|
||||
H.update_body()
|
||||
return ..()
|
||||
|
||||
@@ -71,12 +71,13 @@
|
||||
RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.UnregisterSignal(M, COMSIG_MOB_SAY)
|
||||
|
||||
/obj/item/organ/tongue/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(say_mod && M.dna && M.dna.species)
|
||||
M.dna.species.say_mod = initial(M.dna.species.say_mod)
|
||||
UnregisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
M.RegisterSignal(M, COMSIG_MOB_SAY, /mob/living/carbon/.proc/handle_tongueless_speech)
|
||||
/obj/item/organ/tongue/Remove(special = FALSE)
|
||||
if(!QDELETED(owner))
|
||||
if(say_mod && owner.dna?.species)
|
||||
owner.dna.species.say_mod = initial(owner.dna.species.say_mod)
|
||||
UnregisterSignal(owner, COMSIG_MOB_SAY, .proc/handle_speech)
|
||||
owner.RegisterSignal(owner, COMSIG_MOB_SAY, /mob/living/carbon/.proc/handle_tongueless_speech)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/tongue/could_speak_in_language(datum/language/dt)
|
||||
return is_type_in_typecache(dt, languages_possible)
|
||||
|
||||
Reference in New Issue
Block a user