Merge pull request #33783 from Cruix/fix_blind

Prefixed all disability defines with DISABILITY_ to fix a name collision
This commit is contained in:
Jordan Brown
2017-12-24 11:45:45 -05:00
committed by GitHub
83 changed files with 173 additions and 173 deletions
+4 -4
View File
@@ -16,7 +16,7 @@
/mob/living/carbon/monkey/handle_blood()
if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL)
blood_volume += 0.1 // regenerate blood VERY slowly
@@ -28,7 +28,7 @@
bleed_rate = 0
return
if(bodytemperature >= 225 && !(has_disability(NOCLONE))) //cryosleep or husked people do not pump the blood.
if(bodytemperature >= 225 && !(has_disability(DISABILITY_NOCLONE))) //cryosleep or husked people do not pump the blood.
//Blood regeneration if there is some space
if(blood_volume < BLOOD_VOLUME_NORMAL && !(NOHUNGER in dna.species.species_traits))
@@ -201,13 +201,13 @@
return "blood"
/mob/living/carbon/monkey/get_blood_id()
if(!(has_disability(NOCLONE)))
if(!(has_disability(DISABILITY_NOCLONE)))
return "blood"
/mob/living/carbon/human/get_blood_id()
if(dna.species.exotic_blood)
return dna.species.exotic_blood
else if((NOBLOOD in dna.species.species_traits) || (has_disability(NOCLONE)))
else if((NOBLOOD in dna.species.species_traits) || (has_disability(DISABILITY_NOCLONE)))
return
return "blood"
+2 -2
View File
@@ -79,8 +79,8 @@
if(!brainmob.stored_dna)
brainmob.stored_dna = new /datum/dna/stored(brainmob)
C.dna.copy_dna(brainmob.stored_dna)
if(L.has_disability(NOCLONE))
brainmob.disabilities[NOCLONE] = L.disabilities[NOCLONE]
if(L.has_disability(DISABILITY_NOCLONE))
brainmob.disabilities[DISABILITY_NOCLONE] = L.disabilities[DISABILITY_NOCLONE]
var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE)
if(ZI)
brainmob.set_species(ZI.old_species) //For if the brain is cloned
@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// EYE_BLIND ////////////////////////////////////
@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// STUN ////////////////////////////////////
+4 -4
View File
@@ -157,7 +157,7 @@
if(!throwable_mob.buckled)
thrown_thing = throwable_mob
stop_pulling()
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(src, "<span class='notice'>You gently let go of [throwable_mob].</span>")
var/turf/start_T = get_turf(loc) //Get the start and target tile for the descriptors
var/turf/end_T = get_turf(target)
@@ -170,7 +170,7 @@
thrown_thing = I
dropItemToGround(I)
if(has_disability(PACIFISM) && I.throwforce)
if(has_disability(DISABILITY_PACIFISM) && I.throwforce)
to_chat(src, "<span class='notice'>You set [I] down gently on the ground.</span>")
return
@@ -409,7 +409,7 @@
dropItemToGround(I)
var/modifier = 0
if(has_disability(CLUMSY))
if(has_disability(DISABILITY_CLUMSY))
modifier -= 40 //Clumsy people are more likely to hit themselves -Honk!
switch(rand(1,100)+modifier) //91-100=Nothing special happens
@@ -774,7 +774,7 @@
reagents.addiction_list = list()
cure_all_traumas(TRUE, TRUE)
..()
// heal ears after healing disabilities, since ears check DEAF disability
// heal ears after healing disabilities, since ears check DISABILITY_DEAF disability
// when healing.
restoreEars()
@@ -300,12 +300,12 @@
if(eyes.eye_damage > 20)
if(prob(eyes.eye_damage - 20))
if(!has_disability(NEARSIGHT))
if(!has_disability(DISABILITY_NEARSIGHT))
to_chat(src, "<span class='warning'>Your eyes start to burn badly!</span>")
become_nearsighted(EYE_DAMAGE)
else if(prob(eyes.eye_damage - 25))
if(!has_disability(BLIND))
if(!has_disability(DISABILITY_BLIND))
to_chat(src, "<span class='warning'>You can't see anything!</span>")
become_blind(EYE_DAMAGE)
+1 -1
View File
@@ -70,7 +70,7 @@
else
msg += "<b>[t_He] [t_is] severely deformed!</b>\n"
if(has_disability(DUMB))
if(has_disability(DISABILITY_DUMB))
msg += "[t_He] seem[p_s()] to be clumsy and unable to think.\n"
if(fire_stacks > 0)
@@ -49,6 +49,6 @@
/mob/living/carbon/proc/Drain()
become_husk(CHANGELING_DRAIN)
add_disability(NOCLONE, CHANGELING_DRAIN)
add_disability(DISABILITY_NOCLONE, CHANGELING_DRAIN)
blood_volume = 0
return 1
@@ -279,7 +279,7 @@
if(stat == UNCONSCIOUS)
msg += "[t_He] [t_is]n't responding to anything around [t_him] and seem[p_s()] to be asleep.\n"
else
if(has_disability(DUMB))
if(has_disability(DISABILITY_DUMB))
msg += "[t_He] [t_has] a stupid expression on [t_his] face.\n"
if(InCritical())
msg += "[t_He] [t_is] barely conscious.\n"
@@ -143,7 +143,7 @@
return ..()
/mob/living/carbon/human/grabbedby(mob/living/carbon/user, supress_message = 0)
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(FAT)) && ismonkey(pulling))
if(user == src && pulling && !pulling.anchored && grab_state >= GRAB_AGGRESSIVE && (has_disability(DISABILITY_FAT)) && ismonkey(pulling))
devour_mob(pulling)
else
..()
@@ -92,7 +92,7 @@
/mob/living/carbon/human/IsAdvancedToolUser()
if(has_disability(MONKEYLIKE))
if(has_disability(DISABILITY_MONKEYLIKE))
return FALSE
return TRUE//Humans can use guns and such
@@ -339,7 +339,7 @@
if(TRAITS & TRAIT_SMART)
smartness = 75
else if(TRAITS & TRAIT_DUMB)
add_disability(CLUMSY, GENETIC_MUTATION)
add_disability(DISABILITY_CLUMSY, GENETIC_MUTATION)
smartness = 25
if(TRAITS & TRAIT_MEAN)
@@ -187,7 +187,7 @@
if(G.tint)
update_tint()
if(G.vision_correction)
if(has_disability(NEARSIGHT))
if(has_disability(DISABILITY_NEARSIGHT))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
adjust_eye_damage(0)
if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha))
+10 -10
View File
@@ -299,7 +299,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(!HD) //Decapitated
return
if(H.has_disability(HUSK))
if(H.has_disability(DISABILITY_HUSK))
return
var/datum/sprite_accessory/S
var/list/standing = list()
@@ -440,7 +440,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
if(HD && !(H.has_disability(HUSK)))
if(HD && !(H.has_disability(DISABILITY_HUSK)))
// lipstick
if(H.lip_style && (LIPS in species_traits))
var/mutable_appearance/lip_overlay = mutable_appearance('icons/mob/human_face.dmi', "lips_[H.lip_style]", -BODY_LAYER)
@@ -644,7 +644,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
if(S.center)
accessory_overlay = center_image(accessory_overlay, S.dimension_x, S.dimension_y)
if(!(H.has_disability(HUSK)))
if(!(H.has_disability(DISABILITY_HUSK)))
if(!forced_colour)
switch(S.color_src)
if(MUTCOLORS)
@@ -939,17 +939,17 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/handle_digestion(mob/living/carbon/human/H)
//The fucking FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(H.has_disability(FAT))//I share your pain, past coder.
//The fucking DISABILITY_FAT mutation is the dumbest shit ever. It makes the code so difficult to work with
if(H.has_disability(DISABILITY_FAT))//I share your pain, past coder.
if(H.overeatduration < 100)
to_chat(H, "<span class='notice'>You feel fit again!</span>")
H.remove_disability(FAT, OBESITY)
H.remove_disability(DISABILITY_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
else
if(H.overeatduration > 500)
to_chat(H, "<span class='danger'>You suddenly feel blubbery!</span>")
H.add_disability(FAT, OBESITY)
H.add_disability(DISABILITY_FAT, OBESITY)
H.update_inv_w_uniform()
H.update_inv_wear_suit()
@@ -1106,7 +1106,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
. += (health_deficiency / 25)
if((hungry >= 70) && !flight) //Being hungry won't stop you from using flightpack controls/flapping your wings although it probably will in the wing case but who cares.
. += hungry / 50
if(H.has_disability(FAT))
if(H.has_disability(DISABILITY_FAT))
. += (1.5 - flight)
if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT)
. += (BODYTEMP_COLD_DAMAGE_LIMIT - H.bodytemperature) / COLD_SLOWDOWN_FACTOR
@@ -1152,7 +1152,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
/datum/species/proc/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style)
if(user.has_disability(PACIFISM))
if(user.has_disability(DISABILITY_PACIFISM))
to_chat(user, "<span class='warning'>You don't want to harm [target]!</span>")
return FALSE
if(target.check_block())
@@ -1214,7 +1214,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
return 1
else
user.do_attack_animation(target, ATTACK_EFFECT_DISARM)
if(target.w_uniform)
target.w_uniform.add_fingerprint(user)
var/randomized_zone = ran_zone(user.zone_selected)
@@ -727,7 +727,7 @@
/obj/structure/cloth_pile/proc/revive()
if(QDELETED(src) || QDELETED(cloth_golem)) //QDELETED also checks for null, so if no cloth golem is set this won't runtime
return
if(cloth_golem.suiciding || cloth_golem.has_disability(NOCLONE))
if(cloth_golem.suiciding || cloth_golem.has_disability(DISABILITY_NOCLONE))
QDEL_NULL(cloth_golem)
return
@@ -600,7 +600,7 @@ generate/load female uniform sprites matching all previously decided variables
if(BP.dmg_overlay_type)
. += "-[BP.dmg_overlay_type]"
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
. += "-husk"
/mob/living/carbon/human/load_limb_from_cache()
@@ -122,7 +122,7 @@
if(L == src)
return FALSE
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
return FALSE
if(enemies[L])
@@ -19,7 +19,7 @@
if(!HD) //Decapitated
return
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
return
var/hair_hidden = 0
@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, DISABILITY_NEARSIGHT disability, and DISABILITY_HUSK disability.
/mob/living/carbon/damage_eyes(amount)
var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES)
@@ -279,7 +279,7 @@
else
. += "-robotic"
if(has_disability(HUSK))
if(has_disability(DISABILITY_HUSK))
. += "-husk"
+2 -2
View File
@@ -123,7 +123,7 @@
/mob/living/proc/handle_disabilities()
//Eyes
if(eye_blind) //blindness, heals slowly over time
if(!stat && !(has_disability(BLIND)))
if(!stat && !(has_disability(DISABILITY_BLIND)))
eye_blind = max(eye_blind-1,0)
if(client && !eye_blind)
clear_alert("blind")
@@ -134,7 +134,7 @@
eye_blurry = max(eye_blurry-1, 0)
if(client && !eye_blurry)
clear_fullscreen("blurry")
if(has_disability(PACIFISM) && a_intent == INTENT_HARM)
if(has_disability(DISABILITY_PACIFISM) && a_intent == INTENT_HARM)
to_chat(src, "<span class='notice'>You don't feel like harming anybody.</span>")
a_intent_change(INTENT_HELP)
+1 -1
View File
@@ -806,7 +806,7 @@
if(G.trigger_guard != TRIGGER_GUARD_ALLOW_ALL && !IsAdvancedToolUser())
to_chat(src, "<span class='warning'>You don't have the dexterity to do this!</span>")
return FALSE
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(src, "<span class='notice'>You don't want to risk harming anyone!</span>")
return FALSE
return TRUE
+7 -7
View File
@@ -136,7 +136,7 @@
to_chat(user, "<span class='warning'>[src] can't be grabbed more aggressively!</span>")
return FALSE
if(user.has_disability(PACIFISM))
if(user.has_disability(DISABILITY_PACIFISM))
to_chat(user, "<span class='notice'>You don't want to risk hurting [src]!</span>")
return FALSE
@@ -193,7 +193,7 @@
M.Feedstop()
return // can't attack while eating!
if(has_disability(PACIFISM))
if(has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -210,7 +210,7 @@
M.visible_message("<span class='notice'>\The [M] [M.friendly] [src]!</span>")
return FALSE
else
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -229,7 +229,7 @@
return FALSE
if (M.a_intent == INTENT_HARM)
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
@@ -255,7 +255,7 @@
return FALSE
else
if(L.has_disability(PACIFISM))
if(L.has_disability(DISABILITY_PACIFISM))
to_chat(L, "<span class='notice'>You don't want to hurt anyone!</span>")
return
@@ -280,7 +280,7 @@
grabbedby(M)
return FALSE
if("harm")
if(M.has_disability(PACIFISM))
if(M.has_disability(DISABILITY_PACIFISM))
to_chat(M, "<span class='notice'>You don't want to hurt anyone!</span>")
return FALSE
M.do_attack_animation(src)
@@ -370,7 +370,7 @@
//called when the mob receives a bright flash
/mob/living/proc/flash_act(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash)
if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(BLIND))))
if(get_eye_protection() < intensity && (override_blindness_check || !(has_disability(DISABILITY_BLIND))))
overlay_fullscreen("flash", type)
addtimer(CALLBACK(src, .proc/clear_fullscreen, "flash", 25), 25)
return 1
+2 -2
View File
@@ -134,7 +134,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
// Detection of language needs to be before inherent channels, because
// AIs use inherent channels for the holopad. Most inherent channels
// ignore the language argument however.
var/datum/saymode/SM = SSradio.saymodes[talk_key]
if(SM && !SM.handle_message(src, message, language))
return
@@ -283,7 +283,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
return 1
/mob/living/proc/can_speak_vocal(message) //Check AFTER handling of xeno and ling channels
if(has_disability(MUTE))
if(has_disability(DISABILITY_MUTE))
return 0
if(is_muzzled())
@@ -558,7 +558,7 @@ Difficulty: Very Hard
H.regenerate_limbs()
H.regenerate_organs()
H.revive(1,0)
H.add_disability(NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal
H.add_disability(DISABILITY_NOCLONE, MAGIC_DISABILITY) //Free revives, but significantly limits your options for reviving except via the crystal
H.grab_ghost(force = TRUE)
/obj/machinery/anomalous_crystal/helpers //Lets ghost spawn as helpful creatures that can only heal people slightly. Incredibly fragile and they can't converse with humans
@@ -719,7 +719,7 @@ Difficulty: Very Hard
if(isliving(A) && holder_animal)
var/mob/living/L = A
L.notransform = 1
L.add_disability(MUTE, STASIS_MUTE)
L.add_disability(DISABILITY_MUTE, STASIS_MUTE)
L.status_flags |= GODMODE
L.mind.transfer_to(holder_animal)
var/obj/effect/proc_holder/spell/targeted/exit_possession/P = new /obj/effect/proc_holder/spell/targeted/exit_possession
@@ -729,7 +729,7 @@ Difficulty: Very Hard
/obj/structure/closet/stasis/dump_contents(var/kill = 1)
STOP_PROCESSING(SSobj, src)
for(var/mob/living/L in src)
L.remove_disability(MUTE, STASIS_MUTE)
L.remove_disability(DISABILITY_MUTE, STASIS_MUTE)
L.status_flags &= ~GODMODE
L.notransform = 0
if(holder_animal)
+13 -13
View File
@@ -1,6 +1,6 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
////////////////////////////// STUN ////////////////////////////////////
@@ -183,33 +183,33 @@
/////////////////////////////////// DISABILITY PROCS ////////////////////////////////////
/mob/living/proc/cure_blind(list/sources)
remove_disability(BLIND, sources)
if(!has_disability(BLIND))
remove_disability(DISABILITY_BLIND, sources)
if(!has_disability(DISABILITY_BLIND))
adjust_blindness(-1)
/mob/living/proc/become_blind(source)
if(!has_disability(BLIND))
if(!has_disability(DISABILITY_BLIND))
blind_eyes(1)
add_disability(BLIND, source)
add_disability(DISABILITY_BLIND, source)
/mob/living/proc/cure_nearsighted(list/sources)
remove_disability(NEARSIGHT, sources)
if(!has_disability(NEARSIGHT))
remove_disability(DISABILITY_NEARSIGHT, sources)
if(!has_disability(DISABILITY_NEARSIGHT))
clear_fullscreen("nearsighted")
/mob/living/proc/become_nearsighted(source)
if(!has_disability(NEARSIGHT))
if(!has_disability(DISABILITY_NEARSIGHT))
overlay_fullscreen("nearsighted", /obj/screen/fullscreen/impaired, 1)
add_disability(NEARSIGHT, source)
add_disability(DISABILITY_NEARSIGHT, source)
/mob/living/proc/cure_husk(list/sources)
remove_disability(HUSK, sources)
if(!has_disability(HUSK))
remove_disability(DISABILITY_HUSK, sources)
if(!has_disability(DISABILITY_HUSK))
status_flags &= ~DISFIGURED
update_body()
/mob/living/proc/become_husk(source)
if(!has_disability(HUSK))
if(!has_disability(DISABILITY_HUSK))
status_flags |= DISFIGURED //makes them unknown
update_body()
add_disability(HUSK, source)
add_disability(DISABILITY_HUSK, source)
+3 -3
View File
@@ -1,7 +1,7 @@
//Here are the procs used to modify status effects of a mob.
//The effects include: stun, knockdown, unconscious, sleeping, resting, jitteriness, dizziness, ear damage,
// eye damage, eye_blind, eye_blurry, druggy, BLIND disability, and NEARSIGHT disability.
// eye damage, eye_blind, eye_blurry, druggy, DISABILITY_BLIND disability, and DISABILITY_NEARSIGHT disability.
/////////////////////////////////// STUN ////////////////////////////////////
@@ -164,7 +164,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_disability(BLIND))
if(L.has_disability(DISABILITY_BLIND))
blind_minimum = 1
eye_blind = max(eye_blind+amount, blind_minimum)
if(!eye_blind)
@@ -185,7 +185,7 @@
blind_minimum = 1
if(isliving(src))
var/mob/living/L = src
if(L.has_disability(BLIND))
if(L.has_disability(DISABILITY_BLIND))
blind_minimum = 1
eye_blind = blind_minimum
if(!eye_blind)