diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index f30e4096ab..4de5fbfe54 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -167,11 +167,11 @@ client if(istype(D,/atom)) var/atom/A = D - if(ismob(A)) + if(isliving(A)) body += "[D]" if(A.dir) body += "
<< [dir2text(A.dir)] >>" - var/mob/M = A + var/mob/living/M = A body += "
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]" body += {"
@@ -763,19 +763,22 @@ client var/mob/M = locate(href_list["mobToDamage"]) var/Text = locate(href_list["adjustDamage"]) + if(!isliving(M)) return + var/mob/living/L = M + var/amount = input("Deal how much damage to mob? (Negative values here heal)","Adjust [Text]loss",0) as num if(Text == "brute") - M.adjustBruteLoss(amount) + L.adjustBruteLoss(amount) else if(Text == "fire") - M.adjustFireLoss(amount) + L.adjustFireLoss(amount) else if(Text == "toxin") - M.adjustToxLoss(amount) + L.adjustToxLoss(amount) else if(Text == "oxygen") - M.adjustOxyLoss(amount) + L.adjustOxyLoss(amount) else if(Text == "brain") - M.adjustBrainLoss(amount) + L.adjustBrainLoss(amount) else if(Text == "clone") - M.adjustCloneLoss(amount) + L.adjustCloneLoss(amount) else usr << "You caused an error. DEBUG: Text:[Text] Mob:[M]" return diff --git a/code/datums/diseases/alien_embryo.dm b/code/datums/diseases/alien_embryo.dm index fe1f3bff51..4e5d091048 100644 --- a/code/datums/diseases/alien_embryo.dm +++ b/code/datums/diseases/alien_embryo.dm @@ -1,11 +1,6 @@ //affected_mob.contract_disease(new /datum/disease/alien_embryo) - - - - - /datum/disease/alien_embryo name = "Unidentified Foreign Body" max_stages = 5 diff --git a/code/datums/spell.dm b/code/datums/spell.dm index e7a52c5fe1..830257ebbc 100644 --- a/code/datums/spell.dm +++ b/code/datums/spell.dm @@ -186,7 +186,7 @@ var/list/spells = typesof(/obj/effect/proc_holder/spell) //needed for the badmin return -/obj/effect/proc_holder/spell/proc/adjust_var(mob/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types +/obj/effect/proc_holder/spell/proc/adjust_var(mob/living/target = usr, type, amount) //handles the adjustment of the var when the spell is used. has some hardcoded types switch(type) if("bruteloss") target.adjustBruteLoss(amount) diff --git a/code/game/dna.dm b/code/game/dna.dm index 9afec041a9..8056712421 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -650,6 +650,9 @@ if (usr.stat != 0) return + if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna + usr << "\blue Try as you might, you can not climb up into the scanner." + return if (src.occupant) usr << "\blue The scanner is already occupied!" return diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 78e82eb9a9..c614290a2b 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -251,25 +251,30 @@ usr << "Our genes are still mending themselves! We cannot transform!" return - usr.changeling.chem_charges-- + if(!iscarbon(usr)) + return //Changelings should only really be carbon as only monkeys/humans have DNA - usr.remove_changeling_powers() + var/mob/living/carbon/C = usr - usr.visible_message(text("\red [usr] transforms!")) + C.changeling.chem_charges-- - usr.changeling.geneticdamage = 30 - usr << "Our genes cry out!" + C.remove_changeling_powers() + + C.visible_message(text("\red [C] transforms!")) + + C.changeling.geneticdamage = 30 + C << "Our genes cry out!" var/list/implants = list() //Try to preserve implants. - for(var/obj/item/weapon/implant/W in usr) + for(var/obj/item/weapon/implant/W in C) implants += W - usr.regenerate_icons() - usr.monkeyizing = 1 - usr.canmove = 0 - usr.icon = null - usr.invisibility = 101 - var/atom/movable/overlay/animation = new /atom/movable/overlay( usr.loc ) + C.regenerate_icons() + C.monkeyizing = 1 + C.canmove = 0 + C.icon = null + C.invisibility = 101 + var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc ) animation.icon_state = "blank" animation.icon = 'mob.dmi' animation.master = src @@ -278,36 +283,36 @@ del(animation) var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src) - O.dna = usr.dna - usr.dna = null - O.changeling = usr.changeling + O.dna = C.dna + C.dna = null + O.changeling = C.changeling feedback_add_details("changeling_powers","LF") - for(var/obj/item/W in usr) - usr.drop_from_inventory(W) + for(var/obj/item/W in C) + C.drop_from_inventory(W) - for(var/obj/T in usr) + for(var/obj/T in C) del(T) //for(var/R in usr.organs) //redundant, let's give garbage collector work to do --rastaf0 // del(usr.organs[text("[]", R)]) - O.loc = usr.loc + O.loc = C.loc - O.name = text("monkey ([])",copytext(md5(usr.real_name), 2, 6)) - O.setToxLoss(usr.getToxLoss()) - O.adjustBruteLoss(usr.getBruteLoss()) - O.setOxyLoss(usr.getOxyLoss()) - O.adjustFireLoss(usr.getFireLoss()) - O.stat = usr.stat + O.name = text("monkey ([])",copytext(md5(C.real_name), 2, 6)) + O.setToxLoss(C.getToxLoss()) + O.adjustBruteLoss(C.getBruteLoss()) + O.setOxyLoss(C.getOxyLoss()) + O.adjustFireLoss(C.getFireLoss()) + O.stat = C.stat O.a_intent = "hurt" for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O continue - if(usr.mind) - usr.mind.transfer_to(O) + if(C.mind) + C.mind.transfer_to(O) O.make_lesser_changeling() O.verbs += /client/proc/changeling_lesser_transform @@ -334,29 +339,34 @@ usr << "\red We don't have enough stored chemicals to do that!" return + if(!iscarbon(usr)) + return //Only humans/monkeys have DNA + var/S = input("Select the target DNA: ", "Target DNA", null) in usr.changeling.absorbed_dna if (S == null) return - usr.changeling.chem_charges -= 1 + var/mob/living/carbon/C = usr - usr.remove_changeling_powers() + C.changeling.chem_charges -= 1 - usr.visible_message(text("\red [usr] transforms!")) + C.remove_changeling_powers() - usr.dna = usr.changeling.absorbed_dna[S] + C.visible_message(text("\red [C] transforms!")) + + C.dna = C.changeling.absorbed_dna[S] var/list/implants = list() - for (var/obj/item/weapon/implant/I in usr) //Still preserving implants + for (var/obj/item/weapon/implant/I in C) //Still preserving implants implants += I - usr.regenerate_icons() - usr.monkeyizing = 1 - usr.canmove = 0 - usr.icon = null - usr.invisibility = 101 - var/atom/movable/overlay/animation = new /atom/movable/overlay( usr.loc ) + C.regenerate_icons() + C.monkeyizing = 1 + C.canmove = 0 + C.icon = null + C.invisibility = 101 + var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc ) animation.icon_state = "blank" animation.icon = 'mob.dmi' animation.master = src @@ -365,44 +375,44 @@ del(animation) for(var/obj/item/W in usr) - usr.u_equip(W) - if (usr.client) - usr.client.screen -= W + C.u_equip(W) + if (C.client) + C.client.screen -= W if (W) - W.loc = usr.loc - W.dropped(usr) + W.loc = C.loc + W.dropped(C) W.layer = initial(W.layer) var/mob/living/carbon/human/O = new /mob/living/carbon/human( src ) - if (isblockon(getblock(usr.dna.uni_identity, 11,3),11)) + if (isblockon(getblock(C.dna.uni_identity, 11,3),11)) O.gender = FEMALE else O.gender = MALE - O.dna = usr.dna - usr.dna = null - O.changeling = usr.changeling + O.dna = C.dna + C.dna = null + O.changeling = C.changeling O.real_name = S feedback_add_details("changeling_powers","LFT") - for(var/obj/T in usr) + for(var/obj/T in C) del(T) - O.loc = usr.loc + O.loc = C.loc updateappearance(O,O.dna.uni_identity) domutcheck(O, null) - O.setToxLoss(usr.getToxLoss()) - O.adjustBruteLoss(usr.getBruteLoss()) - O.setOxyLoss(usr.getOxyLoss()) - O.adjustFireLoss(usr.getFireLoss()) - O.stat = usr.stat + O.setToxLoss(C.getToxLoss()) + O.adjustBruteLoss(C.getBruteLoss()) + O.setOxyLoss(C.getOxyLoss()) + O.adjustFireLoss(C.getFireLoss()) + O.stat = C.stat for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O continue - if(usr.mind) - usr.mind.transfer_to(O) + if(C.mind) + C.mind.transfer_to(O) O.make_changeling() @@ -532,45 +542,48 @@ Tarjan shit, not recoding this -Sieve{R}*/ if(usr.changeling.chem_charges < 20) usr << "\red We don't have enough stored chemicals to do that!" return + if(!isliving(usr)) return //This should NEVER happen - usr.changeling.chem_charges -= 20 + var/mob/living/L = usr - usr << "\blue We will regenerate our form." + L.changeling.chem_charges -= 20 - usr.lying = 1 - usr.canmove = 0 - usr.changeling.changeling_fakedeath = 1 - usr.remove_changeling_powers() + L << "\blue We will regenerate our form." feedback_add_details("changeling_powers","FD") - usr.emote("gasp") + L.lying = 1 + L.canmove = 0 + L.changeling.changeling_fakedeath = 1 + L.remove_changeling_powers() + + L.emote("gasp") spawn(1200) - usr.stat = 0 + L.stat = 0 //usr.fireloss = 0 - usr.setToxLoss(0) + L.setToxLoss(0) //usr.bruteloss = 0 - usr.setOxyLoss(0) - usr.setCloneLoss(0) - usr.SetParalysis(0) - usr.SetStunned(0) - usr.SetWeakened(0) - usr.radiation = 0 - //usr.health = 100 - //usr.updatehealth() + L.setOxyLoss(0) + L.setCloneLoss(0) + L.SetParalysis(0) + L.SetStunned(0) + L.SetWeakened(0) + L.radiation = 0 + //L.health = 100 + //L.updatehealth() var/mob/living/M = src M.heal_overall_damage(M.getBruteLoss(), M.getFireLoss()) - usr.reagents.clear_reagents() - usr.lying = 0 - usr.canmove = 1 - usr << "\blue We have regenerated." - usr.visible_message(text("\red [usr] appears to wake from the dead, having healed all wounds.")) + L.reagents.clear_reagents() + L.lying = 0 + L.canmove = 1 + L << "\blue We have regenerated." + L.visible_message(text("\red [usr] appears to wake from the dead, having healed all wounds.")) - usr.changeling.changeling_fakedeath = 0 - if (usr.changeling.changeling_level == 1) - usr.make_lesser_changeling() - else if (usr.changeling.changeling_level == 2) - usr.make_changeling() + L.changeling.changeling_fakedeath = 0 + if (L.changeling.changeling_level == 1) + L.make_lesser_changeling() + else if (L.changeling.changeling_level == 2) + L.make_changeling() return @@ -1056,7 +1069,7 @@ Tarjan shit, not recoding this -Sieve{R}*/ var/list/victims = list() for(var/mob/living/carbon/C in oview(usr.changeling.sting_range)) victims += C - var/mob/T = input(usr, "Who do you wish to sting?") as null | anything in victims + var/mob/living/T = input(usr, "Who do you wish to sting?") as null | anything in victims if(T && T in view(usr.changeling.sting_range)) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index a3d2f3ef7d..5a861246e8 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -48,7 +48,7 @@ if(..()) return if (src.connected) - var/mob/occupant = src.connected.occupant + var/mob/living/occupant = src.connected.occupant var/dat = "Occupant Statistics:
" if (occupant) var/t1 @@ -138,7 +138,7 @@ density = 1 anchored = 1 var/orient = "LEFT" // "RIGHT" changes the dir suffix to "-r" - var/mob/occupant = null + var/mob/living/occupant = null New() @@ -267,7 +267,7 @@ return - proc/inject_inap(mob/user as mob) + proc/inject_inap(mob/living/user as mob) if(src.occupant) if(src.occupant.reagents.get_reagent_amount("inaprovaline") + 30 <= 60) src.occupant.reagents.add_reagent("inaprovaline", 30) @@ -277,7 +277,7 @@ return - proc/inject_stox(mob/user as mob) + proc/inject_stox(mob/living/user as mob) if(src.occupant) if(src.occupant.reagents.get_reagent_amount("stoxin") + 20 <= 40) src.occupant.reagents.add_reagent("stoxin", 20) @@ -287,7 +287,7 @@ return - proc/inject_dermaline(mob/user as mob) + proc/inject_dermaline(mob/living/user as mob) if (src.occupant) if(src.occupant.reagents.get_reagent_amount("dermaline") + 20 <= 40) src.occupant.reagents.add_reagent("dermaline", 20) @@ -297,7 +297,7 @@ return - proc/inject_bicaridine(mob/user as mob) + proc/inject_bicaridine(mob/living/user as mob) if(src.occupant) if(src.occupant.reagents.get_reagent_amount("bicaridine") + 10 <= 20) src.occupant.reagents.add_reagent("bicaridine", 10) @@ -307,7 +307,7 @@ return - proc/inject_dexalin(mob/user as mob) + proc/inject_dexalin(mob/living/user as mob) if(src.occupant) if(src.occupant.reagents.get_reagent_amount("dexalin") + 20 <= 40) src.occupant.reagents.add_reagent("dexalin", 20) @@ -317,7 +317,7 @@ return - proc/check(mob/user as mob) + proc/check(mob/living/user as mob) if(src.occupant) user << text("\blue Occupant ([]) Statistics:", src.occupant) var/t1 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index a1f4642987..84c939ad5c 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -91,7 +91,9 @@ if (!src.implanted) return "ERROR" else - src.healthstring = "[round(src.implanted:getOxyLoss())] - [round(src.implanted:getFireLoss())] - [round(src.implanted:getToxLoss())] - [round(src.implanted:getBruteLoss())]" + if(isliving(src.implanted)) + var/mob/living/L = src.implanted + src.healthstring = "[round(L.getOxyLoss())] - [round(L.getFireLoss())] - [round(L.getToxLoss())] - [round(L.getBruteLoss())]" if (!src.healthstring) src.healthstring = "ERROR" return src.healthstring @@ -115,6 +117,8 @@ if(((!ghost) || (!ghost.client)) || src.mess || src.attempting) return 0 + + src.attempting = 1 //One at a time!! src.locked = 1 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index f15549445e..4e37295483 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -327,7 +327,7 @@ About the new airlock wires panel: -/obj/machinery/door/airlock/bumpopen(mob/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite +/obj/machinery/door/airlock/bumpopen(mob/living/user as mob) //Airlocks now zap you when you 'bump' them open when they're electrified. --NeoFite if(!istype(usr, /mob/living/silicon)) if(src.isElectrified()) if(!src.justzap) @@ -1270,7 +1270,7 @@ About the new airlock wires panel: close() return - for(var/mob/M in get_turf(src)) + for(var/mob/living/M in get_turf(src)) if(isrobot(M)) M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) else diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index d45b913bc3..ada3b2a1c4 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -205,11 +205,12 @@ Class Procs: return 1 */ if (ishuman(user)) - if(user.getBrainLoss() >= 60) + var/mob/living/carbon/human/H = user + if(H.getBrainLoss() >= 60) for(var/mob/M in viewers(src, null)) - M << "\red [user] stares cluelessly at [src] and drools." + M << "\red [H] stares cluelessly at [src] and drools." return 1 - else if(prob(user.getBrainLoss())) + else if(prob(H.getBrainLoss())) user << "\red You momentarily forget how to use [src]." return 1 diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index 0b2d2f3c93..7585286d55 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -134,14 +134,14 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", return - attack_hand(mob/user as mob) + attack_hand(mob/living/user as mob) if(!iscultist(user)) user << "You can't mouth the arcane scratchings without fumbling over them." return if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle)) user << "You are unable to speak the words of the rune." return - if(!word1 || !word2 || !word3 || prob(usr.getBrainLoss())) + if(!word1 || !word2 || !word3 || prob(user.getBrainLoss())) return fizzle() // if(!src.visibility) // src.visibility=1 diff --git a/code/game/objects/devices/PDA/PDA.dm b/code/game/objects/devices/PDA/PDA.dm index 0472c4c7db..5659dbce86 100644 --- a/code/game/objects/devices/PDA/PDA.dm +++ b/code/game/objects/devices/PDA/PDA.dm @@ -890,7 +890,7 @@ var/global/list/obj/item/device/pda/PDAs = list() user << "You slide \the [C] into \the [src]." return -/obj/item/device/pda/attack(mob/C as mob, mob/user as mob) +/obj/item/device/pda/attack(mob/living/C as mob, mob/living/user as mob) if (istype(C, /mob/living/carbon)) switch(scanmode) if(1) diff --git a/code/game/objects/devices/flashlight.dm b/code/game/objects/devices/flashlight.dm index d1a4bc734b..acf53cdc2d 100644 --- a/code/game/objects/devices/flashlight.dm +++ b/code/game/objects/devices/flashlight.dm @@ -46,9 +46,10 @@ return -/obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob) +/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob) src.add_fingerprint(user) if(src.on && user.zone_sel.selecting == "eyes") + if (((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly return ..()//just hit them in the head diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 3a370719ad..6673546f2b 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -76,7 +76,7 @@ MASS SPECTROMETER origin_tech = "magnets=1;biotech=1" var/mode = 1; -/obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob) +/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) diff --git a/code/game/objects/devices/taperecorder.dm b/code/game/objects/devices/taperecorder.dm index 02218b2a23..d95b317c2a 100644 --- a/code/game/objects/devices/taperecorder.dm +++ b/code/game/objects/devices/taperecorder.dm @@ -19,7 +19,7 @@ throw_speed = 4 throw_range = 20 -/obj/item/device/taperecorder/hear_talk(mob/M as mob, msg) +/obj/item/device/taperecorder/hear_talk(mob/living/M as mob, msg) if (recording) var/ending = copytext(msg, length(msg)) src.timestamp+= src.timerecorded diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index bf733a282e..70ba63593f 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -470,7 +470,7 @@ ZIPPO /obj/item/weapon/lighter - attack_self(mob/user) + attack_self(mob/living/user) if(user.r_hand == src || user.l_hand == src) if(!src.lit) src.lit = 1 diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index 20b72dad86..b7c8ad1e3c 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -15,7 +15,7 @@ H.UpdateDamageIcon() return -/obj/item/weapon/storage/bible/attack(mob/M as mob, mob/living/user as mob) +/obj/item/weapon/storage/bible/attack(mob/living/M as mob, mob/living/user as mob) var/chaplain = 0 if(user.mind && (user.mind.assigned_role == "Chaplain")) diff --git a/code/game/objects/watercloset.dm b/code/game/objects/watercloset.dm index 2485e6f7c7..1163a60c43 100644 --- a/code/game/objects/watercloset.dm +++ b/code/game/objects/watercloset.dm @@ -10,13 +10,13 @@ var/open = 0 //if the lid is up var/cistern = 0 //if the cistern bit is open var/w_items = 0 //the combined w_class of all the items in the cistern - var/mob/swirlie = null //the mob being given a swirlie + var/mob/living/swirlie = null //the mob being given a swirlie /obj/structure/toilet/New() open = round(rand(0, 1)) update_icon() -/obj/structure/toilet/attack_hand(mob/user as mob) +/obj/structure/toilet/attack_hand(mob/living/user as mob) if(swirlie) usr.visible_message("[user] slams the toilet seat onto [swirlie.name]'s head!", "You slam the toilet seat onto [swirlie.name]'s head!", "You hear reverberating porcelain.") swirlie.adjustBruteLoss(8) @@ -44,7 +44,7 @@ /obj/structure/toilet/update_icon() icon_state = "toilet[open][cistern]" -/obj/structure/toilet/attackby(obj/item/I as obj, mob/user as mob) +/obj/structure/toilet/attackby(obj/item/I as obj, mob/living/user as mob) if(istype(I, /obj/item/weapon/crowbar)) user << "You start to [cistern ? "replace the lid on the cistern" : "lift the lid off the cistern"]." playsound(loc, 'stonedoor_openclose.ogg', 50, 1) @@ -56,8 +56,10 @@ if(istype(I, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = I - var/mob/GM = G.affecting - if(ismob(G.affecting)) + + if(isliving(G.affecting)) + var/mob/living/GM = G.affecting + if(G.state>1) if(!GM.loc == get_turf(src)) user << "[GM.name] needs to be on the toilet." @@ -102,8 +104,8 @@ /obj/structure/urinal/attackby(obj/item/I as obj, mob/user as mob) if(istype(I, /obj/item/weapon/grab)) var/obj/item/weapon/grab/G = I - var/mob/GM = G.affecting - if(ismob(G.affecting)) + if(isliving(G.affecting)) + var/mob/living/GM = G.affecting if(G.state>1) if(!GM.loc == get_turf(src)) user << "[GM.name] needs to be on the urinal." diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 2162e646d3..5a29620e63 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -149,7 +149,7 @@ target.adjustBruteLoss(100) */ -/obj/item/weapon/mousetrap/attack_self(mob/user as mob) +/obj/item/weapon/mousetrap/attack_self(mob/living/user as mob) if(!armed) icon_state = "mousetraparmed" user << "\blue You arm the mousetrap." @@ -170,7 +170,7 @@ armed = !armed playsound(user.loc, 'handcuffs.ogg', 30, 1, -3) -/obj/item/weapon/mousetrap/attack_hand(mob/user as mob) +/obj/item/weapon/mousetrap/attack_hand(mob/living/user as mob) if(armed) if(( (user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50)) var/which_hand = "l_hand" diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 36923683e4..5071362c09 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -1152,7 +1152,11 @@ var/global/BSACooldown = 0 special_role_description = "Role: Mind datum missing Antagonist: Mind datum missing; Has been rev: Mind datum missing;" //Health - health_description = "Oxy: [M.oxyloss] - Tox: [M.toxloss] - Fire: [M.fireloss] - Brute: [M.bruteloss] - Clone: [M.cloneloss] - Brain: [M.brainloss]" + if(isliving(M)) + var/mob/living/L + health_description = "Oxy: [L.oxyloss] - Tox: [L.toxloss] - Fire: [L.fireloss] - Brute: [L.bruteloss] - Clone: [L.cloneloss] - Brain: [L.brainloss]" + else + health_description = "This mob type has no health to speak of." src.owner << "Info about [M.name]: " src.owner << "Mob type = [M.type]; Damage = [health_description]" @@ -1191,10 +1195,16 @@ var/global/BSACooldown = 0 show_traitor_panel(M) if (href_list["BlueSpaceArtillery"]) - var/mob/M = locate(href_list["BlueSpaceArtillery"]) - if(!M) + var/mob/target = locate(href_list["BlueSpaceArtillery"]) + if(!target) return + if(!isliving(target)) + src.owner << "That is not a valid target." + return + + var/mob/living/M = target + var/choice = alert(src.owner, "Are you sure you wish to hit [key_name(M)] with Blue Space Artillery?", "Confirm Firing?" , "Yes" , "No") if (choice == "No") return diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index cb81ecf7c6..f2553b4563 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -90,7 +90,7 @@ datum M << "\red Your insides are burning!" M.adjustToxLoss(rand(20,60)) else if(prob(40)) - M:heal_organ_damage(5,0) + M.heal_organ_damage(5,0) ..() return @@ -287,7 +287,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:drowsyness = max(M:drowsyness-2, 0) + M.drowsyness = max(M.drowsyness-2, 0) if(holder.has_reagent("toxin")) holder.remove_reagent("toxin", 2) if(holder.has_reagent("stoxin")) @@ -306,7 +306,7 @@ datum holder.remove_reagent("carpotoxin", 1) if(holder.has_reagent("zombiepowder")) holder.remove_reagent("zombiepowder", 0.5) - M:adjustToxLoss(-2) + M.adjustToxLoss(-2) ..() return @@ -319,7 +319,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1.5) + M.adjustToxLoss(1.5) ..() return @@ -332,9 +332,9 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(3) - M:adjustOxyLoss(3) - M:sleeping += 1 + M.adjustToxLoss(3) + M.adjustOxyLoss(3) + M.sleeping += 1 ..() return @@ -366,10 +366,10 @@ datum if(1 to 15) M.eye_blurry = max(M.eye_blurry, 10) if(15 to 25) - M:drowsyness = max(M:drowsyness, 20) + M.drowsyness = max(M.drowsyness, 20) if(25 to INFINITY) M.Paralyse(20) - M.drowsyness = max(M:drowsyness, 30) + M.drowsyness = max(M.drowsyness, 30) data++ ..() return @@ -392,7 +392,7 @@ datum if(1 to 15) M.eye_blurry = max(M.eye_blurry, 10) if(15 to 25) - M:drowsyness = max(M:drowsyness, 20) + M.drowsyness = max(M.drowsyness, 20) if(25 to INFINITY) M.sleeping += 1 M.adjustOxyLoss(-M.getOxyLoss()) @@ -434,7 +434,7 @@ datum if(isturf(M.loc) && !istype(M.loc, /turf/space)) if(M.canmove) if(prob(10)) step(M, pick(cardinal)) - if(prob(7)) M:emote(pick("twitch","drool","moan","giggle")) + if(prob(7)) M.emote(pick("twitch","drool","moan","giggle")) holder.remove_reagent(src.id, 0.2) return @@ -447,7 +447,7 @@ datum on_mob_life(var/mob/living/M as mob) if(ishuman(M)) - if(prob(7)) M:emote(pick("twitch","drool","moan","gasp")) + if(prob(7)) M.emote(pick("twitch","drool","moan","gasp")) holder.remove_reagent(src.id, 0.1) return @@ -532,7 +532,7 @@ datum if(!M) M = holder.my_atom if(M.canmove && istype(M.loc, /turf/space)) step(M, pick(cardinal)) - if(prob(5)) M:emote(pick("twitch","drool","moan")) + if(prob(5)) M.emote(pick("twitch","drool","moan")) ..() return @@ -577,7 +577,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1) + M.adjustToxLoss(1) ..() return @@ -606,7 +606,7 @@ datum if(!M) M = holder.my_atom if(M.canmove && istype(M.loc, /turf/space)) step(M, pick(cardinal)) - if(prob(5)) M:emote(pick("twitch","drool","moan")) + if(prob(5)) M.emote(pick("twitch","drool","moan")) ..() return @@ -618,7 +618,7 @@ datum color = "#808080" // rgb: 128, 128, 128 on_mob_life(var/mob/living/M as mob) - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -631,7 +631,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1) + M.adjustToxLoss(1) M.take_organ_damage(0, 1) ..() return @@ -640,27 +640,29 @@ datum return if(method == TOUCH) if(istype(M, /mob/living/carbon/human)) - if(M:wear_mask) - del (M:wear_mask) - M << "\red Your mask melts away but protects you from the acid!" + var/mob/living/carbon/human/H = M + if(H.wear_mask) + del (H.wear_mask) + H << "\red Your mask melts away but protects you from the acid!" return - if(M:head) - del (M:head) - M << "\red Your helmet melts into uselessness but protects you from the acid!" + if(H.head) + del (H.head) + H << "\red Your helmet melts into uselessness but protects you from the acid!" return if(istype(M, /mob/living/carbon/monkey)) - if(M:wear_mask) - del (M:wear_mask) - M << "\red Your mask melts away but protects you from the acid!" + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + del (MK.wear_mask) + MK << "\red Your mask melts away but protects you from the acid!" return if(!M.unacidable) if(prob(15) && istype(M, /mob/living/carbon/human) && volume >= 30) - - var/datum/organ/external/affecting = M:get_organ("head") + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") if(affecting) if(affecting.take_damage(25, 0)) - M:UpdateDamageIcon() - M:emote("scream") + H.UpdateDamageIcon() + H.emote("scream") else M.take_organ_damage(min(15, volume * 2)) // uses min() and volume to make sure they aren't being sprayed in trace amounts (1 unit != insta rape) -- Doohl else @@ -685,7 +687,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1) + M.adjustToxLoss(1) ..() return @@ -693,40 +695,42 @@ datum if(!istype(M, /mob/living)) return //wooo more runtime fixin if(method == TOUCH) - if(istype(M, /mob/living/carbon/human)) - if(M:wear_mask) - del (M:wear_mask) - M << "\red Your mask melts away!" + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.wear_mask) + del (H.wear_mask) + H << "\red Your mask melts away!" return - if(M:head) + if(H.head) if(prob(15)) - del(M:head) - M << "\red Your helmet melts from the acid!" + del(H.head) + H << "\red Your helmet melts from the acid!" else - M << "\red Your helmet protects you from the acid!" + H << "\red Your helmet protects you from the acid!" return - if(!M.unacidable) - var/datum/organ/external/affecting = M:get_organ("head") + if(!H.unacidable) + var/datum/organ/external/affecting = H.get_organ("head") if(affecting.take_damage(15, 0)) - M:UpdateDamageIcon() - M:emote("scream") + H.UpdateDamageIcon() + H.emote("scream") else - if(istype(M, /mob/living/carbon/monkey) && M:wear_mask) - del (M:wear_mask) - M << "\red Your mask melts away but protects you from the acid!" - return - - - if(!M.unacidable) - M.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid + if(ismonkey(M)) + var/mob/living/carbon/monkey/MK = M + if(MK.wear_mask) + del (MK.wear_mask) + MK << "\red Your mask melts away but protects you from the acid!" + return + if(!MK.unacidable) + MK.take_organ_damage(min(15, volume * 4)) // same deal as sulphuric acid else if(!M.unacidable) - if(istype(M, /mob/living/carbon/human)) - var/datum/organ/external/affecting = M:get_organ("head") + if(ishuman(M)) + var/mob/living/carbon/human/H = M + var/datum/organ/external/affecting = H.get_organ("head") if(affecting.take_damage(15, 0)) - M:UpdateDamageIcon() - M:emote("scream") + H.UpdateDamageIcon() + H.emote("scream") else M.take_organ_damage(min(15, volume * 4)) @@ -840,7 +844,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -850,7 +854,7 @@ datum description = "Sterilizes wounds in preparation for surgery." reagent_state = LIQUID color = "#C8A5DC" // rgb: 200, 165, 220 - /* reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + /* reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) src = null if (method==TOUCH) if(istype(M, /mob/living/carbon/human)) @@ -858,7 +862,7 @@ datum M.crit_op_stage = 0.0 if (method==INGEST) usr << "Well, that was stupid." - M:adjustToxLoss(3) + M.adjustToxLoss(3) return on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom @@ -962,7 +966,7 @@ datum return*/ on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1) + M.adjustToxLoss(1) ..() return @@ -991,7 +995,7 @@ datum reaction_mob(var/mob/M, var/method=TOUCH, var/volume) //TODO: CARN M.clean_blood() - if(istype(M, /mob/living/carbon)) + if(iscarbon(M)) var/mob/living/carbon/C = M if(C.r_hand) C.r_hand.clean_blood() @@ -999,17 +1003,18 @@ datum C.l_hand.clean_blood() if(C.wear_mask) C.wear_mask.clean_blood() - if(istype(M, /mob/living/carbon/human)) - if(C:w_uniform) - C:w_uniform.clean_blood() - if(C:wear_suit) - C:wear_suit.clean_blood() - if(C:shoes) - C:shoes.clean_blood() - if(C:gloves) - C:gloves.clean_blood() - if(C:head) - C:head.clean_blood() + if(ishuman(M)) + var/mob/living/carbon/human/H = C + if(H.w_uniform) + H.w_uniform.clean_blood() + if(H.wear_suit) + H.wear_suit.clean_blood() + if(H.shoes) + H.shoes.clean_blood() + if(H.gloves) + H.gloves.clean_blood() + if(H.head) + H.head.clean_blood() plantbgone @@ -1021,31 +1026,33 @@ datum /* Don't know if this is necessary. on_mob_life(var/mob/living/carbon/M) if(!M) M = holder.my_atom - M:adjustToxLoss(3.0) + M.adjustToxLoss(3.0) ..() return */ reaction_obj(var/obj/O, var/volume) // if(istype(O,/obj/plant/vine/)) - // O:life -= rand(15,35) // Kills vines nicely // Not tested as vines don't work in R41 + // var/obj/plant/vine/V = O + // V.life -= rand(15,35) // Kills vines nicely // Not tested as vines don't work in R41 if(istype(O,/obj/effect/alien/weeds/)) - O:health -= rand(15,35) // Kills alien weeds pretty fast - O:healthcheck() + var/obj/effect/alien/weeds/alien_weeds = O + alien_weeds.health -= rand(15,35) // Kills alien weeds pretty fast + alien_weeds.healthcheck() else if(istype(O,/obj/effect/glowshroom)) //even a small amount is enough to kill it del(O) // Damage that is done to growing plants is separately // at code/game/machinery/hydroponics at obj/item/hydroponics - reaction_mob(var/mob/M, var/method=TOUCH, var/volume) + reaction_mob(var/mob/living/M, var/method=TOUCH, var/volume) src = null - if(istype(M, /mob/living/carbon)) - if(!M.wear_mask) // If not wearing a mask - M:adjustToxLoss(2) // 4 toxic damage per application, doubled for some reason - if(istype(M,/mob/living/carbon/human) && M:mutantrace == "plant") //plantmen take a LOT of damage - M:adjustToxLoss(10) - //if(prob(10)) - //M.make_dizzy(1) doesn't seem to do anything - + if(iscarbon(M)) + var/mob/living/carbon/C = M + if(!C.wear_mask) // If not wearing a mask + C.adjustToxLoss(2) // 4 toxic damage per application, doubled for some reason + if(ishuman(M)) + var/mob/living/carbon/human/H + if(H.mutantrace == "plant") //plantmen take a LOT of damage + H.adjustToxLoss(10) plasma name = "Plasma" @@ -1058,7 +1065,7 @@ datum if(!M) M = holder.my_atom if(holder.has_reagent("inaprovaline")) holder.remove_reagent("inaprovaline", 2) - M:adjustToxLoss(1) + M.adjustToxLoss(1) ..() return reaction_obj(var/obj/O, var/volume) @@ -1124,8 +1131,8 @@ datum if(!M) M = holder.my_atom if(prob(33)) M.take_organ_damage(1, 0) - M:adjustOxyLoss(3) - if(prob(20)) M:emote("gasp") + M.adjustOxyLoss(3) + if(prob(20)) M.emote("gasp") ..() return @@ -1140,7 +1147,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - M:heal_organ_damage(0,2) + M.heal_organ_damage(0,2) ..() return @@ -1155,7 +1162,7 @@ datum if(M.stat == 2.0) //THE GUY IS **DEAD**! BEREFT OF ALL LIFE HE RESTS IN PEACE etc etc. He does NOT metabolise shit anymore, god DAMN return if(!M) M = holder.my_atom - M:heal_organ_damage(0,3) + M.heal_organ_damage(0,3) ..() return @@ -1170,7 +1177,7 @@ datum if(M.stat == 2.0) return //See above, down and around. --Agouri if(!M) M = holder.my_atom - M:adjustOxyLoss(-2) + M.adjustOxyLoss(-2) if(holder.has_reagent("lexorin")) holder.remove_reagent("lexorin", 2) ..() @@ -1204,10 +1211,10 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(40)) M:adjustOxyLoss(-1) - if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0) - if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1) - if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1) + if(M.getOxyLoss() && prob(40)) M.adjustOxyLoss(-1) + if(M.getBruteLoss() && prob(40)) M.heal_organ_damage(1,0) + if(M.getFireLoss() && prob(40)) M.heal_organ_damage(0,1) + if(M.getToxLoss() && prob(40)) M.adjustToxLoss(-1) ..() return @@ -1281,7 +1288,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:drowsyness = max(M:drowsyness-5, 0) + M.drowsyness = max(M.drowsyness-5, 0) M.AdjustParalysis(-1) M.AdjustStunned(-1) M.AdjustWeakened(-1) @@ -1299,10 +1306,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:jitteriness = max(M:jitteriness-5,0) - if(prob(80)) M:adjustBrainLoss(1) - if(prob(50)) M:drowsyness = max(M:drowsyness, 3) - if(prob(10)) M:emote("drool") + M.jitteriness = max(M.jitteriness-5,0) + if(prob(80)) M.adjustBrainLoss(1) + if(prob(50)) M.drowsyness = max(M.drowsyness, 3) + if(prob(10)) M.emote("drool") ..() return @@ -1315,7 +1322,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:radiation = max(M:radiation-3,0) + M.radiation = max(M.radiation-3,0) ..() return @@ -1330,8 +1337,8 @@ datum if(M.stat == 2.0) return //See above, down and around. --Agouri if(!M) M = holder.my_atom - M:radiation = max(M:radiation-7,0) - M:adjustToxLoss(-1) + M.radiation = max(M.radiation-7,0) + M.adjustToxLoss(-1) if(prob(15)) M.take_organ_damage(1, 0) ..() @@ -1346,7 +1353,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustBrainLoss(-3) + M.adjustBrainLoss(-3) ..() return @@ -1359,11 +1366,11 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:eye_blurry = max(M:eye_blurry-5 , 0) - M:eye_blind = max(M:eye_blind-5 , 0) - M:disabilities &= ~1 - M:eye_stat = max(M:eye_stat-5, 0) -// M:sdisabilities &= ~1 Replaced by eye surgery + M.eye_blurry = max(M.eye_blurry-5 , 0) + M.eye_blind = max(M.eye_blind-5 , 0) + M.disabilities &= ~1 + M.eye_stat = max(M.eye_stat-5, 0) +// M.sdisabilities &= ~1 Replaced by eye surgery ..() return @@ -1378,7 +1385,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - M:heal_organ_damage(2,0) + M.heal_organ_damage(2,0) ..() return @@ -1391,7 +1398,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(prob(5)) M:emote(pick("twitch","blink_r","shiver")) + if(prob(5)) M.emote(pick("twitch","blink_r","shiver")) holder.remove_reagent(src.id, 0.2) ..() return @@ -1406,10 +1413,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(M.bodytemperature < 170) - M:adjustCloneLoss(-1) - M:adjustOxyLoss(-3) - M:heal_organ_damage(3,3) - M:adjustToxLoss(-3) + M.adjustCloneLoss(-1) + M.adjustOxyLoss(-3) + M.heal_organ_damage(3,3) + M.adjustToxLoss(-3) ..() return @@ -1423,10 +1430,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(M.bodytemperature < 170) - M:adjustCloneLoss(-3) - M:adjustOxyLoss(-3) - M:heal_organ_damage(3,3) - M:adjustToxLoss(-3) + M.adjustCloneLoss(-3) + M.adjustOxyLoss(-3) + M.heal_organ_damage(3,3) + M.adjustToxLoss(-3) ..() return @@ -1451,7 +1458,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(2) + M.adjustToxLoss(2) ..() return @@ -1466,7 +1473,7 @@ datum M.adjustOxyLoss(0.5) M.adjustToxLoss(0.5) M.Weaken(10) - M.silent = max(M:silent, 10) + M.silent = max(M.silent, 10) ..() return @@ -1477,9 +1484,9 @@ datum reagent_state = LIQUID color = "#B31008" // rgb: 139, 166, 233 - on_mob_life(var/mob/M) + on_mob_life(var/mob/living/M) if(!M) M = holder.my_atom - M:hallucination += 10 + M.hallucination += 10 ..() return @@ -1547,13 +1554,13 @@ datum if(!data) data = 1 data++ M.make_dizzy(5) - M:jitteriness = max(M:jitteriness-5,0) + M.jitteriness = max(M.jitteriness-5,0) if(data >= 25) - if (!M:stuttering) M:stuttering = 1 - M:stuttering += 4 + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 4 if(data >= 40 && prob(33)) - if (!M:confused) M:confused = 1 - M:confused += 3 + if (!M.confused) M.confused = 1 + M.confused += 3 ..() return reaction_obj(var/obj/O, var/volume) @@ -1600,9 +1607,9 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M.dizziness = 0 - M:drowsyness = 0 - M:stuttering = 0 - M:confused = 0 + M.drowsyness = 0 + M.stuttering = 0 + M.confused = 0 ..() return @@ -1619,13 +1626,13 @@ datum data++ switch(data) if(1) - M:confused += 2 - M:drowsyness += 2 + M.confused += 2 + M.drowsyness += 2 if(2 to 50) - M:sleeping += 1 + M.sleeping += 1 if(51 to INFINITY) - M:sleeping += 1 - M:adjustToxLoss(data - 50) + M.sleeping += 1 + M.adjustToxLoss(data - 50) ..() return @@ -1641,13 +1648,13 @@ datum if(!data) data = 1 switch(data) if(1) - M:confused += 2 - M:drowsyness += 2 + M.confused += 2 + M.drowsyness += 2 if(2 to 50) - M:sleeping += 1 + M.sleeping += 1 if(51 to INFINITY) - M:sleeping += 1 - M:adjustToxLoss(data - 50) + M.sleeping += 1 + M.adjustToxLoss(data - 50) data++ ..() return @@ -1666,8 +1673,8 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(prob(50)) M:heal_organ_damage(1,0) - M:nutrition += nutriment_factor // For hunger and fatness + if(prob(50)) M.heal_organ_damage(1,0) + M.nutrition += nutriment_factor // For hunger and fatness /* // If overeaten - vomit and fall down // Makes you feel bad but removes reagents and some effect @@ -1694,10 +1701,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition -= nutriment_factor - M:overeatduration = 0 - if(M:nutrition < 0)//Prevent from going into negatives. - M:nutrition = 0 + M.nutrition -= nutriment_factor + M.overeatduration = 0 + if(M.nutrition < 0)//Prevent from going into negatives. + M.nutrition = 0 ..() return @@ -1730,21 +1737,21 @@ datum if(!data) data = 1 switch(data) if(1 to 15) - M:bodytemperature += 5 + M.bodytemperature += 5 if(holder.has_reagent("frostoil")) holder.remove_reagent("frostoil", 5) if(prob(40) && !istype(M, /mob/living/carbon/metroid)) M.take_organ_damage(0, 1) if(istype(M, /mob/living/carbon/metroid)) - M:bodytemperature += rand(5,20) + M.bodytemperature += rand(5,20) if(15 to 25) - M:bodytemperature += 10 + M.bodytemperature += 10 if(prob(60) && !istype(M, /mob/living/carbon/metroid)) M.take_organ_damage(0, 1) if(istype(M, /mob/living/carbon/metroid)) - M:bodytemperature += rand(5,20) + M.bodytemperature += rand(5,20) if(25 to INFINITY) - M:bodytemperature += 15 + M.bodytemperature += 15 data++ ..() return @@ -1818,21 +1825,21 @@ datum if(!data) data = 1 switch(data) if(1 to 15) - M:bodytemperature -= 5 + M.bodytemperature -= 5 if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 5) if(prob(80) && istype(M, /mob/living/carbon/metroid)) M.adjustFireLoss(rand(5,20)) M << "\red You feel a terrible chill inside your body!" if(15 to 25) - M:bodytemperature -= 10 + M.bodytemperature -= 10 if(prob(60) && !istype(M, /mob/living/carbon/metroid)) M.take_organ_damage(0, 1) if(istype(M, /mob/living/carbon/metroid)) - M:bodytemperature -= rand(5,20) + M.bodytemperature -= rand(5,20) if(25 to INFINITY) - M:bodytemperature -= 15 - if(prob(1)) M:emote("shiver") + M.bodytemperature -= 15 + if(prob(1)) M.emote("shiver") data++ ..() return @@ -1864,7 +1871,7 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -1879,7 +1886,7 @@ datum on_mob_life(var/mob/living/M as mob) if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -1891,7 +1898,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustToxLoss(1) + M.adjustToxLoss(1) ..() return @@ -1907,21 +1914,21 @@ datum if(!data) data = 1 switch(data) if(1 to 5) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_dizzy(5) - if(prob(10)) M:emote(pick("twitch","giggle")) + if(prob(10)) M.emote(pick("twitch","giggle")) if(5 to 10) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_jittery(10) M.make_dizzy(10) M.druggy = max(M.druggy, 35) - if(prob(20)) M:emote(pick("twitch","giggle")) + if(prob(20)) M.emote(pick("twitch","giggle")) if (10 to INFINITY) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_jittery(20) M.make_dizzy(20) M.druggy = max(M.druggy, 40) - if(prob(30)) M:emote(pick("twitch","giggle")) + if(prob(30)) M.emote(pick("twitch","giggle")) holder.remove_reagent(src.id, 0.2) data++ ..() @@ -1935,11 +1942,11 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(istype(M, /mob/living/carbon/human) && M.job in list("Security Officer", "Head of Security", "Detective", "Warden")) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) - M:nutrition += nutriment_factor + M.heal_organ_damage(1,1) + M.nutrition += nutriment_factor ..() return ..() @@ -1952,12 +1959,12 @@ datum color = "#AB7878" // rgb: 171, 120, 120 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(istype(M, /mob/living/carbon/human) && M.mind) if(M.mind.special_role) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) - M:nutrition += nutriment_factor + M.heal_organ_damage(1,1) + M.nutrition += nutriment_factor ..() return ..() @@ -1971,7 +1978,7 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return reaction_turf(var/turf/simulated/T, var/volume) @@ -2017,7 +2024,7 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -2030,7 +2037,7 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+10) ..() @@ -2045,8 +2052,8 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor - M:bodytemperature += 10 + M.nutrition += nutriment_factor + M.bodytemperature += 10 ..() return @@ -2064,10 +2071,10 @@ datum color = "#E78108" // rgb: 231, 129, 8 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(30)) M:adjustOxyLoss(-1) - M:nutrition++ + if(M.getOxyLoss() && prob(30)) M.adjustOxyLoss(-1) + M.nutrition++ ..() return @@ -2080,10 +2087,10 @@ datum color = "#731008" // rgb: 115, 16, 8 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(!M) M = holder.my_atom - if(M:getFireLoss() && prob(20)) M:heal_organ_damage(0,1) - M:nutrition++ + if(M.getFireLoss() && prob(20)) M.heal_organ_damage(0,1) + M.nutrition++ ..() return @@ -2096,10 +2103,10 @@ datum color = "#365E30" // rgb: 54, 94, 48 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(!M) M = holder.my_atom - if(M:getToxLoss() && prob(20)) M:adjustToxLoss(-1) - M:nutrition++ + if(M.getToxLoss() && prob(20)) M.adjustToxLoss(-1) + M.nutrition++ ..() return @@ -2113,16 +2120,16 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor - M:eye_blurry = max(M:eye_blurry-1 , 0) - M:eye_blind = max(M:eye_blind-1 , 0) + M.nutrition += nutriment_factor + M.eye_blurry = max(M.eye_blurry-1 , 0) + M.eye_blind = max(M.eye_blind-1 , 0) if(!data) data = 1 switch(data) if(1 to 20) //nothing if(21 to INFINITY) if (prob(data-10)) - M:disabilities &= ~1 + M.disabilities &= ~1 data++ ..() return @@ -2137,7 +2144,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -2151,8 +2158,8 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor - M:adjustToxLoss(1) + M.nutrition += nutriment_factor + M.adjustToxLoss(1) ..() return @@ -2166,7 +2173,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -2180,7 +2187,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -2192,15 +2199,15 @@ datum color = "#863333" // rgb: 175, 175, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(istype(M, /mob/living/carbon/human) && M.job in list("Clown")) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) ..() return if(istype(M, /mob/living/carbon/monkey)) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) ..() return ..() @@ -2211,10 +2218,10 @@ datum description = "Absolutely nothing." nutriment_factor = 1 * REAGENTS_METABOLISM on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) ..() return ..() @@ -2228,7 +2235,7 @@ datum color = "#302000" // rgb: 48, 32, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor ..() return @@ -2241,10 +2248,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) if(holder.has_reagent("capsaicin")) holder.remove_reagent("capsaicin", 2) - M:nutrition++ + M.nutrition++ ..() return @@ -2257,8 +2264,8 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) - M:nutrition++ + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ ..() return @@ -2271,8 +2278,8 @@ datum color = "#DFD7AF" // rgb: 223, 215, 175 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor - if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) + M.nutrition += nutriment_factor + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) ..() return @@ -2286,8 +2293,8 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = max(0,M.sleeping - 2) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping - 2) if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) @@ -2306,11 +2313,11 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-2) - M:drowsyness = max(0,M:drowsyness-1) - M:jitteriness = max(0,M:jitteriness-3) - M:sleeping = max(0,M.sleeping-1) - if(M:getToxLoss() && prob(20)) - M:adjustToxLoss(-1) + M.drowsyness = max(0,M.drowsyness-1) + M.jitteriness = max(0,M.jitteriness-3) + M.sleeping = max(0,M.sleeping-1) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) if (M.bodytemperature < 310) //310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) ..() @@ -2326,8 +2333,8 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = max(0,M.sleeping-2) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2) if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature-5) M.make_jittery(5) @@ -2344,10 +2351,10 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-2) - M:drowsyness = max(0,M:drowsyness-1) + M.drowsyness = max(0,M.drowsyness-1) M.sleeping = max(0,M.sleeping-2) - if(M:getToxLoss() && prob(20)) - M:adjustToxLoss(-1) + if(M.getToxLoss() && prob(20)) + M.adjustToxLoss(-1) if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature-5) return @@ -2360,10 +2367,10 @@ datum color = "#100800" // rgb: 16, 8, 0 on_mob_life(var/mob/living/M as mob) - M:drowsyness = max(0,M:drowsyness-5) + M.drowsyness = max(0,M.drowsyness-5) if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature-5) - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2378,11 +2385,11 @@ datum M.make_jittery(20) M.druggy = max(M.druggy, 30) M.dizziness +=5 - M:drowsyness = 0 - M:sleeping = max(0,M.sleeping-2) + M.drowsyness = 0 + M.sleeping = max(0,M.sleeping-2) if (M.bodytemperature > 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = max(310, M.bodytemperature-5) - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2394,12 +2401,12 @@ datum color = "#102000" // rgb: 16, 32, 0 on_mob_life(var/mob/living/M as mob) - M:drowsyness = max(0,M:drowsyness-7) - M:sleeping = max(0,M.sleeping-1) + M.drowsyness = max(0,M.drowsyness-7) + M.sleeping = max(0,M.sleeping-1) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) M.make_jittery(5) - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2411,12 +2418,12 @@ datum color = "#102000" // rgb: 16, 32, 0 on_mob_life(var/mob/living/M as mob) - M:drowsyness = max(0,M:drowsyness-7) - M:sleeping = max(0,M.sleeping-2) + M.drowsyness = max(0,M.drowsyness-7) + M.sleeping = max(0,M.sleeping-2) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) M.make_jittery(5) - M:nutrition += 1 + M.nutrition += 1 if(!data) data = 1 data++ M.dizziness +=4 @@ -2424,7 +2431,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2436,10 +2443,10 @@ datum color = "#102000" // rgb: 16, 32, 0 on_mob_life(var/mob/living/M as mob) - M:drowsyness = max(0,M:drowsyness-6) + M.drowsyness = max(0,M.drowsyness-6) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) //310 is the normal bodytemp. 310.055 - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2453,7 +2460,7 @@ datum on_mob_life(var/mob/living/M as mob) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-8) //310 is the normal bodytemp. 310.055 - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2467,7 +2474,7 @@ datum on_mob_life(var/mob/living/M as mob) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-8) //310 is the normal bodytemp. 310.055 - M:nutrition += 1 + M.nutrition += 1 ..() return @@ -2482,14 +2489,14 @@ datum if(!data) data = 1 data++ M.make_dizzy(3) - M:jitteriness = max(M:jitteriness-3,0) - M:nutrition += 2 + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 if(data >= 25) - if (!M:stuttering) M:stuttering = 1 - M:stuttering += 3 + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 if(data >= 40 && prob(33)) - if (!M:confused) M:confused = 1 - M:confused += 2 + if (!M.confused) M.confused = 1 + M.confused += 2 ..() return @@ -2509,7 +2516,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2528,7 +2535,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2548,7 +2555,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2567,7 +2574,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2586,7 +2593,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2605,7 +2612,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 8 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+8,8) + M.confused = max(M.confused+8,8) ..() return @@ -2628,7 +2635,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2647,7 +2654,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2666,7 +2673,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 145 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2679,8 +2686,8 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = max(0,M.sleeping-2) + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) ..() @@ -2695,8 +2702,8 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = max(0,M.sleeping-2)//Copy-paste from Coffee, derp + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = max(0,M.sleeping-2)//Copy-paste from Coffee, derp M.make_jittery(5) ..() return @@ -2717,7 +2724,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2736,7 +2743,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 90 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2755,7 +2762,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2768,7 +2775,7 @@ datum on_mob_life(var/mob/living/M as mob) M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) + M.drowsyness = max(0,M.drowsyness-3) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) ..() @@ -2783,7 +2790,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:bodytemperature -= 5 + M.bodytemperature -= 5 ..() return @@ -2797,18 +2804,18 @@ datum color = "#895C4C" // rgb: 137, 92, 76 on_mob_life(var/mob/living/M as mob) - if(M:getBruteLoss() && prob(10)) M:heal_organ_damage(1,0) - M:nutrition += 2 + if(M.getBruteLoss() && prob(10)) M.heal_organ_damage(1,0) + M.nutrition += 2 if(!data) data = 1 data++ M.make_dizzy(3) - M:jitteriness = max(M:jitteriness-3,0) + M.jitteriness = max(M.jitteriness-3,0) if(data >= 25) - if (!M:stuttering) M:stuttering = 1 - M:stuttering += 3 + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 if(data >= 40 && prob(33)) - if (!M:confused) M:confused = 1 - M:confused += 2 + if (!M.confused) M.confused = 1 + M.confused += 2 ..() return @@ -2821,7 +2828,7 @@ datum on_mob_life(var/mob/living/M as mob) M.druggy = max(M.druggy, 50) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) M.make_dizzy(10) if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 @@ -2829,7 +2836,7 @@ datum data++ switch(data) if(51 to INFINITY) - M:sleeping += 1 + M.sleeping += 1 ..() return @@ -2849,7 +2856,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 90) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2868,7 +2875,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2887,7 +2894,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2906,7 +2913,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 135 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2925,7 +2932,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 135 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2944,7 +2951,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2963,7 +2970,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 135 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -2982,7 +2989,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 135 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3001,7 +3008,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3020,7 +3027,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3039,7 +3046,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+4,0) + M.confused = max(M.confused+4,0) ..() return @@ -3058,7 +3065,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3077,7 +3084,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 45 && prob(50) && data <55) - M.confused = max(M:confused+3,0) + M.confused = max(M.confused+3,0) else if(data >=55) M.druggy = max(M.druggy, 55) ..() @@ -3098,7 +3105,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 145 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3117,7 +3124,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3138,7 +3145,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3158,7 +3165,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3171,10 +3178,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(50)) M:adjustOxyLoss(-2) - if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0) - if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2) - if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2) + if(M.getOxyLoss() && prob(50)) M.adjustOxyLoss(-2) + if(M.getBruteLoss() && prob(60)) M.heal_organ_damage(2,0) + if(M.getFireLoss() && prob(50)) M.heal_organ_damage(0,2) + if(M.getToxLoss() && prob(50)) M.adjustToxLoss(-2) if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15) if(M.confused !=0) M.confused = max(0,M.confused - 5) ..() @@ -3195,7 +3202,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 145 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3214,7 +3221,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3233,7 +3240,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3249,10 +3256,10 @@ datum data++ M.dizziness +=5 if(data >= 30 && data <60) - if (!M.stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 60 && prob(40)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return @@ -3271,7 +3278,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 90 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3290,7 +3297,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 150 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3309,7 +3316,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 150 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3328,7 +3335,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3347,7 +3354,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3367,7 +3374,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3386,7 +3393,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3407,7 +3414,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3426,7 +3433,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return @@ -3445,7 +3452,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 115 && prob(30)) - M.confused = max(M:confused+4,0) + M.confused = max(M.confused+4,0) ..() return @@ -3464,7 +3471,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 10 else if(data >= 115 && prob(90)) - M.confused = max(M:confused+10,10) + M.confused = max(M.confused+10,10) ..() return @@ -3483,7 +3490,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3502,7 +3509,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3521,7 +3528,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) if (M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature-5) ..() @@ -3542,7 +3549,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 15 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return @@ -3565,7 +3572,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 6 else if(data >= 125 && prob(33)) - M.confused = max(M:confused+5,5) + M.confused = max(M.confused+5,5) ..() return @@ -3584,7 +3591,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+4,0) + M.confused = max(M.confused+4,0) ..() return @@ -3603,7 +3610,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+4,4) + M.confused = max(M.confused+4,4) ..() return @@ -3618,14 +3625,14 @@ datum if(!data) data = 1 data++ M.make_dizzy(3) - M:jitteriness = max(M:jitteriness-3,0) - M:nutrition += 2 + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 if(data >= 25) - if (!M:stuttering) M:stuttering = 1 - M:stuttering += 3 + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 if(data >= 40 && prob(33)) - if (!M:confused) M:confused = 1 - M:confused += 2 + if (!M.confused) M.confused = 1 + M.confused += 2 ..() return @@ -3643,14 +3650,14 @@ datum if(!data) data = 1 data++ M.make_dizzy(3) - M:jitteriness = max(M:jitteriness-3,0) - M:nutrition += 2 + M.jitteriness = max(M.jitteriness-3,0) + M.nutrition += 2 if(data >= 25) - if (!M:stuttering) M:stuttering = 1 - M:stuttering += 3 + if (!M.stuttering) M.stuttering = 1 + M.stuttering += 3 if(data >= 40 && prob(33)) - if (!M:confused) M:confused = 1 - M:confused += 2 + if (!M.confused) M.confused = 1 + M.confused += 2 ..() return @@ -3670,7 +3677,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 2 else if(data >= 250 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3689,7 +3696,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 2 else if(data >= 250 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3708,7 +3715,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 1 else if(data >= 250 && prob(33)) - M.confused = max(M:confused+2,0) + M.confused = max(M.confused+2,0) ..() return @@ -3727,7 +3734,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 7 else if(data >= 250 && prob(60)) - M.confused = max(M:confused+8,0) + M.confused = max(M.confused+8,0) ..() return @@ -3741,13 +3748,13 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = 0 if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) - if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) - M:nutrition++ + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ ..() return @@ -3761,13 +3768,13 @@ datum on_mob_life(var/mob/living/M as mob) ..() M.dizziness = max(0,M.dizziness-5) - M:drowsyness = max(0,M:drowsyness-3) - M:sleeping = 0 + M.drowsyness = max(0,M.drowsyness-3) + M.sleeping = 0 if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) - if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) - M:nutrition++ + if(M.getBruteLoss() && prob(20)) M.heal_organ_damage(1,0) + M.nutrition++ ..() return @@ -3786,7 +3793,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 10 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+10,0) + M.confused = max(M.confused+10,0) ..() return @@ -3806,7 +3813,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 4 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return @@ -3819,10 +3826,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:adjustOxyLoss(0.5) - M:adjustOxyLoss(0.5) - M:weakened = max(M:weakened, 15) - M:silent = max(M:silent, 15) + M.adjustOxyLoss(0.5) + M.adjustOxyLoss(0.5) + M.weakened = max(M.weakened, 15) + M.silent = max(M.silent, 15) if(!data) data = 1 data++ M.dizziness +=6 @@ -3830,7 +3837,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 3 else if(data >= 45 && prob(50) && data <55) - M.confused = max(M:confused+3,0) + M.confused = max(M.confused+3,0) else if(data >=55) M.druggy = max(M.druggy, 55) ..() @@ -3851,21 +3858,21 @@ datum if(!data) data = 1 switch(data) if(1 to 5) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_dizzy(10) - if(prob(10)) M:emote(pick("twitch","giggle")) + if(prob(10)) M.emote(pick("twitch","giggle")) if(5 to 10) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_jittery(20) M.make_dizzy(20) M.druggy = max(M.druggy, 45) - if(prob(20)) M:emote(pick("twitch","giggle")) + if(prob(20)) M.emote(pick("twitch","giggle")) if (10 to INFINITY) - if (!M:stuttering) M:stuttering = 1 + if (!M.stuttering) M.stuttering = 1 M.make_jittery(40) M.make_dizzy(40) M.druggy = max(M.druggy, 60) - if(prob(30)) M:emote(pick("twitch","giggle")) + if(prob(30)) M.emote(pick("twitch","giggle")) holder.remove_reagent(src.id, 0.2) data++ ..() @@ -3879,29 +3886,29 @@ datum color = "#664300" // rgb: 102, 67, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(!data) data = 1 data++ if(istype(M, /mob/living/carbon/human) && M.job in list("Clown")) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) M.dizziness +=5 if(data >= 55 && data <165) if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return if(istype(M, /mob/living/carbon/monkey)) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) M.dizziness +=5 if(data >= 55 && data <165) if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return @@ -3913,18 +3920,18 @@ datum color = "#664300" // rgb: 102, 67, 0 on_mob_life(var/mob/living/M as mob) - M:nutrition += nutriment_factor + M.nutrition += nutriment_factor if(!data) data = 1 data++ if(istype(M, /mob/living/carbon/human) && M.job in list("Mime")) if(!M) M = holder.my_atom - M:heal_organ_damage(1,1) + M.heal_organ_damage(1,1) M.dizziness +=5 if(data >= 55 && data <165) if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 165 && prob(33)) - M.confused = max(M:confused+5,0) + M.confused = max(M.confused+5,0) ..() return @@ -3944,7 +3951,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return @@ -3963,7 +3970,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 5 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return @@ -3982,7 +3989,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 10 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return @@ -4001,7 +4008,7 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 30 else if(data >= 115 && prob(60)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return @@ -4020,6 +4027,6 @@ datum if (!M.stuttering) M.stuttering = 1 M.stuttering += 10 else if(data >= 115 && prob(33)) - M.confused = max(M:confused+15,15) + M.confused = max(M.confused+15,15) ..() return \ No newline at end of file diff --git a/code/modules/critters/critter_AI.dm b/code/modules/critters/critter_AI.dm index a3a41ebf72..d62e2a78df 100644 --- a/code/modules/critters/critter_AI.dm +++ b/code/modules/critters/critter_AI.dm @@ -194,13 +194,14 @@ var/damage = rand(melee_damage_lower, melee_damage_upper) - if(istype(target, /mob/living/carbon/human)) + if(ishuman(target)) var/mob/living/carbon/human/H = target var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg") var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee")) - else - target:adjustBruteLoss(damage) + else if(isliving(target)) + var/mob/living/L = target + L.adjustBruteLoss(damage) if(attack_sound) playsound(loc, attack_sound, 50, 1, -1) diff --git a/code/modules/flufftext/Hallucination.dm b/code/modules/flufftext/Hallucination.dm index 9e458887ce..2804164a44 100644 --- a/code/modules/flufftext/Hallucination.dm +++ b/code/modules/flufftext/Hallucination.dm @@ -346,7 +346,7 @@ var/list/non_fakeattack_weapons = list(/obj/item/weapon/gun/projectile, /obj/ite /obj/item/clothing/shoes/magboots, /obj/item/blueprints, /obj/item/weapon/disk/nuclear,\ /obj/item/clothing/suit/space/nasavoid, /obj/item/weapon/tank) -/proc/fake_attack(var/mob/target) +/proc/fake_attack(var/mob/living/target) // var/list/possible_clones = new/list() var/mob/living/carbon/human/clone = null var/clone_weapon = null diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 2bfcca3be0..a1ac5a205d 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -528,7 +528,7 @@ proc/handle_stomach() spawn(0) - for(var/mob/M in stomach_contents) + for(var/mob/living/M in stomach_contents) if(M.loc != src) stomach_contents.Remove(M) continue diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index b65840a0e0..eab45d7a64 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -459,7 +459,7 @@ proc/handle_stomach() spawn(0) - for(var/mob/M in stomach_contents) + for(var/mob/living/M in stomach_contents) if(M.loc != src) stomach_contents.Remove(M) continue diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 20bf80980a..6ba7f7506e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -235,3 +235,13 @@ /mob/living/carbon/proc/eyecheck() return 0 +// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching. +// Stop! ... Hammertime! ~Carn + +/mob/living/carbon/proc/getDNA() + return dna + +/mob/living/carbon/proc/setDNA(var/datum/dna/newDNA) + dna = newDNA + +// ++++ROCKDTBEN++++ MOB PROCS //END diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 2dc1f02ee0..bd49275cdf 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -310,7 +310,7 @@ var/t7 = 1 if (restrained()) - for(var/mob/M in range(src, 1)) + for(var/mob/living/M in range(src, 1)) if ((M.pulling == src && M.stat == 0 && !( M.restrained() ))) t7 = null if ((t7 && (pulling && ((get_dist(src, pulling) <= 1 || pulling.loc == loc) && (client && client.moving))))) @@ -337,8 +337,8 @@ else diag = null if ((get_dist(src, pulling) > 1 || diag)) - if (ismob(pulling)) - var/mob/M = pulling + if (isliving(pulling)) + var/mob/living/M = pulling var/ok = 1 if (locate(/obj/item/weapon/grab, M.grabbed_by)) if (prob(75)) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 36d01d2c54..07a0e60173 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1102,7 +1102,7 @@ proc/handle_stomach() spawn(0) - for(var/mob/M in stomach_contents) + for(var/mob/living/M in stomach_contents) if(M.loc != src) stomach_contents.Remove(M) continue diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index c97091484e..1693b07791 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -81,6 +81,70 @@ // world << "[src] ~ [src.bodytemperature] ~ [temperature]" return temperature + +// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching. +// Stop! ... Hammertime! ~Carn + +/mob/living/proc/getBruteLoss() + return bruteloss + +/mob/living/proc/adjustBruteLoss(var/amount) + bruteloss = max(bruteloss + amount, 0) + +/mob/living/proc/getOxyLoss() + return oxyloss + +/mob/living/proc/adjustOxyLoss(var/amount) + oxyloss = max(oxyloss + amount, 0) + +/mob/living/proc/setOxyLoss(var/amount) + oxyloss = amount + +/mob/living/proc/getToxLoss() + return toxloss + +/mob/living/proc/adjustToxLoss(var/amount) + toxloss = max(toxloss + amount, 0) + +/mob/living/proc/setToxLoss(var/amount) + toxloss = amount + +/mob/living/proc/getFireLoss() + return fireloss + +/mob/living/proc/adjustFireLoss(var/amount) + fireloss = max(fireloss + amount, 0) + +/mob/living/proc/getCloneLoss() + return cloneloss + +/mob/living/proc/adjustCloneLoss(var/amount) + cloneloss = max(cloneloss + amount, 0) + +/mob/living/proc/setCloneLoss(var/amount) + cloneloss = amount + +/mob/living/proc/getBrainLoss() + return brainloss + +/mob/living/proc/adjustBrainLoss(var/amount) + brainloss = max(brainloss + amount, 0) + +/mob/living/proc/setBrainLoss(var/amount) + brainloss = amount + +/mob/living/proc/getHalLoss() + return halloss + +/mob/living/proc/adjustHalLoss(var/amount) + halloss = max(halloss + amount, 0) + +/mob/living/proc/setHalLoss(var/amount) + halloss = amount + +// ++++ROCKDTBEN++++ MOB PROCS //END + + /mob/proc/get_contents() /mob/living/get_contents() diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm new file mode 100644 index 0000000000..914054abc9 --- /dev/null +++ b/code/modules/mob/living/living_defines.dm @@ -0,0 +1,17 @@ +/mob/living + + + //Vars that should only be accessed via 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/cloneloss = 0 //Damage caused by being cloned or ejected from the cloner early. Metroids 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/halloss = 0 //Hallucination damage. 'Fake' damage obtained through hallucinating or the holodeck. Sleeping should cause it to wear off. + //Vars that should only be accessed via procs ++END + + var/hallucination = 0 //Directly affects how long a mob will hallucinate for + var/list/atom/hallucinations = list() //A list of hallucinated people that try to attack the mob. See /obj/effect/fake_attacker in hallucinations.dm + + var/last_special = 0 //Used by the resist verb, likely used to prevent players from bypassing next_move by logging in/out. \ No newline at end of file diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 19aff6ecbc..247e6721a6 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -812,82 +812,12 @@ note dizziness decrements automatically in the mob's Life() proc. resting = max(resting + amount,0) return -// ++++ROCKDTBEN++++ MOB PROCS -- Ask me before touching. -// Stop! ... Hammertime! ~Carn - -/mob/proc/getBruteLoss() - return bruteloss - -/mob/proc/adjustBruteLoss(var/amount) - bruteloss = max(bruteloss + amount, 0) - -/mob/proc/getOxyLoss() - return oxyloss - -/mob/proc/adjustOxyLoss(var/amount) - oxyloss = max(oxyloss + amount, 0) - -/mob/proc/setOxyLoss(var/amount) - oxyloss = amount - -/mob/proc/getToxLoss() - return toxloss - -/mob/proc/adjustToxLoss(var/amount) - toxloss = max(toxloss + amount, 0) - -/mob/proc/setToxLoss(var/amount) - toxloss = amount - -/mob/proc/getFireLoss() - return fireloss - -/mob/proc/adjustFireLoss(var/amount) - fireloss = max(fireloss + amount, 0) - -/mob/proc/getCloneLoss() - return cloneloss - -/mob/proc/adjustCloneLoss(var/amount) - cloneloss = max(cloneloss + amount, 0) - -/mob/proc/setCloneLoss(var/amount) - cloneloss = amount - -/mob/proc/getHalLoss() - return halloss - -/mob/proc/adjustHalLoss(var/amount) - halloss = max(halloss + amount, 0) - -/mob/proc/setHalLoss(var/amount) - halloss = amount - - - -/mob/proc/getBrainLoss() - return brainloss - -/mob/proc/adjustBrainLoss(var/amount) - brainloss = max(brainloss + amount, 0) - -/mob/proc/setBrainLoss(var/amount) - brainloss = amount - -/mob/proc/getDNA() - return dna - -/mob/proc/setDNA(var/datum/dna/newDNA) - dna = newDNA - /mob/proc/getMaxHealth() return maxHealth /mob/proc/setMaxHealth(var/newMaxHealth) maxHealth = newMaxHealth -// ++++ROCKDTBEN++++ MOB PROCS //END - /* * Sends resource files to client cache */ diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 8a6605d473..ece6c2b20a 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -5,25 +5,10 @@ flags = NOREACT var/datum/mind/mind - //MOB overhaul - //Not in use yet var/obj/effect/organstructure/organStructure = null - //Vars that have been relocated to organStructure - //Vars that have been relocated to organStructure ++END - - - - //Vars that should only be accessed via procs - var/bruteloss = 0.0//Living - var/oxyloss = 0.0//Living - var/toxloss = 0.0//Living - var/fireloss = 0.0//Living - var/cloneloss = 0//Carbon - var/brainloss = 0//Carbon - var/maxHealth = 100 //Living - //Vars that should only be accessed via procs ++END + var/maxHealth = 100 //Maximum health that should be possible. Used by living, organ and simple_mobs // var/uses_hud = 0 @@ -57,7 +42,6 @@ */ //var/midis = 1 //Check if midis should be played for someone - no, this is something that is tied to clients, not mobs. var/alien_egg_flag = 0//Have you been infected? - var/last_special = 0 var/obj/screen/zone_sel/zone_sel = null var/emote_allowed = 1 @@ -238,11 +222,6 @@ var/robot_talk_understand = 0 var/alien_talk_understand = 0 - //You can guess what these are for. --SkyMarshal - var/list/atom/hallucinations = list() - var/halloss = 0 - var/hallucination = 0 - /*For ninjas and others. This variable is checked when a mob moves and I guess it was supposed to allow the mob to move through dense areas, such as walls. Setting density to 0 does the same thing. The difference here is that the mob is also allowed to move without any sort of restriction. For instance, in space or out of holder objects.*/ diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 243f7cb3f6..5f6d33e990 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -57,8 +57,10 @@ var/ending = copytext(text, length(text)) if (src.stuttering) return "stammers, \"[text]\""; - if (src.getBrainLoss() >= 60) - return "gibbers, \"[text]\""; + if(isliving(src)) + var/mob/living/L = src + if (L.getBrainLoss() >= 60) + return "gibbers, \"[text]\""; if (ending == "?") return "asks, \"[text]\""; if (ending == "!") diff --git a/code/modules/mob/screen.dm b/code/modules/mob/screen.dm index 3bbf555bc0..b87a6fc52a 100644 --- a/code/modules/mob/screen.dm +++ b/code/modules/mob/screen.dm @@ -521,7 +521,7 @@ return -/mob/living/verb/mob_sleep() +/mob/living/carbon/verb/mob_sleep() set name = "Sleep" set category = "IC" @@ -531,7 +531,7 @@ else usr.sleeping = 20 //Short nap -/mob/living/verb/lay_down() +/mob/living/carbon/verb/lay_down() set name = "Lay down / Get up" set category = "IC" @@ -543,14 +543,16 @@ set name = "Resist" set category = "IC" - if(usr.next_move > world.time) + if(!isliving(usr) || usr.next_move > world.time) return usr.next_move = world.time + 20 + var/mob/living/L = usr + //resisting grabs (as if it helps anyone...) - if ((!( usr.stat ) && usr.canmove && !( usr.restrained() ))) + if ((!( L.stat ) && L.canmove && !( L.restrained() ))) var/resisting = 0 - for(var/obj/O in usr.requests) + for(var/obj/O in L.requests) del(O) resisting++ for(var/obj/item/weapon/grab/G in usr.grabbed_by) @@ -560,86 +562,46 @@ else if (G.state == 2) if (prob(25)) - for(var/mob/O in viewers(usr, null)) - O.show_message(text("\red [] has broken free of []'s grip!", usr, G.assailant), 1) + for(var/mob/O in viewers(L, null)) + O.show_message(text("\red [] has broken free of []'s grip!", L, G.assailant), 1) del(G) else if (G.state == 3) if (prob(5)) for(var/mob/O in viewers(usr, null)) - O.show_message(text("\red [] has broken free of []'s headlock!", usr, G.assailant), 1) + O.show_message(text("\red [] has broken free of []'s headlock!", L, G.assailant), 1) del(G) if(resisting) for(var/mob/O in viewers(usr, null)) - O.show_message(text("\red [] resists!", usr), 1) + O.show_message(text("\red [] resists!", L), 1) - - //breaking out of handcuffs - if(usr:handcuffed && usr:canmove && (usr.last_special <= world.time)) - usr.next_move = world.time + 100 - usr.last_special = world.time + 100 - if(isalienadult(usr) || (HULK in usr.mutations) || (SUPRSTR in usr.augmentations))//Don't want to do a lot of logic gating here. - usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)" - for(var/mob/O in viewers(usr)) - O.show_message(text("\red [] is trying to break the handcuffs!", usr), 1) - spawn(0) - if(do_after(usr, 50)) - if(!usr:handcuffed || usr:buckled) - return - for(var/mob/O in viewers(usr)) - O.show_message(text("\red [] manages to break the handcuffs!", usr), 1) - usr << "\green You successfully break your handcuffs." - del(usr:handcuffed) - usr:handcuffed = null - usr.update_inv_handcuffed() - else - var/obj/item/weapon/handcuffs/HC = usr:handcuffed - var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type - var/displaytime = 2 //Minutes to display in the "this will take X minutes." - if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future... - breakouttime = HC.breakouttime - displaytime = breakouttime / 600 //Minutes - usr << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" - for(var/mob/O in viewers(usr)) - O.show_message( "\red [usr] attempts to remove \the [HC]!", 1) - spawn(0) - if(do_after(usr, breakouttime)) - if(!usr:handcuffed || usr:buckled) - return // time leniency for lag which also might make this whole thing pointless but the server - for(var/mob/O in viewers(usr))// lags so hard that 40s isn't lenient enough - Quarxink - O.show_message("\red [usr] manages to remove the handcuffs!", 1) - usr << "\blue You successfully remove \the [usr:handcuffed]." - usr:handcuffed.loc = usr.loc - usr:handcuffed = null - usr.update_inv_handcuffed() - //unbuckling yourself - else if( usr:buckled && (usr.last_special <= world.time) ) - if( usr:handcuffed ) - usr.next_move = world.time + 100 - usr.last_special = world.time + 100 - usr << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)" - for(var/mob/O in viewers(usr)) + if( L.buckled && (L.last_special <= world.time) ) + if( L.handcuffed ) + L.next_move = world.time + 100 + L.last_special = world.time + 100 + L << "\red You attempt to unbuckle yourself. (This will take around 2 minutes and you need to stand still)" + for(var/mob/O in viewers(L)) O.show_message("\red [usr] attempts to unbuckle themself!", 1) spawn(0) if(do_after(usr, 1200)) - if(!usr:buckled) + if(!L.buckled) return - for(var/mob/O in viewers(usr)) + for(var/mob/O in viewers(L)) O.show_message("\red [usr] manages to unbuckle themself!", 1) - usr << "\blue You successfully unbuckle yourself." - usr:buckled.manual_unbuckle(usr) + L << "\blue You successfully unbuckle yourself." + L.buckled.manual_unbuckle(L) else - usr:buckled.manual_unbuckle(usr) - + L.buckled.manual_unbuckle(L) + //Breaking out of a locker? else if( src.loc && (istype(src.loc, /obj/structure/closet)) ) - var/obj/structure/closet/C = usr.loc + var/obj/structure/closet/C = L.loc if(C.opened) return //Door's open... wait, why are you in it's contents then? - if(istype(usr.loc, /obj/structure/closet/secure_closet)) - var/obj/structure/closet/secure_closet/SC = usr.loc + if(istype(L.loc, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = L.loc if(!SC.locked && !SC.welded) return //It's a secure closet, but isn't locked. Easily escapable from, no need to 'resist' else @@ -648,18 +610,18 @@ //okay, so the closet is either welded or locked... resist!!! usr.next_move = world.time + 100 - usr.last_special = world.time + 100 - usr << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about 2 minutes)" + L.last_special = world.time + 100 + L << "\red You lean on the back of \the [C] and start pushing the door open. (this will take about 2 minutes)" for(var/mob/O in viewers(usr.loc)) - O.show_message("\red The [usr.loc] begins to shake violently!", 1) + O.show_message("\red The [L.loc] begins to shake violently!", 1) spawn(0) if(do_after(usr, 50)) - if(!C || !usr || usr.loc != C || C.opened) //User, closet destroyed OR user no longer in closet OR closet opened + if(!C || !L || L.loc != C || C.opened) //User, closet destroyed OR user no longer in closet OR closet opened return //Perform the same set of checks as above for weld and lock status to determine if there is even still a point in 'resisting'... - if(istype(usr.loc, /obj/structure/closet/secure_closet)) - var/obj/structure/closet/secure_closet/SC = usr.loc + if(istype(L.loc, /obj/structure/closet/secure_closet)) + var/obj/structure/closet/secure_closet/SC = L.loc if(!SC.locked && !SC.welded) return else @@ -668,7 +630,7 @@ //Well then break it! if(istype(usr.loc, /obj/structure/closet/secure_closet)) - var/obj/structure/closet/secure_closet/SC = usr.loc + var/obj/structure/closet/secure_closet/SC = L.loc SC.desc = "It appears to be broken." SC.icon_state = SC.icon_off flick(SC.icon_broken, SC) @@ -678,12 +640,53 @@ SC.broken = 1 SC.locked = 0 usr << "\red You successfully break out!" - for(var/mob/O in viewers(usr.loc)) + for(var/mob/O in viewers(L.loc)) O.show_message("\red \the [usr] successfully broke out of \the [SC]!", 1) SC.open() else C.welded = 0 usr << "\red You successfully break out!" - for(var/mob/O in viewers(usr.loc)) + for(var/mob/O in viewers(L.loc)) O.show_message("\red \the [usr] successfully broke out of \the [C]!", 1) - C.open() \ No newline at end of file + C.open() + + //breaking out of handcuffs + else if(iscarbon(L)) + var/mob/living/carbon/CM = L + if(CM.handcuffed && CM.canmove && (CM.last_special <= world.time)) + CM.next_move = world.time + 100 + CM.last_special = world.time + 100 + if(isalienadult(CM) || (HULK in usr.mutations) || (SUPRSTR in CM.augmentations))//Don't want to do a lot of logic gating here. + usr << "\green You attempt to break your handcuffs. (This will take around 5 seconds and you need to stand still)" + for(var/mob/O in viewers(CM)) + O.show_message(text("\red [] is trying to break the handcuffs!", CM), 1) + spawn(0) + if(do_after(CM, 50)) + if(!CM.handcuffed || CM.buckled) + return + for(var/mob/O in viewers(CM)) + O.show_message(text("\red [] manages to break the handcuffs!", CM), 1) + CM << "\green You successfully break your handcuffs." + del(CM.handcuffed) + CM.handcuffed = null + CM.update_inv_handcuffed() + else + var/obj/item/weapon/handcuffs/HC = CM.handcuffed + var/breakouttime = 1200 //A default in case you are somehow handcuffed with something that isn't an obj/item/weapon/handcuffs type + var/displaytime = 2 //Minutes to display in the "this will take X minutes." + if(istype(HC)) //If you are handcuffed with actual handcuffs... Well what do I know, maybe someone will want to handcuff you with toilet paper in the future... + breakouttime = HC.breakouttime + displaytime = breakouttime / 600 //Minutes + CM << "\red You attempt to remove \the [HC]. (This will take around [displaytime] minutes and you need to stand still)" + for(var/mob/O in viewers(CM)) + O.show_message( "\red [usr] attempts to remove \the [HC]!", 1) + spawn(0) + if(do_after(CM, breakouttime)) + if(!CM.handcuffed || CM.buckled) + return // time leniency for lag which also might make this whole thing pointless but the server + for(var/mob/O in viewers(CM))// lags so hard that 40s isn't lenient enough - Quarxink + O.show_message("\red [CM] manages to remove the handcuffs!", 1) + CM << "\blue You successfully remove \the [CM.handcuffed]." + CM.handcuffed.loc = usr.loc + CM.handcuffed = null + CM.update_inv_handcuffed() \ No newline at end of file diff --git a/code/modules/projectiles/projectile/special.dm b/code/modules/projectiles/projectile/special.dm index 66e88936da..3ea6d135a9 100644 --- a/code/modules/projectiles/projectile/special.dm +++ b/code/modules/projectiles/projectile/special.dm @@ -48,7 +48,7 @@ flag = "energy" on_hit(var/atom/target, var/blocked = 0) - var/mob/M = target + var/mob/living/M = target if(istype(target, /mob/living) && M:mutantrace == "plant") //Plantmen possibly get mutated and damaged by the rays. var/mob/living/L as mob if(prob(15)) diff --git a/html/changelog.html b/html/changelog.html index b8fc3d7584..c0af452998 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -33,7 +33,7 @@
- Coders: TLE, NEO, Errorage, muskets, veryinky, Skie, Noise, Numbers, Agouri, Noka, Urist McDorf, Uhangi, Darem, Mport, rastaf0, Doohl, Superxpdude, Rockdtben, ConstantA, Petethegoat, Kor, Polymorph, Carn, Nodrak, Donkie
+ Coders: TLE, NEO, Errorage, muskets, veryinky, Skie, Noise, Numbers, Agouri, Noka, Urist McDorf, Uhangi, Darem, Mport, rastaf0, Doohl, Superxpdude, Rockdtben, ConstantA, Petethegoat, Kor, Polymorph, Carn, Nodrak, Donkie, Sieve
Spriters: Agouri, Cheridan, Cruazy Guest, Deeaych, Deuryn, Matty406, Microwave, ShiftyEyesShady, Skie, Uhangi, Veyveyr, Petethegoat, Kor, Ricotez, Ausops, TankNut
Sounds: Skie, Lasty/Vinyl
Thanks to: CDK Station devs, GoonStation devs, the original SpaceStation developers and Invisty for the title image @@ -46,6 +46,14 @@ Stuff which is in development and not yet visible to players or just code relate should be listed in the changelog upon commit tho. Thanks. --> +
+

Thursday, June 28th

+

Nodrak updated:

+
    +
  • I'm currently working on cleaning up and moving around a large portion of the mob code. These changes do not directly affect players; HOWEVER, bugs, oversights or simple mistakes may cause problems for players. While I have tested as much as I can, there may be some lingering bugs I have missed.

    This part of the mob code cleanup mainly focuses on damage variables and procs. So if you suspect something related to taking, dealing or examining damage is not working as intended please fill out an issue report here and be as detailed as possible. This includes what you were doing, steps to reproduce the problem, who you were doing it to, what you were using ect... Thank you.

  • +
+
+

Wednesday, June 27th

Errorage updated:

diff --git a/tgstation.dme b/tgstation.dme index 918412c688..290c4b34fb 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -920,6 +920,7 @@ #include "code\modules\mob\living\damage_procs.dm" #include "code\modules\mob\living\living.dm" #include "code\modules\mob\living\living_defense.dm" +#include "code\modules\mob\living\living_defines.dm" #include "code\modules\mob\living\login.dm" #include "code\modules\mob\living\say.dm" #include "code\modules\mob\living\blob\blob.dm"