Purrbation toggle and organ insert code refactor (#68738)

This PR improves the purrbation toggle code. Admins can now put any human species on purrbation.
This commit is contained in:
Riggle
2022-07-30 20:57:10 +02:00
committed by GitHub
parent ec6ca62125
commit 8a680eb9ec
17 changed files with 113 additions and 108 deletions

View File

@@ -15,14 +15,14 @@
if(iscarbon(loc))
Insert(loc)
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/body_egg/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
ADD_TRAIT(owner, TRAIT_XENO_HOST, ORGAN_TRAIT)
ADD_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
owner.med_hud_set_status()
INVOKE_ASYNC(src, .proc/AddInfectionImages, owner)
/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/body_egg/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
if(owner)
REMOVE_TRAIT(owner, TRAIT_XENO_HOST, ORGAN_TRAIT)
REMOVE_TRAIT(owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)

View File

@@ -80,7 +80,7 @@
active_mind_control = FALSE
return TRUE
/obj/item/organ/internal/heart/gland/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/heart/gland/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
active = FALSE
if(initial(uses) == 1)
uses = initial(uses)
@@ -89,7 +89,7 @@
clear_mind_control()
..()
/obj/item/organ/internal/heart/gland/Insert(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/heart/gland/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
if(special != 2 && uses) // Special 2 means abductor surgery
Start()

View File

@@ -7,11 +7,11 @@
mind_control_uses = 2
mind_control_duration = 900
/obj/item/organ/internal/heart/gland/electric/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/gland/electric/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
ADD_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
/obj/item/organ/internal/heart/gland/electric/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/gland/electric/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
REMOVE_TRAIT(owner, TRAIT_SHOCKIMMUNE, "abductor_gland")
..()

View File

@@ -7,12 +7,12 @@
mind_control_uses = 1
mind_control_duration = 2400
/obj/item/organ/internal/heart/gland/slime/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/gland/slime/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
owner.faction |= "slime"
owner.grant_language(/datum/language/slime, TRUE, TRUE, LANGUAGE_GLAND)
/obj/item/organ/internal/heart/gland/slime/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/gland/slime/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
owner.faction -= "slime"
owner.remove_language(/datum/language/slime, TRUE, TRUE, LANGUAGE_GLAND)
..()

View File

@@ -10,7 +10,7 @@
icon_state = "brain-x-d"
var/datum/action/cooldown/spell/jaunt/shadow_walk/our_jaunt
/obj/item/organ/internal/brain/nightmare/Insert(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/brain/nightmare/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(M.dna.species.id != SPECIES_NIGHTMARE)
M.set_species(/datum/species/shadow/nightmare)
@@ -19,7 +19,7 @@
our_jaunt = new(M)
our_jaunt.Grant(M)
/obj/item/organ/internal/brain/nightmare/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/brain/nightmare/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
QDEL_NULL(our_jaunt)
return ..()
@@ -56,13 +56,13 @@
user.temporarilyRemoveItemFromInventory(src, TRUE)
Insert(user)
/obj/item/organ/internal/heart/nightmare/Insert(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/heart/nightmare/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(special != HEART_SPECIAL_SHADOWIFY)
blade = new/obj/item/light_eater
M.put_in_hands(blade)
/obj/item/organ/internal/heart/nightmare/Remove(mob/living/carbon/M, special = FALSE)
/obj/item/organ/internal/heart/nightmare/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
respawn_progress = 0
if(blade && special != HEART_SPECIAL_SHADOWIFY)
M.visible_message(span_warning("\The [blade] disintegrates!"))

View File

@@ -178,13 +178,13 @@
user.temporarilyRemoveItemFromInventory(src, TRUE)
src.Insert(user) //Consuming the heart literally replaces your heart with a demon heart. H A R D C O R E
/obj/item/organ/internal/heart/demon/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/demon/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
// Gives a non-eat-people crawl to the new owner
var/datum/action/cooldown/spell/jaunt/bloodcrawl/crawl = new(M)
crawl.Grant(M)
/obj/item/organ/internal/heart/demon/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/heart/demon/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
..()
var/datum/action/cooldown/spell/jaunt/bloodcrawl/crawl = locate() in M.actions
qdel(crawl)

View File

@@ -37,7 +37,7 @@
/// Maximum skillchip slots available. Do not reference this var directly and instead call get_max_skillchip_slots()
var/max_skillchip_slots = 5
/obj/item/organ/internal/brain/Insert(mob/living/carbon/C, special = 0,no_id_transfer = FALSE)
/obj/item/organ/internal/brain/Insert(mob/living/carbon/C, special = FALSE, drop_if_replaced = TRUE, no_id_transfer = FALSE)
. = ..()
name = "brain"

View File

@@ -67,17 +67,17 @@
else
owner.adjustPlasma(0.1 * plasma_rate * delta_time)
/obj/item/organ/internal/alien/plasmavessel/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/alien/plasmavessel/Insert(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
..()
if(isalien(M))
var/mob/living/carbon/alien/A = M
A.updatePlasmaDisplay()
if(isalien(organ_owner))
var/mob/living/carbon/alien/target_alien = organ_owner
target_alien.updatePlasmaDisplay()
/obj/item/organ/internal/alien/plasmavessel/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/alien/plasmavessel/Remove(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
..()
if(isalien(M))
var/mob/living/carbon/alien/A = M
A.updatePlasmaDisplay()
if(isalien(organ_owner))
var/mob/living/carbon/alien/organ_owner_alien = organ_owner
organ_owner_alien.updatePlasmaDisplay()
#define QUEEN_DEATH_DEBUFF_DURATION 2400
@@ -91,14 +91,14 @@
/// Indicates if the queen died recently, aliens are heavily weakened while this is active.
var/recent_queen_death = FALSE
/obj/item/organ/internal/alien/hivenode/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/alien/hivenode/Insert(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
..()
M.faction |= ROLE_ALIEN
ADD_TRAIT(M, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
organ_owner.faction |= ROLE_ALIEN
ADD_TRAIT(organ_owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
/obj/item/organ/internal/alien/hivenode/Remove(mob/living/carbon/M, special = 0)
M.faction -= ROLE_ALIEN
REMOVE_TRAIT(M, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
/obj/item/organ/internal/alien/hivenode/Remove(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
organ_owner.faction -= ROLE_ALIEN
REMOVE_TRAIT(organ_owner, TRAIT_XENO_IMMUNE, ORGAN_TRAIT)
..()
//When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her.
@@ -215,11 +215,11 @@
stomach_contents -= source
UnregisterSignal(source, list(COMSIG_MOVABLE_MOVED, COMSIG_LIVING_DEATH))
/obj/item/organ/internal/stomach/alien/Insert(mob/living/carbon/stomach_owner, special)
/obj/item/organ/internal/stomach/alien/Insert(mob/living/carbon/stomach_owner, special = FALSE, drop_if_replaced = TRUE)
RegisterSignal(stomach_owner, COMSIG_ATOM_RELAYMOVE, .proc/something_moved)
return ..()
/obj/item/organ/internal/stomach/alien/Remove(mob/living/carbon/stomach_owner, special)
/obj/item/organ/internal/stomach/alien/Remove(mob/living/carbon/stomach_owner, special = FALSE, drop_if_replaced = TRUE)
UnregisterSignal(stomach_owner, COMSIG_ATOM_RELAYMOVE)
return ..()

View File

@@ -853,8 +853,8 @@
if(href_list[VV_HK_PURRBATION])
if(!check_rights(R_SPAWN))
return
if(!ishumanbasic(src))
to_chat(usr, "This can only be done to the basic human species at the moment.")
if(!ishuman(src))
to_chat(usr, "This can only be done to human species at the moment.")
return
var/success = purrbation_toggle(src)
if(success)

View File

@@ -28,87 +28,92 @@
fish.toxpwr = 0
/datum/species/human/felinid/on_species_gain(mob/living/carbon/C, datum/species/old_species, pref_load)
if(ishuman(C))
var/mob/living/carbon/human/H = C
/datum/species/human/felinid/on_species_gain(mob/living/carbon/carbon_being, datum/species/old_species, pref_load)
if(ishuman(carbon_being))
var/mob/living/carbon/human/target_human = carbon_being
if(!pref_load) //Hah! They got forcefully purrbation'd. Force default felinid parts on them if they have no mutant parts in those areas!
H.dna.features["tail_cat"] = "Cat"
if(H.dna.features["ears"] == "None")
H.dna.features["ears"] = "Cat"
if(H.dna.features["ears"] == "Cat")
target_human.dna.features["tail_cat"] = "Cat"
if(target_human.dna.features["ears"] == "None")
target_human.dna.features["ears"] = "Cat"
if(target_human.dna.features["ears"] == "Cat")
var/obj/item/organ/internal/ears/cat/ears = new
ears.Insert(H, drop_if_replaced = FALSE)
ears.Insert(target_human, drop_if_replaced = FALSE)
else
mutantears = /obj/item/organ/internal/ears
return ..()
/proc/mass_purrbation()
for(var/M in GLOB.mob_list)
if(ishuman(M))
purrbation_apply(M)
for(var/mob in GLOB.human_list)
purrbation_apply(mob)
CHECK_TICK
/proc/mass_remove_purrbation()
for(var/M in GLOB.mob_list)
if(ishuman(M))
purrbation_remove(M)
for(var/mob in GLOB.human_list)
purrbation_remove(mob)
CHECK_TICK
/proc/purrbation_toggle(mob/living/carbon/human/H, silent = FALSE)
if(!ishumanbasic(H))
/proc/purrbation_toggle(mob/living/carbon/human/target_human, silent = FALSE)
if(!ishuman(target_human))
return
if(!isfelinid(H))
purrbation_apply(H, silent)
if(!istype(target_human.getorganslot(ORGAN_SLOT_EARS), /obj/item/organ/internal/ears/cat))
purrbation_apply(target_human, silent = silent)
. = TRUE
else
purrbation_remove(H, silent)
purrbation_remove(target_human, silent = silent)
. = FALSE
/proc/purrbation_apply(mob/living/carbon/human/H, silent = FALSE)
if(!ishuman(H) || isfelinid(H))
/proc/purrbation_apply(mob/living/carbon/human/soon_to_be_felinid, silent = FALSE)
if(!ishuman(soon_to_be_felinid) || isfelinid(soon_to_be_felinid))
return
if(ishumanbasic(H))
H.set_species(/datum/species/human/felinid)
var/datum/species/human/felinid/cat_species = H.dna.species
if(ishumanbasic(soon_to_be_felinid))
soon_to_be_felinid.set_species(/datum/species/human/felinid)
var/datum/species/human/felinid/cat_species = soon_to_be_felinid.dna.species
cat_species.original_felinid = FALSE
else
var/obj/item/organ/internal/ears/cat/kitty_ears = new
var/obj/item/organ/external/tail/cat/kitty_tail = new
kitty_ears.Insert(H, TRUE, FALSE) //Gives nonhumans cat tail and ears
kitty_tail.Insert(H, TRUE, FALSE)
kitty_ears.Insert(soon_to_be_felinid, special = TRUE, drop_if_replaced = FALSE) //Gives nonhumans cat tail and ears
kitty_tail.Insert(soon_to_be_felinid, special = TRUE, drop_if_replaced = FALSE)
if(!silent)
to_chat(H, span_boldnotice("Something is nya~t right."))
playsound(get_turf(H), 'sound/effects/meow1.ogg', 50, TRUE, -1)
to_chat(soon_to_be_felinid, span_boldnotice("Something is nya~t right."))
playsound(get_turf(soon_to_be_felinid), 'sound/effects/meow1.ogg', 50, TRUE, -1)
/proc/purrbation_remove(mob/living/carbon/human/H, silent = FALSE)
if(isfelinid(H))
var/datum/species/human/felinid/cat_species = H.dna.species
if(!cat_species.original_felinid)
H.set_species(/datum/species/human)
else if(ishuman(H) && !ishumanbasic(H))
var/datum/species/target_species = H.dna.species
for(var/obj/item/organ/current_organ as anything in H.external_organs)
if(istype(current_organ, /obj/item/organ/external/tail/cat))
current_organ.Remove(H, TRUE)
var/obj/item/organ/external/tail/new_tail = locate(/obj/item/organ/external/tail) in target_species.external_organs
if(new_tail)
new_tail = new new_tail()
new_tail.Insert(H, TRUE, FALSE)
if(istype(current_organ, /obj/item/organ/internal/ears/cat))
var/obj/item/organ/new_ears = new target_species.mutantears
new_ears.Insert(H, TRUE, FALSE)
/proc/purrbation_remove(mob/living/carbon/human/purrbated_human, silent = FALSE)
if(isfelinid(purrbated_human))
var/datum/species/human/felinid/cat_species = purrbated_human.dna.species
if(cat_species.original_felinid)
return // Don't display the to_chat message
purrbated_human.set_species(/datum/species/human)
else if(ishuman(purrbated_human) && !ishumanbasic(purrbated_human))
var/datum/species/target_species = purrbated_human.dna.species
// From the previous check we know they're not a felinid, therefore removing cat ears and tail is safe
var/obj/item/organ/external/tail/old_tail = purrbated_human.getorganslot(ORGAN_SLOT_EXTERNAL_TAIL)
if(istype(old_tail, /obj/item/organ/external/tail/cat))
var/obj/item/organ/external/tail/new_tail = locate(/obj/item/organ/external/tail) in target_species.external_organs
if(new_tail)
new_tail = new new_tail()
new_tail.Insert(purrbated_human, special = TRUE, drop_if_replaced = FALSE)
else
old_tail.Remove(purrbated_human, special = TRUE)
qdel(old_tail)
var/obj/item/organ/internal/ears/old_ears = purrbated_human.getorganslot(ORGAN_SLOT_EARS)
if(istype(old_ears, /obj/item/organ/internal/ears/cat))
var/obj/item/organ/new_ears = new target_species.mutantears()
new_ears.Insert(purrbated_human, special = TRUE, drop_if_replaced = FALSE)
if(!silent)
to_chat(H, span_boldnotice("You are no longer a cat."))
to_chat(purrbated_human, span_boldnotice("You are no longer a cat."))
/datum/species/human/felinid/prepare_human_for_preview(mob/living/carbon/human/human)
human.hairstyle = "Hime Cut"
human.hair_color = "#ffcccc" // pink
human.update_hair(is_creating = TRUE)
/datum/species/human/felinid/prepare_human_for_preview(mob/living/carbon/human/human_for_preview)
human_for_preview.hairstyle = "Hime Cut"
human_for_preview.hair_color = "#ffcccc" // pink
human_for_preview.update_hair(is_creating = TRUE)
var/obj/item/organ/internal/ears/cat/cat_ears = human.getorgan(/obj/item/organ/internal/ears/cat)
var/obj/item/organ/internal/ears/cat/cat_ears = human_for_preview.getorgan(/obj/item/organ/internal/ears/cat)
if (cat_ears)
cat_ears.color = human.hair_color
human.update_body()
cat_ears.color = human_for_preview.hair_color
human_for_preview.update_body()
/datum/species/human/felinid/get_species_description()
return "Felinids are one of the many types of bespoke genetic \

View File

@@ -72,12 +72,12 @@
/obj/item/organ/internal/appendix/get_availability(datum/species/owner_species)
return !(TRAIT_NOHUNGER in owner_species.inherent_traits)
/obj/item/organ/internal/appendix/Remove(mob/living/carbon/organ_owner, special = FALSE)
/obj/item/organ/internal/appendix/Remove(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
REMOVE_TRAIT(organ_owner, TRAIT_DISEASELIKE_SEVERITY_MEDIUM, type)
organ_owner.med_hud_set_status()
..()
/obj/item/organ/internal/appendix/Insert(mob/living/carbon/organ_owner, special = FALSE)
/obj/item/organ/internal/appendix/Insert(mob/living/carbon/organ_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(.)
if(inflamation_stage)

View File

@@ -116,11 +116,11 @@
var/stun_cap_amount = 40
/obj/item/organ/internal/cyberimp/brain/anti_stun/Remove(mob/living/carbon/implant_owner, special = FALSE)
/obj/item/organ/internal/cyberimp/brain/anti_stun/Remove(mob/living/carbon/implant_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
UnregisterSignal(implant_owner, signalCache)
/obj/item/organ/internal/cyberimp/brain/anti_stun/Insert()
/obj/item/organ/internal/cyberimp/brain/anti_stun/Insert(special = FALSE, drop_if_replaced = TRUE)
. = ..()
RegisterSignal(owner, signalCache, .proc/on_signal)

View File

@@ -243,11 +243,11 @@
see_in_dark = NIGHTVISION_FOV_RANGE
sight_flags = SEE_MOBS | SEE_OBJS | SEE_TURFS
/obj/item/organ/internal/eyes/robotic/xray/Insert(mob/living/carbon/eye_owner, special = FALSE)
/obj/item/organ/internal/eyes/robotic/xray/Insert(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
ADD_TRAIT(eye_owner, TRAIT_XRAY_VISION, ORGAN_TRAIT)
/obj/item/organ/internal/eyes/robotic/xray/Remove(mob/living/carbon/eye_owner, special = FALSE)
/obj/item/organ/internal/eyes/robotic/xray/Remove(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = TRUE)
REMOVE_TRAIT(eye_owner, TRAIT_XRAY_VISION, ORGAN_TRAIT)
return ..()
@@ -519,11 +519,11 @@
eye_icon_state = "flyeyes"
icon_state = "eyeballs-fly"
/obj/item/organ/internal/eyes/fly/Insert(mob/living/carbon/eye_owner, special = FALSE)
/obj/item/organ/internal/eyes/fly/Insert(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
ADD_TRAIT(eye_owner, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)
/obj/item/organ/internal/eyes/fly/Remove(mob/living/carbon/eye_owner, special = FALSE)
/obj/item/organ/internal/eyes/fly/Remove(mob/living/carbon/eye_owner, special = FALSE, drop_if_replaced = TRUE)
REMOVE_TRAIT(eye_owner, TRAIT_FLASH_SENSITIVE, ORGAN_TRAIT)
return ..()
@@ -538,7 +538,7 @@
overlay_ignore_lighting = TRUE
var/obj/item/flashlight/eyelight/adapted/adapt_light
/obj/item/organ/internal/eyes/night_vision/maintenance_adapted/Insert(mob/living/carbon/adapted, special = FALSE)
/obj/item/organ/internal/eyes/night_vision/maintenance_adapted/Insert(mob/living/carbon/adapted, special = FALSE, drop_if_replaced = TRUE)
. = ..()
//add lighting
if(!adapt_light)
@@ -561,7 +561,7 @@
applyOrganDamage(-10) //heal quickly
. = ..()
/obj/item/organ/internal/eyes/night_vision/maintenance_adapted/Remove(mob/living/carbon/unadapted, special = FALSE)
/obj/item/organ/internal/eyes/night_vision/maintenance_adapted/Remove(mob/living/carbon/unadapted, special = FALSE, drop_if_replaced = TRUE)
//remove lighting
adapt_light.on = FALSE
adapt_light.update_brightness(unadapted)

View File

@@ -137,12 +137,12 @@
else
last_pump = world.time //lets be extra fair *sigh*
/obj/item/organ/internal/heart/cursed/Insert(mob/living/carbon/accursed, special = 0)
/obj/item/organ/internal/heart/cursed/Insert(mob/living/carbon/accursed, special = FALSE, drop_if_replaced = TRUE)
..()
if(owner)
to_chat(owner, span_userdanger("Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!"))
/obj/item/organ/internal/heart/cursed/Remove(mob/living/carbon/accursed, special = 0)
/obj/item/organ/internal/heart/cursed/Remove(mob/living/carbon/accursed, special = FALSE, drop_if_replaced = TRUE)
..()
accursed.remove_client_colour(/datum/client_colour/cursed_heart_blood)
@@ -276,13 +276,13 @@
. = ..()
add_atom_colour(ethereal_color, FIXED_COLOUR_PRIORITY)
/obj/item/organ/internal/heart/ethereal/Insert(mob/living/carbon/owner, special = 0)
/obj/item/organ/internal/heart/ethereal/Insert(mob/living/carbon/owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
RegisterSignal(owner, COMSIG_MOB_STATCHANGE, .proc/on_stat_change)
RegisterSignal(owner, COMSIG_LIVING_POST_FULLY_HEAL, .proc/on_owner_fully_heal)
RegisterSignal(owner, COMSIG_PARENT_QDELETING, .proc/owner_deleted)
/obj/item/organ/internal/heart/ethereal/Remove(mob/living/carbon/owner, special = 0)
/obj/item/organ/internal/heart/ethereal/Remove(mob/living/carbon/owner, special = FALSE, drop_if_replaced = TRUE)
UnregisterSignal(owner, list(COMSIG_MOB_STATCHANGE, COMSIG_LIVING_POST_FULLY_HEAL, COMSIG_PARENT_QDELETING))
REMOVE_TRAIT(owner, TRAIT_CORPSELOCKED, SPECIES_TRAIT)
stop_crystalization_process(owner)

View File

@@ -12,13 +12,13 @@
adjust_charge(-ETHEREAL_CHARGE_FACTOR * delta_time)
handle_charge(owner, delta_time, times_fired)
/obj/item/organ/internal/stomach/ethereal/Insert(mob/living/carbon/carbon, special = 0)
/obj/item/organ/internal/stomach/ethereal/Insert(mob/living/carbon/carbon, special = FALSE, drop_if_replaced = TRUE)
. = ..()
RegisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, .proc/charge)
RegisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT, .proc/on_electrocute)
ADD_TRAIT(owner, TRAIT_NOHUNGER, REF(src))
/obj/item/organ/internal/stomach/ethereal/Remove(mob/living/carbon/carbon, special = 0)
/obj/item/organ/internal/stomach/ethereal/Remove(mob/living/carbon/carbon, special = FALSE, drop_if_replaced = TRUE)
UnregisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT)
UnregisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT)
REMOVE_TRAIT(owner, TRAIT_NOHUNGER, REF(src))

View File

@@ -46,7 +46,7 @@
/obj/item/organ/internal/tongue/proc/modify_speech(datum/source, list/speech_args)
return speech_args[SPEECH_MESSAGE]
/obj/item/organ/internal/tongue/Insert(mob/living/carbon/tongue_owner, special = 0)
/obj/item/organ/internal/tongue/Insert(mob/living/carbon/tongue_owner, special = FALSE, drop_if_replaced = TRUE)
..()
if(say_mod && tongue_owner.dna && tongue_owner.dna.species)
tongue_owner.dna.species.say_mod = say_mod
@@ -63,7 +63,7 @@
if(!sense_of_taste)
ADD_TRAIT(tongue_owner, TRAIT_AGEUSIA, ORGAN_TRAIT)
/obj/item/organ/internal/tongue/Remove(mob/living/carbon/tongue_owner, special = 0)
/obj/item/organ/internal/tongue/Remove(mob/living/carbon/tongue_owner, special = FALSE, drop_if_replaced = TRUE)
. = ..()
if(say_mod && tongue_owner.dna && tongue_owner.dna.species)
tongue_owner.dna.species.say_mod = initial(tongue_owner.dna.species.say_mod)
@@ -446,7 +446,7 @@
// The timerid for our tonal indicator
var/tonal_timerid
/obj/item/organ/internal/tongue/tied/Insert(mob/living/carbon/signer)
/obj/item/organ/internal/tongue/tied/Insert(mob/living/carbon/signer, special = FALSE, drop_if_replaced = TRUE)
. = ..()
signer.verb_ask = "signs"
signer.verb_exclaim = "signs"
@@ -457,7 +457,7 @@
ADD_TRAIT(signer, TRAIT_SIGN_LANG, ORGAN_TRAIT)
REMOVE_TRAIT(signer, TRAIT_MUTE, ORGAN_TRAIT)
/obj/item/organ/internal/tongue/tied/Remove(mob/living/carbon/speaker, special = 0)
/obj/item/organ/internal/tongue/tied/Remove(mob/living/carbon/speaker, special = FALSE, drop_if_replaced = TRUE)
..()
speaker.verb_ask = initial(speaker.verb_ask)
speaker.verb_exclaim = initial(speaker.verb_exclaim)

View File

@@ -23,11 +23,11 @@
GLOB.zombie_infection_list -= src
. = ..()
/obj/item/organ/internal/zombie_infection/Insert(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/zombie_infection/Insert(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/organ/internal/zombie_infection/Remove(mob/living/carbon/M, special = 0)
/obj/item/organ/internal/zombie_infection/Remove(mob/living/carbon/M, special = FALSE, drop_if_replaced = TRUE)
. = ..()
STOP_PROCESSING(SSobj, src)
if(iszombie(M) && old_species && !special && !QDELETED(src))