mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Changes the is_changeling and is_mindslave procs into proper defines (#25212)
* Changes these procs into proper defines * Henri review
This commit is contained in:
@@ -47,7 +47,7 @@ GLOBAL_LIST(contractors)
|
||||
/// Denotes that this power can not be obtained normally. Primarily used for base types such as [/datum/action/changeling/weapon].
|
||||
#define CHANGELING_UNOBTAINABLE_POWER 3
|
||||
|
||||
#define CHANGELING_FAKEDEATH_TIME 50 SECONDS
|
||||
#define CHANGELING_FAKEDEATH_TIME 50 SECONDS
|
||||
#define CHANGELING_ABSORB_RECENT_SPEECH 8 //The amount of recent spoken lines to gain on absorbing a mob
|
||||
|
||||
/**
|
||||
@@ -62,9 +62,6 @@ GLOBAL_LIST(contractors)
|
||||
*/
|
||||
#define PULSEDEMON_SOURCE_DRAIN_INVALID (-1)
|
||||
|
||||
/proc/ischangeling(mob/M) // TODO: Someone please convert these to proper defines some day.
|
||||
return M.mind?.has_antag_datum(/datum/antagonist/changeling)
|
||||
#define IS_CHANGELING(mob) (isliving(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/changeling))
|
||||
|
||||
// Helper proc that determines if a mob is a mindslave.
|
||||
/proc/ismindslave(mob/living/carbon/human/H)
|
||||
return istype(H) && H.mind.has_antag_datum(/datum/antagonist/mindslave, FALSE)
|
||||
#define IS_MINDSLAVE(mob) (ishuman(mob) && mob?:mind?:has_antag_datum(/datum/antagonist/mindslave, FALSE))
|
||||
|
||||
+2
-2
@@ -962,12 +962,12 @@
|
||||
else if(href_list["changeling"])
|
||||
switch(href_list["changeling"])
|
||||
if("clear")
|
||||
if(ischangeling(current))
|
||||
if(IS_CHANGELING(current))
|
||||
remove_antag_datum(/datum/antagonist/changeling)
|
||||
log_admin("[key_name(usr)] has de-changelinged [key_name(current)]")
|
||||
message_admins("[key_name_admin(usr)] has de-changelinged [key_name_admin(current)]")
|
||||
if("changeling")
|
||||
if(!ischangeling(current))
|
||||
if(!IS_CHANGELING(current))
|
||||
add_antag_datum(/datum/antagonist/changeling)
|
||||
to_chat(current, "<span class='biggerdanger'>Your powers have awoken. A flash of memory returns to us... we are a changeling!</span>")
|
||||
log_admin("[key_name(usr)] has changelinged [key_name(current)]")
|
||||
|
||||
@@ -587,7 +587,7 @@
|
||||
else if(!AT)
|
||||
to_chat(usr, "<span class='warning'>Error: Embedded Syndicate credentials not found.</span>")
|
||||
return
|
||||
else if(ischangeling(usr) || mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
else if(IS_CHANGELING(usr) || mind.has_antag_datum(/datum/antagonist/vampire))
|
||||
to_chat(usr, "<span class='warning'>Error: Embedded Syndicate credentials contain an abnormal signature. Aborting.</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -532,7 +532,7 @@ Congratulations! You are now trained for invasive xenobiology research!"}
|
||||
if(ishuman(L))
|
||||
var/mob/living/carbon/human/H = L
|
||||
species = "<span clas=='notice'>[H.dna.species.name]</span>"
|
||||
if(ischangeling(L))
|
||||
if(IS_CHANGELING(L))
|
||||
species = "<span class='warning'>Changeling lifeform</span>"
|
||||
var/obj/item/organ/internal/heart/gland/temp = locate() in H.internal_organs
|
||||
if(temp)
|
||||
|
||||
@@ -276,7 +276,7 @@
|
||||
if(has_guardian(user))
|
||||
to_chat(user, "You already have a [mob_name]!")
|
||||
return
|
||||
if(user.mind && (ischangeling(user) || user.mind.has_antag_datum(/datum/antagonist/vampire)))
|
||||
if(user.mind && (IS_CHANGELING(user) || user.mind.has_antag_datum(/datum/antagonist/vampire)))
|
||||
to_chat(user, "[ling_failure]")
|
||||
return
|
||||
if(used)
|
||||
|
||||
@@ -276,7 +276,7 @@ GLOBAL_LIST_INIT(potential_theft_objectives, (subtypesof(/datum/theft_objective)
|
||||
if(.)
|
||||
return
|
||||
// If the target is a changeling, then it's an invalid target. Since changelings can not be debrained.
|
||||
if(ischangeling(possible_target.current))
|
||||
if(IS_CHANGELING(possible_target.current))
|
||||
return TARGET_INVALID_CHANGELING
|
||||
|
||||
/datum/objective/debrain/update_explanation_text()
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
return SCANNER_HUSKED
|
||||
if(NO_CLONESCAN in scanned.dna.species.species_traits)
|
||||
return SCANNER_UNCLONEABLE_SPECIES
|
||||
if(!scanned.ckey || !scanned.client || ischangeling(scanned))
|
||||
if(!scanned.ckey || !scanned.client || IS_CHANGELING(scanned))
|
||||
return SCANNER_NO_SOUL
|
||||
if(scanned.suiciding || !scanned.get_int_organ(/obj/item/organ/internal/brain))
|
||||
return SCANNER_BRAIN_ISSUE
|
||||
|
||||
@@ -271,7 +271,7 @@
|
||||
if(HAS_TRAIT(user, TRAIT_RESISTHEAT))
|
||||
to_chat(user, "<span class='warning'>You are already fireproof!</span>")
|
||||
return
|
||||
if(user.mind && (ischangeling(user) || user.mind.has_antag_datum(/datum/antagonist/vampire)) || (user.dna && user.dna.species.name != "Plasmaman"))
|
||||
if(user.mind && (IS_CHANGELING(user) || user.mind.has_antag_datum(/datum/antagonist/vampire)) || (user.dna && user.dna.species.name != "Plasmaman"))
|
||||
to_chat(user, "<span class='warning'>The injector is not compatable with your biology!</span>")
|
||||
return
|
||||
if(used)
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
return FALSE
|
||||
|
||||
// Fails if they're already a mindslave of someone, or if they're mindshielded.
|
||||
if(ismindslave(mindslave_target) || ismindshielded(mindslave_target))
|
||||
if(IS_MINDSLAVE(mindslave_target) || ismindshielded(mindslave_target))
|
||||
mindslave_target.visible_message(
|
||||
"<span class='warning'>[mindslave_target] seems to resist the bio-chip!</span>", \
|
||||
"<span class='warning'>You feel a strange sensation in your head that quickly dissipates.</span>")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
/obj/item/caution/proximity_sign/attack_self(mob/user as mob)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
if(!H.mind.has_antag_datum(/datum/antagonist/traitor) && !ismindslave(H))
|
||||
if(!H.mind.has_antag_datum(/datum/antagonist/traitor) && !IS_MINDSLAVE(H))
|
||||
return
|
||||
if(armed)
|
||||
armed = FALSE
|
||||
|
||||
@@ -757,7 +757,7 @@
|
||||
|
||||
if(!target || !ishuman(target) || !missionary || !ishuman(missionary))
|
||||
return
|
||||
if(ismindslave(target) || target.mind.zealot_master) //mindslaves and zealots override the staff because the staff is just a temporary mindslave
|
||||
if(IS_MINDSLAVE(target) || target.mind.zealot_master) //mindslaves and zealots override the staff because the staff is just a temporary mindslave
|
||||
to_chat(missionary, "<span class='warning'>Your faith is strong, but [target.p_their()] mind is already slaved to someone else's ideals. Perhaps an inquisition would reveal more...</span>")
|
||||
faith -= 25 //same faith cost as losing sight of them mid-conversion, but did you just find someone who can lead you to a fellow traitor?
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
var/confirm = null
|
||||
if(!forced)
|
||||
if(ischangeling(src))
|
||||
if(IS_CHANGELING(src))
|
||||
// the alternative is to allow clings to commit suicide, but then you'd probably have them
|
||||
// killing themselves as soon as they're in cuffs
|
||||
to_chat(src, "<span class='warning'>We refuse to take the coward's way out.</span>")
|
||||
|
||||
@@ -660,7 +660,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
antag_list += "Nuclear Operative"
|
||||
if(iswizard(M))
|
||||
antag_list += "Wizard"
|
||||
if(ischangeling(M))
|
||||
if(IS_CHANGELING(M))
|
||||
antag_list += "Changeling"
|
||||
if(M.mind in SSticker.mode.abductors)
|
||||
antag_list += "Abductor"
|
||||
@@ -670,7 +670,7 @@ GLOBAL_VAR_INIT(nologevent, 0)
|
||||
antag_list += "Vampire Thrall"
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/traitor))
|
||||
antag_list += "Traitor"
|
||||
if(M.mind.has_antag_datum(/datum/antagonist/mindslave, FALSE))
|
||||
if(IS_MINDSLAVE(M))
|
||||
antag_list += "Mindslave"
|
||||
if(isrobot(M))
|
||||
var/mob/living/silicon/robot/R = M
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
/datum/action/changeling/weapon/proc/retract(atom/target, any_hand = FALSE)
|
||||
SIGNAL_HANDLER
|
||||
if(!ischangeling(owner))
|
||||
if(!IS_CHANGELING(owner))
|
||||
return
|
||||
if(!any_hand && !istype(owner.get_active_hand(), weapon_type))
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(H.check_ear_prot() >= HEARING_PROTECTION_TOTAL)
|
||||
continue
|
||||
if(!M.mind || !ischangeling(M))
|
||||
if(!M.mind || !IS_CHANGELING(M))
|
||||
M.Deaf(30 SECONDS)
|
||||
M.AdjustConfused(40 SECONDS)
|
||||
M.Jitter(100 SECONDS)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(!istype(target) || !target.mind || issmall(target) || HAS_TRAIT(target, TRAIT_GENELESS))
|
||||
to_chat(user, "<span class='warning'>[target] is not compatible with this ability.</span>")
|
||||
return FALSE
|
||||
if(ischangeling(target))
|
||||
if(IS_CHANGELING(target))
|
||||
to_chat(user, "<span class='warning'>We are unable to swap forms with another changeling!</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(ismachineperson(target))
|
||||
to_chat(user, "<span class='warning'>This won't work on synthetics.</span>")
|
||||
return FALSE
|
||||
if(ischangeling(target))
|
||||
if(IS_CHANGELING(target))
|
||||
sting_feedback(user, target)
|
||||
take_chemical_cost()
|
||||
return FALSE
|
||||
@@ -67,7 +67,7 @@
|
||||
if(!target)
|
||||
return
|
||||
to_chat(user, "<span class='notice'>We stealthily sting [target.name].</span>")
|
||||
if(ischangeling(target))
|
||||
if(IS_CHANGELING(target))
|
||||
to_chat(target, "<span class='warning'>You feel a tiny prick.</span>")
|
||||
add_attack_logs(user, target, "Unsuccessful sting (changeling)")
|
||||
return TRUE
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
if(V.subclass.thrall_cap <= length(user.mind.som.serv))
|
||||
to_chat(user, "<span class='warning'>You don't have enough power to enthrall any more people!</span>")
|
||||
return
|
||||
if(ismindshielded(C) || C.mind.has_antag_datum(/datum/antagonist/vampire) || C.mind.has_antag_datum(/datum/antagonist/mindslave))
|
||||
if(ismindshielded(C) || C.mind.has_antag_datum(/datum/antagonist/vampire) || IS_MINDSLAVE(C))
|
||||
C.visible_message("<span class='warning'>[C] seems to resist the takeover!</span>", "<span class='notice'>You feel a familiar sensation in your skull that quickly dissipates.</span>")
|
||||
return
|
||||
if(HAS_MIND_TRAIT(C, TRAIT_HOLY))
|
||||
|
||||
@@ -316,7 +316,7 @@
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
if(user.mind) //Prevents changelings and vampires from being able to learn it
|
||||
if(ischangeling(user))
|
||||
if(IS_CHANGELING(user))
|
||||
to_chat(user, "<span class ='warning'>We try multiple times, but we are not able to comprehend the contents of the scroll!</span>")
|
||||
return
|
||||
else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires
|
||||
@@ -340,7 +340,7 @@
|
||||
if(!istype(user) || !user)
|
||||
return
|
||||
if(user.mind) //Prevents changelings and vampires from being able to learn it
|
||||
if(ischangeling(user))
|
||||
if(IS_CHANGELING(user))
|
||||
to_chat(user, "<span class='warning'>We try multiple times, but we simply cannot grasp the basics of CQC!</span>")
|
||||
return
|
||||
else if(user.mind.has_antag_datum(/datum/antagonist/vampire)) //Vampires
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(sponge)
|
||||
return min(sponge.damage,maxHealth*2)
|
||||
else
|
||||
if(ischangeling(src))
|
||||
if(IS_CHANGELING(src))
|
||||
// if a changeling has no brain, they have no brain damage.
|
||||
return 0
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/headslug/projectile_hit_check(obj/item/projectile/P)
|
||||
return (stat || FALSE)
|
||||
|
||||
|
||||
/obj/item/organ/internal/body_egg/changeling_egg
|
||||
name = "changeling egg"
|
||||
desc = "Twitching and disgusting."
|
||||
@@ -95,7 +95,7 @@
|
||||
|
||||
if(origin && origin.current && (origin.current.stat == DEAD))
|
||||
origin.transfer_to(M)
|
||||
var/datum/antagonist/changeling/cling = M.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
var/datum/antagonist/changeling/cling = IS_CHANGELING(M)
|
||||
if(cling.can_absorb_dna(owner))
|
||||
cling.absorb_dna(owner)
|
||||
|
||||
|
||||
@@ -883,7 +883,7 @@
|
||||
|
||||
game_plane_master_controller.add_filter(MEPHEDRONE_SCREEN_BLUR, 1, list("type" = "radial_blur", "size" = 0.02))
|
||||
|
||||
if(!ischangeling(L) || HAS_TRAIT(L, TRAIT_MEPHEDRONE_ADAPTED))
|
||||
if(!IS_CHANGELING(L) || HAS_TRAIT(L, TRAIT_MEPHEDRONE_ADAPTED))
|
||||
return
|
||||
var/datum/antagonist/changeling/cling = L.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
cling.chem_recharge_slowdown += 1
|
||||
@@ -901,7 +901,7 @@
|
||||
if(overdosed)
|
||||
UnregisterSignal(L, COMSIG_ATOM_PREHIT)
|
||||
|
||||
if(ischangeling(L))
|
||||
if(IS_CHANGELING(L))
|
||||
var/datum/antagonist/changeling/cling = L.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
cling.chem_recharge_slowdown -= changeling_chemical_tracker
|
||||
changeling_chemical_tracker = 0
|
||||
@@ -1014,7 +1014,7 @@
|
||||
RegisterSignal(L, COMSIG_ATOM_PREHIT, PROC_REF(dodge_bullets))
|
||||
|
||||
L.next_move_modifier -= 0.2 // Overdosing makes you a liiitle faster but you know has some really bad consequences
|
||||
if(ischangeling(L))
|
||||
if(IS_CHANGELING(L))
|
||||
var/datum/antagonist/changeling/cling = L.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
cling.chem_recharge_slowdown += 1
|
||||
changeling_chemical_tracker += 1
|
||||
@@ -1036,7 +1036,7 @@
|
||||
|
||||
L.next_move_modifier += 0.2
|
||||
|
||||
if(ischangeling(L))
|
||||
if(IS_CHANGELING(L))
|
||||
var/datum/antagonist/changeling/cling = L.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
if(changeling_chemical_tracker > 0) //Just in case this gets called somehow after on_remove is done
|
||||
cling.chem_recharge_slowdown -= 1
|
||||
|
||||
@@ -905,7 +905,7 @@
|
||||
if(method == REAGENT_INGEST || (method == REAGENT_TOUCH && prob(25)))
|
||||
if(M.stat == DEAD)
|
||||
if(M.getBruteLoss() + M.getFireLoss() + M.getCloneLoss() >= 150)
|
||||
if(ischangeling(M))
|
||||
if(IS_CHANGELING(M))
|
||||
return
|
||||
M.delayed_gib(TRUE)
|
||||
return
|
||||
|
||||
@@ -101,7 +101,7 @@
|
||||
var/mob/living/carbon/human/H = target
|
||||
H.update_hair()
|
||||
|
||||
if(ischangeling(target))
|
||||
if(IS_CHANGELING(target))
|
||||
decoy_brain = TRUE
|
||||
|
||||
if(!brain_already_exists)
|
||||
|
||||
Reference in New Issue
Block a user