From 0921aa201f3ee3894dfad2d400023c39fe1d1e01 Mon Sep 17 00:00:00 2001 From: Razharas Date: Fri, 12 Dec 2014 04:48:11 +0300 Subject: [PATCH] Added datum mutations Also removed some mob vars like sdisabilities and merged the usability with disabilities Removed need for mutations var, they are not handled in dna Removed blinded var, now its handled by eye_blind being bigger than zero Ands lots, lots of other shit in files that used mutations --- code/__DEFINES/genetics.dm | 7 +- code/__DEFINES/misc.dm | 27 ++ code/__DEFINES/stat.dm | 8 + code/_globalvars/genetics.dm | 5 +- code/_onclick/other_mobs.dm | 21 +- code/_onclick/telekinesis.dm | 17 +- .../diseases/advance/symptoms/deafness.dm | 7 +- .../diseases/advance/symptoms/visionloss.dm | 7 +- code/datums/mutations.dm | 308 ++++++++++++++++++ code/game/atoms.dm | 7 + code/game/dna.dm | 56 +++- code/game/gamemodes/changeling/changeling.dm | 9 +- .../gamemodes/changeling/powers/tiny_prick.dm | 2 +- code/game/gamemodes/cult/cult.dm | 2 +- code/game/gamemodes/cult/runes.dm | 18 +- code/game/gamemodes/gang/gang.dm | 2 +- code/game/gamemodes/revolution/revolution.dm | 2 +- code/game/gamemodes/setupgame.dm | 19 +- code/game/gamemodes/traitor/traitor.dm | 2 +- code/game/jobs/job/civilian.dm | 2 +- code/game/machinery/bots/ed209bot.dm | 3 +- code/game/machinery/bots/secbot.dm | 3 +- code/game/machinery/computer/camera.dm | 4 +- code/game/machinery/flasher.dm | 2 +- code/game/machinery/wishgranter.dm | 29 +- code/game/mecha/mecha.dm | 62 +--- code/game/objects/effects/aliens.dm | 14 +- code/game/objects/effects/effect_system.dm | 15 +- code/game/objects/items.dm | 6 +- code/game/objects/items/devices/camera_bug.dm | 2 +- code/game/objects/items/devices/flash.dm | 4 +- code/game/objects/items/devices/flashlight.dm | 10 +- .../objects/items/devices/laserpointer.dm | 2 +- code/game/objects/items/devices/scanners.dm | 4 +- .../objects/items/weapons/dna_injector.dm | 72 ++-- .../items/weapons/grenades/flashbang.dm | 8 +- .../objects/items/weapons/grenades/grenade.dm | 4 +- code/game/objects/items/weapons/handcuffs.dm | 4 +- code/game/objects/items/weapons/kitchen.dm | 6 +- .../objects/items/weapons/melee/energy.dm | 4 +- code/game/objects/items/weapons/melee/misc.dm | 11 +- code/game/objects/items/weapons/shields.dm | 4 +- .../objects/items/weapons/storage/book.dm | 4 +- code/game/objects/items/weapons/stunbaton.dm | 4 +- code/game/objects/items/weapons/tools.dm | 8 +- code/game/objects/items/weapons/twohanded.dm | 21 +- .../closets/secure/secure_closets.dm | 2 +- .../crates_lockers/closets/statue.dm | 4 +- code/game/objects/structures/grille.dm | 8 +- code/game/objects/structures/tables_racks.dm | 52 +-- code/game/objects/structures/window.dm | 29 +- code/game/turfs/simulated/walls.dm | 37 +-- code/game/turfs/simulated/walls_reinforced.dm | 5 - code/modules/assembly/mousetrap.dm | 10 +- code/modules/clothing/glasses/glasses.dm | 4 +- code/modules/events/disease_outbreak.dm | 2 +- code/modules/events/ninja.dm | 9 +- code/modules/mob/dead/observer/observer.dm | 1 - .../living/carbon/alien/humanoid/humanoid.dm | 19 +- .../mob/living/carbon/alien/humanoid/life.dm | 24 +- .../mob/living/carbon/alien/larva/larva.dm | 19 +- .../mob/living/carbon/alien/larva/life.dm | 20 +- code/modules/mob/living/carbon/brain/life.dm | 13 +- code/modules/mob/living/carbon/carbon.dm | 5 + .../living/carbon/human/human_attackhand.dm | 4 + .../mob/living/carbon/human/human_damage.dm | 12 - code/modules/mob/living/carbon/human/life.dm | 32 +- code/modules/mob/living/carbon/human/say.dm | 4 +- .../mob/living/carbon/human/species.dm | 32 +- code/modules/mob/living/carbon/life.dm | 2 +- code/modules/mob/living/carbon/monkey/life.dm | 40 +-- code/modules/mob/living/carbon/slime/life.dm | 13 +- code/modules/mob/living/living.dm | 8 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/living/silicon/robot/life.dm | 23 +- .../mob/living/simple_animal/friendly/crab.dm | 62 +--- .../living/simple_animal/hostile/statue.dm | 2 +- code/modules/mob/mob.dm | 7 +- code/modules/mob/mob_defines.dm | 2 - code/modules/mob/mob_helpers.dm | 7 +- code/modules/paperwork/paper.dm | 14 +- code/modules/projectiles/gun.dm | 25 +- code/modules/reagents/Chemistry-Reagents.dm | 7 +- code/modules/surgery/eye_surgery.dm | 4 +- tgstation.dme | 1 + 85 files changed, 818 insertions(+), 586 deletions(-) create mode 100644 code/datums/mutations.dm diff --git a/code/__DEFINES/genetics.dm b/code/__DEFINES/genetics.dm index 64458a74709..11c149844b5 100644 --- a/code/__DEFINES/genetics.dm +++ b/code/__DEFINES/genetics.dm @@ -42,17 +42,12 @@ #define ELECTRICITY 20 // ability to shoot electric attacks (15%) //disabilities -#define NEARSIGHTED 1 +#define NEARSIGHT 1 #define EPILEPSY 2 #define COUGHING 4 #define TOURETTES 8 #define NERVOUS 16 -//sdisabilities -#define BLIND 1 -#define MUTE 2 -#define DEAF 4 - //DNA - Because fuck you and your magic numbers being all over the codebase. #define DNA_BLOCK_SIZE 3 diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 4af1675b4e7..a4abcbcfe4a 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -1,5 +1,32 @@ #define MIDNIGHT_ROLLOVER 864000 //number of deciseconds in a day + +//Human Overlays Indexes///////// +#define SPECIES_LAYER 23 // mutantrace colors... these are on a seperate layer in order to prvent +#define BODY_LAYER 22 //underwear, undershirts, eyes, lips(makeup) +#define MUTATIONS_LAYER 21 //Tk headglows etc. +#define AUGMENTS_LAYER 20 +#define DAMAGE_LAYER 19 //damage indicators (cuts and burns) +#define UNIFORM_LAYER 18 +#define ID_LAYER 17 +#define SHOES_LAYER 16 +#define GLOVES_LAYER 15 +#define EARS_LAYER 14 +#define SUIT_LAYER 13 +#define GLASSES_LAYER 12 +#define BELT_LAYER 11 //Possible make this an overlay of somethign required to wear a belt? +#define SUIT_STORE_LAYER 10 +#define BACK_LAYER 9 +#define HAIR_LAYER 8 //TODO: make part of head layer? +#define FACEMASK_LAYER 7 +#define HEAD_LAYER 6 +#define HANDCUFF_LAYER 5 +#define LEGCUFF_LAYER 4 +#define L_HAND_LAYER 3 +#define R_HAND_LAYER 2 //Having the two hands seperate seems rather silly, merge them together? It'll allow for code to be reused on mobs with arbitarily many hands +#define FIRE_LAYER 1 //If you're on fire +#define TOTAL_LAYERS 23 //KEEP THIS UP-TO-DATE OR SHIT WILL BREAK ;_; + //Security levels #define SEC_LEVEL_GREEN 0 #define SEC_LEVEL_BLUE 1 diff --git a/code/__DEFINES/stat.dm b/code/__DEFINES/stat.dm index 816da605d36..43e8fd35500 100644 --- a/code/__DEFINES/stat.dm +++ b/code/__DEFINES/stat.dm @@ -7,6 +7,14 @@ #define UNCONSCIOUS 1 #define DEAD 2 +//mob disabilities stat + +#define BLIND 1 +#define MUTE 2 +#define DEAF 4 +#define NEARSIGHT 8 +#define VISIONBLOCK 16 + // bitflags for machine stat variable #define BROKEN 1 #define NOPOWER 2 diff --git a/code/_globalvars/genetics.dm b/code/_globalvars/genetics.dm index 7ff714de5f9..0944554d63e 100644 --- a/code/_globalvars/genetics.dm +++ b/code/_globalvars/genetics.dm @@ -1,5 +1,5 @@ ////////////// -var/NEARSIGHTEDBLOCK = 0 +var/NEARSIGHTBLOCK = 0 var/EPILEPSYBLOCK = 0 var/COUGHBLOCK = 0 var/TOURETTESBLOCK = 0 @@ -23,3 +23,6 @@ var/NULLED_UI var/list/global_mutations = list() // list of hidden mutation things +var/list/bad_mutations = list() +var/list/good_mutations = list() +var/list/not_good_mutations = list() \ No newline at end of file diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 06e2fed0368..e3b23502dcf 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -13,7 +13,15 @@ if(proximity && istype(G) && G.Touch(A,1)) return + var/override = 0 + + for(var/datum/mutation/human/HM in dna.mutations) + override += HM.on_attack_hand(src, A) + + if(override) return + A.attack_hand(src) + /atom/proc/attack_hand(mob/user as mob) return @@ -26,7 +34,16 @@ return 0 /mob/living/carbon/human/RangedAttack(var/atom/A) - if(!gloves && !mutations.len) return + if(gloves) + var/obj/item/clothing/gloves/G = gloves + if(istype(G) && G.Touch(A,0)) // for magic gloves + return + + for(var/datum/mutation/human/HM in dna.mutations) + HM.on_ranged_attack(src, A) + + +/* if(!gloves && !mutations.len) return var/obj/item/clothing/gloves/G = gloves if((LASER in mutations) && a_intent == "harm") LaserEyes(A) // moved into a proc below @@ -36,7 +53,7 @@ else if(TK in mutations) A.attack_tk(src) - +*/ /* Animals & All Unspecified */ diff --git a/code/_onclick/telekinesis.dm b/code/_onclick/telekinesis.dm index a4e8a119365..bbb21d49c4e 100644 --- a/code/_onclick/telekinesis.dm +++ b/code/_onclick/telekinesis.dm @@ -38,14 +38,11 @@ var/const/tk_maxrange = 15 return /obj/item/attack_tk(mob/user) - if(user.stat || !isturf(loc)) return - if((TK in user.mutations) && !user.get_active_hand()) // both should already be true to get here - var/obj/item/tk_grab/O = new(src) - user.put_in_active_hand(O) - O.host = user - O.focus_object(src) - else - WARNING("Strange attack_tk(): TK([TK in user.mutations]) empty hand([!user.get_active_hand()])") + if(user.stat) return + var/obj/item/tk_grab/O = new(src) + user.put_in_active_hand(O) + O.host = user + O.focus_object(src) return @@ -95,13 +92,13 @@ var/const/tk_maxrange = 15 if(focus) focus.attack_self_tk(user) -/obj/item/tk_grab/afterattack(atom/target, mob/living/user, proximity)//TODO: go over this +/obj/item/tk_grab/afterattack(atom/target, mob/living/carbon/user, proximity)//TODO: go over this if(!target || !user) return if(last_throw+3 > world.time) return if(!host || host != user) qdel(src) return - if(!(TK in host.mutations)) + if(!(user.dna.check_mutation("Telekinesis", user))) qdel(src) return if(isobj(target) && !isturf(target.loc)) diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index a5394222876..90345160262 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -33,10 +33,11 @@ Bonus if(3, 4) M << "[pick("You hear a ringing in your ear.", "Your ears pop.")]" if(5) - if(!(M.sdisabilities & DEAF)) + if(!(M.ear_deaf)) M << "Your ears pop and begin ringing loudly!" - M.sdisabilities |= DEAF + M.disabilities |= DEAF + M.ear_deaf = 1 spawn(200) if(M) - M.sdisabilities &= ~DEAF + M.ear_deaf = 0 return \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/visionloss.dm b/code/datums/diseases/advance/symptoms/visionloss.dm index 47303b9643a..c80b5a35d6c 100644 --- a/code/datums/diseases/advance/symptoms/visionloss.dm +++ b/code/datums/diseases/advance/symptoms/visionloss.dm @@ -41,8 +41,9 @@ Bonus M.eye_blurry = 20 M.eye_stat += 5 if (M.eye_stat >= 10) - M.disabilities |= NEARSIGHTED - if (prob(M.eye_stat - 10 + 1) && !(M.sdisabilities & BLIND)) + M.disabilities |= NEARSIGHT + if (prob(M.eye_stat - 10 + 1) && !(M.eye_blind)) M << "You go blind!" - M.sdisabilities |= BLIND + M.disabilities |= BLIND + M.eye_blind = 1 return \ No newline at end of file diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm new file mode 100644 index 00000000000..abc6dc65ab4 --- /dev/null +++ b/code/datums/mutations.dm @@ -0,0 +1,308 @@ +/var/global/list/mutations_list = list() + +#define POSITIVE 1 +#define NEGATIVE 2 +#define MINOR_NEGATIVE 3 +#define NON_SCANNABLE + +/datum/mutation/ + + var/name + +/datum/mutation/New() + + mutations_list[name] = src + +/datum/mutation/human + + var/dna_block + var/quality + var/get_chance = 100 + var/lowest_value = 256 * 9 + var/text_indication = "" + var/list/visual_indicators = list() + +/datum/mutation/human/proc/force_on(mob/living/carbon/human/owner) + set_block(owner) + owner.dna.mutations |= src + +/datum/mutation/human/proc/set_block(mob/living/carbon/human/owner) + var/before = copytext(owner.dna.struc_enzymes, 1, (dna_block * 3) + 1) + var/injection = num2hex(lowest_value + rand(1, 256)) +// var/injection = copytext(owner.dna.struc_enzymes, (dna_bloc * 3) + 1, (dna_bloc * 3) + 4) + var/after = copytext(owner.dna.struc_enzymes, (dna_block * 3) + 4) + owner.dna.struc_enzymes = before + injection + after + +/datum/mutation/human/proc/check_block(mob/living/carbon/human/owner) + if(hex2num(getblock(owner.dna.struc_enzymes, dna_block)) >= lowest_value) + if(prob(get_chance)) + on_aquairing(owner) + else + on_loosing(owner) + +/datum/mutation/human/proc/on_aquairing(mob/living/carbon/human/owner) + if(src in owner.dna.mutations) + return 1 + owner.dna.mutations.Add(src) + gain_indication(owner) + owner << text_indication + +/datum/mutation/human/proc/gain_indication(mob/living/carbon/human/owner) + owner.overlays.Add(visual_indicators) +/* + owner.apply_overlay(MUTATIONS_LAYER) + return +*/ +/datum/mutation/human/proc/loose_indication(mob/living/carbon/human/owner) + owner.overlays.Remove(visual_indicators) +/* + owner.remove_overlay(MUTATIONS_LAYER) + for(var/datum/mutation/human/H in owner.dna.mutations) + H.gain_indication(owner) +*/ +/datum/mutation/human/proc/on_attack_hand(mob/living/carbon/human/owner, atom/target) + return + +/datum/mutation/human/proc/on_ranged_attack(mob/living/carbon/human/owner, atom/target) + return + +/datum/mutation/human/proc/on_life(mob/living/carbon/human/owner) + return + +/datum/mutation/human/proc/on_loosing(mob/living/carbon/human/owner) + if(owner.dna.mutations.Remove(src)) + loose_indication(owner) + return 0 + return 1 + +/datum/mutation/human/hulk + + name = "Hulk" + quality = POSITIVE + get_chance = 100 + lowest_value = 256 * 9 + text_indication = "Your muscules hurt!" + +/datum/mutation/human/hulk/New() + ..() + visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="hulk_f_s", "layer"=-MUTATIONS_LAYER) + visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="hulk_m_s", "layer"=-MUTATIONS_LAYER) + +/datum/mutation/human/hulk/on_aquairing(mob/living/carbon/human/owner) + if(..()) return + var/status = CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH + owner.status_flags &= ~status + +/datum/mutation/human/hulk/on_attack_hand(mob/living/carbon/human/owner, atom/target) + return target.attack_hulk(owner) + +/datum/mutation/human/hulk/gain_indication(mob/living/carbon/human/owner) + var/g = (owner.gender == FEMALE) ? 1 : 2 + owner.overlays += visual_indicators[g] + +/datum/mutation/human/hulk/on_life(mob/living/carbon/human/owner) + if(owner.health < 25) + on_loosing(owner) + owner << "You suddenly feel very weak." + owner.Weaken(3) + owner.emote("collapse") + +/datum/mutation/human/hulk/on_loosing(mob/living/carbon/human/owner) + ..() + owner.status_flags |= CANSTUN | CANWEAKEN | CANPARALYSE | CANPUSH + +/datum/mutation/human/telekinesis + + name = "Telekinesis" + quality = POSITIVE + get_chance = 100 + lowest_value = 256 * 9 + text_indication = "You feel smarter!" + +/datum/mutation/human/telekinesis/New() + ..() + visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="telekinesishead_s", "layer"=-MUTATIONS_LAYER) + +//datum/mutation/human/telekinesis/gain_indication(mob/living/carbon/human/owner) +/* var/list/L = list() + if(owner.overlays_standing[MUTATIONS_LAYER]) + L.Add(owner.overlays_standing[MUTATIONS_LAYER]) + L |= image("icon"='icons/effects/genetics.dmi', "icon_state"="telekinesishead_s", "layer"=-MUTATIONS_LAYER) + owner.overlays_standing[MUTATIONS_LAYER] = L + ..() +*/ +/datum/mutation/human/telekinesis/on_ranged_attack(mob/living/carbon/human/owner, atom/target) + target.attack_tk(owner) + +/datum/mutation/human/cold_resistance + + name = "Cold Resistance" + quality = POSITIVE + text_indication = "Your body feels farm!" + +/datum/mutation/human/cold_resistance/New() + ..() + visual_indicators |= image("icon"='icons/effects/genetics.dmi', "icon_state"="fire_s", "layer"=-MUTATIONS_LAYER) + +//datum/mutation/human/cold_resistance/gain_indication(mob/living/carbon/human/owner) +/* var/list/L = list() + if(owner.overlays_standing[MUTATIONS_LAYER]) + L.Add(owner.overlays_standing[MUTATIONS_LAYER]) + L |= image("icon"='icons/effects/genetics.dmi', "icon_state"="fire_s", "layer"=-MUTATIONS_LAYER) + owner.overlays_standing[MUTATIONS_LAYER] = L + ..() +*/ +/datum/mutation/human/cold_resistance/on_life(mob/living/carbon/human/owner) + if(owner.getFireLoss()) + if(prob(1)) + owner.heal_organ_damage(0,1) //Is this really needed? + +/datum/mutation/human/x_ray + + name = "X Ray Vision" + quality = POSITIVE + text_indication = "The walls suddenly disappear!" + +/datum/mutation/human/x_ray/on_aquairing(mob/living/carbon/human/owner) + if(..()) return + on_life(owner) + +/datum/mutation/human/x_ray/on_life(mob/living/carbon/human/owner) + owner.sight |= SEE_MOBS|SEE_OBJS|SEE_TURFS + owner.see_in_dark = 8 + owner.see_invisible = SEE_INVISIBLE_LEVEL_TWO + +/datum/mutation/human/x_ray/on_loosing(mob/living/carbon/human/owner) + if(..()) return + owner.see_in_dark = initial(owner.see_in_dark) + owner.see_invisible = initial(owner.see_invisible) + owner.sight = initial(owner.sight) + +/datum/mutation/human/nearsight + + name = "Near Sightness" + quality = MINOR_NEGATIVE + text_indication = "You cant see very well." + +/datum/mutation/human/nearsight/on_aquairing(mob/living/carbon/human/owner) + if(..()) return + owner.disabilities |= NEARSIGHT + +/datum/mutation/human/nearsight/on_loosing(mob/living/carbon/human/owner) + if(..()) return + owner.disabilities &= ~NEARSIGHT + +/datum/mutation/human/epilepcy + + name = "Epilepcy" + quality = NEGATIVE + +/datum/mutation/human/epilepcy/on_life(mob/living/carbon/human/owner) + if ((prob(1) && owner.paralysis < 1)) + owner << "You have a seizure!" + for(var/mob/O in viewers(owner, null) - owner) + O.show_message(text("[src] starts having a seizure!"), 1) + owner.Paralyse(10) + owner.Jitter(1000) + +/datum/mutation/human/bad_dna + + name = "Unstable DNA" + quality = NEGATIVE + +/datum/mutation/human/bad_dna/on_aquairing(mob/living/carbon/human/owner) + if(prob(95)) + if(prob(50)) + randmutb(owner) + else + randmuti(owner) + else + randmutg(owner) + on_loosing(owner) + +/datum/mutation/human/cough + + name = "Cough" + quality = MINOR_NEGATIVE + +/datum/mutation/human/cough/on_life(mob/living/carbon/human/owner) + if((prob(5) && owner.paralysis <= 1)) + owner.drop_item() + owner.emote("cough") + +/datum/mutation/human/clumsy + + name = "Clumsiness" + quality = MINOR_NEGATIVE + +/datum/mutation/human/tourettes + + name = "Tourettes Syndrome" + quality = NEGATIVE + +/datum/mutation/human/tourettes/on_life(mob/living/carbon/human/owner) + if((prob(10) && owner.paralysis <= 1)) + owner.Stun(10) + switch(rand(1, 3)) + if(1) + owner.emote("twitch") + if(2 to 3) + owner.say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]") + var/x_offset = owner.pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point. + var/y_offset = owner.pixel_y + rand(-1,1) + animate(owner, owner.pixel_x = owner.pixel_x + x_offset, owner.pixel_y = owner.pixel_y + y_offset, time = 1) + animate(owner.pixel_x = initial(owner.pixel_x) , owner.pixel_y = initial(owner.pixel_y), time = 1) + +/datum/mutation/human/nervousness + + name = "Nervousness" + quality = MINOR_NEGATIVE + +/datum/mutation/human/nervousness/on_life(mob/living/carbon/human/owner) + if(prob(10)) + owner.stuttering = max(10, owner.stuttering) + +/datum/mutation/human/deaf + + name = "Deafness" + quality = NEGATIVE + +/datum/mutation/human/deaf/on_aquairing(mob/living/carbon/human/owner) + ..() + owner.disabilities |= DEAF + +/datum/mutation/human/deaf/on_loosing(mob/living/carbon/human/owner) + ..() + owner.disabilities &= ~DEAF + +/datum/mutation/human/blind + + name = "Blindness" + quality = NEGATIVE + +/datum/mutation/human/blind/on_aquairing(mob/living/carbon/human/owner) + ..() + owner.disabilities |= BLIND + +/datum/mutation/human/blind/on_loosing(mob/living/carbon/human/owner) + ..() + owner.disabilities &= ~BLIND + +/datum/mutation/human/race + + name = "Monkified" + quality = NEGATIVE + +/datum/mutation/human/race/on_aquairing(mob/living/carbon/human/owner) + if(..()) return + owner.monkeyize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) + +/datum/mutation/human/race/gain_indication(mob/living/carbon/human/owner) + return + +/datum/mutation/human/race/loose_indication(mob/living/carbon/monkey/owner) + return + +/datum/mutation/human/race/on_loosing(mob/living/carbon/monkey/owner) + if(..()) return + owner.humanize(TR_KEEPITEMS | TR_KEEPIMPLANTS | TR_KEEPDAMAGE | TR_KEEPVIRUS | TR_KEEPSE) \ No newline at end of file diff --git a/code/game/atoms.dm b/code/game/atoms.dm index e5ec1e07753..bd2c4b9758c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -41,6 +41,13 @@ var/mob/living/M = src M.take_organ_damage(20) +/atom/proc/attack_hulk(mob/living/carbon/human/hulk, do_attack_animation = 0) + if(do_attack_animation) + hulk.changeNext_move(CLICK_CD_MELEE) + add_logs(hulk, src, "punched", "hulk powers") + hulk.do_attack_animation(src) + return + /atom/proc/CheckParts() return diff --git a/code/game/dna.dm b/code/game/dna.dm index 98586486e0c..3aabea5c4b5 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -23,6 +23,22 @@ var/datum/species/species = new /datum/species/human() //The type of mutant race the player is if applicable (i.e. potato-man) var/mutant_color = "FFF" // What color you are if you have certain speciess var/real_name //Stores the real name of the person who originally got this dna datum. Used primarely for changelings, + var/list/mutations = list() //All mutations are from now on here + +/datum/dna/proc/add_mutation(mutation_name, mob/living/carbon/human/target) + if(!istype(target)) return + var/datum/mutation/human/HM = mutations_list[mutation_name] + HM.on_aquairing(target) + +/datum/dna/proc/remove_mutation(mutation_name, mob/living/carbon/human/target) + if(!istype(target)) return + var/datum/mutation/human/HM = mutations_list[mutation_name] + HM.on_loosing(target) + +/datum/dna/proc/check_mutation(mutation_name, mob/living/carbon/human/target) + if(!istype(target)) return + var/datum/mutation/human/HM = mutations_list[mutation_name] + return mutations.Find(HM) /datum/dna/proc/generate_uni_identity(mob/living/carbon/character) . = "" @@ -51,13 +67,20 @@ /datum/dna/proc/generate_struc_enzymes(mob/living/carbon/character) var/list/L = list("0","1","2","3","4","5","6") - . = "" - for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++) - if(i == RACEBLOCK) - . += construct_block(istype(character,/mob/living/carbon/monkey)+1, 2) + var/list/sorting = list() + sorting.len = 14 + var/result + for(var/A in mutations_list) + var/datum/mutation/human/M = mutations_list[A]//, i<=DNA_STRUC_ENZYMES_BLOCKS, i++) + if(A == "Monkified" && istype(character,/mob/living/carbon/monkey)) + sorting[M.dna_block] = num2hex(M.lowest_value + rand(0, 256 * 6), DNA_BLOCK_SIZE) + character.dna.mutations.Add(mutations_list["Monkified"]) else - . += random_string(DNA_BLOCK_SIZE, L) - return . + sorting[M.dna_block] = random_string(DNA_BLOCK_SIZE, L) + + for(var/B in sorting) + result += B + return result /datum/dna/proc/generate_unique_enzymes(mob/living/carbon/character) . = "" @@ -172,9 +195,13 @@ return /proc/randmutb(mob/living/carbon/M) + var/datum/mutation/human/HM = pick(bad_mutations | not_good_mutations) + HM.on_aquairing(M) return randmut(M, bad_se_blocks) /proc/randmutg(mob/living/carbon/M) + var/datum/mutation/human/HM = pick(good_mutations) + HM.on_aquairing(M) return randmut(M, good_se_blocks | op_se_blocks) /proc/randmuti(mob/living/carbon/M) @@ -234,8 +261,11 @@ if(!check_dna_integrity(M)) return 0 - M.disabilities = 0 - M.sdisabilities = 0 + for(var/A in mutations_list) + var/datum/mutation/human/HM = mutations_list[A] + HM.check_block(M) + +/* M.disabilities = 0 M.mutations.Cut() M.see_in_dark = initial(M.see_in_dark) @@ -250,8 +280,8 @@ for(var/i in op_se_blocks) //Overpowered mutations...extra difficult to obtain blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), OP_MUTATION_DIFFICULTY) == OP_MUTATION_DIFFICULTY) - if(blocks[NEARSIGHTEDBLOCK]) - M.disabilities |= NEARSIGHTED + if(blocks[NEARSIGHTBLOCK]) + M.disabilities |= NEARSIGHT M << "Your eyes feel strange." if(blocks[EPILEPSYBLOCK]) M.disabilities |= EPILEPSY @@ -275,11 +305,11 @@ M.disabilities |= NERVOUS M << "You feel nervous." if(blocks[DEAFBLOCK]) - M.sdisabilities |= DEAF + M.disabilities |= DEAF M.ear_deaf = 1 M << "You can't seem to hear anything." if(blocks[BLINDBLOCK]) - M.sdisabilities |= BLIND + M.disabilities |= BLIND M << "You can't seem to see anything." if(blocks[HULKBLOCK]) if(inj || prob(10)) @@ -326,7 +356,7 @@ O.loc = C C.occupant = O connected = null - return 1 + return 1*/ //////////////////////////////////////////////////////////// Monkey Block if(M) M.update_icon = 1 //queue a full icon update at next life() call diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index eff9b4e843a..ebcb3d83e20 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -157,9 +157,10 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" changeling.current << "You must complete the following tasks:" if (changeling.current.mind) - if (changeling.current.mind.assigned_role == "Clown") - changeling.current << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself." - changeling.current.mutations.Remove(CLUMSY) + var/mob/living/carbon/human/H = changeling.current + if(H.mind.assigned_role == "Clown") + H << "You have evolved beyond your clownish nature, allowing you to wield weapons without harming yourself." + H.dna.remove_mutation("Clumsiness", changeling.current) var/obj_count = 1 for(var/datum/objective/objective in changeling.objectives) @@ -285,7 +286,7 @@ var/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","Epsilon" return if(!target) return - if((NOCLONE in target.mutations) || (HUSK in target.mutations)) + if((NOCLONE in target.disabilities) || (HUSK in target.disabilities)) user << "DNA of [target] is ruined beyond usability!" return if(!ishuman(target))//Absorbing monkeys is entirely possible, but it can cause issues with transforming. That's what lesser form is for anyway! diff --git a/code/game/gamemodes/changeling/powers/tiny_prick.dm b/code/game/gamemodes/changeling/powers/tiny_prick.dm index f25022ce6f3..b62407e0e81 100644 --- a/code/game/gamemodes/changeling/powers/tiny_prick.dm +++ b/code/game/gamemodes/changeling/powers/tiny_prick.dm @@ -140,7 +140,7 @@ obj/effect/proc_holder/changeling/sting/blind /obj/effect/proc_holder/changeling/sting/blind/sting_action(var/mob/user, var/mob/target) add_logs(user, target, "stung", object="blind sting") target << "Your eyes burn horrifically!" - target.disabilities |= NEARSIGHTED + target.disabilities |= NEARSIGHT target.eye_blind = 20 target.eye_blurry = 40 feedback_add_details("changeling_powers","BS") diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index a8394f6235f..fdb3adce369 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -139,7 +139,7 @@ if (mob.mind) if (mob.mind.assigned_role == "Clown") mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - mob.mutations.Remove(CLUMSY) + mob.dna.remove_mutation("Clumsiness", mob) var/obj/item/weapon/paper/talisman/supply/T = new(mob) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index c4eede9feff..ef0675edbe3 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -886,8 +886,8 @@ var/list/sacrificed = list() C.ear_deaf += 50 C.show_message("The world around you suddenly becomes quiet.", 3) affected++ - if(prob(1)) - C.sdisabilities |= DEAF + if(prob(1) && ishuman(C)) + C.dna.add_mutation("Deafness") if(affected) usr.say("Sti[pick("'","`")] kaliedir!") usr << "The world becomes quiet as the deafening rune dissipates into fine dust." @@ -926,9 +926,9 @@ var/list/sacrificed = list() C.eye_blurry += 50 C.eye_blind += 20 if(prob(5)) - C.disabilities |= NEARSIGHTED + C.disabilities |= NEARSIGHT if(prob(10)) - C.sdisabilities |= BLIND + C.disabilities |= BLIND C.show_message("Suddenly you see red flash that blinds you.", 3) affected++ if(affected) @@ -1030,8 +1030,7 @@ var/list/sacrificed = list() if(iscarbon(L)) var/mob/living/carbon/C = L flick("e_flash", C.flash) - if(C.stuttering < 1 && (!(HULK in C.mutations))) - C.stuttering = 1 + C.stuttering = 1 C.Weaken(1) C.Stun(1) C.show_message("The rune explodes in a bright flash.", 3) @@ -1057,10 +1056,9 @@ var/list/sacrificed = list() else if(iscarbon(T)) var/mob/living/carbon/C = T flick("e_flash", C.flash) - if (!(HULK in C.mutations)) - C.silent += 15 - C.Weaken(10) - C.Stun(10) + C.silent += 15 + C.Weaken(10) + C.Stun(10) return /////////////////////////////////////////TWENTY-FIFTH RUNE diff --git a/code/game/gamemodes/gang/gang.dm b/code/game/gamemodes/gang/gang.dm index 718f9ad8d65..5d1c5664c0e 100644 --- a/code/game/gamemodes/gang/gang.dm +++ b/code/game/gamemodes/gang/gang.dm @@ -117,7 +117,7 @@ if (mob.mind) if (mob.mind.assigned_role == "Clown") mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - mob.mutations.Remove(CLUMSY) + mob.dna.remove_mutation("Clumsiness", mob) var/obj/item/device/flash/T = new(mob) diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 3dc96cba6fb..80594636eb1 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -133,7 +133,7 @@ if (mob.mind) if (mob.mind.assigned_role == "Clown") mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - mob.mutations.Remove(CLUMSY) + mob.dna.remove_mutation("Clumsiness", mob) var/obj/item/device/flash/T = new(mob) diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index 9840315d2ae..cb3c848649d 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -8,7 +8,18 @@ for(var/i=1, i<=DNA_STRUC_ENZYMES_BLOCKS, i++) avnums[i] = i - HULKBLOCK = pick_n_take(avnums) + for(var/A in typesof(/datum/mutation/human) - /datum/mutation/human) + var/datum/mutation/human/B = new A() + B.dna_block = pick_n_take(avnums) + world << "[A] is block [B.dna_block]" + if(B.quality == POSITIVE) + good_mutations |= B + else if(B.quality == NEGATIVE) + bad_mutations |= B + else if(B.quality == MINOR_NEGATIVE) + not_good_mutations |= B + +/* HULKBLOCK = pick_n_take(avnums) TELEBLOCK = pick_n_take(avnums) FIREBLOCK = pick_n_take(avnums) @@ -18,19 +29,21 @@ STRANGEBLOCK = pick_n_take(avnums) DEAFBLOCK = pick_n_take(avnums) BLINDBLOCK = pick_n_take(avnums) - NEARSIGHTEDBLOCK = pick_n_take(avnums) + NEARSIGHTBLOCK = pick_n_take(avnums) EPILEPSYBLOCK = pick_n_take(avnums) COUGHBLOCK = pick_n_take(avnums) TOURETTESBLOCK = pick_n_take(avnums) NERVOUSBLOCK = pick_n_take(avnums) RACEBLOCK = pick_n_take(avnums) - bad_se_blocks = list(NEARSIGHTEDBLOCK,EPILEPSYBLOCK,STRANGEBLOCK,COUGHBLOCK,CLUMSYBLOCK,TOURETTESBLOCK,NERVOUSBLOCK,DEAFBLOCK,BLINDBLOCK) + bad_se_blocks = list(NEARSIGHTBLOCK,EPILEPSYBLOCK,STRANGEBLOCK,COUGHBLOCK,CLUMSYBLOCK,TOURETTESBLOCK,NERVOUSBLOCK,DEAFBLOCK,BLINDBLOCK) good_se_blocks = list(FIREBLOCK,XRAYBLOCK) op_se_blocks = list(HULKBLOCK,TELEBLOCK) NULLED_SE = repeat_string(DNA_STRUC_ENZYMES_BLOCKS, repeat_string(DNA_BLOCK_SIZE, "_")) NULLED_UI = repeat_string(DNA_UNI_IDENTITY_BLOCKS, repeat_string(DNA_BLOCK_SIZE, "_")) +*/ + // HIDDEN MUTATIONS / SUPERPOWERS INITIALIZTION /* diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm index 13b89560a57..ed64287f7a8 100644 --- a/code/game/gamemodes/traitor/traitor.dm +++ b/code/game/gamemodes/traitor/traitor.dm @@ -266,7 +266,7 @@ if (traitor_mob.mind) if (traitor_mob.mind.assigned_role == "Clown") traitor_mob << "Your training has allowed you to overcome your clownish nature, allowing you to wield weapons without harming yourself." - traitor_mob.mutations.Remove(CLUMSY) + traitor_mob.dna.remove_mutation("Clumsiness", traitor_mob) // find a radio! toolbox(es), backpack, belt, headset var/loc = "" diff --git a/code/game/jobs/job/civilian.dm b/code/game/jobs/job/civilian.dm index c476753d82b..48a6211b39d 100644 --- a/code/game/jobs/job/civilian.dm +++ b/code/game/jobs/job/civilian.dm @@ -227,7 +227,7 @@ Clown H.equip_to_slot_or_del(new /obj/item/weapon/bikehorn(H), slot_l_store) H.equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(H), slot_r_store) - H.mutations.Add(CLUMSY) + H.dna.add_mutation("Clumsiness", H) H.rename_self("clown") /* diff --git a/code/game/machinery/bots/ed209bot.dm b/code/game/machinery/bots/ed209bot.dm index b5de2fb95a7..1645a5d9e7e 100644 --- a/code/game/machinery/bots/ed209bot.dm +++ b/code/game/machinery/bots/ed209bot.dm @@ -255,8 +255,7 @@ Auto Patrol[]"}, icon_state = "[lasercolor]ed209[on]" var/mob/living/carbon/M = target if(istype(M, /mob/living/carbon/human)) - if( M.stuttering < 5 && !(HULK in M.mutations) ) - M.stuttering = 5 + M.stuttering = 5 M.Stun(5) M.Weaken(5) else diff --git a/code/game/machinery/bots/secbot.dm b/code/game/machinery/bots/secbot.dm index 51f7faec68e..6f8b0624360 100644 --- a/code/game/machinery/bots/secbot.dm +++ b/code/game/machinery/bots/secbot.dm @@ -218,8 +218,7 @@ Auto Patrol: []"}, icon_state = "secbot[on]" var/mob/living/carbon/M = target if(istype(M, /mob/living/carbon/human)) - if( M.stuttering < 5 && !(HULK in M.mutations) ) - M.stuttering = 5 + M.stuttering = 5 M.Stun(5) M.Weaken(5) else diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 0aa6ed942bc..37453e8ea44 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -9,7 +9,7 @@ var/mapping = 0//For the overview file, interesting bit of code. /obj/machinery/computer/security/check_eye(var/mob/user as mob) - if ((get_dist(user, src) > 1 || user.blinded || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon))) + if ((get_dist(user, src) > 1 || user.eye_blind || !( current ) || !( current.status )) && (!istype(user, /mob/living/silicon))) return null var/list/viewing = viewers(src) if((istype(user,/mob/living/silicon/robot)) && (!(viewing.Find(user)))) @@ -64,7 +64,7 @@ return 0 if(C) - if ((get_dist(user, src) > 1 || user.machine != src || user.blinded || !( C.can_use() )) && (!istype(user, /mob/living/silicon/ai))) + if ((get_dist(user, src) > 1 || user.machine != src || user.eye_blind || !( C.can_use() )) && (!istype(user, /mob/living/silicon/ai))) if(!C.can_use() && !isAI(user)) src.current = null return 0 diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 5e52de0bb9a..787057f6fae 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -95,7 +95,7 @@ flick("e_flash", O:flash) O.eye_stat += rand(1, 2) else - if(!O.blinded) + if(!O.eye_blind) flick("flash", O:flash) O.eye_stat += rand(0, 2) return 1 diff --git a/code/game/machinery/wishgranter.dm b/code/game/machinery/wishgranter.dm index c6e676a9c97..c310a462ce8 100644 --- a/code/game/machinery/wishgranter.dm +++ b/code/game/machinery/wishgranter.dm @@ -11,7 +11,8 @@ var/charges = 1 var/insisting = 0 -/obj/machinery/wish_granter/attack_hand(var/mob/user as mob) +/obj/machinery/wish_granter/attack_hand(var/mob/living/carbon/user) + if(istype(user)) return usr.set_machine(src) if(charges <= 0) @@ -36,28 +37,18 @@ charges-- insisting = 0 - if (!(HULK in user.mutations)) - user.mutations.Add(HULK) + user.dna.add_mutation("Hulk", user) - if (!(LASER in user.mutations)) +/* if (!(LASER in user.mutations)) user.mutations.Add(LASER) +*/ + user.dna.add_mutation("X Ray Vision", user) + user.dna.add_mutation("Cold Resistance", user) + user.dna.add_mutation("Telekinesis", user) - if (!(XRAY in user.mutations)) - user.mutations.Add(XRAY) - user.sight |= (SEE_MOBS|SEE_OBJS|SEE_TURFS) - user.see_in_dark = 8 - user.see_invisible = SEE_INVISIBLE_LEVEL_TWO - - if (!(COLD_RESISTANCE in user.mutations)) - user.mutations.Add(COLD_RESISTANCE) - - if (!(TK in user.mutations)) - user.mutations.Add(TK) - - if(!(HEAL in user.mutations)) +/* if(!(HEAL in user.mutations)) user.mutations.Add(HEAL) - - user.update_mutations() +*/ ticker.mode.traitors += user.mind user.mind.special_role = "Avatar of the Wish Granter" diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 6bd0982060b..75abab684ba 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -490,19 +490,20 @@ obj/mecha/proc/can_use(mob/user) else qdel(src) +/obj/mecha/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + take_damage(15) + check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) + user.visible_message("[user] hits [src.name], doing some damage.", "You hit [src.name] with all your might. The metal creaks and bends.") + occupant_message("[user] hits [src.name], doing some damage.") + return 1 + /obj/mecha/attack_hand(mob/living/user as mob) user.changeNext_move(CLICK_CD_MELEE) // Ugh. Ideally we shouldn't be setting cooldowns outside of click code. user.do_attack_animation(src) src.log_message("Attack by hand/paw. Attacker - [user].",1) - - if ((HULK in user.mutations) && !prob(src.deflect_chance)) - src.take_damage(15) - src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - user.visible_message("[user] hits [src.name], doing some damage.", "You hit [src.name] with all your might. The metal creaks and bends.") - src.occupant_message("[user] hits [src.name], doing some damage.") - else - user.visible_message("[user] hits [src.name]. Nothing happens","You hit [src.name] with no visible effect.") - src.log_append_to_last("Armor saved.") + user.visible_message("[user] hits [src.name]. Nothing happens","You hit [src.name] with no visible effect.") + src.log_append_to_last("Armor saved.") return /obj/mecha/attack_paw(mob/user as mob) @@ -629,28 +630,6 @@ obj/mecha/proc/can_use(mob/user) src.check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1) return -/*Will fix later -Sieve -/obj/mecha/attack_blob(mob/user as mob) - src.log_message("Attack by blob. Attacker - [user].",1) - if(!prob(src.deflect_chance)) - src.take_damage(6) - src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) - playsound(src.loc, 'sound/effects/blobattack.ogg', 50, 1, -1) - user << "\red You smash at the armored suit!" - for (var/mob/V in viewers(src)) - if(V.client && !(V.blinded)) - V.show_message("\red The [user] smashes against [src.name]'s armor!", 1) - else - src.log_append_to_last("Armor saved.") - playsound(src.loc, 'sound/effects/blobattack.ogg', 50, 1, -1) - user << "\green Your attack had no effect!" - src.occupant_message("\blue The [user]'s attack is stopped by the armor.") - for (var/mob/V in viewers(src)) - if(V.client && !(V.blinded)) - V.show_message("\blue The [user] rebounds off the [src.name] armor!", 1) - return -*/ - /obj/mecha/blob_act() take_damage(30, "brute") return @@ -677,11 +656,6 @@ obj/mecha/proc/can_use(mob/user) if(prob(src.deflect_chance)) user << "The [W] bounces off [src.name] armor." src.log_append_to_last("Armor saved.") -/* - for (var/mob/V in viewers(src)) - if(V.client && !(V.blinded)) - V.show_message("The [W] bounces off [src.name] armor.", 1) -*/ return 0 else src.occupant_message("[user] hits [src] with [W].") @@ -810,22 +784,6 @@ obj/mecha/proc/can_use(mob/user) else if(!(W.flags&NOBLUDGEON)) call((proc_res["dynattackby"]||src), "dynattackby")(W,user) -/* - src.log_message("Attacked by [W]. Attacker - [user]") - if(prob(src.deflect_chance)) - user << "\red The [W] bounces off [src.name] armor." - src.log_append_to_last("Armor saved.") -/* - for (var/mob/V in viewers(src)) - if(V.client && !(V.blinded)) - V.show_message("The [W] bounces off [src.name] armor.", 1) -*/ - else - src.occupant_message("[user] hits [src] with [W].") - user.visible_message("[user] hits [src] with [W].", "You hit [src] with [W].") - src.take_damage(W.force,W.damtype) - src.check_for_internal_damage(list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH,MECHA_INT_CONTROL_LOST)) -*/ return /* diff --git a/code/game/objects/effects/aliens.dm b/code/game/objects/effects/aliens.dm index 55f7dd17261..5bf1b4746c1 100644 --- a/code/game/objects/effects/aliens.dm +++ b/code/game/objects/effects/aliens.dm @@ -108,14 +108,12 @@ health -= tforce healthcheck() - -/obj/structure/alien/resin/attack_hand(mob/living/user) - if(HULK in user.mutations) - user.do_attack_animation(src) - user.visible_message("[user] destroys [src]!") - health = 0 - healthcheck() - +/obj/structure/alien/resin/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + user.do_attack_animation(src) + user.visible_message("[user] destroys [src]!") + health = 0 + healthcheck() /obj/structure/alien/resin/attack_paw(mob/user) return attack_hand(user) diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm index 3dd5fdf823c..c3b2250a35f 100644 --- a/code/game/objects/effects/effect_system.dm +++ b/code/game/objects/effects/effect_system.dm @@ -966,16 +966,15 @@ steam.start() -- spawns the effect qdel(src) return -/obj/structure/foamedmetal/attack_hand(var/mob/user) - if ((HULK in user.mutations) || (prob(75 - metal*25))) - user.visible_message("[user] smashes through the foamed metal.", \ +/obj/structure/foamedmetal/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + user.visible_message("[user] smashes through the foamed metal.", \ "You smash through the metal foam wall.") + qdel(src) + return 1 - qdel(src) - else - user << "You hit the metal foam but bounce off it." - return - +/obj/structure/foamedmetal/attack_hand(var/mob/user) + user << "You hit the metal foam but bounce off it." /obj/structure/foamedmetal/attackby(var/obj/item/I, var/mob/user) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index df3c30675bd..12bb5ad2f9e 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -317,7 +317,7 @@ // M = user /* M << "\red You stab yourself in the eye." - M.sdisabilities |= BLIND + M.disabilities |= BLIND M.weakened += 4 M.adjustBruteLoss(10) */ @@ -341,7 +341,7 @@ M.eye_stat += rand(2,4) if (M.eye_stat >= 10) M.eye_blurry += 15+(0.1*M.eye_blurry) - M.disabilities |= NEARSIGHTED + M.disabilities |= NEARSIGHT if(M.stat != 2) M << "Your eyes start to bleed profusely!" if(prob(50)) @@ -354,7 +354,7 @@ if (prob(M.eye_stat - 10 + 1)) if(M.stat != 2) M << "You go blind!" - M.sdisabilities |= BLIND + M.disabilities |= BLIND return /obj/item/clean_blood() diff --git a/code/game/objects/items/devices/camera_bug.dm b/code/game/objects/items/devices/camera_bug.dm index da1bcf84de8..ab24b6cfa6b 100644 --- a/code/game/objects/items/devices/camera_bug.dm +++ b/code/game/objects/items/devices/camera_bug.dm @@ -71,7 +71,7 @@ interact(user) /obj/item/device/camera_bug/check_eye(var/mob/user as mob) - if (user.stat || loc != user || !user.canmove || user.blinded || !current) + if (user.stat || loc != user || !user.canmove || user.eye_blind || !current) user.reset_view(null) user.unset_machine() return null diff --git a/code/game/objects/items/devices/flash.dm b/code/game/objects/items/devices/flash.dm index a88cde90254..bbf8040c78f 100644 --- a/code/game/objects/items/devices/flash.dm +++ b/code/game/objects/items/devices/flash.dm @@ -15,8 +15,8 @@ var/last_used = 0 //last world.time it was used. -/obj/item/device/flash/proc/clown_check(mob/user) - if(user && (CLUMSY in user.mutations) && prob(50)) +/obj/item/device/flash/proc/clown_check(mob/living/carbon/human/user) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) flash_carbon(user, user, 15, 0) user.visible_message("[user] blinds [user] with the flash!") return 0 diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index ae3fe04ec0e..5d01db6b891 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -45,11 +45,11 @@ return 1 -/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/device/flashlight/attack(mob/living/M as mob, mob/living/carbon/human/user as mob) add_fingerprint(user) if(on && user.zone_sel.selecting == "eyes") - if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly + if(((istype(user) && user.dna.check_mutation("Clumsiness", user)) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head if(!user.IsAdvancedToolUser()) @@ -62,7 +62,7 @@ return if(M == user) //they're using it on themselves - if(!M.blinded) + if(!M.eye_blind) flick("flash", M.flash) M.visible_message("[M] directs [src] to \his eyes.", \ "You wave the light in front of your eyes! Trippy!") @@ -75,12 +75,12 @@ "You direct [src] to [M]'s eyes.") if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected - if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind + if(M.stat == DEAD || M.disabilities & BLIND) //mob is dead or fully blind user << "[M] pupils does not react to the light!" else if(XRAY in M.mutations) //mob has X-RAY vision user << "[M] pupils give an eerie glow!" else //they're okay! - if(!M.blinded) + if(!M.eye_blind) flick("flash", M.flash) //flash the affected mob user << "[M]'s pupils narrow." else diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index 4e0804e76cf..5eb381cf1dc 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -109,7 +109,7 @@ //eye target check outmsg = "You blind [C] by shining [src] in their eyes." var/eye_prot = C.eyecheck() - if(C.blinded || eye_prot >= 2) + if(C.eye_blind || eye_prot >= 2) eye_prot = 4 var/severity = 3 - eye_prot if(prob(33)) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 7eef024ef0e..0a473316417 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -77,10 +77,10 @@ MASS SPECTROMETER origin_tech = "magnets=1;biotech=1" var/mode = 1; -/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/carbon/human/user as mob) // Clumsiness/brain damage check - if ((CLUMSY in user.mutations || user.getBrainLoss() >= 60) && prob(50)) + if ((istype(user) && user.dna.check_mutation("Clumsiness", user) || user.getBrainLoss() >= 60) && prob(50)) user << "You stupidly try to analyze the floor's vitals!" user.visible_message("[user] has analyzed the floor's vitals!") user.show_message("Analyzing Results for The floor:\n\t Overall Status: Healthy", 1) diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index 2c7b48d2897..fe80b658e68 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -67,28 +67,32 @@ desc = "Cures green skin." New() ..() - fields = list("SE"=setblock(NULLED_SE, HULKBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Hulk"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/hulkmut name = "\improper DNA injector (Hulk)" desc = "This will make you big and strong, but give you a bad skin condition." New() ..() - fields = list("SE"=setblock(NULLED_SE, HULKBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Hulk"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/xraymut name = "\improper DNA injector (Xray)" desc = "Finally you can see what the Captain does." New() ..() - fields = list("SE"=setblock(NULLED_SE, XRAYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["X Ray Vision"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/antixray name = "\improper DNA injector (Anti-Xray)" desc = "It will make you see harder." New() ..() - fields = list("SE"=setblock(NULLED_SE, XRAYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["X Ray Vision"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) ///////////////////////////////////// /obj/item/weapon/dnainjector/antiglasses @@ -96,42 +100,48 @@ desc = "Toss away those glasses!" New() ..() - fields = list("SE"=setblock(NULLED_SE, NEARSIGHTEDBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Nearsight"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/glassesmut name = "\improper DNA injector (Glasses)" desc = "Will make you need dorkish glasses." New() ..() - fields = list("SE"=setblock(NULLED_SE, NEARSIGHTEDBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Nearsight"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/epimut name = "\improper DNA injector (Epi.)" desc = "Shake shake shake the room!" New() ..() - fields = list("SE"=setblock(NULLED_SE, EPILEPSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Epilepcy"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/antiepi name = "\improper DNA injector (Anti-Epi.)" desc = "Will fix you up from shaking the room." New() ..() - fields = list("SE"=setblock(NULLED_SE, EPILEPSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Epilepcy"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) //////////////////////////////////// /obj/item/weapon/dnainjector/anticough name = "\improper DNA injector (Anti-Cough)" desc = "Will stop that aweful noise." New() ..() - fields = list("SE"=setblock(NULLED_SE, COUGHBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Cough"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/coughmut name = "\improper DNA injector (Cough)" desc = "Will bring forth a sound of horror from your throat." New() ..() - fields = list("SE"=setblock(NULLED_SE, COUGHBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Cough"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/clumsymut @@ -139,7 +149,8 @@ desc = "Makes clown minions." New() ..() - fields = list("SE"=setblock(NULLED_SE, CLUMSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Clumsiness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/anticlumsy @@ -147,77 +158,88 @@ desc = "Apply this for Security Clown." New() ..() - fields = list("SE"=setblock(NULLED_SE, CLUMSYBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Clumsiness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/antitour name = "\improper DNA injector (Anti-Tour.)" desc = "Will cure tourrets." New() ..() - fields = list("SE"=setblock(NULLED_SE, TOURETTESBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Tourettes"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/tourmut name = "\improper DNA injector (Tour.)" desc = "Gives you a nasty case off tourrets." New() ..() - fields = list("SE"=setblock(NULLED_SE, TOURETTESBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Tourettes"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/stuttmut name = "\improper DNA injector (Stutt.)" desc = "Makes you s-s-stuttterrr" New() ..() - fields = list("SE"=setblock(NULLED_SE, NERVOUSBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Nervousness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/antistutt name = "\improper DNA injector (Anti-Stutt.)" desc = "Fixes that speaking impairment." New() ..() - fields = list("SE"=setblock(NULLED_SE, NERVOUSBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Nervousness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/antifire name = "\improper DNA injector (Anti-Fire)" desc = "Cures fire." New() ..() - fields = list("SE"=setblock(NULLED_SE, FIREBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Cold Resistance"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/firemut name = "\improper DNA injector (Fire)" desc = "Gives you fire." New() ..() - fields = list("SE"=setblock(NULLED_SE, FIREBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Cold Resistance"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/blindmut name = "\improper DNA injector (Blind)" desc = "Makes you not see anything." New() ..() - fields = list("SE"=setblock(NULLED_SE, BLINDBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Blindness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/antiblind name = "\improper DNA injector (Anti-Blind)" desc = "ITS A MIRACLE!!!" New() ..() - fields = list("SE"=setblock(NULLED_SE, BLINDBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Blindness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/antitele name = "\improper DNA injector (Anti-Tele.)" desc = "Will make you not able to control your mind." New() ..() - fields = list("SE"=setblock(NULLED_SE, TELEBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Telekinesis"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/telemut name = "\improper DNA injector (Tele.)" desc = "Super brain man!" New() ..() - fields = list("SE"=setblock(NULLED_SE, TELEBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Telekinesis"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/telemut/darkbundle name = "\improper DNA injector" @@ -228,14 +250,16 @@ desc = "Sorry, what did you say?" New() ..() - fields = list("SE"=setblock(NULLED_SE, DEAFBLOCK, repeat_string(DNA_BLOCK_SIZE,"f"))) + var/datum/mutation/human/HM = mutations_list["Deafness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"f"))) /obj/item/weapon/dnainjector/antideaf name = "\improper DNA injector (Anti-Deaf)" desc = "Will make you hear once more." New() ..() - fields = list("SE"=setblock(NULLED_SE, DEAFBLOCK, repeat_string(DNA_BLOCK_SIZE,"0"))) + var/datum/mutation/human/HM = mutations_list["Deafness"] + fields = list("SE"=setblock(NULLED_SE, HM.dna_block, repeat_string(DNA_BLOCK_SIZE,"0"))) /obj/item/weapon/dnainjector/h2m name = "\improper DNA injector (Human > Monkey)" diff --git a/code/game/objects/items/weapons/grenades/flashbang.dm b/code/game/objects/items/weapons/grenades/flashbang.dm index 81880012ee9..214448b8911 100644 --- a/code/game/objects/items/weapons/grenades/flashbang.dm +++ b/code/game/objects/items/weapons/grenades/flashbang.dm @@ -45,11 +45,11 @@ M.Weaken(max(10/distance, 3)) if (M.eye_stat >= 20 && takes_eye_damage) M << "Your eyes start to burn badly!" - M.disabilities |= NEARSIGHTED + M.disabilities |= NEARSIGHT if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang))) if (prob(M.eye_stat - 20 + 1)) M << "You can't see anything!" - M.sdisabilities |= BLIND + M.disabilities |= BLIND //Bang if((src.loc == M) || src.loc == M.loc)//Holding on person or being exactly where lies is significantly more dangerous and voids protection @@ -63,9 +63,9 @@ if (M.ear_damage >= 15) M << "Your ears start to ring badly!" if(!banglet && !(istype(src , /obj/item/weapon/grenade/flashbang/clusterbang))) - if (prob(M.ear_damage - 10 + 5)) + if(prob(M.ear_damage - 10 + 5)) M << "You can't hear anything!" - M.sdisabilities |= DEAF + M.disabilities |= DEAF else if (M.ear_damage >= 5) M << "Your ears start to ring!" diff --git a/code/game/objects/items/weapons/grenades/grenade.dm b/code/game/objects/items/weapons/grenades/grenade.dm index a049f4e795a..be4a824bdc6 100644 --- a/code/game/objects/items/weapons/grenades/grenade.dm +++ b/code/game/objects/items/weapons/grenades/grenade.dm @@ -13,8 +13,8 @@ var/det_time = 50 var/display_timer = 1 -/obj/item/weapon/grenade/proc/clown_check(var/mob/living/user) - if((CLUMSY in user.mutations) && prob(50)) +/obj/item/weapon/grenade/proc/clown_check(var/mob/living/carbon/human/user) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "Huh? How does this thing work?" active = 1 icon_state = initial(icon_state) + "_active" diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index bed73f30890..a49c35e914f 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -18,8 +18,8 @@ var/cuffsound = 'sound/weapons/handcuffs.ogg' var/trashtype = null //for disposable cuffs -/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/user) - if(CLUMSY in user.mutations && prob(50)) +/obj/item/weapon/restraints/handcuffs/attack(mob/living/carbon/C, mob/living/carbon/human/user) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "Uh... how do those things work?!" apply_cuffs(user,user) diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 32acca5e4b4..6fc541cce87 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -66,7 +66,7 @@ src.icon_state = "fork" return else - if((CLUMSY in user.mutations) && prob(50)) + if(ishuman(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) M = user return eyestab(M,user) @@ -86,8 +86,8 @@ "[user] is slitting \his stomach open with the [src.name]! It looks like \he's trying to commit seppuku.")) return (BRUTELOSS) -/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/user as mob) - if ((CLUMSY in user.mutations) && prob(50)) +/obj/item/weapon/kitchen/utensil/knife/attack(target as mob, mob/living/carbon/human/user) + if (istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << " You accidentally cut yourself with the [src]." user.take_organ_damage(20) return diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm index d6b446dea03..ce4b1a4c1b2 100644 --- a/code/game/objects/items/weapons/melee/energy.dm +++ b/code/game/objects/items/weapons/melee/energy.dm @@ -67,8 +67,8 @@ return 1 return 0 -/obj/item/weapon/melee/energy/sword/attack_self(mob/living/user) - if ((CLUMSY in user.mutations) && prob(50)) +/obj/item/weapon/melee/energy/sword/attack_self(mob/living/carbon/human/user) + if (istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "You accidentally cut yourself with [src], like a doofus!" user.take_organ_damage(5,5) active = !active diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 0fbfa179960..1abc877974e 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -27,9 +27,9 @@ slot_flags = SLOT_BELT force = 10 -/obj/item/weapon/melee/classic_baton/attack(mob/M, mob/living/user) +/obj/item/weapon/melee/classic_baton/attack(mob/M, mob/living/carbon/human/user) add_fingerprint(user) - if((CLUMSY in user.mutations) && prob(50)) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "You club yourself over the head!" user.Weaken(3 * force) if(ishuman(user)) @@ -49,8 +49,7 @@ if(user.a_intent == "harm") if(!..()) return - if(M.stuttering < 7 && !(HULK in M.mutations)) - M.stuttering = 7 + M.stuttering = 7 M.Stun(7) M.Weaken(7) M.visible_message("[user] has beaten [M] with [src]!", \ @@ -101,10 +100,10 @@ playsound(src.loc, 'sound/weapons/batonextend.ogg', 50, 1) add_fingerprint(user) -/obj/item/weapon/melee/telebaton/attack(mob/target as mob, mob/living/user as mob) +/obj/item/weapon/melee/telebaton/attack(mob/target, mob/living/carbon/human/user) if(on) add_fingerprint(user) - if((CLUMSY in user.mutations) && prob(50)) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "You club yourself over the head." user.Weaken(3 * force) if(ishuman(user)) diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index aa2cb519a56..370dabb90ab 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -56,8 +56,8 @@ /obj/item/weapon/shield/energy/IsReflect() return (active) -/obj/item/weapon/shield/energy/attack_self(mob/living/user) - if((CLUMSY in user.mutations) && prob(50)) +/obj/item/weapon/shield/energy/attack_self(mob/living/carbon/human/user) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "You beat yourself in the head with [src]." user.take_organ_damage(5) active = !active diff --git a/code/game/objects/items/weapons/storage/book.dm b/code/game/objects/items/weapons/storage/book.dm index 6168bb200b8..25fce9f4b68 100644 --- a/code/game/objects/items/weapons/storage/book.dm +++ b/code/game/objects/items/weapons/storage/book.dm @@ -44,7 +44,7 @@ H.update_damage_overlays(0) return -/obj/item/weapon/storage/book/bible/attack(mob/living/M as mob, mob/living/user as mob) +/obj/item/weapon/storage/book/bible/attack(mob/living/M as mob, mob/living/carbon/human/user as mob) var/chaplain = 0 if(user.mind && (user.mind.assigned_role == "Chaplain")) @@ -60,7 +60,7 @@ user.take_organ_damage(0,10) return - if ((CLUMSY in user.mutations) && prob(50)) + if (istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user << "The [src] slips out of your hand and hits your head." user.take_organ_damage(10) user.Paralyse(20) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index c21bb64f252..e6dd1c91ff3 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -100,8 +100,8 @@ update_icon() add_fingerprint(user) -/obj/item/weapon/melee/baton/attack(mob/M, mob/living/user) - if(status && (CLUMSY in user.mutations) && prob(50)) +/obj/item/weapon/melee/baton/attack(mob/M, mob/living/carbon/human/user) + if(status && istype(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) user.visible_message("[user] accidentally hits themself with [src]!", \ "You accidentally hit yourself with [src]!") user.Weaken(stunforce*3) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index fc4b26368f2..97b92f15666 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -86,7 +86,7 @@ if(!istype(M)) return ..() if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head") return ..() - if((CLUMSY in user.mutations) && prob(50)) + if(ishuman(user) && user.dna.check_mutation("Clumsiness", user) && prob(50)) M = user return eyestab(M,user) @@ -351,14 +351,14 @@ user << "Your eyes are really starting to hurt. This can't be good for you!" if (prob(user.eye_stat - 25 + 1)) user << "You go blind!" - user.sdisabilities |= BLIND + user.disabilities |= BLIND else if(prob(user.eye_stat - 15 + 1)) user << "You go blind!" user.eye_blind = 5 user.eye_blurry = 5 - user.disabilities |= NEARSIGHTED + user.disabilities |= NEARSIGHT spawn(100) - user.disabilities &= ~NEARSIGHTED + user.disabilities &= ~NEARSIGHT /obj/item/weapon/weldingtool/proc/flamethrower_screwdriver(obj/item/I, mob/user) if(welding) diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index 3b0ba69ed11..43f04ea8cd8 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -212,9 +212,9 @@ obj/item/weapon/twohanded/ clean_blood()//blood overlays get weird otherwise, because the sprite changes. return -/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/user as mob) +/obj/item/weapon/twohanded/dualsaber/attack(target as mob, mob/living/carbon/human/user as mob) ..() - if((CLUMSY in user.mutations) && (wielded) && prob(40)) + if(istype(user) && user.dna.check_mutation("Clumsiness", user) && (wielded) && prob(40)) impale(user) return if((wielded) && prob(50)) @@ -236,13 +236,18 @@ obj/item/weapon/twohanded/ else return 0 +/obj/item/weapon/twohanded/dualsaber/attack_hulk(mob/living/carbon/human/user) + if(wielded) + user << "You cant pick up such dangerous item with your meaty hands without loosing fingers, better not to." + return 1 + /obj/item/weapon/twohanded/dualsaber/wield() //Specific wield () hulk checks due to reflect_chance var for balance issues and switches hitsounds. ..() - var/mob/living/M = loc + var/mob/living/carbon/M = loc if(istype(loc, /mob/living)) - if (HULK in M.mutations) + if(M.dna.check_mutation("HULK", M)) loc << "You lack the grace to wield this to its full extent." - hitsound = 'sound/weapons/blade1.ogg' + hitsound = 'sound/weapons/blade1.ogg' /obj/item/weapon/twohanded/dualsaber/unwield() //Specific unwield () to switch hitsounds. @@ -251,11 +256,7 @@ obj/item/weapon/twohanded/ /obj/item/weapon/twohanded/dualsaber/IsReflect() if(wielded) - var/mob/living/M = loc - if(istype(loc, /mob/living)) - if (HULK in M.mutations) - return - return 1 + return 1 /obj/item/weapon/twohanded/dualsaber/green New() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 68bcbe41c49..84fbbbeabfb 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -45,7 +45,7 @@ src.locked = !src.locked add_fingerprint(user) for(var/mob/O in viewers(user, 3)) - if((O.client && !( O.blinded ))) + if((O.client && !( O.eye_blind ))) O << "[user] has [locked ? null : "un"]locked the locker." if(src.locked) src.icon_state = src.icon_locked diff --git a/code/game/objects/structures/crates_lockers/closets/statue.dm b/code/game/objects/structures/crates_lockers/closets/statue.dm index 986a918ffb4..85817a719df 100644 --- a/code/game/objects/structures/crates_lockers/closets/statue.dm +++ b/code/game/objects/structures/crates_lockers/closets/statue.dm @@ -22,7 +22,7 @@ L.client.perspective = EYE_PERSPECTIVE L.client.eye = src L.loc = src - L.sdisabilities += MUTE + L.disabilities += MUTE L.faction += "mimic" //Stops mimics from instaqdeling people in statues health = L.health + 100 //stoning damaged mobs will result in easier to shatter statues @@ -79,7 +79,7 @@ for(var/mob/living/M in src) M.loc = src.loc - M.sdisabilities -= MUTE + M.disabilities -= MUTE M.take_overall_damage((M.health - health - 100),0) //any new damage the statue incurred is transfered to the mob M.faction -= "mimic" if(M.client) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 25128f564a9..9de4cb597ba 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -29,6 +29,12 @@ /obj/structure/grille/attack_paw(mob/user as mob) attack_hand(user) +/obj/structure/grille/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + shock(user, 70) + health -= 5 + healthcheck() + /obj/structure/grille/attack_hand(mob/living/user as mob) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) @@ -39,8 +45,6 @@ if(shock(user, 70)) return - if(HULK in user.mutations) - health -= 5 else health -= rand(1,2) healthcheck() diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 3b7ab8924b7..eac2dcc710a 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -208,15 +208,16 @@ /obj/structure/table/attack_paw(mob/user) attack_hand(user) +/obj/structure/table/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + visible_message("[user] smashes [src] apart!") + playsound(src.loc, 'sound/effects/bang.ogg', 50, 1) + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + table_destroy(1) + return 1 + /obj/structure/table/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) - if(HULK in user.mutations) - user.do_attack_animation(src) - visible_message("[user] smashes [src] apart!") - playsound(src.loc, 'sound/effects/bang.ogg', 50, 1) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - table_destroy(1) - return /obj/structure/table/attack_tk() // no telehulk sorry return @@ -462,19 +463,17 @@ /obj/structure/table/reinforced/attack_paw(mob/user) attack_hand(user) -/obj/structure/table/reinforced/attack_hand(mob/user as mob) - user.changeNext_move(CLICK_CD_MELEE) - if ((HULK in user.mutations)) - if (prob(75)) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - usr << text("You kick [src] into pieces.") - usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - table_destroy(1) - return - else - playsound(src, 'sound/effects/bang.ogg', 50, 1) - usr << text("You kick [src].") - return +/obj/structure/table/reinforced/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + if(prob(75)) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + user << text("You kick [src] into pieces.") + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + table_destroy(1) + else + playsound(src, 'sound/effects/bang.ogg', 50, 1) + user << text("You kick [src].") + return 1 /* * Racks @@ -551,20 +550,21 @@ /obj/structure/rack/attack_paw(mob/living/user) attack_hand(user) +/obj/structure/rack/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + health -= 5 + healthcheck() + return 1 + /obj/structure/rack/attack_hand(mob/living/user) user.changeNext_move(CLICK_CD_MELEE) user.do_attack_animation(src) playsound(loc, 'sound/items/dodgeball.ogg', 80, 1) user.visible_message("[user] kicks [src].", \ "You kick [src].") - - if(HULK in user.mutations) - health -= 5 - else - health -= rand(1,2) + health -= rand(1,2) healthcheck() - /obj/structure/rack/attack_alien(mob/living/user) user.do_attack_animation(src) visible_message("[user] slices [src] apart!") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index d748bdd960d..34e299fdf9a 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -123,22 +123,25 @@ add_fingerprint(user) playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1) +/obj/structure/window/attack_hulk(mob/living/carbon/human/user) + if(!can_be_reached(user)) + return + ..(user, 1) + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) + user.visible_message("[user] smashes through [src]!") + storedshard.add_fingerprint(user) + if(storedrods) + storedrods.add_fingerprint(user) + hit(50) + return 1 + /obj/structure/window/attack_hand(mob/user as mob) if(!can_be_reached(user)) return - if(HULK in user.mutations) - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!")) - user.visible_message("[user] smashes through [src]!") - storedshard.add_fingerprint(user) - if(storedrods) - storedrods.add_fingerprint(user) - spawnfragments() - else - user.changeNext_move(CLICK_CD_MELEE) - user.visible_message("[user] knocks on [src].") - add_fingerprint(user) - playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1) - + user.changeNext_move(CLICK_CD_MELEE) + user.visible_message("[user] knocks on [src].") + add_fingerprint(user) + playsound(loc, 'sound/effects/Glassknock.ogg', 50, 1) /obj/structure/window/attack_paw(mob/user as mob) return attack_hand(user) diff --git a/code/game/turfs/simulated/walls.dm b/code/game/turfs/simulated/walls.dm index 3b40db1a39c..34bb213ce3c 100644 --- a/code/game/turfs/simulated/walls.dm +++ b/code/game/turfs/simulated/walls.dm @@ -86,19 +86,6 @@ /turf/simulated/wall/attack_paw(mob/living/user as mob) user.changeNext_move(CLICK_CD_MELEE) - if ((HULK in user.mutations)) - user.do_attack_animation(src) - if (prob(hardness)) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - user << "You smash through the wall." - user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - playsound(src, 'sound/effects/bang.ogg', 50, 1) - usr << text("You punch the wall.") - return - return src.attack_hand(user) @@ -111,21 +98,21 @@ dismantle_wall(1) return +/turf/simulated/wall/attack_hulk(mob/user) + ..(user, 1) + if(prob(hardness)) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) + user << text("You smash through the wall.") + user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) + dismantle_wall(1) + + else + playsound(src, 'sound/effects/bang.ogg', 50, 1) + user << text("You punch the wall.") + return 1 /turf/simulated/wall/attack_hand(mob/user as mob) user.changeNext_move(CLICK_CD_MELEE) - if (HULK in user.mutations) - if (prob(hardness)) - playsound(src, 'sound/effects/meteorimpact.ogg', 100, 1) - usr << text("You smash through the wall.") - usr.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) - dismantle_wall(1) - return - else - playsound(src, 'sound/effects/bang.ogg', 50, 1) - usr << text("You punch the wall.") - return - user << "You push the wall but nothing happens!" playsound(src, 'sound/weapons/Genhit.ogg', 25, 1) src.add_fingerprint(user) diff --git a/code/game/turfs/simulated/walls_reinforced.dm b/code/game/turfs/simulated/walls_reinforced.dm index 3957af514c0..3463b8d65cb 100644 --- a/code/game/turfs/simulated/walls_reinforced.dm +++ b/code/game/turfs/simulated/walls_reinforced.dm @@ -28,11 +28,6 @@ else M << "This wall is far too strong for you to destroy." -/turf/simulated/wall/r_wall/attack_hand(mob/user as mob) - //this is ugly - if ((HULK in user.mutations) || !d_state) - ..() - /turf/simulated/wall/r_wall/try_destroy(obj/item/weapon/W as obj, mob/user as mob, turf/T as turf) if(istype(W, /obj/item/weapon/melee/energy/blade)) user << "This wall is too thick to slice through. You will need to find a different path." diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 2e951f9f539..acd005c4aec 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -18,7 +18,7 @@ if(!armed) if(ishuman(usr)) var/mob/living/carbon/human/user = usr - if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))) + if((user.getBrainLoss() >= 60) || (ishuman(user) && user.dna.check_mutation("Clumsiness", user)) && prob(50)) user << "Your hand slips, setting off the trigger." pulse(0) update_icon() @@ -65,11 +65,11 @@ pulse(0) -/obj/item/device/assembly/mousetrap/attack_self(mob/living/user as mob) +/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user as mob) if(!armed) user << "You arm [src]." else - if(((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50))) + if(((user.getBrainLoss() >= 60) || (istype(user) && user.dna.check_mutation("Clumsiness", user))) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -83,9 +83,9 @@ playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3) -/obj/item/device/assembly/mousetrap/attack_hand(mob/living/user as mob) +/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user as mob) if(armed) - if(((user.getBrainLoss() >= 60 || CLUMSY in user.mutations)) && prob(50)) + if(((user.getBrainLoss() >= 60) || (istype(user) && user.dna.check_mutation("Clumsiness", user))) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 16e36636c14..16add9a8e5f 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -126,9 +126,9 @@ if(M.glasses == src) M.eye_blind = 3 M.eye_blurry = 5 - M.disabilities |= NEARSIGHTED + M.disabilities |= NEARSIGHT spawn(100) - M.disabilities &= ~NEARSIGHTED + M.disabilities &= ~NEARSIGHT ..() /obj/item/clothing/glasses/thermal/syndi //These are now a traitor item, concealed as mesons. -Pete diff --git a/code/modules/events/disease_outbreak.dm b/code/modules/events/disease_outbreak.dm index 7ff6b0ead14..bf704135455 100644 --- a/code/modules/events/disease_outbreak.dm +++ b/code/modules/events/disease_outbreak.dm @@ -35,7 +35,7 @@ var/datum/disease/D if(virus_type == /datum/disease/dnaspread) //Dnaspread needs strain_data set to work. - if(!H.dna || (H.sdisabilities & BLIND)) //A blindness disease would be the worst. + if(!H.dna || (H.disabilities & BLIND)) //A blindness disease would be the worst. continue D = new virus_type() var/datum/disease/dnaspread/DS = D diff --git a/code/modules/events/ninja.dm b/code/modules/events/ninja.dm index 961a2d771d9..7d3f065118c 100644 --- a/code/modules/events/ninja.dm +++ b/code/modules/events/ninja.dm @@ -2710,13 +2710,12 @@ It is possible to destroy the net by the occupant or someone else. ..() return -/obj/effect/energy_net/attack_hand(mob/user) - if (HULK in user.mutations) - user.visible_message("[user] rips the energy net apart!", \ +/obj/effect/energy_net/attack_hulk(mob/living/carbon/human/user) + ..(user, 1) + user.visible_message("[user] rips the energy net apart!", \ "You easily destroy the energy net.") - health-=50 + health-=50 healthcheck() - return /obj/effect/energy_net/attack_paw(mob/user) return attack_hand() diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index d8aac764edd..d1178339a95 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -7,7 +7,6 @@ stat = DEAD density = 0 canmove = 0 - blinded = 0 anchored = 1 // don't get pushed around invisibility = INVISIBILITY_OBSERVER languages = ALL diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index 587114bd587..6b833d1daae 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -85,19 +85,24 @@ updatehealth() return +/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user) + if(user.a_intent == "harm") + ..(user, 1) + adjustBruteLoss(14 + rand(1,9)) + Paralyse(1) + step_away(src,user,15) + sleep(1) + step_away(src,user,15) + return 1 + else + return + /mob/living/carbon/alien/humanoid/attack_hand(mob/living/carbon/human/M as mob) if(..()) switch(M.a_intent) if ("harm") var/damage = rand(1, 9) if (prob(90)) - if (HULK in M.mutations)//HULK SMASH - damage += 14 - spawn(0) - Paralyse(1) - step_away(src,M,15) - sleep(3) - step_away(src,M,15) playsound(loc, "punch", 25, 1, -1) visible_message("[M] has punched [src]!", \ "[M] has punched [src]!") diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 7b44fdbe47d..7101627b3a9 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -45,7 +45,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - blinded = null //Handle temperature/pressure differences between body and environment handle_environment(environment) @@ -69,10 +68,6 @@ /mob/living/carbon/alien/humanoid/proc/handle_disabilities() - if (disabilities & EPILEPSY) - if ((prob(1) && paralysis < 10)) - src << "You have a seizure!" - Paralyse(10) if (disabilities & COUGHING) if ((prob(5) && paralysis <= 1)) drop_item() @@ -110,12 +105,12 @@ updatehealth() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 + eye_blind = 1 silent = 0 else //ALIVE. LIGHTS ARE ON if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain)) death() - blinded = 1 + eye_blind = 1 stat = DEAD silent = 0 return 1 @@ -131,11 +126,11 @@ if(paralysis) AdjustParalysis(-1) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS else if(sleeping) sleeping = max(sleeping-1, 0) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS if( prob(10) && health ) spawn(0) @@ -149,16 +144,15 @@ move_delay_add = max(0, move_delay_add - rand(1, 2)) //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own + eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) - blinded = 1 else if(eye_blurry) //blurry eyes heal slowly eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own ear_deaf = max(ear_deaf, 1) else if(ear_deaf) //deafness, heals slowly over time ear_deaf = max(ear_deaf-1, 0) @@ -242,12 +236,12 @@ client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) - if ((blinded)) + if ((eye_blind)) blind.layer = 18 else blind.layer = 0 - if (disabilities & NEARSIGHTED) + if (disabilities & NEARSIGHT) client.screen += global_hud.vimpaired if (eye_blurry) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 7288651a2cc..68aeae28cd2 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -104,17 +104,22 @@ updatehealth() return +/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user) + if(user.a_intent == "harm") + ..(user, 1) + adjustBruteLoss(5 + rand(1,9)) + Paralyse(1) + step_away(src,user,15) + sleep(1) + step_away(src,user,15) + return 1 + else + return + /mob/living/carbon/alien/larva/attack_hand(mob/living/carbon/human/M as mob) if(..()) var/damage = rand(1, 9) if (prob(90)) - if (HULK in M.mutations) - damage += 5 - spawn(0) - Paralyse(1) - step_away(src,M,15) - sleep(3) - step_away(src,M,15) playsound(loc, "punch", 25, 1, -1) add_logs(M, src, "attacked", admin=0) visible_message("[M] has kicked [src]!", \ diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index f98557fb45f..18dbc7376c3 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -38,7 +38,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - blinded = null //Handle temperature/pressure differences between body and environment handle_environment(enviroment) @@ -64,12 +63,12 @@ updatehealth() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 + eye_blind = max(1, eye_blind) silent = 0 else //ALIVE. LIGHTS ARE ON if(health < -25 || !getorgan(/obj/item/organ/brain)) death() - blinded = 1 + eye_blind = max(1, eye_blind) silent = 0 return 1 @@ -84,11 +83,11 @@ if(paralysis) AdjustParalysis(-2) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS else if(sleeping) sleeping = max(sleeping-1, 0) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS if( prob(10) && health ) spawn(0) @@ -102,16 +101,15 @@ move_delay_add = max(0, move_delay_add - rand(1, 2)) //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own + eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) - blinded = 1 else if(eye_blurry) //blurry eyes heal slowly eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own ear_deaf = max(ear_deaf, 1) else if(ear_deaf) //deafness, heals slowly over time ear_deaf = max(ear_deaf-1, 0) @@ -191,12 +189,12 @@ client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) - if ((blinded)) + if ((eye_blind)) blind.layer = 18 else blind.layer = 0 - if (disabilities & NEARSIGHTED) + if (disabilities & NEARSIGHT) client.screen += global_hud.vimpaired if (eye_blurry) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index f7a40978a0e..901a93c553e 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -18,7 +18,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - blinded = null //Handle temperature/pressure differences between body and environment if(environment) // More error checking @@ -125,12 +124,12 @@ updatehealth() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 + eye_blind = max(eye_blind, 1) silent = 0 else //ALIVE. LIGHTS ARE ON if( !container && (health < config.health_threshold_dead || ((world.time - timeofhostdeath) > config.revival_brain_life)) ) death() - blinded = 1 + eye_blind = max(eye_blind, 1) silent = 0 return 1 @@ -144,8 +143,7 @@ if(31 to INFINITY) emp_damage = 30//Let's not overdo it if(21 to 30)//High level of EMP damage, unable to see, hear, or speak - eye_blind = 1 - blinded = 1 + eye_blind = max(eye_blind, 1) ear_deaf = 1 silent = 1 if(!alert)//Sounds an alarm, but only once per 'level' @@ -156,7 +154,6 @@ emp_damage -= 1 if(20) alert = 0 - blinded = 0 eye_blind = 0 ear_deaf = 0 silent = 0 @@ -249,12 +246,12 @@ client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((blind && stat != 2)) - if ((blinded)) + if (eye_blind) blind.layer = 18 else blind.layer = 0 - if (disabilities & NEARSIGHTED) + if (disabilities & NEARSIGHT) client.screen += global_hud.vimpaired if (eye_blurry) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 482079d7d61..aa7368723e0 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -1,3 +1,8 @@ +/mob/living/carbon/UnarmedAttack(var/atom/A, var/proximity_flag) + ..() + for(var/datum/mutation/human/HM in dna.mutations) + . += HM.on_attack_hand(A, src) + /mob/living/carbon/prepare_huds() ..() prepare_data_huds() diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index d703a7ab610..be47a15b67f 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -1,3 +1,7 @@ +/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user) + adjustBruteLoss(5) + Weaken(4) + /mob/living/carbon/human/attack_hand(mob/living/carbon/human/M) if(..()) //to allow surgery to return properly. return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index ab55bba100e..b13f76395c3 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -44,18 +44,6 @@ else heal_overall_damage(0, -amount) -/mob/living/carbon/human/Stun(amount) - if(HULK in mutations) return - ..() - -/mob/living/carbon/human/Weaken(amount) - if(HULK in mutations) return - ..() - -/mob/living/carbon/human/Paralyse(amount) - if(HULK in mutations) return - ..() - mob/living/carbon/human/proc/hat_fall_prob() var/multiplier = 1 var/obj/item/clothing/head/H = head diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 6985cf97e93..0edd08972d5 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -49,7 +49,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - blinded = null fire_alert = 0 //Reset this here, because both breathe() and handle_environment() have a chance to set it. tinttotal = tintcheck() //here as both hud updates and status updates call it @@ -58,6 +57,9 @@ //No need to update all of these procs if the guy is dead. if(stat != DEAD) + for(var/datum/mutation/human/HM in dna.mutations) + HM.on_life(src) + if(air_master.current_cycle%4==2 || failed_last_breath) //First, resolve location and get a breath breathe() //Only try to take a breath every 4 ticks, unless suffocating @@ -138,18 +140,6 @@ if ((prob(5) && paralysis <= 1)) drop_item() emote("cough") - if (disabilities & TOURETTES) - if ((prob(10) && paralysis <= 1)) - Stun(10) - switch(rand(1, 3)) - if(1) - emote("twitch") - if(2 to 3) - say("[prob(50) ? ";" : ""][pick("SHIT", "PISS", "FUCK", "CUNT", "COCKSUCKER", "MOTHERFUCKER", "TITS")]") - var/x_offset = pixel_x + rand(-2,2) //Should probably be moved into the twitch emote at some point. - var/y_offset = pixel_y + rand(-1,1) - animate(src, pixel_x = pixel_x + x_offset, pixel_y = pixel_y + y_offset, time = 1) - animate(pixel_x = initial(pixel_x) , pixel_y = initial(pixel_y), time = 1) if (disabilities & NERVOUS) if (prob(10)) stuttering = max(10, stuttering) @@ -437,13 +427,13 @@ /mob/living/carbon/human/proc/handle_regular_status_updates() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 + eye_blind = max(eye_blind, 1) silent = 0 else //ALIVE. LIGHTS ARE ON updatehealth() //TODO if(health <= config.health_threshold_dead || !getorgan(/obj/item/organ/brain)) death() - blinded = 1 + eye_blind = max(eye_blind, 1) silent = 0 return 1 @@ -477,13 +467,13 @@ if(paralysis) AdjustParalysis(-1) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS else if(sleeping) handle_dreams() adjustStaminaLoss(-10) sleeping = max(sleeping-1, 0) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS if( prob(10) && health && !hal_crit ) spawn(0) @@ -493,19 +483,17 @@ stat = CONSCIOUS //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own + eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) - blinded = 1 else if(tinttotal >= TINT_BLIND) //covering your eyes heals blurry eyes faster eye_blurry = max(eye_blurry-3, 0) - // blinded = 1 //now handled under /handle_regular_hud_updates() else if(eye_blurry) //blurry eyes heal slowly eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own ear_deaf = max(ear_deaf, 1) else if(istype(ears, /obj/item/clothing/ears/earmuffs)) //resting your ears with earmuffs heals ear damage faster, and slowly heals deafness ear_damage = max(ear_damage-0.15, 0) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 2981a2374da..b061904c605 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -22,7 +22,7 @@ if(dna) message = dna.species.handle_speech(message,src) - if ((HULK in mutations) && health >= 25 && length(message)) + if (dna.check_mutation("Hulk", src)) message = "[uppertext(replacetext(message, ".", "!"))]!!" //because I don't know how to code properly in getting vars from other files -Bro if(viruses.len) @@ -103,7 +103,7 @@ if (ears) ears.talk_into(src, message, message_mode) return ITALICS | REDUCE_RANGE - + if(message_mode in radiochannels) if(ears) ears.talk_into(src, message, message_mode) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index f0eb93ee6c2..ca0b0e35a76 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -442,11 +442,6 @@ H.see_invisible = invis_sight H.see_in_dark = darksight - if(XRAY in H.mutations) - H.sight |= SEE_TURFS|SEE_MOBS|SEE_OBJS - H.see_in_dark = 8 - H.see_invisible = SEE_INVISIBLE_LEVEL_TWO - if(H.seer) H.see_invisible = SEE_INVISIBLE_OBSERVER @@ -472,16 +467,16 @@ if(H.tinttotal >= TINT_IMPAIR) if(tinted_weldhelh) if(H.tinttotal >= TINT_BLIND) - H.blinded = 1 // You get the sudden urge to learn to play keyboard + H.eye_blind = max(H.eye_blind, 1) // You get the sudden urge to learn to play keyboard H.client.screen += global_hud.darkMask else H.client.screen += global_hud.darkMask if(H.blind) - if(H.blinded) H.blind.layer = 18 + if(H.eye_blind) H.blind.layer = 18 else H.blind.layer = 0 - if( H.disabilities & NEARSIGHTED && !istype(H.glasses, /obj/item/clothing/glasses/regular) ) + if( H.disabilities & NEARSIGHT && !istype(H.glasses, /obj/item/clothing/glasses/regular) ) H.client.screen += global_hud.vimpaired if(H.eye_blurry) H.client.screen += global_hud.blurry if(H.druggy) H.client.screen += global_hud.druggy @@ -557,16 +552,6 @@ return 1 /datum/species/proc/handle_mutations_and_radiation(var/mob/living/carbon/human/H) - if(H.getFireLoss()) - if((COLD_RESISTANCE in H.mutations) || (prob(1))) - H.heal_organ_damage(0,1) - - if ((HULK in H.mutations) && H.health <= 25) - H.mutations.Remove(HULK) - H.update_mutations() //update our mutation overlays - H << "You suddenly feel very weak." - H.Weaken(3) - H.emote("collapse") if (H.radiation && !(RADIMMUNE in specflags)) if (H.radiation > 100) @@ -628,7 +613,7 @@ if(J.allow_thrust(0.01, H)) hasjetpack = 1 var/grav = has_gravity(H) - + if(!grav && !hasjetpack) mspeed += 1 //Slower space without jetpack @@ -727,9 +712,6 @@ var/obj/item/organ/limb/affecting = H.get_organ(ran_zone(M.zone_sel.selecting)) var/armor_block = H.run_armor_check(affecting, "melee") - if(HULK in M.mutations) - damage += 5 - if(M.dna) playsound(H.loc, M.dna.species.attack_sound, 25, 1, -1) else @@ -1131,7 +1113,7 @@ return 1 /datum/species/proc/handle_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures - if( (abs(310.15 - breath.temperature) > 50) && !(COLD_RESISTANCE in H.mutations) && !(COLDRES in specflags)) // Hot air hurts :( + if( (abs(310.15 - breath.temperature) > 50) && !(mutations_list["Cold Resistance"] in H.dna.mutations) && !(COLDRES in specflags)) // Hot air hurts :( if(breath.temperature < 260.15) if(prob(20)) H << "You feel your face freezing and an icicle forming in your lungs!" @@ -1139,7 +1121,7 @@ if(prob(20)) H << "You feel your face burning and a searing heat in your lungs!" - if(!(COLDRES in specflags)) // COLD DAMAGE + if(!(mutations_list["Cold Resistance"] in H.dna.mutations)) // COLD DAMAGE switch(breath.temperature) if(-INFINITY to 120) H.apply_damage(COLD_GAS_DAMAGE_LEVEL_3, BURN, "head") @@ -1208,7 +1190,7 @@ H.apply_damage(HEAT_DAMAGE_LEVEL_2*heatmod, BURN) H.fire_alert = max(H.fire_alert, 2) - else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !(COLDRES in specflags)) + else if(H.bodytemperature < BODYTEMP_COLD_DAMAGE_LIMIT && !(mutations_list["Cold Resistance"] in H.dna.mutations)) H.fire_alert = max(H.fire_alert, 1) if(!istype(H.loc, /obj/machinery/atmospherics/unary/cryo_cell)) switch(H.bodytemperature) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 8bd2edd73a9..52ed2acedc0 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -11,4 +11,4 @@ else if (internals) internals.icon_state = "internal0" - return + return \ No newline at end of file diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 0853a049540..16568c0fafa 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -46,7 +46,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - blinded = null //Handle temperature/pressure differences between body and environment if(environment) // More error checking -- TLE @@ -77,11 +76,6 @@ return pressure /mob/living/carbon/monkey/proc/handle_disabilities() - - if (disabilities & EPILEPSY) - if ((prob(1) && paralysis < 10)) - src << "You have a seizure!" - Paralyse(10) if (disabilities & COUGHING) if ((prob(5) && paralysis <= 1)) drop_item() @@ -100,20 +94,6 @@ /mob/living/carbon/monkey/proc/handle_mutations_and_radiation() - if(getFireLoss()) - if((COLD_RESISTANCE in mutations) && prob(50)) - switch(getFireLoss()) - if(1 to 50) - adjustFireLoss(-1) - if(51 to 100) - adjustFireLoss(-5) - - if ((HULK in mutations) && health <= 25) - mutations.Remove(HULK) - src << "You suddenly feel very weak." - Weaken(3) - emote("collapse") - if (radiation) if (radiation > 100) radiation = 100 @@ -384,12 +364,12 @@ updatehealth() if(stat == DEAD) //DEAD. BROWN BREAD. SWIMMING WITH THE SPESS CARP - blinded = 1 + eye_blind = max(eye_blind, 1) silent = 0 else //ALIVE. LIGHTS ARE ON if(health < config.health_threshold_dead || !getorgan(/obj/item/organ/brain)) death() - blinded = 1 + eye_blind = max(eye_blind, 1) stat = DEAD silent = 0 return 1 @@ -405,11 +385,11 @@ if(paralysis) AdjustParalysis(-1) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS else if(sleeping) sleeping = max(sleeping-1, 0) - blinded = 1 + eye_blind = max(eye_blind, 1) stat = UNCONSCIOUS if( prob(10) && health ) spawn(0) @@ -419,16 +399,16 @@ stat = CONSCIOUS //Eyes - if(sdisabilities & BLIND) //disabled-blind, doesn't get better on its own - blinded = 1 + if(disabilities & BLIND) //disabled-blind, doesn't get better on its own + eye_blind = max(eye_blind, 1) else if(eye_blind) //blindness, heals slowly over time eye_blind = max(eye_blind-1,0) - blinded = 1 + eye_blind = max(eye_blind, 1) else if(eye_blurry) //blurry eyes heal slowly eye_blurry = max(eye_blurry-1, 0) //Ears - if(sdisabilities & DEAF) //disabled-deaf, doesn't get better on its own + if(disabilities & DEAF) //disabled-deaf, doesn't get better on its own ear_deaf = max(ear_deaf, 1) else if(ear_deaf) //deafness, heals slowly over time ear_deaf = max(ear_deaf-1, 0) @@ -532,12 +512,12 @@ client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if(blind && stat != DEAD) - if(blinded) + if(eye_blind) blind.layer = 18 else blind.layer = 0 - if(disabilities & NEARSIGHTED) + if(disabilities & NEARSIGHT) client.screen += global_hud.vimpaired if(eye_blurry) diff --git a/code/modules/mob/living/carbon/slime/life.dm b/code/modules/mob/living/carbon/slime/life.dm index 46136f4ecf9..1a6fd83b0f4 100644 --- a/code/modules/mob/living/carbon/slime/life.dm +++ b/code/modules/mob/living/carbon/slime/life.dm @@ -33,7 +33,6 @@ //blinded get reset each cycle and then get activated later in the //code. Very ugly. I dont care. Moving this stuff here so its easy //to find it. - src.blinded = null if(environment) handle_environment(environment) // Handle temperature/pressure differences between body and environment @@ -210,7 +209,7 @@ if (src.stat == DEAD) src.lying = 1 - src.blinded = 1 + src.eye_blind = max(eye_blind, 1) else if (src.paralysis || src.stunned || src.weakened || (status_flags && FAKEDEATH)) //Stunned etc. if (src.stunned > 0) @@ -222,7 +221,7 @@ src.stat = 0 if (src.paralysis > 0) AdjustParalysis(-1) - src.blinded = 0 + src.eye_blind = 0 src.lying = 0 src.stat = 0 @@ -234,7 +233,7 @@ if (src.eye_blind) src.eye_blind = 0 - src.blinded = 1 + src.eye_blind = max(eye_blind, 1) if (src.ear_deaf > 0) src.ear_deaf = 0 if (src.ear_damage < 25) @@ -242,9 +241,9 @@ src.density = !( src.lying ) - if (src.sdisabilities & BLIND) - src.blinded = 1 - if (src.sdisabilities & DEAF) + if (src.disabilities & BLIND) + src.eye_blind = max(eye_blind, 1) + if (src.disabilities & DEAF) src.ear_deaf = 1 if (src.eye_blurry > 0) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f9d4fe588e5..04970ab3dc6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -136,7 +136,7 @@ /mob/living/ex_act(severity, target) ..() - if(client && !blinded) + if(client && !eye_blind) flick("flash", src.flash) /mob/living/proc/updatehealth() @@ -380,9 +380,7 @@ radiation = 0 nutrition = 400 bodytemperature = 310 - sdisabilities = 0 disabilities = 0 - blinded = 0 eye_blind = 0 eye_blurry = 0 ear_deaf = 0 @@ -530,7 +528,7 @@ /mob/living/proc/cuff_break(obj/item/weapon/restraints/I, mob/living/carbon/C) - if(HULK in usr.mutations) + if(C.dna.check_mutation("Hulk", C)) C.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" )) C.visible_message("[C] manages to break [I]!") @@ -556,7 +554,7 @@ breakouttime = LC.breakouttime displaytime = breakouttime / 600 - if(isalienadult(C) || HULK in usr.mutations) + if(isalienadult(C) || C.dna.check_mutation("Hulk", C)) C.visible_message("[C] is trying to break [I]!") C << "You attempt to break [I]. (This will take around 5 seconds and you need to stand still.)" spawn(0) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index c6ed851bece..8e136c91b10 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -196,7 +196,7 @@ var/list/department_radio_keys = list( if(!message) return 0 - if(sdisabilities & MUTE) + if(disabilities & MUTE) return 0 if(is_muzzled()) diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index e2848be3439..3420cbfd540 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -5,9 +5,6 @@ if (src.notransform) return - - src.blinded = null - //Status updates, death etc. clamp_values() handle_regular_status_updates() @@ -50,7 +47,7 @@ if(src.module_state_3) src.cell.use(5) src.cell.use(1) - src.blinded = 0 + src.eye_blind = 0 src.stat = 0 else uneq_all() @@ -98,22 +95,20 @@ AdjustWeakened(-1) if (src.paralysis > 0) AdjustParalysis(-1) - src.blinded = 1 + src.eye_blind = max(eye_blind, 1) else - src.blinded = 0 + src.eye_blind = 0 else //Not stunned. src.stat = 0 else //Dead. - src.blinded = 1 - src.stat = 2 + src.eye_blind = 1 if (src.stuttering) src.stuttering-- if (src.eye_blind) src.eye_blind-- - src.blinded = 1 if (src.ear_deaf > 0) src.ear_deaf-- if (src.ear_damage < 25) @@ -122,9 +117,9 @@ src.density = !( src.lying ) - if ((src.sdisabilities & BLIND)) - src.blinded = 1 - if ((src.sdisabilities & DEAF)) + if (src.disabilities & BLIND) + src.eye_blind = max(1, eye_blind) + if (src.disabilities & DEAF) src.ear_deaf = 1 if (src.eye_blurry > 0) @@ -241,11 +236,11 @@ client.screen.Remove(global_hud.blurry,global_hud.druggy,global_hud.vimpaired) if ((src.blind && src.stat != 2)) - if(src.blinded) + if(src.eye_blind) src.blind.layer = 18 else src.blind.layer = 0 - if (src.disabilities & NEARSIGHTED) + if (src.disabilities & NEARSIGHT) src.client.screen += global_hud.vimpaired if (src.eye_blurry) diff --git a/code/modules/mob/living/simple_animal/friendly/crab.dm b/code/modules/mob/living/simple_animal/friendly/crab.dm index 0ac3781a406..e4a1f52301c 100644 --- a/code/modules/mob/living/simple_animal/friendly/crab.dm +++ b/code/modules/mob/living/simple_animal/friendly/crab.dm @@ -41,64 +41,4 @@ desc = "It's Coffee, the other pet!" response_help = "pets" response_disarm = "gently pushes aside" - response_harm = "stomps" - -//LOOK AT THIS - ..()?? -/*/mob/living/simple_animal/crab/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(istype(O, /obj/item/weapon/wirecutters)) - if(prob(50)) - user << "\red \b This kills the crab." - health -= 20 - Die() - else - GetMad() - get - if(istype(O, /obj/item/stack/medical)) - if(stat != DEAD) - var/obj/item/stack/medical/MED = O - if(health < maxHealth) - if(MED.amount >= 1) - health = min(maxHealth, health + MED.heal_brute) - MED.amount -= 1 - if(MED.amount <= 0) - qdel(MED) - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("\blue [user] applies [MED] on [src]") - else - user << "\blue this crab is dead, medical items won't bring it back to life." - else - if(O.force) - health -= O.force - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("\red \b [src] has been attacked with [O] by [user]. ") - else - usr << "\red This weapon is ineffective, it does no damage." - for(var/mob/M in viewers(src, null)) - if ((M.client && !( M.blinded ))) - M.show_message("\red [user] gently taps [src] with [O]. ") - -/mob/living/simple_animal/crab/GetMad() - name = "MEGAMADCRAB" - real_name = "MEGAMADCRAB" - desc = "OH NO YOU DUN IT NOW." - icon = 'icons/mob/mob.dmi' - icon_state = "madcrab" - icon_living = "madcrab" - icon_dead = "madcrab_dead" - speak_emote = list("clicks") - emote_hear = list("clicks with fury", "clicks angrily") - emote_see = list("clacks") - speak_chance = 1 - turns_per_move = 15//Gotta go fast - maxHealth = 100//So they don't die as quickly - health = 100 - melee_damage_lower = 3 - melee_damage_upper = 10//Kill them. Kill them all - if(inventory_head)//Drops inventory so it doesn't have to be dealt with - inventory_head.loc = src.loc - inventory_head = null - if(inventory_mask) - inventory_mask.loc = src.loc - inventory_mask = null*/ \ No newline at end of file + response_harm = "stomps" \ No newline at end of file diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 93ad66bd444..d834d5482a8 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -127,7 +127,7 @@ for(var/atom/check in check_list) for(var/mob/living/M in viewers(world.view + 1, check) - src) if(M.client && CanAttack(M) && !issilicon(M)) - if(!M.blinded && !(sdisabilities & BLIND)) + if(!M.eye_blind) return M return null diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e26a681c46a..7b2ace49b29 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -54,19 +54,19 @@ var/next_mob_id = 0 msg = copytext(msg, 1, MAX_MESSAGE_LEN) if (type) - if(type & 1 && (sdisabilities & BLIND || blinded || paralysis) )//Vision related + if(type & 1 && (disabilities & BLIND || paralysis) )//Vision related if (!( alt )) return else msg = alt type = alt_type - if (type & 2 && (sdisabilities & DEAF || ear_deaf))//Hearing related + if (type & 2 && ear_deaf)//Hearing related if (!( alt )) return else msg = alt type = alt_type - if ((type & 1 && sdisabilities & BLIND)) + if ((type & 1 && disabilities & BLIND)) return // Added voice muffling for Issue 41. if(stat == UNCONSCIOUS || sleeping > 0) @@ -289,7 +289,6 @@ var/list/slot_equipment_priority = list( \ set name = "Examine" set category = "IC" -// if( (sdisabilities & BLIND || blinded || stat) && !istype(src,/mob/dead/observer) ) if(is_blind(src)) src << "Something is there but you can't see it." return diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 6b66ca59f6e..3fc28c4f96a 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -41,7 +41,6 @@ var/obj/machinery/machine = null var/other_mobs = null var/memory = "" - var/sdisabilities = 0 //Carbon var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/next_move = null @@ -53,7 +52,6 @@ var/ear_damage = null //Carbon var/stuttering = null //Carbon var/real_name = null - var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0 var/druggy = 0 //Carbon diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index ed782e6daaf..4c74063c68e 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -371,10 +371,9 @@ It's fairly easy to fix if dealing with single letters but not so much with comp hud_used.action_intent.icon_state = "help" proc/is_blind(A) - if(istype(A, /mob/living/carbon)) - var/mob/living/carbon/C = A - if(C.blinded != null) - return 1 + if(ismob(A)) + var/mob/B = A + return B.eye_blind return 0 proc/is_special_character(mob/M) // returns 1 for special characters and 2 for heroes of gamemode //moved out of admins.dm because things other than admin procs were calling this. diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 0f7b55673dd..ca0d4c866d3 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -68,9 +68,13 @@ if(usr.stat || !usr.canmove || usr.restrained()) return - if((CLUMSY in usr.mutations) && prob(25)) - usr << "You cut yourself on the paper! Ahhhh! Ahhhhh!" - usr.damageoverlaytemp = 9001 + + if(!ishuman(usr)) + return + var/mob/living/carbon/human/H = usr + if(H.dna.check_mutation("Clumsiness", H) && prob(25)) + H << "You cut yourself on the paper! Ahhhh! Ahhhhh!" + H.damageoverlaytemp = 9001 return var/n_name = copytext(sanitize(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text), 1, MAX_NAME_LEN) if((loc == usr && usr.stat == 0)) @@ -263,14 +267,14 @@ update_icon() -/obj/item/weapon/paper/attackby(obj/item/weapon/P, mob/user) +/obj/item/weapon/paper/attackby(obj/item/weapon/P, mob/living/carbon/human/user) ..() if(is_blind(user)) return var/clown = 0 - if(user && (CLUMSY in user.mutations)) + if(istype(user) && user.dna.check_mutation("Clumsiness", user)) clown = 1 if(istype(P, /obj/item/weapon/pen) || istype(P, /obj/item/toy/crayon)) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index c42644b2999..439c07fd13b 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -52,7 +52,7 @@ for(var/obj/O in contents) O.emp_act(severity) -/obj/item/weapon/gun/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)//TODO: go over this +/obj/item/weapon/gun/afterattack(atom/target as mob|obj|turf, mob/living/carbon/human/user as mob|obj, flag, params)//TODO: go over this if(flag) //It's adjacent, is the user, or is on the user's person if(istype(target, /mob/) && target != user && !(target in user.contents)) //We make sure that it is a mob, it's not us or part of us. if(user.a_intent == "harm") //Flogging action @@ -62,27 +62,22 @@ //Exclude lasertag guns from the CLUMSY check. if(clumsy_check) - if(istype(user, /mob/living)) - var/mob/living/M = user - if ((CLUMSY in M.mutations) && prob(40)) - M << "You shoot yourself in the foot with \the [src]!" - afterattack(user, user) - M.drop_item() - return + if((istype(user) && user.dna.check_mutation("Clumsiness", user)) && prob(40)) + user << "You shoot yourself in the foot with \the [src]!" + afterattack(user, user) + user.drop_item() + return if (!user.IsAdvancedToolUser()) user << "You don't have the dexterity to do this!" return if(trigger_guard) - if(istype(user, /mob/living)) - var/mob/living/M = user - if (HULK in M.mutations) - M << "Your meaty finger is much too large for the trigger guard!" + if(istype(user)) + if(user.dna.check_mutation("Hulk")) + user << "Your meaty finger is much too large for the trigger guard!" return - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(H.dna && NOGUNS in H.dna.species.specflags) + if(NOGUNS in user.dna.species.specflags) user << "Your fingers don't fit in the trigger guard!" return diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 4a278afbdbe..2422177c07b 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -611,7 +611,6 @@ datum/reagent/ryetalyn/on_mob_life(var/mob/living/M as mob) M.mutations = list() M.disabilities = 0 - M.sdisabilities = 0 M.jitteriness = 0 // Might need to update appearance for hulk etc. @@ -978,7 +977,6 @@ datum/reagent/adminordrazine/on_mob_life(var/mob/living/carbon/M as mob) M.hallucination = 0 M.setBrainLoss(0) M.disabilities = 0 - M.sdisabilities = 0 M.eye_blurry = 0 M.eye_blind = 0 M.SetWeakened(0) @@ -1092,9 +1090,8 @@ datum/reagent/imidazoline/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 &= ~NEARSIGHTED + M.disabilities &= ~NEARSIGHT M.eye_stat = max(M.eye_stat-5, 0) -// M.sdisabilities &= ~1 Replaced by eye surgery ..() return @@ -2263,7 +2260,7 @@ datum/reagent/carrotjuice/on_mob_life(var/mob/living/M as mob) //nothing if(21 to INFINITY) if (prob(data-10)) - M.disabilities &= ~NEARSIGHTED + M.disabilities &= ~NEARSIGHT data++ ..() return diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 9d3afe3e1b9..0fb7f2413cb 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -15,8 +15,8 @@ /datum/surgery_step/fix_eyes/success(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) user.visible_message("[user] successfully fixes [target]'s eyes!") - target.sdisabilities &= ~BLIND - target.disabilities &= ~NEARSIGHTED + target.disabilities &= ~BLIND + target.disabilities &= ~NEARSIGHT target.eye_blurry = 35 //this will fix itself slowly. target.eye_stat = 0 return 1 diff --git a/tgstation.dme b/tgstation.dme index 17ef9c54309..02a2fb742ec 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -136,6 +136,7 @@ #include "code\datums\mind.dm" #include "code\datums\mixed.dm" #include "code\datums\modules.dm" +#include "code\datums\mutations.dm" #include "code\datums\recipe.dm" #include "code\datums\spell.dm" #include "code\datums\sun.dm"