Removing a troublesome argument from organ/Remove() in favor or using the 'owner' variable
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
|
||||
if(isorgan(organ))
|
||||
O = organ
|
||||
O.Remove(C)
|
||||
O.Remove()
|
||||
else
|
||||
I = organ
|
||||
I.removed(C)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
if(IC)
|
||||
user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "<span class='notice'>You pull [IC] out of [target]'s [target_zone].</span>")
|
||||
user.put_in_hands(IC)
|
||||
IC.Remove(target)
|
||||
IC.Remove()
|
||||
return 1
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You don't find anything in [target]'s [target_zone]!</span>")
|
||||
|
||||
@@ -73,13 +73,14 @@
|
||||
active_mind_control = FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/heart/gland/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/heart/gland/Remove(special = FALSE)
|
||||
active = 0
|
||||
if(initial(uses) == 1)
|
||||
uses = initial(uses)
|
||||
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
|
||||
hud.remove_from_hud(owner)
|
||||
clear_mind_control()
|
||||
if(!QDELETED(owner))
|
||||
var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR]
|
||||
hud.remove_from_hud(owner)
|
||||
clear_mind_control()
|
||||
..()
|
||||
|
||||
/obj/item/organ/heart/gland/Insert(mob/living/carbon/M, special = 0, drop_if_replaced = TRUE)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
/obj/item/organ/heart/gland/access/proc/free_access(datum/source, obj/O)
|
||||
return TRUE
|
||||
|
||||
/obj/item/organ/heart/gland/access/Remove(mob/living/carbon/M, special = 0)
|
||||
UnregisterSignal(owner, COMSIG_MOB_ALLOWED)
|
||||
..()
|
||||
/obj/item/organ/heart/gland/access/Remove(special = FALSE)
|
||||
if(!QDELETED(owner))
|
||||
UnregisterSignal(owner, COMSIG_MOB_ALLOWED)
|
||||
return ..()
|
||||
@@ -11,9 +11,10 @@
|
||||
..()
|
||||
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
|
||||
|
||||
/obj/item/organ/heart/gland/electric/Remove(mob/living/carbon/M, special = 0)
|
||||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
|
||||
..()
|
||||
/obj/item/organ/heart/gland/electric/Remove(special = FALSE)
|
||||
if(!QDELETED(owner))
|
||||
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/heart/gland/electric/activate()
|
||||
owner.visible_message("<span class='danger'>[owner]'s skin starts emitting electric arcs!</span>",\
|
||||
|
||||
@@ -65,14 +65,14 @@
|
||||
/obj/item/organ/heart/gland/heal/proc/reject_implant(obj/item/organ/cyberimp/implant)
|
||||
owner.visible_message("<span class='warning'>[owner] vomits up his [implant.name]!</span>", "<span class='userdanger'>You suddenly vomit up your [implant.name]!</span>")
|
||||
owner.vomit(0, TRUE, TRUE, 1, FALSE, FALSE, FALSE, TRUE)
|
||||
implant.Remove(owner)
|
||||
implant.Remove()
|
||||
implant.forceMove(owner.drop_location())
|
||||
|
||||
/obj/item/organ/heart/gland/heal/proc/replace_liver(obj/item/organ/liver/liver)
|
||||
if(liver)
|
||||
owner.visible_message("<span class='warning'>[owner] vomits up his [liver.name]!</span>", "<span class='userdanger'>You suddenly vomit up your [liver.name]!</span>")
|
||||
owner.vomit(0, TRUE, TRUE, 1, FALSE, FALSE, FALSE, TRUE)
|
||||
liver.Remove(owner)
|
||||
liver.Remove()
|
||||
liver.forceMove(owner.drop_location())
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel a weird rumble in your bowels...</span>")
|
||||
@@ -87,7 +87,7 @@
|
||||
if(lungs)
|
||||
owner.visible_message("<span class='warning'>[owner] vomits up his [lungs.name]!</span>", "<span class='userdanger'>You suddenly vomit up your [lungs.name]!</span>")
|
||||
owner.vomit(0, TRUE, TRUE, 1, FALSE, FALSE, FALSE, TRUE)
|
||||
lungs.Remove(owner)
|
||||
lungs.Remove()
|
||||
lungs.forceMove(owner.drop_location())
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel a weird rumble inside your chest...</span>")
|
||||
@@ -102,7 +102,7 @@
|
||||
if(eyes)
|
||||
owner.visible_message("<span class='warning'>[owner]'s [eyes.name] fall out of their sockets!</span>", "<span class='userdanger'>Your [eyes.name] fall out of their sockets!</span>")
|
||||
playsound(owner, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
eyes.Remove(owner)
|
||||
eyes.Remove()
|
||||
eyes.forceMove(owner.drop_location())
|
||||
else
|
||||
to_chat(owner, "<span class='warning'>You feel a weird rumble behind your eye sockets...</span>")
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
var/list/organs = user.getorganszone(BODY_ZONE_HEAD, 1)
|
||||
|
||||
for(var/obj/item/organ/I in organs)
|
||||
I.Remove(user, 1)
|
||||
I.Remove(TRUE)
|
||||
|
||||
explosion(get_turf(user), 0, 0, 2, 0, TRUE)
|
||||
for(var/mob/living/carbon/human/H in range(2,user))
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
if(!istype(O))
|
||||
continue
|
||||
|
||||
O.Remove(user)
|
||||
O.Remove()
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
C.vomit(0, toxic = TRUE)
|
||||
|
||||
@@ -104,6 +104,6 @@
|
||||
transfer_personality(H)
|
||||
brainmob.fully_replace_character_name(null, "[braintype] [H.real_name]")
|
||||
name = "[initial(name)] ([brainmob.name])"
|
||||
B.Remove(H)
|
||||
B.Remove()
|
||||
qdel(B)
|
||||
H.update_hair()
|
||||
|
||||
@@ -100,10 +100,9 @@
|
||||
if(M.mind)
|
||||
M.mind.AddSpell(new /obj/effect/proc_holder/spell/bloodcrawl(null))
|
||||
|
||||
/obj/item/organ/heart/demon/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(M.mind)
|
||||
M.mind.RemoveSpell(/obj/effect/proc_holder/spell/bloodcrawl)
|
||||
/obj/item/organ/heart/demon/Remove(special = FALSE)
|
||||
owner?.mind?.RemoveSpell(/obj/effect/proc_holder/spell/bloodcrawl)
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/heart/demon/Stop()
|
||||
return 0 // Always beating.
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
for(var/X in CM.internal_organs)
|
||||
var/destination = get_edge_target_turf(T, pick(GLOB.alldirs)) //Pick a random direction to toss them in
|
||||
var/obj/item/organ/O = X
|
||||
O.Remove(CM) //Note that this isn't the same proc as for lists
|
||||
O.Remove() //Note that this isn't the same proc as for lists
|
||||
O.forceMove(T) //Move the organ outta the body
|
||||
O.throw_at(destination, 2, 3) //Thow the organ at a random tile 3 spots away
|
||||
sleep(1)
|
||||
|
||||
@@ -111,8 +111,8 @@
|
||||
preserved(TRUE)
|
||||
owner.visible_message("<span class='notice'>[src] stabilizes as it's inserted.</span>")
|
||||
|
||||
/obj/item/organ/regenerative_core/Remove(mob/living/carbon/M, special = 0)
|
||||
if(!inert && !special)
|
||||
/obj/item/organ/regenerative_core/Remove(special = FALSE)
|
||||
if(!inert && !special && !QDELETED(owner))
|
||||
owner.visible_message("<span class='notice'>[src] rapidly decays as it's removed.</span>")
|
||||
go_inert()
|
||||
return ..()
|
||||
|
||||
@@ -55,16 +55,18 @@
|
||||
//Update the body's icon so it doesnt appear debrained anymore
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/Remove(mob/living/carbon/C, special = 0, no_id_transfer = FALSE)
|
||||
..()
|
||||
/obj/item/organ/brain/Remove(special = FALSE, no_id_transfer = FALSE)
|
||||
. = ..()
|
||||
var/mob/living/carbon/C = .
|
||||
for(var/X in traumas)
|
||||
var/datum/brain_trauma/BT = X
|
||||
BT.on_lose(TRUE)
|
||||
BT.owner = null
|
||||
|
||||
if((!gc_destroyed || (owner && !owner.gc_destroyed)) && !no_id_transfer)
|
||||
if((!QDELETED(src) || C) && !no_id_transfer)
|
||||
transfer_identity(C)
|
||||
C.update_hair()
|
||||
if(C)
|
||||
C.update_hair()
|
||||
|
||||
/obj/item/organ/brain/prepare_eat()
|
||||
return // Too important to eat.
|
||||
|
||||
@@ -20,9 +20,10 @@
|
||||
M.AddAbility(P)
|
||||
|
||||
|
||||
/obj/item/organ/alien/Remove(mob/living/carbon/M, special = 0)
|
||||
for(var/obj/effect/proc_holder/alien/P in alien_powers)
|
||||
M.RemoveAbility(P)
|
||||
/obj/item/organ/alien/Remove(special = FALSE)
|
||||
if(owner)
|
||||
for(var/obj/effect/proc_holder/alien/P in alien_powers)
|
||||
owner.RemoveAbility(P)
|
||||
..()
|
||||
|
||||
/obj/item/organ/alien/prepare_eat()
|
||||
@@ -100,11 +101,11 @@
|
||||
var/mob/living/carbon/alien/A = M
|
||||
A.updatePlasmaDisplay()
|
||||
|
||||
/obj/item/organ/alien/plasmavessel/Remove(mob/living/carbon/M, special = 0)
|
||||
..()
|
||||
if(isalien(M))
|
||||
var/mob/living/carbon/alien/A = M
|
||||
/obj/item/organ/alien/plasmavessel/Remove(special = FALSE)
|
||||
if(owner && isalien(owner))
|
||||
var/mob/living/carbon/alien/A = owner
|
||||
A.updatePlasmaDisplay()
|
||||
return ..()
|
||||
|
||||
#define QUEEN_DEATH_DEBUFF_DURATION 2400
|
||||
|
||||
@@ -121,9 +122,10 @@
|
||||
..()
|
||||
M.faction |= ROLE_ALIEN
|
||||
|
||||
/obj/item/organ/alien/hivenode/Remove(mob/living/carbon/M, special = 0)
|
||||
M.faction -= ROLE_ALIEN
|
||||
..()
|
||||
/obj/item/organ/alien/hivenode/Remove(special = FALSE)
|
||||
if(owner)
|
||||
owner.faction -= ROLE_ALIEN
|
||||
return ..()
|
||||
|
||||
//When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her.
|
||||
/obj/item/organ/alien/hivenode/proc/queen_death()
|
||||
|
||||
@@ -533,7 +533,7 @@
|
||||
break //Guess we're out of organs!
|
||||
var/obj/item/organ/guts = pick(internal_organs)
|
||||
var/turf/T = get_turf(src)
|
||||
guts.Remove(src)
|
||||
guts.Remove()
|
||||
guts.forceMove(T)
|
||||
var/atom/throw_target = get_edge_target_turf(guts, dir)
|
||||
guts.throw_at(throw_target, power, 4, src)
|
||||
@@ -872,7 +872,7 @@
|
||||
var/obj/item/organ/O = X
|
||||
if(prob(50))
|
||||
organs_amt++
|
||||
O.Remove(src)
|
||||
O.Remove()
|
||||
O.forceMove(drop_location())
|
||||
if(organs_amt)
|
||||
to_chat(user, "<span class='notice'>You retrieve some of [src]\'s internal organs!</span>")
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
continue
|
||||
var/org_zone = check_zone(O.zone) //both groin and chest organs.
|
||||
if(org_zone == BODY_ZONE_CHEST)
|
||||
O.Remove(src)
|
||||
O.Remove()
|
||||
O.forceMove(Tsec)
|
||||
O.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
else
|
||||
@@ -55,7 +55,7 @@
|
||||
if(no_organs && !istype(I, /obj/item/organ/brain))
|
||||
qdel(I)
|
||||
continue
|
||||
I.Remove(src)
|
||||
I.Remove()
|
||||
I.forceMove(Tsec)
|
||||
I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
|
||||
|
||||
@@ -189,21 +189,21 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(brain && (replace_current || !should_have_brain))
|
||||
if(!brain.decoy_override)//Just keep it if it's fake
|
||||
brain.Remove(C,TRUE,TRUE)
|
||||
brain.Remove(TRUE,TRUE)
|
||||
QDEL_NULL(brain)
|
||||
if(should_have_brain && !brain)
|
||||
brain = new mutant_brain()
|
||||
brain.Insert(C, TRUE, TRUE)
|
||||
|
||||
if(heart && (!should_have_heart || replace_current))
|
||||
heart.Remove(C,1)
|
||||
heart.Remove(TRUE)
|
||||
QDEL_NULL(heart)
|
||||
if(should_have_heart && !heart)
|
||||
heart = new mutant_heart()
|
||||
heart.Insert(C)
|
||||
|
||||
if(lungs && (!should_have_lungs || replace_current))
|
||||
lungs.Remove(C,1)
|
||||
lungs.Remove(TRUE)
|
||||
QDEL_NULL(lungs)
|
||||
if(should_have_lungs && !lungs)
|
||||
if(mutantlungs)
|
||||
@@ -213,7 +213,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
lungs.Insert(C)
|
||||
|
||||
if(liver && (!should_have_liver || replace_current))
|
||||
liver.Remove(C,1)
|
||||
liver.Remove(TRUE)
|
||||
QDEL_NULL(liver)
|
||||
if(should_have_liver && !liver)
|
||||
if(mutantliver)
|
||||
@@ -223,7 +223,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
liver.Insert(C)
|
||||
|
||||
if(stomach && (!should_have_stomach || replace_current))
|
||||
stomach.Remove(C,1)
|
||||
stomach.Remove(TRUE)
|
||||
QDEL_NULL(stomach)
|
||||
if(should_have_stomach && !stomach)
|
||||
if(mutantstomach)
|
||||
@@ -233,14 +233,14 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
stomach.Insert(C)
|
||||
|
||||
if(appendix && (!should_have_appendix || replace_current))
|
||||
appendix.Remove(C,1)
|
||||
appendix.Remove(TRUE)
|
||||
QDEL_NULL(appendix)
|
||||
if(should_have_appendix && !appendix)
|
||||
appendix = new()
|
||||
appendix.Insert(C)
|
||||
|
||||
if(tail && (!should_have_tail || replace_current))
|
||||
tail.Remove(C,1)
|
||||
tail.Remove(TRUE)
|
||||
QDEL_NULL(tail)
|
||||
if(should_have_tail && !tail)
|
||||
tail = new mutanttail()
|
||||
@@ -248,21 +248,21 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
if(C.get_bodypart(BODY_ZONE_HEAD))
|
||||
if(eyes && (replace_current || !should_have_eyes))
|
||||
eyes.Remove(C,1)
|
||||
eyes.Remove(TRUE)
|
||||
QDEL_NULL(eyes)
|
||||
if(should_have_eyes && !eyes)
|
||||
eyes = new mutanteyes
|
||||
eyes.Insert(C, TRUE)
|
||||
|
||||
if(ears && (replace_current || !should_have_ears))
|
||||
ears.Remove(C,1)
|
||||
ears.Remove(TRUE)
|
||||
QDEL_NULL(ears)
|
||||
if(should_have_ears && !ears)
|
||||
ears = new mutantears
|
||||
ears.Insert(C)
|
||||
|
||||
if(tongue && (replace_current || !should_have_tongue))
|
||||
tongue.Remove(C,1)
|
||||
tongue.Remove(TRUE)
|
||||
QDEL_NULL(tongue)
|
||||
if(should_have_tongue && !tongue)
|
||||
tongue = new mutanttongue
|
||||
@@ -272,7 +272,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
for(var/mutantorgan in old_species.mutant_organs)
|
||||
var/obj/item/organ/I = C.getorgan(mutantorgan)
|
||||
if(I)
|
||||
I.Remove(C)
|
||||
I.Remove()
|
||||
QDEL_NULL(I)
|
||||
|
||||
for(var/path in mutant_organs)
|
||||
@@ -1601,7 +1601,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
"<span class='danger'>\The [user] slaps \the [target]'s ass!</span>",\
|
||||
"<span class='notice'>You slap [user == target ? "your" : "\the [target]'s"] ass!</span>",\
|
||||
"You hear a slap."
|
||||
)
|
||||
)
|
||||
return FALSE
|
||||
else if(attacker_style && attacker_style.disarm_act(user,target))
|
||||
return 1
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
if(NT)
|
||||
NT.Insert(H, drop_if_replaced = FALSE)
|
||||
else
|
||||
tail.Remove(H)
|
||||
tail.Remove()
|
||||
|
||||
/proc/mass_purrbation()
|
||||
for(var/M in GLOB.mob_list)
|
||||
|
||||
@@ -84,10 +84,10 @@
|
||||
shadowwalk = SW
|
||||
|
||||
|
||||
/obj/item/organ/brain/nightmare/Remove(mob/living/carbon/M, special = 0)
|
||||
if(shadowwalk)
|
||||
M.RemoveSpell(shadowwalk)
|
||||
..()
|
||||
/obj/item/organ/brain/nightmare/Remove(special = FALSE)
|
||||
if(shadowwalk && owner)
|
||||
owner.RemoveSpell(shadowwalk)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/organ/heart/nightmare
|
||||
@@ -120,12 +120,12 @@
|
||||
blade = new/obj/item/light_eater
|
||||
M.put_in_hands(blade)
|
||||
|
||||
/obj/item/organ/heart/nightmare/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/heart/nightmare/Remove(special = FALSE)
|
||||
respawn_progress = 0
|
||||
if(blade && special != HEART_SPECIAL_SHADOWIFY)
|
||||
M.visible_message("<span class='warning'>\The [blade] disintegrates!</span>")
|
||||
if(!QDELETED(owner) && blade && special != HEART_SPECIAL_SHADOWIFY)
|
||||
owner.visible_message("<span class='warning'>\The [blade] disintegrates!</span>")
|
||||
QDEL_NULL(blade)
|
||||
..()
|
||||
return ..()
|
||||
|
||||
/obj/item/organ/heart/nightmare/Stop()
|
||||
return 0
|
||||
@@ -146,7 +146,7 @@
|
||||
owner.revive(full_heal = TRUE)
|
||||
if(!(owner.dna.species.id == "shadow" || owner.dna.species.id == "nightmare"))
|
||||
var/mob/living/carbon/old_owner = owner
|
||||
Remove(owner, HEART_SPECIAL_SHADOWIFY)
|
||||
Remove(HEART_SPECIAL_SHADOWIFY)
|
||||
old_owner.set_species(/datum/species/shadow)
|
||||
Insert(old_owner, HEART_SPECIAL_SHADOWIFY)
|
||||
to_chat(owner, "<span class='userdanger'>You feel the shadows invade your skin, leaping into the center of your chest! You're alive!</span>")
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
var/obj/item/organ/tail/cat/tail = L.getorgan(/obj/item/organ/tail/cat)
|
||||
if(!QDELETED(tail))
|
||||
visible_message("[src] severs [L]'s tail in one swift swipe!", "<span class='notice'>You sever [L]'s tail in one swift swipe.</span>")
|
||||
tail.Remove(L)
|
||||
tail.Remove()
|
||||
var/obj/item/organ/tail/cat/dropped_tail = new(target.drop_location())
|
||||
dropped_tail.color = L.hair_color
|
||||
return 1
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
time++
|
||||
if(time >= EGG_INCUBATION_TIME)
|
||||
Pop()
|
||||
Remove(owner)
|
||||
Remove()
|
||||
qdel(src)
|
||||
|
||||
/obj/item/organ/body_egg/changeling_egg/proc/Pop()
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(tr_flags & TR_KEEPORGANS)
|
||||
for(var/X in O.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
I.Remove(O, 1)
|
||||
I.Remove(TRUE)
|
||||
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
@@ -103,7 +103,7 @@
|
||||
for(var/X in internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
int_organs += I
|
||||
I.Remove(src, 1)
|
||||
I.Remove(TRUE)
|
||||
|
||||
for(var/X in int_organs)
|
||||
var/obj/item/organ/I = X
|
||||
@@ -250,7 +250,7 @@
|
||||
if(tr_flags & TR_KEEPORGANS)
|
||||
for(var/X in O.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
I.Remove(O, 1)
|
||||
I.Remove(TRUE)
|
||||
|
||||
if(mind)
|
||||
mind.transfer_to(O)
|
||||
@@ -262,7 +262,7 @@
|
||||
for(var/X in internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
int_organs += I
|
||||
I.Remove(src, 1)
|
||||
I.Remove(TRUE)
|
||||
|
||||
for(var/X in int_organs)
|
||||
var/obj/item/organ/I = X
|
||||
|
||||
@@ -555,7 +555,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
to_chat(C, "<span class='userdanger'>That was a really dense idea.</span>")
|
||||
C.visible_message("<span class='userdanger'>A bright flare of radiation is seen from [C]'s head, shortly before you hear a sickening sizzling!</span>")
|
||||
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
|
||||
rip_u.Remove(C)
|
||||
rip_u.Remove()
|
||||
qdel(rip_u)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
to_chat(C, "<span class='userdanger'>That was a shockingly dumb idea.</span>")
|
||||
C.visible_message("<span class='userdanger'>A bright flare of lightning is seen from [C]'s head, shortly before you hear a sickening sizzling!</span>")
|
||||
var/obj/item/organ/brain/rip_u = locate(/obj/item/organ/brain) in C.internal_organs
|
||||
rip_u.Remove(C)
|
||||
rip_u.Remove()
|
||||
qdel(rip_u)
|
||||
return
|
||||
return ..()
|
||||
|
||||
@@ -163,7 +163,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] blows [user.p_their()] brain[user.p_s()] out with [src]!</span>")
|
||||
playsound(src, 'sound/weapons/dink.ogg', 30, 1)
|
||||
var/turf/target = get_ranged_target_turf(user, turn(user.dir, 180), BRAINS_BLOWN_THROW_RANGE)
|
||||
B.Remove(user)
|
||||
B.Remove()
|
||||
B.forceMove(T)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
|
||||
@@ -197,7 +197,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES)
|
||||
if(HAS_TRAIT(M, TRAIT_BLIND))
|
||||
if(eyes)
|
||||
eyes.Remove(M)
|
||||
eyes.Remove()
|
||||
eyes.forceMove(get_turf(M))
|
||||
to_chat(M, "<span class='userdanger'>You double over in pain as you feel your eyeballs liquify in your head!</span>")
|
||||
M.emote("scream")
|
||||
|
||||
@@ -144,7 +144,7 @@
|
||||
C.dropItemToGround(W)
|
||||
for(var/X in C.internal_organs)
|
||||
var/obj/item/organ/I = X
|
||||
I.Remove(C)
|
||||
I.Remove()
|
||||
I.forceMove(body_turf)
|
||||
var/wheres_wizdo = dir2text(get_dir(body_turf, item_turf))
|
||||
if(wheres_wizdo)
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(organ.owner)
|
||||
// If this code ever runs I will be happy
|
||||
log_combat(L, organ.owner, "magically removed [organ.name] from", addition="INTENT: [uppertext(L.a_intent)]")
|
||||
organ.Remove(organ.owner)
|
||||
organ.Remove()
|
||||
else
|
||||
while(!isturf(item_to_retrieve.loc) && infinite_recursion < 10) //if it's in something you get the whole thing.
|
||||
if(isitem(item_to_retrieve.loc))
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
var/org_zone = check_zone(O.zone)
|
||||
if(org_zone != BODY_ZONE_CHEST)
|
||||
continue
|
||||
O.Remove(C)
|
||||
O.Remove()
|
||||
O.forceMove(T)
|
||||
organ_spilled = 1
|
||||
. += X
|
||||
@@ -141,11 +141,11 @@
|
||||
|
||||
//when a limb is dropped, the internal organs are removed from the mob and put into the limb
|
||||
/obj/item/organ/proc/transfer_to_limb(obj/item/bodypart/LB, mob/living/carbon/C)
|
||||
Remove(C)
|
||||
Remove()
|
||||
forceMove(LB)
|
||||
|
||||
/obj/item/organ/brain/transfer_to_limb(obj/item/bodypart/head/LB, mob/living/carbon/human/C)
|
||||
Remove(C) //Changeling brain concerns are now handled in Remove
|
||||
Remove() //Changeling brain concerns are now handled in Remove
|
||||
forceMove(LB)
|
||||
LB.brain = src
|
||||
if(brainmob)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
var/list/organs = M.getorganszone("head") + M.getorganszone("eyes") + M.getorganszone("mouth")
|
||||
for(var/internal_organ in organs)
|
||||
var/obj/item/organ/I = internal_organ
|
||||
I.Remove(M)
|
||||
I.Remove()
|
||||
I.forceMove(T)
|
||||
head.drop_limb()
|
||||
qdel(head)
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
"[user] successfully extracts [I] from [target]'s [parse_zone(target_zone)]!",
|
||||
"[user] successfully extracts something from [target]'s [parse_zone(target_zone)]!")
|
||||
log_combat(user, target, "surgically removed [I.name] from", addition="INTENT: [uppertext(user.a_intent)]")
|
||||
I.Remove(target)
|
||||
I.Remove()
|
||||
I.forceMove(get_turf(target))
|
||||
else
|
||||
display_results(user, target, "<span class='notice'>You can't extract anything from [target]'s [parse_zone(target_zone)]!</span>",
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -27,13 +27,14 @@
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/organ/zombie_infection/Remove(mob/living/carbon/M, special = 0)
|
||||
/obj/item/organ/zombie_infection/Remove(special = FALSE)
|
||||
if(owner)
|
||||
if(iszombie(owner) && old_species)
|
||||
owner.set_species(old_species)
|
||||
if(timer_id)
|
||||
deltimer(timer_id)
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
if(iszombie(M) && old_species)
|
||||
M.set_species(old_species)
|
||||
if(timer_id)
|
||||
deltimer(timer_id)
|
||||
STOP_PROCESSING(SSobj, src) //Required to be done after the parent call to avoid conflicts with organ decay.
|
||||
|
||||
/obj/item/organ/zombie_infection/on_find(mob/living/finder)
|
||||
to_chat(finder, "<span class='warning'>Inside the head is a disgusting black \
|
||||
@@ -44,7 +45,7 @@
|
||||
if(!owner)
|
||||
return
|
||||
if(!(src in owner.internal_organs))
|
||||
Remove(owner)
|
||||
Remove()
|
||||
if (causes_damage && !iszombie(owner) && owner.stat != DEAD)
|
||||
owner.adjustToxLoss(1)
|
||||
if (prob(10))
|
||||
|
||||
Reference in New Issue
Block a user