From ee88e7b8b48bd44e0a41299fbc2dcdb1321d1778 Mon Sep 17 00:00:00 2001 From: PsiOmega Date: Sat, 13 Jun 2015 13:34:27 +0200 Subject: [PATCH] Base Life-addition() --- code/__defines/_compile_options.dm | 2 ++ code/datums/mind.dm | 2 +- code/game/dna/dna_misc.dm | 8 ++--- code/game/dna/genes/monkey.dm | 8 ++--- .../gamemodes/changeling/changeling_powers.dm | 2 +- code/game/gamemodes/cult/cult_structures.dm | 4 +-- code/game/machinery/cloning.dm | 2 +- code/modules/mob/death.dm | 4 +-- code/modules/mob/living/carbon/alien/life.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 2 +- .../mob/living/carbon/human/update_icons.dm | 2 +- .../modules/mob/living/carbon/metroid/life.dm | 2 +- code/modules/mob/living/life.dm | 14 ++++++++ code/modules/mob/living/silicon/robot/life.dm | 2 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/mob_movement.dm | 2 +- code/modules/mob/transform_procs.dm | 32 +++++++++---------- code/modules/projectiles/projectile/change.dm | 2 +- .../Chemistry-Reagents-Toxins.dm | 4 +-- .../modules/spells/targeted/ethereal_jaunt.dm | 4 +-- 21 files changed, 60 insertions(+), 44 deletions(-) create mode 100644 code/__defines/_compile_options.dm create mode 100644 code/modules/mob/living/life.dm diff --git a/code/__defines/_compile_options.dm b/code/__defines/_compile_options.dm new file mode 100644 index 0000000000..ac5f7120fd --- /dev/null +++ b/code/__defines/_compile_options.dm @@ -0,0 +1,2 @@ +#define BACKGROUND_ENABLED 0 // The default value for all uses of set background. Set background can cause gradual lag and is recommended you only turn this on if necessary. + // 1 will enable set background. 0 will disable set background. \ No newline at end of file diff --git a/code/datums/mind.dm b/code/datums/mind.dm index c3a77b4b0e..a60c9aee86 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -323,7 +323,7 @@ datum/mind /* else if (href_list["monkey"]) var/mob/living/L = current - if (L.monkeyizing) + if (L.transforming) return switch(href_list["monkey"]) if("healthy") diff --git a/code/game/dna/dna_misc.dm b/code/game/dna/dna_misc.dm index 3862bd474f..de4590c203 100644 --- a/code/game/dna/dna_misc.dm +++ b/code/game/dna/dna_misc.dm @@ -399,7 +399,7 @@ if (isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && istype(M, /mob/living/carbon/human)) // human > monkey var/mob/living/carbon/human/H = M - H.monkeyizing = 1 + H.transforming = 1 var/list/implants = list() //Try to preserve implants. for(var/obj/item/weapon/implant/W in H) implants += W @@ -410,7 +410,7 @@ if (W==H.w_uniform) // will be teared continue H.drop_from_inventory(W) - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.invisibility = 101 @@ -475,7 +475,7 @@ if (!isblockon(getblock(M.dna.struc_enzymes, MONKEYBLOCK,3),MONKEYBLOCK) && !istype(M, /mob/living/carbon/human)) // monkey > human, var/mob/living/carbon/monkey/Mo = M - Mo.monkeyizing = 1 + Mo.transforming = 1 var/list/implants = list() //Still preserving implants for(var/obj/item/weapon/implant/W in Mo) implants += W @@ -483,7 +483,7 @@ if(!connected) for(var/obj/item/W in (Mo.contents-implants)) Mo.drop_from_inventory(W) - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.invisibility = 101 diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 7d9da10636..c93a19d567 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -12,7 +12,7 @@ //testing("Cannot monkey-ify [M], type is [M.type].") return var/mob/living/carbon/human/H = M - H.monkeyizing = 1 + H.transforming = 1 var/list/implants = list() //Try to preserve implants. for(var/obj/item/weapon/implant/W in H) implants += W @@ -23,7 +23,7 @@ if (W==H.w_uniform) // will be teared continue H.drop_from_inventory(W) - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.invisibility = 101 @@ -90,7 +90,7 @@ //testing("Cannot humanize [M], type is [M.type].") return var/mob/living/carbon/monkey/Mo = M - Mo.monkeyizing = 1 + Mo.transforming = 1 var/list/implants = list() //Still preserving implants for(var/obj/item/weapon/implant/W in Mo) implants += W @@ -98,7 +98,7 @@ if(!connected) for(var/obj/item/W in (Mo.contents-implants)) Mo.drop_from_inventory(W) - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.invisibility = 101 diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 2961950377..eb15d45f51 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -374,7 +374,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E for (var/obj/item/weapon/implant/I in C) //Still preserving implants implants += I - C.monkeyizing = 1 + C.transforming = 1 C.canmove = 0 C.icon = null C.overlays.Cut() diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index d70c181830..3a6c2c1b3c 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -138,7 +138,7 @@ var/mob/living/M = A if(M.stat != DEAD) - if(M.monkeyizing) + if(M.transforming) return if(M.has_brain_worms()) return //Borer stuff - RR @@ -146,7 +146,7 @@ if(iscultist(M)) return if(!ishuman(M) && !isrobot(M)) return - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.overlays.len = 0 diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index b4e75b046f..799590e65c 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -306,7 +306,7 @@ occupant.client.perspective = MOB_PERSPECTIVE occupant.loc = loc eject_wait = 0 //If it's still set somehow. - domutcheck(occupant) //Waiting until they're out before possible monkeyizing. + domutcheck(occupant) //Waiting until they're out before possible transforming. occupant = null biomass -= CLONE_BIOMASS diff --git a/code/modules/mob/death.dm b/code/modules/mob/death.dm index 07cd8f19ff..014c27df1b 100644 --- a/code/modules/mob/death.dm +++ b/code/modules/mob/death.dm @@ -2,7 +2,7 @@ //added different sort of gibs and animations. N /mob/proc/gib(anim="gibbed-m",do_gibs) death(1) - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -28,7 +28,7 @@ /mob/proc/dust(anim="dust-m",remains=/obj/effect/decal/cleanable/ash) death(1) var/atom/movable/overlay/animation = null - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm index 13bc1a4686..fcdf40c03e 100644 --- a/code/modules/mob/living/carbon/alien/life.dm +++ b/code/modules/mob/living/carbon/alien/life.dm @@ -4,7 +4,7 @@ set invisibility = 0 set background = 1 - if (monkeyizing) return + if (transforming) return if(!loc) return ..() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9b03380b82..33877037f1 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -38,7 +38,7 @@ set invisibility = 0 set background = 1 - if (monkeyizing) return + if (transforming) return if(!loc) return // Fixing a null error that occurs when the mob isn't found in the world -- TLE ..() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 8b13178adf..83d332bad7 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -426,7 +426,7 @@ var/global/list/damage_icon_parts = list() //For legacy support. /mob/living/carbon/human/regenerate_icons() ..() - if(monkeyizing) return + if(transforming) return update_mutations(0) update_body(0) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index b41fdb758a..3c059c62e6 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -2,7 +2,7 @@ set invisibility = 0 set background = 1 - if (src.monkeyizing) + if (src.transforming) return ..() diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm new file mode 100644 index 0000000000..948490e0af --- /dev/null +++ b/code/modules/mob/living/life.dm @@ -0,0 +1,14 @@ +/mob/living/Life() + set invisibility = 0 + set background = BACKGROUND_ENABLED + + if (transforming) + return + if(!loc) + return + var/datum/gas_mixture/environment = loc.return_air() + + if(stat != DEAD) + . = 1 + + return . diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm index 5ed6df43cf..58159f3382 100644 --- a/code/modules/mob/living/silicon/robot/life.dm +++ b/code/modules/mob/living/silicon/robot/life.dm @@ -2,7 +2,7 @@ set invisibility = 0 set background = 1 - if (src.monkeyizing) + if (src.transforming) return src.blinded = null diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index c551d0a6b8..2264f60a54 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -648,7 +648,7 @@ if(!canmove) return 0 if(stat) return 0 if(anchored) return 0 - if(monkeyizing) return 0 + if(transforming) return 0 return 1 //Updates canmove, lying and icons. Could perhaps do with a rename but I can't think of anything to describe it. diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 109e29f036..cee9e723a4 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -57,7 +57,7 @@ var/disabilities = 0 //Carbon var/atom/movable/pulling = null var/next_move = null - var/monkeyizing = null //Carbon + var/transforming = null //Carbon var/other = 0.0 var/hand = null var/eye_blind = null //Carbon diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 3cffc1a57a..7eefc97d68 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -196,7 +196,7 @@ if(mob.eyeobj) return mob.EyeMove(n,direct) - if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var + if(mob.transforming) return//This is sota the goto stop mobs from moving var if(isliving(mob)) var/mob/living/L = mob diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 1f7220f699..05417c22d7 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -1,12 +1,12 @@ /mob/living/carbon/human/proc/monkeyize() - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) if (W==w_uniform) // will be torn continue drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 stunned = 1 icon = null @@ -21,7 +21,7 @@ sleep(48) //animation = null - monkeyizing = 0 + transforming = 0 stunned = 0 update_canmove() invisibility = initial(invisibility) @@ -46,7 +46,7 @@ return ..() /mob/living/carbon/human/AIize(move=1) // 'move' argument needs defining here too because BYOND is dumb - if (monkeyizing) + if (transforming) return for(var/t in organs) qdel(t) @@ -54,11 +54,11 @@ return ..(move) /mob/living/carbon/AIize() - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) drop_from_inventory(W) - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -112,12 +112,12 @@ //human -> robot /mob/living/carbon/human/proc/Robotize() - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -165,12 +165,12 @@ //human -> alien /mob/living/carbon/human/proc/Alienize() - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -188,12 +188,12 @@ return /mob/living/carbon/human/proc/slimeize(adult as num, reproduce as num) - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -222,12 +222,12 @@ return /mob/living/carbon/human/proc/corgize() - if (monkeyizing) + if (transforming) return for(var/obj/item/W in src) drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 @@ -251,13 +251,13 @@ usr << "\red Sorry but this mob type is currently unavailable." return - if(monkeyizing) + if(transforming) return for(var/obj/item/W in src) drop_from_inventory(W) regenerate_icons() - monkeyizing = 1 + transforming = 1 canmove = 0 icon = null invisibility = 101 diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index 4a9fdb9c4f..c643e94dcc 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -11,7 +11,7 @@ /obj/item/projectile/change/proc/wabbajack(var/mob/M) if(istype(M, /mob/living) && M.stat != DEAD) - if(M.monkeyizing) + if(M.transforming) return if(M.has_brain_worms()) return //Borer stuff - RR diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm index 9f8e05a20b..2e118ea052 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Toxins.dm @@ -467,10 +467,10 @@ color = "#13BC5E" /datum/reagent/aslimetoxin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed) // TODO: check if there's similar code anywhere else - if(M.monkeyizing) + if(M.transforming) return M << "Your flesh rapidly mutates!" - M.monkeyizing = 1 + M.transforming = 1 M.canmove = 0 M.icon = null M.overlays.Cut() diff --git a/code/modules/spells/targeted/ethereal_jaunt.dm b/code/modules/spells/targeted/ethereal_jaunt.dm index 12dfd55caa..99c486ae44 100644 --- a/code/modules/spells/targeted/ethereal_jaunt.dm +++ b/code/modules/spells/targeted/ethereal_jaunt.dm @@ -16,7 +16,7 @@ /spell/targeted/ethereal_jaunt/cast(list/targets) //magnets, so mostly hardcoded for(var/mob/living/target in targets) - target.monkeyizing = 1 //protects the mob from being transformed (replaced) midjaunt and getting stuck in bluespace + target.transforming = 1 //protects the mob from being transformed (replaced) midjaunt and getting stuck in bluespace if(target.buckled) target.buckled = null spawn(0) var/mobloc = get_turf(target.loc) @@ -33,7 +33,7 @@ target.buckled = null jaunt_disappear(animation, target) target.loc = holder - target.monkeyizing=0 //mob is safely inside holder now, no need for protection. + target.transforming=0 //mob is safely inside holder now, no need for protection. jaunt_steam(mobloc) sleep(duration) mobloc = get_turf(target.loc)