diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 8cc7145ccd5..97f797b2718 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -18,8 +18,8 @@ /////////////////////////////////////// // Generic mutations: -#define TK 1 -#define RESIST_COLD 2 +#define TK 1 +#define RESIST_COLD 2 #define XRAY 3 #define HULK 4 #define CLUMSY 5 @@ -30,78 +30,52 @@ // Extra powers: #define LASER 9 // harm intent - click anywhere to shoot lasers from eyes -//#define HEAL 10 // (Not implemented) healing people with hands -//#define SHADOW 11 // (Not implemented) shadow teleportation (create in/out portals anywhere) (25%) -//#define SCREAM 12 // (Not implemented) supersonic screaming (25%) -//#define EXPLOSIVE 13 // (Not implemented) exploding on-demand (15%) -//#define REGENERATION 14 // (Not implemented) superhuman regeneration (30%) -//#define REPROCESSOR 15 // (Not implemented) eat anything (50%) -//#define SHAPESHIFTING 16 // (Not implemented) take on the appearance of anything (40%) -//#define PHASING 17 // (Not implemented) ability to phase through walls (40%) -//#define SHIELD 18 // (Not implemented) shielding from all projectile attacks (30%) -//#define SHOCKWAVE 19 // (Not implemented) attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) -//#define ELECTRICITY 20 // (Not implemented) ability to shoot electric attacks (15%) -//bitflags for mutations - // Extra powers: -#define SHADOW (1<<10) // shadow teleportation (create in/out portals anywhere) (25%) -#define SCREAM (1<<11) // supersonic screaming (25%) -#define EXPLOSIVE (1<<12) // exploding on-demand (15%) -#define REGENERATION (1<<13) // superhuman regeneration (30%) -#define REPROCESSOR (1<<14) // eat anything (50%) -#define SHAPESHIFTING (1<<15) // take on the appearance of anything (40%) -#define PHASING (1<<16) // ability to phase through walls (40%) -#define SHIELD (1<<17) // shielding from all projectile attacks (30%) -#define SHOCKWAVE (1<<18) // attack a nearby tile and cause a massive shockwave, knocking most people on their asses (25%) -#define ELECTRICITY (1<<19) // ability to shoot electric attacks (15%) - - - //2spooky +//2spooky #define SKELETON 29 #define PLANT 30 // Other Mutations: #define NO_BREATH 100 // no need to breathe -#define REMOTE_VIEW 101 // remote viewing +#define REMOTE_VIEW 101 // remote viewing #define REGEN 102 // health regen -#define RUN 103 // no slowdown -#define REMOTE_TALK 104 // remote talking +#define RUN 103 // no slowdown +#define REMOTE_TALK 104 // remote talking #define MORPH 105 // changing appearance -#define RESIST_HEAT 106 // heat resistance -#define HALLUCINATE 107 // hallucinations +#define RESIST_HEAT 106 // heat resistance +#define HALLUCINATE 107 // hallucinations #define FINGERPRINTS 108 // no fingerprints #define NO_SHOCK 109 // insulated hands #define DWARF 110 // table climbing // Goon muts -#define OBESITY 200 // Decreased metabolism -#define TOXIC_FARTS 201 // Duh -#define STRONG 202 // (Nothing) -#define SOBER 203 // Increased alcohol metabolism -#define PSY_RESIST 204 // Block remoteview -#define SUPER_FART 205 // Duh -#define EMPATH 206 //Read minds +#define OBESITY 200 // Decreased metabolism +#define TOXIC_FARTS 201 // Duh +#define STRONG 202 // (Nothing) +#define SOBER 203 // Increased alcohol metabolism +#define PSY_RESIST 204 // Block remoteview +#define SUPER_FART 205 // Duh +#define EMPATH 206 //Read minds #define COMIC 207 //Comic Sans // /vg/ muts -#define LOUD 208 // CAUSES INTENSE YELLING -//#define WHISPER 209 // causes quiet whispering -#define DIZZY 210 // Trippy. +#define LOUD 208 // CAUSES INTENSE YELLING +#define DIZZY 210 // Trippy. -#define LISP 300 -#define RADIOACTIVE 301 -#define CHAV 302 -#define SWEDISH 303 -#define SCRAMBLED 304 -#define HORNS 305 -#define IMMOLATE 306 -#define CLOAK 307 -#define CHAMELEON 308 -#define CRYO 309 -#define EATER 310 +#define LISP 300 +#define RADIOACTIVE 301 +#define CHAV 302 +#define SWEDISH 303 +#define SCRAMBLED 304 +#define HORNS 305 +#define IMMOLATE 306 +#define CLOAK 307 +#define CHAMELEON 308 +#define CRYO 309 +#define EATER 310 -#define JUMPY 400 -#define POLYMORPH 401 +#define JUMPY 400 +#define POLYMORPH 401 //disabilities #define NEARSIGHTED 1 @@ -109,11 +83,9 @@ #define COUGHING 4 #define TOURETTES 8 #define NERVOUS 16 - -//sdisabilities -#define BLIND 1 -#define MUTE 2 -#define DEAF 4 +#define BLIND 32 +#define MUTE 64 +#define DEAF 128 //Nutrition levels for humans. No idea where else to put it #define NUTRITION_LEVEL_FAT 600 diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index b642b034921..73b2b7304f6 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -53,7 +53,6 @@ var/CHAMELEONBLOCK = 0 var/CRYOBLOCK = 0 var/EATBLOCK = 0 var/JUMPBLOCK = 0 -//var/MELTBLOCK = 0 var/EMPATHBLOCK = 0 var/SUPERFARTBLOCK = 0 var/IMMOLATEBLOCK = 0 @@ -63,7 +62,6 @@ var/POLYMORPHBLOCK = 0 // /vg/ Mutations /////////////////////////////// var/LOUDBLOCK = 0 -//var/WHISPERBLOCK = 0 var/DIZZYBLOCK = 0 var/list/reg_dna = list( ) //this appears to be a list of UE == real_name correlations diff --git a/code/datums/mind.dm b/code/datums/mind.dm index da332e3970f..2863e8a595c 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -1055,18 +1055,13 @@ switch(href_list["shadowling"]) if("clear") ticker.mode.update_shadow_icons_removed(src) - current.spell_list.Cut() if(src in ticker.mode.shadows) ticker.mode.shadows -= src special_role = null to_chat(current, "Your powers have been quenched! You are no longer a shadowling!") - current.spell_list.Cut() - if(current.mind) - current.mind.spell_list.Cut() message_admins("[key_name_admin(usr)] has de-shadowlinged [current].") log_admin("[key_name(usr)] has de-shadowlinged [current].") - remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) - remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_ascend) + current.spellremove(current) current.remove_language("Shadowling Hivemind") else if(src in ticker.mode.shadowling_thralls) ticker.mode.remove_thrall(src,0) @@ -1488,9 +1483,17 @@ return (duration <= world.time - brigged_since) -/datum/mind/proc/AddSpell(var/obj/effect/proc_holder/spell/spell) - spell_list += spell - spell.action.Grant(current) +/datum/mind/proc/AddSpell(obj/effect/proc_holder/spell/S) + spell_list += S + S.action.Grant(current) + +/datum/mind/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind + if(!spell) + return + for(var/obj/effect/proc_holder/spell/S in spell_list) + if(istype(S, spell)) + qdel(S) + spell_list -= S /datum/mind/proc/transfer_actions(var/mob/living/new_character) if(current && current.actions) diff --git a/code/datums/spell.dm b/code/datums/spell.dm index fa48fcd2ee7..c7aa3dfd9a0 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -57,7 +57,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin /obj/effect/proc_holder/spell/proc/cast_check(skipcharge = 0, mob/living/user = usr) //checks if the spell can be cast based on its settings; skipcharge is used when an additional cast_check is called inside the spell - if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.spell_list)) + if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) to_chat(user, "You shouldn't have this spell! Something's wrong.") return 0 if(istype(user, /mob/living/carbon/human)) @@ -91,7 +91,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if(ishuman(user) && (invocation_type == "whisper" || invocation_type == "shout") && user.is_muzzled()) to_chat(user, "Mmmf mrrfff!") return 0 - var/obj/effect/proc_holder/spell/noclothes/spell = locate() in (user.spell_list | (user.mind ? user.mind.spell_list : list())) + var/obj/effect/proc_holder/spell/noclothes/spell = locate() in (user.mob_spell_list | (user.mind ? user.mind.spell_list : list())) if(clothes_req && !(spell && istype(spell)))//clothes check if(!istype(user, /mob/living/carbon/human)) to_chat(user, "You aren't a human, Why are you trying to cast a human spell, silly non-human? Casting human spells is for humans.") @@ -360,7 +360,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin return 1 /obj/effect/proc_holder/spell/proc/can_cast(mob/user = usr) - if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.spell_list)) + if(((!user.mind) || !(src in user.mind.spell_list)) && !(src in user.mob_spell_list)) return 0 if(user.z == ZLEVEL_CENTCOMM && !centcom_cancast) //Certain spells are not allowed on the centcom zlevel @@ -386,7 +386,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin if((invocation_type == "whisper" || invocation_type == "shout") && H.is_muzzled()) return 0 - var/obj/effect/proc_holder/spell/noclothes/clothcheck = locate() in user.spell_list + var/obj/effect/proc_holder/spell/noclothes/clothcheck = locate() in user.mob_spell_list var/obj/effect/proc_holder/spell/noclothes/clothcheck2 = locate() in user.mind.spell_list if(clothes_req && !(clothcheck && istype(clothcheck)) && !(clothcheck2 && istype(clothcheck2)))//clothes check if(!istype(H.wear_suit, /obj/item/clothing/suit/wizrobe) && !istype(H.wear_suit, /obj/item/clothing/suit/space/rig/wizard)) diff --git a/code/datums/spells/charge.dm b/code/datums/spells/charge.dm index b46472c35b9..1551dbc3b68 100644 --- a/code/datums/spells/charge.dm +++ b/code/datums/spells/charge.dm @@ -20,8 +20,8 @@ if(L.pulling && (istype(L.pulling, /mob/living))) var/mob/living/M = L.pulling - if(M.spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) - for(var/obj/effect/proc_holder/spell/S in M.spell_list) + if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0)) + for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) S.charge_counter = S.charge_max if(M.mind) for(var/obj/effect/proc_holder/spell/S in M.mind.spell_list) diff --git a/code/datums/spells/genetic.dm b/code/datums/spells/genetic.dm index 036e2158989..e61819dc183 100644 --- a/code/datums/spells/genetic.dm +++ b/code/datums/spells/genetic.dm @@ -2,7 +2,7 @@ name = "Genetic" desc = "This spell inflicts a set of mutations and disabilities upon the target." - var/sdisabilities = 0 //bits + var/disabilities = 0 //bits var/list/mutations = list() //mutation strings var/duration = 100 //deciseconds /* @@ -22,14 +22,14 @@ target.mutations.Add(x) /* if(x == HULK && ishuman(target)) target:hulk_time=world.time + duration */ - target.sdisabilities |= sdisabilities + target.disabilities |= disabilities target.update_mutations() //update target's mutation overlays var/mob/living/carbon/human/H = target if(ishuman(target)) H.update_body() spawn(duration) target.mutations.Remove(mutations) - target.sdisabilities &= ~sdisabilities + target.disabilities &= ~disabilities target.update_mutations() if(ishuman(target)) H.update_body() diff --git a/code/datums/spells/mind_transfer.dm b/code/datums/spells/mind_transfer.dm index 514cb95dce4..4195052fdda 100644 --- a/code/datums/spells/mind_transfer.dm +++ b/code/datums/spells/mind_transfer.dm @@ -19,19 +19,18 @@ Urist: I don't feel like figuring out how you store object spells so I'm leaving Make sure spells that are removed from spell_list are actually removed and deleted when mind transfering. Also, you never added distance checking after target is selected. I've went ahead and did that. */ -/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets,mob/user = usr) +/obj/effect/proc_holder/spell/targeted/mind_transfer/cast(list/targets, mob/user = usr, distanceoverride) if(!targets.len) to_chat(user, "No mind found.") return if(targets.len > 1) to_chat(user, "Too many minds! You're not a hive damnit!")//Whaa...aat? - return var/mob/living/target = targets[1] - if(!(target in oview(range)))//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it. + if(!(target in oview(range)) && !distanceoverride)//If they are not in overview after selection. Do note that !() is necessary for in to work because ! takes precedence over it. to_chat(user, "They are too far away!") return @@ -64,18 +63,16 @@ Also, you never added distance checking after target is selected. I've went ahea victim.verbs -= V var/mob/dead/observer/ghost = victim.ghostize(0) - ghost.spell_list = victim.spell_list//If they have spells, transfer them. Now we basically have a backup mob. - caster.mind.transfer_to(victim) - victim.spell_list = caster.spell_list//Now they are inside the victim's body. if(victim.mind.special_verbs.len)//To add all the special verbs for the original caster. for(var/V in caster.mind.special_verbs)//Not too important but could come into play. caster.verbs += V ghost.mind.transfer_to(caster) - caster.key = ghost.key //have to transfer the key since the mind was not active - caster.spell_list = ghost.spell_list + if(ghost.key) + caster.key = ghost.key //have to transfer the key since the mind was not active + qdel(ghost) if(caster.mind.special_verbs.len)//If they had any special verbs, we add them here. for(var/V in caster.mind.special_verbs) diff --git a/code/datums/spells/wizard.dm b/code/datums/spells/wizard.dm index 8a056245b16..33cc6b8d574 100644 --- a/code/datums/spells/wizard.dm +++ b/code/datums/spells/wizard.dm @@ -231,7 +231,7 @@ amt_eye_blurry = 20 /obj/effect/proc_holder/spell/targeted/genetic/blind - sdisabilities = BLIND + disabilities = BLIND duration = 300 /obj/effect/proc_holder/spell/dumbfire/fireball diff --git a/code/game/dna/genes/disabilities.dm b/code/game/dna/genes/disabilities.dm index bbad4a7912f..a30d160fd92 100644 --- a/code/game/dna/genes/disabilities.dm +++ b/code/game/dna/genes/disabilities.dm @@ -1,7 +1,7 @@ ///////////////////// // DISABILITY GENES // -// These activate either a mutation, disability, or sdisability. +// These activate either a mutation, disability // // Gene is always activated. ///////////////////// @@ -15,9 +15,6 @@ // Disability to give (or 0) var/disability=0 - // SDisability to give (or 0) - var/sdisability=0 - // Activation message var/activation_message="" @@ -33,8 +30,6 @@ M.mutations.Add(mutation) if(disability) M.disabilities|=disability - if(sdisability) - M.sdisabilities|=sdisability if(activation_message) to_chat(M, "[activation_message]") else @@ -46,8 +41,6 @@ M.mutations.Remove(mutation) if(disability) M.disabilities &= ~disability - if(sdisability) - M.sdisabilities &= ~sdisability if(deactivation_message) to_chat(M, "[deactivation_message]") else @@ -117,7 +110,7 @@ activation_message="You can't seem to see anything." deactivation_message ="You can see now, in case you didn't notice..." instability = -GENE_INSTABILITY_MAJOR - sdisability=BLIND + disability=BLIND /datum/dna/gene/disability/blindness/New() block=BLINDBLOCK @@ -127,7 +120,7 @@ activation_message="It's kinda quiet." deactivation_message ="You can hear again!" instability = -GENE_INSTABILITY_MAJOR - sdisability=DEAF + disability=DEAF /datum/dna/gene/disability/deaf/New() block=DEAFBLOCK diff --git a/code/game/dna/genes/goon_disabilities.dm b/code/game/dna/genes/goon_disabilities.dm index 2afb9b7bd83..cac55d7d317 100644 --- a/code/game/dna/genes/goon_disabilities.dm +++ b/code/game/dna/genes/goon_disabilities.dm @@ -13,7 +13,7 @@ activation_message = "You feel unable to express yourself at all." deactivation_message = "You feel able to speak freely again." instability = -GENE_INSTABILITY_MODERATE - sdisability = MUTE + disability = MUTE /datum/dna/gene/disability/mute/New() ..() diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 3d9b045da13..394540c7762 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -92,14 +92,14 @@ var/obj/effect/proc_holder/spell/spelltype /datum/dna/gene/basic/grant_spell/activate(var/mob/M, var/connected, var/flags) - M.AddSpell(new spelltype(M)) + M.AddSpell(new spelltype(null)) ..() return 1 /datum/dna/gene/basic/grant_spell/deactivate(var/mob/M, var/connected, var/flags) - for(var/obj/effect/proc_holder/spell/S in M.spell_list) - if(istype(S,spelltype)) - M.spell_list.Remove(S) + for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list) + if(istype(S, spelltype)) + M.RemoveSpell(S) ..() return 1 diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index c7a858d7be7..83c29ed9109 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -47,7 +47,7 @@ /obj/item/organ/internal/cyberimp/eyes/shield/ling/on_life() ..() var/obj/item/organ/internal/eyes/E = owner.get_int_organ(/obj/item/organ/internal/eyes) - if(owner.eye_blind || owner.eye_blurry || (owner.sdisabilities & BLIND) || (owner.disabilities & NEARSIGHTED) || (E.damage > 0)) + if(owner.eye_blind || owner.eye_blurry || (owner.disabilities & BLIND) || (owner.disabilities & NEARSIGHTED) || (E.damage > 0)) owner.reagents.add_reagent("oculine", 1) /obj/item/organ/internal/cyberimp/eyes/shield/ling/prepare_eat() diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm index 6150da027ca..1bb19749ac1 100644 --- a/code/game/gamemodes/changeling/powers/revive.dm +++ b/code/game/gamemodes/changeling/powers/revive.dm @@ -19,8 +19,7 @@ user.radiation = 0 user.eye_blind = 0 user.eye_blurry = 0 - user.ear_deaf = 0 - user.ear_damage = 0 + user.setEarDamage(0,0) user.heal_overall_damage(user.getBruteLoss(), user.getFireLoss()) user.reagents.clear_reagents() user.germ_level = 0 diff --git a/code/game/gamemodes/changeling/powers/shriek.dm b/code/game/gamemodes/changeling/powers/shriek.dm index 745d84507d7..7babc2a5a62 100644 --- a/code/game/gamemodes/changeling/powers/shriek.dm +++ b/code/game/gamemodes/changeling/powers/shriek.dm @@ -11,8 +11,7 @@ for(var/mob/living/M in get_mobs_in_view(4, user)) if(iscarbon(M)) if(!M.mind || !M.mind.changeling) - M.ear_deaf = max(0, M.ear_deaf + 30) - M.ear_damage = max(0, M.ear_damage) + M.adjustEarDamage(0, 30) M.confused += 20 M.Jitter(50) else diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 28511c9c6f5..7ad1e33b747 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -840,11 +840,11 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.ear_deaf += 50 + C.adjustEarDamage(0,50) C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ if(prob(1)) - C.sdisabilities |= DEAF + C.disabilities |= DEAF if(affected) usr.say("Sti[pick("'","`")] kaliedir!") to_chat(usr, "\red The world becomes quiet as the deafening rune dissipates into fine dust.") @@ -859,7 +859,7 @@ var/list/sacrificed = list() var/obj/item/weapon/nullrod/N = locate() in C if(N) continue - C.ear_deaf += 30 + C.adjustEarDamage(0,30) //talismans is weaker. C.show_message("\red The world around you suddenly becomes quiet.", 3) affected++ @@ -885,7 +885,7 @@ var/list/sacrificed = list() if(prob(5)) C.disabilities |= NEARSIGHTED if(prob(10)) - C.sdisabilities |= BLIND + C.disabilities |= BLIND C.show_message("\red Suddenly you see red flash that blinds you.", 3) affected++ if(affected) diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index ac32105229a..2f293b86825 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -179,7 +179,7 @@ ..() if(M.mind) M.bloodcrawl = 0 - M.mind.remove_spell(/obj/effect/proc_holder/spell/bloodcrawl) + M.mind.RemoveSpell(/obj/effect/proc_holder/spell/bloodcrawl) /obj/item/organ/internal/heart/demon/Stop() return 0 // Always beating. diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index e570ea6fc8b..5c509c2d26d 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -86,7 +86,6 @@ CRYOBLOCK = getAssignedBlock("CRYO", numsToAssign, DNA_HARD_BOUNDS, good=1) EATBLOCK = getAssignedBlock("EAT", numsToAssign, DNA_HARD_BOUNDS, good=1) JUMPBLOCK = getAssignedBlock("JUMP", numsToAssign, DNA_HARD_BOUNDS, good=1) -// MELTBLOCK = getAssignedBlock("MELT", numsToAssign, good=1) IMMOLATEBLOCK = getAssignedBlock("IMMOLATE", numsToAssign) EMPATHBLOCK = getAssignedBlock("EMPATH", numsToAssign, DNA_HARD_BOUNDS, good=1) SUPERFARTBLOCK = getAssignedBlock("SUPERFART", numsToAssign, DNA_HARDER_BOUNDS, good=1) @@ -98,7 +97,6 @@ // Disabilities LOUDBLOCK = getAssignedBlock("LOUD", numsToAssign) - //WHISPERBLOCK = getAssignedBlock("WHISPER", numsToAssign) BROKEN WITH NEW SAYCODE DIZZYBLOCK = getAssignedBlock("DIZZY", numsToAssign) diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index 3b67e7bb4f3..2cc099cc115 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -132,7 +132,7 @@ Made by Xhuis /datum/game_mode/proc/finalize_shadowling(var/datum/mind/shadow_mind) var/mob/living/carbon/human/S = shadow_mind.current - shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch) + shadow_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_hatch(null)) spawn(0) shadow_mind.current.add_language("Shadowling Hivemind") update_shadow_icons_added(shadow_mind) @@ -149,9 +149,9 @@ Made by Xhuis update_shadow_icons_added(new_thrall_mind) new_thrall_mind.current.attack_log += "\[[time_stamp()]\] Became a thrall" new_thrall_mind.current.add_language("Shadowling Hivemind") - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare) - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) - new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_glare(null)) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/lesser_shadow_walk(null)) + new_thrall_mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision/thrall(null)) to_chat(new_thrall_mind.current, "You see the truth. Reality has been torn away and you realize what a fool you've been.") to_chat(new_thrall_mind.current, "The shadowlings are your masters. Serve them above all else and ensure they complete their goals.") to_chat(new_thrall_mind.current, "You may not harm other thralls or the shadowlings. However, you do not need to obey other thralls.") @@ -171,7 +171,7 @@ Made by Xhuis thrall_mind.special_role = null update_shadow_icons_removed(thrall_mind) for(var/obj/effect/proc_holder/spell/S in thrall_mind.spell_list) - thrall_mind.remove_spell(S) + thrall_mind.RemoveSpell(S) thrall_mind.current.remove_language("Shadowling Hivemind") if(kill && ishuman(thrall_mind.current)) //If dethrallization surgery fails, kill the mob as well as dethralling them var/mob/living/carbon/human/H = thrall_mind.current @@ -215,7 +215,7 @@ Made by Xhuis ling_mind.current.attack_log += "\[[time_stamp()]\] Deshadowlinged" ling_mind.special_role = null for(var/obj/effect/proc_holder/spell/S in ling_mind.spell_list) - ling_mind.remove_spell(S) + ling_mind.RemoveSpell(S) var/mob/living/M = ling_mind.current if(issilicon(M)) M.audible_message("[M] lets out a short blip.", \ diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 6106bb04ec4..c4e88ea12b8 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -438,24 +438,24 @@ if(thralls >= 3 && !screech_acquired) screech_acquired = 1 to_chat(user, "The power of your thralls has granted you the Sonic Screech ability. This ability will shatter nearby windows and deafen enemies, plus stunning silicon lifeforms.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/unearthly_screech) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/unearthly_screech(null)) if(thralls >= 5 && !blind_smoke_acquired) blind_smoke_acquired = 1 to_chat(user, "The power of your thralls has granted you the Blinding Smoke ability. \ It will create a choking cloud that will blind any non-thralls who enter.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/blindness_smoke(null)) if(thralls >= 7 && !drainLifeAcquired) drainLifeAcquired = 1 to_chat(user, "The power of your thralls has granted you the Drain Life ability. You can now drain the health of nearby humans to heal yourself.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/drainLife(null)) if(thralls >= 9 && !reviveThrallAcquired) reviveThrallAcquired = 1 to_chat(user, "The power of your thralls has granted you the Black Recuperation ability. \ This will, after a short time, bring a dead thrall completely back to life with no bodily defects.") - user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/reviveThrall) + user.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/reviveThrall(null)) if(thralls < victory_threshold) to_chat(user, "You do not have the power to ascend. You require [victory_threshold] thralls, but only [thralls] living thralls are present.") @@ -469,8 +469,8 @@ if(CM in M.mind.spell_list) M.mind.spell_list -= CM qdel(CM) - M.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_ascend) + M.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/shadowling_hatch) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_ascend(null)) if(M == usr) to_chat(M, "You project this power to the rest of the shadowlings.") else @@ -557,7 +557,7 @@ var/mob/living/carbon/M = target to_chat(M, "A spike of pain drives into your head and scrambles your thoughts!") M.confused += 10 - M.ear_damage += 3 + M.setEarDamage(M.ear_damage + 3) else if(issilicon(target)) var/mob/living/silicon/S = target to_chat(S, "ERROR $!(@ ERROR )#^! SENSORY OVERLOAD \[$(!@#") @@ -674,10 +674,10 @@ "You feel new power flow into you. You have been gifted by your masters. You now closely resemble them. You are empowered in \ darkness but wither slowly in light. In addition, Lesser Glare and Guise have been upgraded into their true forms.") thrallToRevive.set_species("Lesser Shadowling") - thrallToRevive.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_glare) - thrallToRevive.mind.remove_spell(/obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) - thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare) - thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk) + thrallToRevive.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/lesser_glare) + thrallToRevive.mind.RemoveSpell(/obj/effect/proc_holder/spell/targeted/lesser_shadow_walk) + thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare(null)) + thrallToRevive.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk(null)) if("Revive") if(!is_thrall(thrallToRevive)) to_chat(usr, "[thrallToRevive] is not a thrall.") diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm index 98f81f1d128..2c06168499e 100644 --- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm @@ -92,19 +92,19 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N H.equip_to_slot_or_del(new /obj/item/clothing/glasses/shadowling(usr), slot_glasses) H.set_species("Shadowling") //can't be a shadowling without being a shadowling - H.mind.remove_spell(src) + H.mind.RemoveSpell(src) sleep(10) to_chat(H, "Your powers are awoken. You may now live to your fullest extent. Remember your goal. Cooperate with your thralls and allies.") - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/enthrall) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/veil) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flashfreeze) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor) - H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_vision(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/enthrall(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/glare(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/veil(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadow_walk(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flashfreeze(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/collective_mind(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_regenarmor(null)) + H.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_extend_shuttle(null)) /obj/effect/proc_holder/spell/targeted/shadowling_ascend name = "Ascend" @@ -162,15 +162,15 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N var/mob/A = new /mob/living/simple_animal/ascendant_shadowling(H.loc) for(var/obj/effect/proc_holder/spell/S in H.mind.spell_list) if(S == src) continue - H.mind.remove_spell(S) + H.mind.RemoveSpell(S) H.mind.transfer_to(A) A.name = H.real_name A.languages = H.languages - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/annihilate) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/hypnosis) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_phase_shift) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/ascendant_storm) - A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowlingAscendantTransmit) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/annihilate(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/hypnosis(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowling_phase_shift(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/ascendant_storm(null)) + A.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/shadowlingAscendantTransmit(null)) if(A.real_name) A.real_name = H.real_name H.invisibility = 60 //This is pretty bad, but is also necessary for the shuttle call to function properly @@ -179,5 +179,5 @@ var/list/possibleShadowlingNames = list("U'ruan", "Y`shej", "Nex", "Hel-uae", "N if(!ticker.mode.shadowling_ascended) shuttle_master.emergency.request(null, 0.3) ticker.mode.shadowling_ascended = 1 - A.mind.remove_spell(src) + A.mind.RemoveSpell(src) qdel(H) diff --git a/code/game/gamemodes/vampire/vampire_powers.dm b/code/game/gamemodes/vampire/vampire_powers.dm index 64309ef8f5e..f33bda2ed3a 100644 --- a/code/game/gamemodes/vampire/vampire_powers.dm +++ b/code/game/gamemodes/vampire/vampire_powers.dm @@ -259,7 +259,7 @@ continue to_chat(C, "You hear a ear piercing shriek and your senses dull!") C.Weaken(4) - C.ear_deaf = 20 + C.adjustEarDamage(0,20) C.stuttering = 20 C.Stun(4) C.Jitter(150) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 514f612ca43..3f33d84b978 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -59,21 +59,21 @@ to_chat(M, "You are the [H.real_name]'s apprentice! You are bound by magic contract to follow their orders and help them in accomplishing their goals.") switch(href_list["school"]) if("destruction") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/projectile/magic_missile(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/dumbfire/fireball(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned powerful, destructive spells. You are able to cast magic missile and fireball.") if("bluespace") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/area_teleport/teleport(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned reality bending mobility spells. You are able to cast teleport and ethereal jaunt.") if("healing") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/charge(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/forcewall(null)) M.equip_to_slot_or_del(new /obj/item/weapon/gun/magic/staff/healing(M), slot_r_hand) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned livesaving survival spells. You are able to cast charge and forcewall.") if("robeless") - M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(M)) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(M)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/knock(null)) + M.mind.AddSpell(new /obj/effect/proc_holder/spell/targeted/mind_transfer(null)) to_chat(M, "Your service has not gone unrewarded, however. Studying under [H.real_name], you have learned stealthy, robeless spells. You are able to cast knock and mindswap.") M.equip_to_slot_or_del(new /obj/item/device/radio/headset(M), slot_l_ear) @@ -778,7 +778,7 @@ var/global/list/multiverse = list() else if(istype(I,/obj/item/weapon/bikehorn)) to_chat(target, "HONK") target << 'sound/items/AirHorn.ogg' - target.ear_damage += rand(0,3) + target.adjustEarDamage(0,3) GiveHint(target) cooldown = world.time +cooldown_time return diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index 2daf3ab7e42..0dbcd3103fe 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -684,9 +684,9 @@ /obj/item/weapon/spellbook/oneuse/Initialize() //No need to init return -/obj/item/weapon/spellbook/oneuse/attack_self(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/attack_self(mob/user) var/obj/effect/proc_holder/spell/S = new spell - for(var/obj/effect/proc_holder/spell/knownspell in user.spell_list) + for(var/obj/effect/proc_holder/spell/knownspell in user.mind.spell_list) if(knownspell.type == S.type) if(user.mind) if(user.mind.special_role == "apprentice" || user.mind.special_role == "Wizard") @@ -703,10 +703,10 @@ onlearned(user) -/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/proc/recoil(mob/user) user.visible_message("[src] glows in a black light!") -/obj/item/weapon/spellbook/oneuse/proc/onlearned(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/proc/onlearned(mob/user) used = 1 user.visible_message("[src] glows dark for a second!") @@ -762,7 +762,7 @@ name = "spellbook of [spellname]" //Note, desc doesn't change by design ..() -/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user as mob) +/obj/item/weapon/spellbook/oneuse/mindswap/recoil(mob/user) ..() if(stored_swap in dead_mob_list) stored_swap = null @@ -774,31 +774,8 @@ to_chat(user, "You stare at the book some more, but there doesn't seem to be anything else to learn...") return - if(user.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs -= V - - if(stored_swap.mind.special_verbs.len) - for(var/V in stored_swap.mind.special_verbs) - stored_swap.verbs -= V - - var/mob/dead/observer/ghost = stored_swap.ghostize(0) - ghost.spell_list = stored_swap.spell_list - - user.mind.transfer_to(stored_swap) - stored_swap.spell_list = user.spell_list - - if(stored_swap.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs += V - - ghost.mind.transfer_to(user) - user.key = ghost.key - user.spell_list = ghost.spell_list - - if(user.mind.special_verbs.len) - for(var/V in user.mind.special_verbs) - user.verbs += V + var/obj/effect/proc_holder/spell/targeted/mind_transfer/swapper = new + swapper.cast(user, stored_swap, 1) to_chat(stored_swap, "You're suddenly somewhere else... and someone else?!") to_chat(user, "Suddenly you're staring at [src] again... where are you, who are you?!") diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 4de241a2c81..338d088d6f1 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -240,20 +240,19 @@ //OTHER PROCS -//To batch-remove wizard spells. Linked to mind.dm. +//To batch-remove wizard spells. Linked to mind.dm /mob/proc/spellremove(mob/M) if(!mind) return - for(var/obj/effect/proc_holder/spell/spell_to_remove in src.mind.spell_list) + for(var/obj/effect/proc_holder/spell/spell_to_remove in mind.spell_list) qdel(spell_to_remove) mind.spell_list -= spell_to_remove -/datum/mind/proc/remove_spell(var/obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind - if(!spell) return - for(var/obj/effect/proc_holder/spell/S in spell_list) - if(istype(S, spell)) - qdel(S) - spell_list -= S +//To batch-remove mob spells. +/mob/proc/mobspellremove(mob/M) + for(var/obj/effect/proc_holder/spell/spell_to_remove in mob_spell_list) + qdel(spell_to_remove) + mob_spell_list -= spell_to_remove /*Checks if the wizard can cast spells. Made a proc so this is not repeated 14 (or more) times.*/ diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index decb7fc5922..8ea98b53c8b 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -444,7 +444,7 @@ occupantData["intOrgan"] = intOrganData - occupantData["blind"] = (H.sdisabilities & BLIND) + occupantData["blind"] = (H.disabilities & BLIND) occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED) data["occupant"] = occupantData @@ -636,7 +636,7 @@ dat += "[i.name]N/A[i.damage][infection]:[mech]" dat += "" dat += "" - if(occupant.sdisabilities & BLIND) + if(occupant.disabilities & BLIND) dat += "Cataracts detected.
" if(occupant.disabilities & NEARSIGHTED) dat += "Retinal misalignment detected.
" diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 22850e63f48..6660692ce62 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -166,7 +166,7 @@ to_chat(M, "HONK") M.sleeping = 0 M.stuttering = 20 - M.ear_deaf = 30 + M.adjustEarDamage(0,30) M.Weaken(3) if(prob(30)) M.Stun(10) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 74da1ee9187..ea96938ca95 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -71,7 +71,7 @@ "You direct [src] to [M]'s eyes.") if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected - if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind + if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind to_chat(user, "[M] pupils does not react to the light!") else if(XRAY in M.mutations) //mob has X-RAY vision to_chat(user, "[M] pupils give an eerie glow!") diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index cf060b7d02a..9562f9442c7 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -51,8 +51,7 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.ear_damage += rand(0, 5) - M.ear_deaf = max(M.ear_deaf,15) + M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") if(prob(M.ear_damage - 10 + 5)) diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 005caf3256d..3f49d3e3bde 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -22,7 +22,7 @@ L.client.perspective = EYE_PERSPECTIVE L.client.eye = src L.loc = src - L.sdisabilities += MUTE + L.disabilities += MUTE health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues intialTox = L.getToxLoss() intialFire = L.getFireLoss() @@ -77,7 +77,7 @@ for(var/mob/living/M in src) M.loc = src.loc - M.sdisabilities -= MUTE + M.disabilities -= MUTE M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob if(M.client) M.client.eye = M.client.mob diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index e375b09b329..c28f472020d 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -1920,15 +1920,15 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(disabilities & DISABILITY_FLAG_DEAF) character.dna.SetSEState(DEAFBLOCK,1,1) - character.sdisabilities|=DEAF + character.disabilities|=DEAF if(disabilities & DISABILITY_FLAG_BLIND) character.dna.SetSEState(BLINDBLOCK,1,1) - character.sdisabilities|=BLIND + character.disabilities|=BLIND if(disabilities & DISABILITY_FLAG_MUTE) character.dna.SetSEState(MUTEBLOCK,1,1) - character.sdisabilities |= MUTE + character.disabilities |= MUTE S.handle_dna(character) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index c6636d034e0..b15761d8c57 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -36,7 +36,7 @@ var/list/image/ghost_darkness_images = list() //this is a list of images for thi verbs += /mob/dead/observer/proc/dead_tele // Our new boo spell. - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/boo(null)) can_reenter_corpse = flags & GHOST_CAN_REENTER started_as_observer = flags & GHOST_IS_OBSERVER diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 7a67345bc6c..af1dab9098c 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -28,7 +28,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(sdisabilities & BLIND || blinded) //blind people can't see dumbass + if(disabilities & BLIND || blinded) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -65,7 +65,7 @@ if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src)) message = "[message]" - if(sdisabilities & DEAF || ear_deaf) + if(disabilities & DEAF || ear_deaf) if(!language || !(language.flags & INNATE)) // INNATE is the flag for audible-emote-language, so we don't want to show an "x talks but you cannot hear them" message if it's set if(speaker == src) to_chat(src, "You cannot hear yourself speak!") @@ -95,7 +95,7 @@ //non-verbal languages are garbled if you can't see the speaker. Yes, this includes if they are inside a closet. if(language && (language.flags & NONVERBAL)) - if(sdisabilities & BLIND || blinded) //blind people can't see dumbass + if(disabilities & BLIND || blinded) //blind people can't see dumbass message = stars(message) if(!speaker || !(speaker in view(src))) @@ -182,7 +182,7 @@ formatted = language.format_message_radio(message, verb) else formatted = "[verb], \"[message]\"" - if(sdisabilities & DEAF || ear_deaf) + if(disabilities & DEAF || ear_deaf) if(prob(20)) to_chat(src, "You feel your headset vibrate but can hear nothing from it!") else if(track) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 9996c3eeb89..9f47fc9910c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -96,15 +96,13 @@ f_loss += 60 - ear_damage += 30 - ear_deaf += 120 + adjustEarDamage(30, 120) if(3.0) b_loss += 30 if(prob(50) && !shielded) Paralyse(1) - ear_damage += 15 - ear_deaf += 60 + adjustEarDamage(15,60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index d478194bc44..4cccb6e57ed 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -59,7 +59,7 @@ blinded = 1 silent = 0 else //ALIVE. LIGHTS ARE ON - if(health < config.health_threshold_dead || brain_op_stage == 4.0) + if(health < config.health_threshold_dead || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 stat = DEAD @@ -95,7 +95,7 @@ move_delay_add = max(0, move_delay_add - rand(1, 2)) //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) @@ -104,12 +104,12 @@ eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own - ear_deaf = max(ear_deaf, 1) + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own + setEarDamage(-1, max(ear_deaf, 1)) else if(ear_deaf) //deafness, heals slowly over time - ear_deaf = max(ear_deaf-1, 0) + adjustEarDamage(0,-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - ear_damage = max(ear_damage-0.05, 0) + adjustEarDamage(-0.05, 0) //Other if(stunned) diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index e2862184b79..daba3852764 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -88,37 +88,4 @@ icon_state = "queen_s" for(var/image/I in overlays_standing) - overlays += I - - -/* -/mob/living/carbon/alien/humanoid/queen/verb/evolve() // -- TLE - set name = "Evolve (1000)" - set desc = "The ultimate transformation. Become an alien Empress. Only one empress can exist at a time." - set category = "Alien" - - if(powerc(1000)) - // Queen check - var/no_queen = 1 - for(var/mob/living/carbon/alien/humanoid/empress/E in living_mob_list) - if(!E.key && E.brain_op_stage != 4) - continue - no_queen = 0 - - if(no_queen) - adjustToxLoss(-1000) - to_chat(src, "You begin to evolve!") - for(var/mob/O in viewers(src, null)) - O.show_message(text("[src] begins to twist and contort!"), 1) - var/mob/living/carbon/alien/humanoid/empress/new_xeno = new(loc) - if(mind) - mind.transfer_to(new_xeno) - else - new_xeno.key = key - new_xeno.mind.name = new_xeno.name - qdel(src) - else - to_chat(src, "We already have an alive empress.") - return - -*/ \ No newline at end of file + overlays += I \ No newline at end of file diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index c8bd8765a97..19f3368ce96 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -87,15 +87,13 @@ f_loss += 60 - ear_damage += 30 - ear_deaf += 120 + adjustEarDamage(30,120) if(3.0) b_loss += 30 if(prob(50)) Paralyse(1) - ear_damage += 15 - ear_deaf += 60 + adjustEarDamage(15,60) adjustBruteLoss(b_loss) adjustFireLoss(f_loss) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 4e7b974d855..76ceef6ad2e 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -19,7 +19,7 @@ blinded = 1 silent = 0 else //ALIVE. LIGHTS ARE ON - if(health < -25 || brain_op_stage == 4.0) + if(health < -25 || !get_int_organ(/obj/item/organ/internal/brain)) death() blinded = 1 silent = 0 @@ -54,7 +54,7 @@ move_delay_add = max(0, move_delay_add - rand(1, 2)) //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) @@ -63,12 +63,12 @@ eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own - ear_deaf = max(ear_deaf, 1) + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own + setEarDamage(-1, max(ear_deaf, 1)) else if(ear_deaf) //deafness, heals slowly over time - ear_deaf = max(ear_deaf-1, 0) + adjustEarDamage(0,-1) else if(ear_damage < 25) //ear damage heals slowly under this threshold. - ear_damage = max(ear_damage-0.05, 0) + adjustEarDamage(-0.05,0) //Other if(stunned) diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 597b755a620..6f203d2c326 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -98,4 +98,10 @@ I'm using this for Stat to give it a more nifty interface to work with stat("Exosuit Integrity", "[!M.health ? "0" : "[(M.health / initial(M.health)) * 100]"]%") /mob/living/carbon/brain/can_safely_leave_loc() - return 0 //You're not supposed to be ethereal jaunting, brains \ No newline at end of file + return 0 //You're not supposed to be ethereal jaunting, brains + +/mob/living/carbon/brain/adjustEarDamage() + return + +/mob/living/carbon/brain/setEarDamage() // no ears to damage or heal + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index f75cfee8f9b..dd2e81ed35b 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -21,8 +21,7 @@ /obj/item/organ/internal/brain/surgeryize() if(!owner) return - owner.ear_damage = 0 //Yeah, didn't you...hear? The ears are totally inside the brain. - owner.ear_deaf = 0 + owner.setEarDamage(0,0) //Yeah, didn't you...hear? The ears are totally inside the brain. /obj/item/organ/internal/brain/xeno name = "xenomorph brain" diff --git a/code/modules/mob/living/carbon/brain/posibrain.dm b/code/modules/mob/living/carbon/brain/posibrain.dm index 7b04e52f69b..aad88276473 100644 --- a/code/modules/mob/living/carbon/brain/posibrain.dm +++ b/code/modules/mob/living/carbon/brain/posibrain.dm @@ -183,7 +183,6 @@ src.brainmob.container = src src.brainmob.stat = 0 src.brainmob.silent = 0 - src.brainmob.brain_op_stage = 4.0 dead_mob_list -= src.brainmob ..() diff --git a/code/modules/mob/living/carbon/carbon_defines.dm b/code/modules/mob/living/carbon/carbon_defines.dm index 07a6a0d28cd..e900fc10517 100644 --- a/code/modules/mob/living/carbon/carbon_defines.dm +++ b/code/modules/mob/living/carbon/carbon_defines.dm @@ -1,15 +1,12 @@ -/mob/living/carbon/ +/mob/living/carbon gender = MALE hud_possible = list(HEALTH_HUD,STATUS_HUD,SPECIALROLE_HUD) var/list/stomach_contents = list() var/list/internal_organs = list() - var/brain_op_stage = 0.0 var/antibodies = 0 - var/last_eating = 0 //Not sure what this does... I found it hidden in food.dm var/life_tick = 0 // The amount of life ticks that have processed on this mob. - var/analgesic = 0 // when this is set, the mob isn't affected by shock or pain - // life should decrease this by 1 every tick + // total amount of wounds on mob, used to spread out healing and the like over all wounds var/number_wounds = 0 var/obj/item/handcuffed = null //Whether or not the mob is handcuffed diff --git a/code/modules/mob/living/carbon/human/emote.dm b/code/modules/mob/living/carbon/human/emote.dm index 40c935188cf..ef5768fcb0e 100644 --- a/code/modules/mob/living/carbon/human/emote.dm +++ b/code/modules/mob/living/carbon/human/emote.dm @@ -10,7 +10,7 @@ act = copytext(act, 1, t1) var/muzzled = is_muzzled() - if(sdisabilities & MUTE || silent) + if(disabilities & MUTE || silent) muzzled = 1 //var/m_type = 1 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 33ad123c34d..07060cfe1a4 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -355,8 +355,7 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - ear_damage += 30 - ear_deaf += 120 + adjustEarDamage(30, 120) if(prob(70) && !shielded) Paralyse(10) @@ -380,8 +379,7 @@ else valid_limbs -= processing_dismember if(!istype(l_ear, /obj/item/clothing/ears/earmuffs) && !istype(r_ear, /obj/item/clothing/ears/earmuffs)) - ear_damage += 15 - ear_deaf += 60 + adjustEarDamage(15,60) if(prob(50) && !shielded) Paralyse(10) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 4ee83d8eb5f..5e61d82d7c2 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -816,9 +816,6 @@ handle_organs() handle_blood() - //the analgesic effect wears off slowly - analgesic = max(0, analgesic - 1) - if(paralysis) blinded = 1 stat = UNCONSCIOUS @@ -864,7 +861,7 @@ else //blindness - if(sdisabilities & BLIND) // Disabled-blind, doesn't get better on its own + if(disabilities & BLIND) // Disabled-blind, doesn't get better on its own blinded = 1 else if(eye_blind) // Blindness, heals slowly over time @@ -884,18 +881,18 @@ //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own - ear_deaf = max(ear_deaf, 1) + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own + setEarDamage(-1, max(ear_deaf, 1)) else if(ear_deaf) //deafness, heals slowly over time - ear_deaf = max(ear_deaf - 1, 0) + adjustEarDamage(0,-1) else if(istype(l_ear, /obj/item/clothing/ears/earmuffs) || istype(r_ear, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster - ear_damage = max(ear_damage - 0.15, 0) - ear_deaf = max(ear_deaf, 1) + adjustEarDamage(-0.15,0) + setEarDamage(-1, max(ear_deaf, 1)) else if(ear_damage < 25) //ear damage heals slowly under this threshold. otherwise you'll need earmuffs - ear_damage = max(ear_damage - 0.05, 0) + adjustEarDamage(-0.05,0) if(flying) animate(src, pixel_y = pixel_y + 5 , time = 10, loop = 1, easing = SINE_EASING) @@ -987,8 +984,10 @@ /mob/living/carbon/human/handle_shock() ..() - if(status_flags & GODMODE) return 0 //godmode - if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily + if(status_flags & GODMODE) + return 0 //godmode + if(species && species.flags & NO_PAIN) + return if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse shock_stage = max(shock_stage, 61) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 138e15d72a1..72e6ff63314 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -106,7 +106,7 @@ var/list/returns[3] var/speech_problem_flag = 0 - if(silent || (sdisabilities & MUTE)) + if(silent || (disabilities & MUTE)) message = "" speech_problem_flag = 1 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 9091fcd9079..617d63c798b 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -615,25 +615,22 @@ /datum/species/proc/handle_hud_icons(mob/living/carbon/human/H) if(H.healths) - if(H.analgesic) - H.healths.icon_state = "health_health_numb" + if(H.stat == DEAD) + H.healths.icon_state = "health7" else - if(H.stat == DEAD) - H.healths.icon_state = "health7" - else - switch(H.hal_screwyhud) - if(1) H.healths.icon_state = "health6" - if(2) H.healths.icon_state = "health7" - if(5) H.healths.icon_state = "health0" - else - switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss) - if(100 to INFINITY) H.healths.icon_state = "health0" - if(80 to 100) H.healths.icon_state = "health1" - if(60 to 80) H.healths.icon_state = "health2" - if(40 to 60) H.healths.icon_state = "health3" - if(20 to 40) H.healths.icon_state = "health4" - if(0 to 20) H.healths.icon_state = "health5" - else H.healths.icon_state = "health6" + switch(H.hal_screwyhud) + if(1) H.healths.icon_state = "health6" + if(2) H.healths.icon_state = "health7" + if(5) H.healths.icon_state = "health0" + else + switch(100 - ((flags & NO_PAIN) ? 0 : H.traumatic_shock) - H.staminaloss) + if(100 to INFINITY) H.healths.icon_state = "health0" + if(80 to 100) H.healths.icon_state = "health1" + if(60 to 80) H.healths.icon_state = "health2" + if(40 to 60) H.healths.icon_state = "health3" + if(20 to 40) H.healths.icon_state = "health4" + if(0 to 20) H.healths.icon_state = "health5" + else H.healths.icon_state = "health6" if(H.healthdoll) H.healthdoll.overlays.Cut() diff --git a/code/modules/mob/living/carbon/shock.dm b/code/modules/mob/living/carbon/shock.dm index b1c83a1e7c1..0a86f2756cf 100644 --- a/code/modules/mob/living/carbon/shock.dm +++ b/code/modules/mob/living/carbon/shock.dm @@ -16,8 +16,6 @@ src.traumatic_shock -= R.shock_reduction // now you too can varedit cyanide to reduce shock by 1000 - Iamgoofball if(src.slurring) src.traumatic_shock -= 10 - if(src.analgesic) - src.traumatic_shock = 0 // broken or ripped off organs will add quite a bit of pain if(istype(src,/mob/living/carbon/human)) diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index 1582ccb2bd8..b51e0084ee3 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -217,9 +217,9 @@ src.density = !( src.lying ) - if(src.sdisabilities & BLIND) + if(src.disabilities & BLIND) src.blinded = 1 - if(src.sdisabilities & DEAF) + if(src.disabilities & DEAF) src.ear_deaf = 1 if(src.eye_blurry > 0) diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index ab12c584259..23233fd5e09 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -33,8 +33,9 @@ if(default_spells.len) for(var/spell in default_spells) var/obj/effect/proc_holder/spell/S = spell - if(!S) return - H.AddSpell(new S) + if(!S) + return + H.mind.AddSpell(new S(null)) /datum/superheroes/proc/assign_id(var/mob/living/carbon/human/H) var/obj/item/weapon/card/id/syndicate/W = new(H) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index 93103fc2cae..c568b1b5c6c 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -174,7 +174,7 @@ /mob/living/proc/handle_disabilities() //Eyes - if(sdisabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own + if(disabilities & BLIND || stat) //blindness from disability or unconsciousness doesn't get better on its own eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 93c5dbf871f..69a32f2c285 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -346,7 +346,7 @@ dead_mob_list -= src living_mob_list |= src mob_list |= src - ear_deaf = 0 + setEarDamage(-1,0) timeofdeath = 0 /mob/living/proc/rejuvenate() @@ -373,13 +373,11 @@ hallucination = 0 nutrition = 400 bodytemperature = 310 - sdisabilities = 0 disabilities = 0 blinded = 0 eye_blind = 0 eye_blurry = 0 - ear_deaf = 0 - ear_damage = 0 + setEarDamage(0,0) heal_overall_damage(1000, 1000) ExtinguishMob() fire_stacks = 0 @@ -646,7 +644,7 @@ //called when the mob receives a bright flash /mob/living/proc/flash_eyes(intensity = 1, override_blindness_check = 0, affect_silicon = 0, visual = 0, type = /obj/screen/fullscreen/flash) - if(check_eye_prot() < intensity && (override_blindness_check || !(sdisabilities & BLIND))) + if(check_eye_prot() < intensity && (override_blindness_check || !(disabilities & BLIND))) overlay_fullscreen("flash", type) addtimer(src, "clear_fullscreen", 25, FALSE, "flash", 25) return 1 diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 0cb7b6c3457..19dc6f99cd1 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -7,10 +7,10 @@ //Damage related vars, NOTE: THESE SHOULD ONLY BE MODIFIED BY PROCS - var/bruteloss = 0.0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage) - var/oxyloss = 0.0 //Oxygen depravation damage (no air in lungs) - var/toxloss = 0.0 //Toxic damage caused by being poisoned or radiated - var/fireloss = 0.0 //Burn damage caused by being way too hot, too cold or burnt. + var/bruteloss = 0 //Brutal damage caused by brute force (punching, being clubbed by a toolbox ect... this also accounts for pressure damage) + var/oxyloss = 0 //Oxygen depravation damage (no air in lungs) + var/toxloss = 0 //Toxic damage caused by being poisoned or radiated + var/fireloss = 0 //Burn damage caused by being way too hot, too cold or burnt. var/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. slimes also deal cloneloss damage to victims var/brainloss = 0 //'Retardation' damage caused by someone hitting you in the head with a bible or being infected with brainrot. var/staminaloss = 0 //Stamina damage, or exhaustion. You recover it slowly naturally, and are stunned if it gets too high. Holodeck and hallucinations deal this. @@ -23,11 +23,6 @@ //Allows mobs to move through dense areas without restriction. For instance, in space or out of holder objects. var/incorporeal_move = 0 //0 is off, 1 is normal, 2 is for ninjas. - var/t_plasma = null - var/t_oxygen = null - var/t_sl_gas = null - var/t_n2 = null - var/now_pushing = null var/atom/movable/cameraFollow = null @@ -36,9 +31,8 @@ var/fire_stacks = 0 //Tracks how many stacks of fire we have on, max is usually 20 var/update_slimes = 1 - var/specialsauce = 0 //Has this person consumed enough special sauce? IF so they're a ticking time bomb of death. var/implanting = 0 //Used for the mind-slave implant - var/silent = null //Can't talk. Value goes down every life proc. + var/silent = 0 //Can't talk. Value goes down every life proc. //NOTE TO FUTURE CODERS: DO NOT INITIALIZE NUMERICAL VARS AS NULL OR I WILL MURDER YOU. var/floating = 0 var/nightvision = 0 diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index c6fc2919a16..70270568125 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -17,8 +17,7 @@ SetStunned(min(stunned, 30)) SetParalysis(min(paralysis, 30)) SetWeakened(min(weakened, 20)) - sleeping = 0 - ear_deaf = 0 + SetSleeping(0) /mob/living/silicon/robot/proc/handle_robot_cell() if(stat != DEAD) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index c3dd1b71ae4..f467925d309 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -358,4 +358,12 @@ return ..() /mob/living/silicon/is_mechanical() - return 1 \ No newline at end of file + return 1 + +/////////////////////////////////// EAR DAMAGE //////////////////////////////////// + +/mob/living/silicon/adjustEarDamage() + return + +/mob/living/silicon/setEarDamage() + return \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 4cbf3dd91ce..4bcd234b9c0 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -27,7 +27,7 @@ name = text("[initial(name)] ([rand(1, 1000)])") real_name = name for(var/spell in construct_spells) - AddSpell(new spell(src)) + AddSpell(new spell(null)) updateglow() /mob/living/simple_animal/construct/death() diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 1c7836c0a13..cb48c63b66f 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -52,9 +52,9 @@ /mob/living/simple_animal/hostile/statue/New(loc, var/mob/living/creator) ..() // Give spells - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(src)) - AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/flicker_lights(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blindness(null)) + AddSpell(new /obj/effect/proc_holder/spell/targeted/night_vision(null)) // Give nightvision see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 0030e893e68..ea83f8bf414 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -695,3 +695,9 @@ /mob/living/simple_animal/proc/sentience_act() //Called when a simple animal gains sentience via gold slime potion return + +/mob/living/simple_animal/adjustEarDamage() + return + +/mob/living/simple_animal/setEarDamage() + return \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index f673fa5ab0d..0bb9c2ad4a8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -6,6 +6,7 @@ hud_used = null if(mind && mind.current == src) spellremove(src) + mobspellremove(src) for(var/infection in viruses) qdel(infection) ghostize() @@ -61,19 +62,19 @@ if(!client) return if(type) - if(type & 1 && (sdisabilities & BLIND || blinded || paralysis) )//Vision related + if(type & 1 && (disabilities & BLIND || blinded || paralysis) )//Vision related if(!( alt )) return else msg = alt type = alt_type - if(type & 2 && (sdisabilities & DEAF || ear_deaf))//Hearing related + if(type & 2 && (disabilities & DEAF || ear_deaf))//Hearing related if(!( alt )) return else msg = alt type = alt_type - if((type & 1 && sdisabilities & BLIND)) + if((type & 1 && disabilities & BLIND)) return // Added voice muffling for Issue 41. if(stat == UNCONSCIOUS || (sleeping > 0 && stat != 2)) @@ -158,8 +159,6 @@ /mob/proc/Life() // handle_typing_indicator() -// if(organStructure) -// organStructure.ProcessOrgans() return @@ -960,8 +959,8 @@ var/list/slot_equipment_priority = list( \ if(mind && mind.changeling) add_stings_to_statpanel(mind.changeling.purchasedpowers) - if(spell_list && spell_list.len) - for(var/obj/effect/proc_holder/spell/S in spell_list) + if(mob_spell_list && mob_spell_list.len) + for(var/obj/effect/proc_holder/spell/S in mob_spell_list) add_spell_to_statpanel(S) if(mind && istype(src, /mob/living) && mind.spell_list && mind.spell_list.len) for(var/obj/effect/proc_holder/spell/S in mind.spell_list) @@ -994,6 +993,7 @@ var/list/slot_equipment_priority = list( \ for(var/obj/effect/proc_holder/changeling/S in stings) if(S.chemical_cost >=0 && S.can_be_used_by(src)) statpanel("[S.panel]",((S.chemical_cost > 0) ? "[S.chemical_cost]" : ""),S) + /mob/proc/add_spell_to_statpanel(var/obj/effect/proc_holder/spell/S) switch(S.charge_type) if("recharge") @@ -1002,17 +1002,6 @@ var/list/slot_equipment_priority = list( \ statpanel(S.panel,"[S.charge_counter]/[S.charge_max]",S) if("holdervar") statpanel(S.panel,"[S.holder_var_type] [S.holder_var_amount]",S) - /* // Why have a duplicate set of turfs in the stat panel? - if(listed_turf) - if(get_dist(listed_turf,src) > 1) - listed_turf = null - else - statpanel(listed_turf.name,listed_turf.name,listed_turf) - for(var/atom/A in listed_turf) - if(A.invisibility > see_invisible) - continue - statpanel(listed_turf.name,A.name,A) - */ // facing verbs @@ -1366,9 +1355,17 @@ mob/proc/yank_out_object() /mob/proc/setEarDamage() return -/mob/proc/AddSpell(var/obj/effect/proc_holder/spell/spell) - spell_list += spell - spell.action.Grant(src) +/mob/proc/AddSpell(obj/effect/proc_holder/spell/S) + mob_spell_list += S + S.action.Grant(src) + +/mob/proc/RemoveSpell(obj/effect/proc_holder/spell/spell) //To remove a specific spell from a mind + if(!spell) + return + for(var/obj/effect/proc_holder/spell/S in mob_spell_list) + if(istype(S, spell)) + qdel(S) + mob_spell_list -= S //override to avoid rotating pixel_xy on mobs /mob/shuttleRotate(rotation) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index fca9a35212c..37bb39b7754 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -2,15 +2,11 @@ density = 1 layer = 4.0 animate_movement = 2 -// flags = NOREACT pressure_resistance = 8 var/datum/mind/mind var/stat = 0 //Whether a mob is alive or dead. TODO: Move this to living - Nodrak - //Not in use yet - var/obj/effect/organstructure/organStructure = null - var/obj/screen/hands = null var/obj/screen/pullin = null var/obj/screen/i_select = null @@ -34,24 +30,21 @@ var/lastattacker = null var/lastattacked = null var/attack_log = list( ) - var/already_placed = 0.0 var/obj/machinery/machine = null var/other_mobs = null var/memory = "" - var/poll_answer = 0.0 - var/sdisabilities = 0 //Carbon var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/next_move = null var/notransform = null //Carbon var/other = 0.0 var/hand = null - var/eye_blind = null //Carbon - var/eye_blurry = null //Carbon - var/ear_deaf = null //Carbon - var/ear_damage = null //Carbon - var/stuttering = null //Carbon - var/slurring = null //Carbon + var/eye_blind = 0 //Carbon + var/eye_blurry = 0 //Carbon + var/ear_deaf = 0 //Carbon + var/ear_damage = 0 //Carbon + var/stuttering = 0 //Carbon + var/slurring = 0 //Carbon var/real_name = null var/flavor_text = "" var/med_record = "" @@ -63,8 +56,6 @@ var/druggy = 0 //Carbon var/confused = 0 //Carbon var/drunk = 0 - var/antitoxs = null - var/plasma = null var/sleeping = 0 //Carbon var/resting = 0 //Carbon var/lying = 0 @@ -95,11 +86,11 @@ var/nutrition = 400.0//Carbon var/overeatduration = 0 // How long this guy is overeating //Carbon - var/paralysis = 0.0 - var/stunned = 0.0 - var/weakened = 0.0 + var/paralysis = 0 + var/stunned = 0 + var/weakened = 0 var/slowed = 0 - var/losebreath = 0.0//Carbon + var/losebreath = 0 //Carbon var/intent = null//Living var/shakecamera = 0 var/a_intent = I_HELP//Living @@ -123,8 +114,8 @@ var/research_scanner = 0 //For research scanner equipped mobs. Enable to show research data when examining. - var/list/grabbed_by = list( ) - var/list/requests = list( ) + var/list/grabbed_by = list() + var/list/requests = list() var/list/mapobjs = list() @@ -134,17 +125,10 @@ var/emote_cd = 0 // Used to supress emote spamming. 1 if on CD, 2 if disabled by admin (manually set), else 0 - var/music_lastplayed = "null" - var/job = null//Living - var/const/blindness = 1//Carbon - var/const/deafness = 2//Carbon - var/const/muteness = 4//Carbon - - var/datum/dna/dna = null//Carbon - var/radiation = 0.0//Carbon + var/radiation = 0 //Carbon var/list/mutations = list() //Carbon -- Doohl //see: setup.dm for list of mutations @@ -157,24 +141,24 @@ var/has_enabled_antagHUD = 0 var/antagHUD = 0 -//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. - var/proc_holder_list[] = list()//Right now unused. - //Also unlike the spell list, this would only store the object in contents, not an object in itself. - /* Add this line to whatever stat module you need in order to use the proc holder list. +//Generic list for proc holders. Only way I can see to enable certain verbs/procs. Should be modified if needed. + var/proc_holder_list[] = list() + + /* //Also unlike the spell list, this would only store the object in contents, not an object in itself. + + Add this line to whatever stat module you need in order to use the proc holder list. Unlike the object spell system, it's also possible to attach verb procs from these objects to right-click menus. This requires creating a verb for the object proc holder. if(proc_holder_list.len)//Generic list for proc_holder objects. for(var/obj/effect/proc_holder/P in proc_holder_list) - statpanel("[P.panel]","",P) - */ + statpanel("[P.panel]","",P)*/ //The last mob/living/carbon to push/drag/grab this mob (mostly used by slimes friend recognition) var/mob/living/carbon/LAssailant = null -//Wizard mode, but can be used in other modes thanks to the brand new "Give Spell" badmin button - var/obj/effect/proc_holder/spell/list/spell_list = list() + var/list/mob_spell_list = list() //construct spells and mime spells. Spells that do not transfer from one mob to another and can not be lost in mindswap. //Changlings, but can be used in other modes // var/obj/effect/proc_holder/changpower/list/power_list = list() @@ -195,9 +179,6 @@ var/has_unlimited_silicon_privilege = 0 // Can they interact with station electronics - var/list/radar_blips = list() // list of screen objects, radar blips - var/radar_open = 0 // nonzero is radar is open - var/atom/movable/remote_control //Calls relaymove() to whatever it is var/remote_view = 0 // Set to 1 to prevent view resets on Life @@ -219,11 +200,11 @@ var/turf/listed_turf = null //the current turf being examined in the stat panel var/list/shouldnt_see = list(/atom/movable/lighting_overlay) //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes - var/kills=0 + var/kills = 0 var/stance_damage = 0 //Whether this mob's ability to stand has been affected - var/list/active_genes=list() + var/list/active_genes = list() var/last_movement = -100 // Last world.time the mob actually moved of its own accord. diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ff29bda1d9d..f78f6ba314f 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -63,7 +63,7 @@ proc/iscuffed(A) proc/isdeaf(A) if(istype(A, /mob)) var/mob/M = A - return (M.sdisabilities & DEAF) || M.ear_deaf + return (M.disabilities & DEAF) || M.ear_deaf return 0 proc/hassensorlevel(A, var/level) @@ -358,7 +358,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HARM) /proc/is_blind(A) if(iscarbon(A)) var/mob/living/carbon/C = A - if(C.sdisabilities & BLIND || C.blinded) + if(C.disabilities & BLIND || C.blinded) return 1 return 0 diff --git a/code/modules/mob/spirit/mask/mask.dm b/code/modules/mob/spirit/mask/mask.dm index 03ba63dbe01..2b907ca7f5a 100644 --- a/code/modules/mob/spirit/mask/mask.dm +++ b/code/modules/mob/spirit/mask/mask.dm @@ -4,9 +4,9 @@ /mob/spirit/mask/New() ..() - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(src)) - AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(src)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/conjure/create_talisman(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/blood_speech(null)) + AddSpell(new /obj/effect/proc_holder/spell/aoe_turf/shatter_lights(null)) /mob/spirit/mask/verb/go_to_follower() diff --git a/code/modules/mob/typing_indicator.dm b/code/modules/mob/typing_indicator.dm index def65e1859d..9c6c8f2fa73 100644 --- a/code/modules/mob/typing_indicator.dm +++ b/code/modules/mob/typing_indicator.dm @@ -15,10 +15,10 @@ var/global/image/typing_indicator if(ishuman(src)) var/mob/living/carbon/human/H = src - if(H.sdisabilities & MUTE || H.silent) + if(H.disabilities & MUTE || H.silent) overlays -= typing_indicator return - + if(client) if((client.prefs.toggles & SHOW_TYPING) || stat != CONSCIOUS || is_muzzled()) overlays -= typing_indicator diff --git a/code/modules/reagents/newchem/medicine.dm b/code/modules/reagents/newchem/medicine.dm index 5d4fb8ef6bc..5b5e5722c46 100644 --- a/code/modules/reagents/newchem/medicine.dm +++ b/code/modules/reagents/newchem/medicine.dm @@ -478,15 +478,15 @@ if(istype(E)) E.damage = max(E.damage-1, 0) M.eye_blurry = max(M.eye_blurry-1 , 0) - M.ear_damage = max(M.ear_damage-1, 0) + M.adjustEarDamage(-1,0) if(prob(50)) M.disabilities &= ~NEARSIGHTED if(prob(30)) - M.sdisabilities &= ~BLIND + M.disabilities &= ~BLIND M.eye_blind = 0 if(M.ear_damage <= 25) if(prob(30)) - M.ear_deaf = 0 + M.setEarDamage(-1,0) ..() /datum/chemical_reaction/oculine @@ -696,7 +696,7 @@ /datum/reagent/mutadone/on_mob_life(mob/living/carbon/human/M) M.jitteriness = 0 - var/needs_update = M.mutations.len > 0 || M.disabilities > 0 || M.sdisabilities > 0 + var/needs_update = M.mutations.len > 0 || M.disabilities > 0 if(needs_update) for(var/block=1;block<=DNA_SE_LENGTH;block++) diff --git a/code/modules/reagents/newchem/pyro.dm b/code/modules/reagents/newchem/pyro.dm index 5bb6700dd49..96cbecf3680 100644 --- a/code/modules/reagents/newchem/pyro.dm +++ b/code/modules/reagents/newchem/pyro.dm @@ -356,8 +356,7 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.ear_damage += rand(0, 5) - M.ear_deaf = max(M.ear_deaf,15) + M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") if(prob(M.ear_damage - 10 + 5)) @@ -385,8 +384,7 @@ if(!ear_safety) M.Stun(max(10/distance, 3)) M.Weaken(max(10/distance, 3)) - M.ear_damage += rand(0, 5) - M.ear_deaf = max(M.ear_deaf,15) + M.setEarDamage(M.ear_damage + rand(0, 5), max(M.ear_deaf,15)) if(M.ear_damage >= 15) to_chat(M, "Your ears start to ring badly!") if(prob(M.ear_damage - 10 + 5)) diff --git a/code/modules/reagents/oldchem/reagents/reagents_admin.dm b/code/modules/reagents/oldchem/reagents/reagents_admin.dm index fa2f661f648..ccc617d2aaa 100644 --- a/code/modules/reagents/oldchem/reagents/reagents_admin.dm +++ b/code/modules/reagents/oldchem/reagents/reagents_admin.dm @@ -25,7 +25,6 @@ if(E.mend_fracture()) E.perma_injury = 0 M.disabilities = 0 - M.sdisabilities = 0 M.eye_blurry = 0 M.eye_blind = 0 M.SetWeakened(0) diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index b7eba792060..9c28a60b055 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -357,7 +357,7 @@ if(!owner) return owner.disabilities &= ~NEARSIGHTED - owner.sdisabilities &= ~BLIND + owner.disabilities &= ~BLIND owner.eye_blurry = 0 owner.eye_blind = 0 @@ -538,7 +538,7 @@ to_chat(owner, "HONK") owner.sleeping = 0 owner.stuttering = 20 - owner.ear_deaf = 30 + owner.adjustEarDamage(0, 30) owner.Weaken(3) owner << 'sound/items/AirHorn.ogg' if(prob(30)) diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index b2f6945b6f1..0bd2d138948 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -12,8 +12,6 @@ mob/living/carbon/proc/pain(var/partname, var/amount, var/force, var/burning = 0 return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return if(world.time < next_pain_time && !force) return if(amount > 10 && istype(src,/mob/living/carbon/human)) @@ -55,8 +53,6 @@ mob/living/carbon/human/proc/custom_pain(var/message, var/flash_strength) return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return var/msg = "\red [message]" if(flash_strength >= 1) msg = "\red [message]" @@ -94,8 +90,6 @@ mob/living/carbon/human/proc/handle_pain() return if(reagents.has_reagent("hydrocodone")) return - if(analgesic) - return var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null for(var/obj/item/organ/external/E in organs) diff --git a/code/modules/surgery/organs/subtypes/diona.dm b/code/modules/surgery/organs/subtypes/diona.dm index 8277be6f241..0f75fe9f80f 100644 --- a/code/modules/surgery/organs/subtypes/diona.dm +++ b/code/modules/surgery/organs/subtypes/diona.dm @@ -170,7 +170,7 @@ if(!owner) return owner.disabilities &= ~NEARSIGHTED - owner.sdisabilities &= ~BLIND + owner.disabilities &= ~BLIND owner.eye_blurry = 0 owner.eye_blind = 0 diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index 1249a58c0d0..d64fbf70e3d 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -150,7 +150,7 @@ if(!owner) return owner.disabilities &= ~NEARSIGHTED - owner.sdisabilities &= ~BLIND + owner.disabilities &= ~BLIND owner.eye_blurry = 0 owner.eye_blind = 0 diff --git a/code/world.dm b/code/world.dm index e11070d8e79..6fa54acfbe7 100644 --- a/code/world.dm +++ b/code/world.dm @@ -282,31 +282,6 @@ var/world_topic_spam_protect_time = world.timeofday sleep_check = world.timeofday waiting++ //#undef INACTIVITY_KICK -/* -#define DISCONNECTED_DELETE 6000 //10 minutes in ticks (approx) -/world/proc/KickDisconnectedClients() - spawn(-1) - //set background = 1 - while(1) - sleep(DISCONNECTED_DELETE) - for(var/mob/living/carbon/human/C in living_mob_list) - if(dd_hasprefix(C.key,@)) return - if(!C.client && C.brain_op_stage!=4.0 && C.lastKnownIP) - sleep(600) - if(!C.client && C.stat != DEAD && C.brain_op_stage!=4.0) - job_master.FreeRole(C.job) - message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client disconnect for 10 minutes)\n") - for(var/obj/item/W in C) - C.unEquip(W) - del(C) - else if(!C.key && C.stat != DEAD && C.brain_op_stage!=4.0) - job_master.FreeRole(C.job) - message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client quit BYOND)\n") - for(var/obj/item/W in C) - C.unEquip(W) - del(C) -#undef INACTIVITY_KICK -*/ /hook/startup/proc/loadMode() world.load_mode()