From f205911b5a769b5e06344f3b5e3df086a3a9aa65 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sun, 15 Oct 2017 20:33:35 -0400 Subject: [PATCH 001/266] Adds defines for organ slots --- code/__DEFINES/DNA.dm | 28 ++++ code/_onclick/hud/screen_objects.dm | 2 +- .../diseases/advance/symptoms/deafness.dm | 2 +- .../diseases/advance/symptoms/vision.dm | 4 +- .../gamemodes/changeling/evolution_menu.dm | 2 +- .../changeling/powers/augmented_eyesight.dm | 6 +- .../gamemodes/changeling/powers/regenerate.dm | 2 +- code/game/machinery/cloning.dm | 2 +- code/game/objects/items.dm | 2 +- code/game/objects/items/airlock_painter.dm | 129 ++++++++++++++++++ code/game/objects/items/devices/flashlight.dm | 2 +- code/game/objects/items/devices/scanners.dm | 4 +- code/game/objects/items/tanks/tanks.dm | 2 +- code/modules/clothing/neck/neck.dm | 4 +- code/modules/mob/living/brain/brain_item.dm | 4 +- code/modules/mob/living/carbon/carbon.dm | 6 +- .../mob/living/carbon/carbon_defense.dm | 10 +- .../mob/living/carbon/carbon_movement.dm | 2 +- code/modules/mob/living/carbon/human/death.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 26 ++-- .../mob/living/carbon/human/human_defense.dm | 2 +- .../mob/living/carbon/human/inventory.dm | 2 +- code/modules/mob/living/carbon/human/life.dm | 6 +- code/modules/mob/living/carbon/human/say.dm | 2 +- .../mob/living/carbon/human/species.dm | 22 +-- .../carbon/human/species_types/zombies.dm | 2 +- code/modules/mob/living/carbon/life.dm | 14 +- .../mob/living/carbon/monkey/monkey.dm | 2 +- code/modules/mob/living/carbon/say.dm | 6 +- .../modules/mob/living/carbon/status_procs.dm | 6 +- code/modules/mob/living/say.dm | 2 +- code/modules/mob/living/taste.dm | 2 +- code/modules/projectiles/guns/ballistic.dm | 2 +- .../chemistry/reagents/alcohol_reagents.dm | 2 +- .../chemistry/reagents/food_reagents.dm | 2 +- .../chemistry/reagents/medicine_reagents.dm | 4 + .../chemistry/reagents/other_reagents.dm | 2 +- code/modules/station_goals/dna_vault.dm | 2 +- code/modules/surgery/eye_surgery.dm | 40 ++++++ code/modules/surgery/organs/appendix.dm | 2 +- code/modules/surgery/organs/augments_arms.dm | 14 +- code/modules/surgery/organs/augments_chest.dm | 6 +- code/modules/surgery/organs/augments_eyes.dm | 4 +- .../surgery/organs/augments_internal.dm | 6 +- code/modules/surgery/organs/ears.dm | 2 +- code/modules/surgery/organs/eyes.dm | 2 +- code/modules/surgery/organs/heart.dm | 2 +- code/modules/surgery/organs/liver.dm | 2 +- code/modules/surgery/organs/lungs.dm | 2 +- code/modules/surgery/organs/organ_internal.dm | 14 +- code/modules/surgery/organs/stomach.dm | 2 +- code/modules/surgery/organs/tails.dm | 2 +- code/modules/surgery/organs/tongue.dm | 4 +- code/modules/surgery/organs/vocal_cords.dm | 10 +- code/modules/zombie/items.dm | 2 +- code/modules/zombie/organs.dm | 2 +- 56 files changed, 323 insertions(+), 118 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index dd5a25d8ff..8c1ce43717 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -127,6 +127,7 @@ #define TOXINLOVER 24 #define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi) #define NO_UNDERWEAR 26 +<<<<<<< HEAD #define MUTCOLORS2 27 #define MUTCOLORS3 28 #define NOLIVER 29 @@ -135,3 +136,30 @@ #define NOAROUSAL 29 //Stops all arousal effects #define NOGENITALS 30 //Cannot create, use, or otherwise have genitals #define NO_DNA_COPY 31 +======= +#define NOLIVER 27 +#define NOSTOMACH 28 +#define NO_DNA_COPY 29 + +#define ORGAN_SLOT_BRAIN "brain" +#define ORGAN_SLOT_APPENDIX "appendix" +#define ORGAN_SLOT_RIGHT_ARM_AUG "r_arm_device" +#define ORGAN_SLOT_LEFT_ARM_AUG "l_arm_device" +#define ORGAN_SLOT_STOMACH "stomach" +#define ORGAN_SLOT_BREATHING_TUBE "breathing_tube" +#define ORGAN_SLOT_EARS "ears" +#define ORGAN_SLOT_EYES "eye_sight" +#define ORGAN_SLOT_LUNGS "lungs" +#define ORGAN_SLOT_HEART "heart" +#define ORGAN_SLOT_ZOMBIE "zombie_infection" +#define ORGAN_SLOT_THRUSTERS "thrusters" +#define ORGAN_SLOT_HUD "eye_hud" +#define ORGAN_SLOT_LIVER "liver" +#define ORGAN_SLOT_TONGUE "tongue" +#define ORGAN_SLOT_VOICE "vocal_cords" +#define ORGAN_SLOT_ADAMANTINE_RESONATOR "adamantine_resonator" +#define ORGAN_SLOT_HEART_AID "heartdrive" +#define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop" +#define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun" +#define ORGAN_SLOT_TAIL "tail" +>>>>>>> 04c05d8... Adds defines for organ slots (#31737) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9730aaf552..6ca365d62e 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -251,7 +251,7 @@ to_chat(C, "You are no longer running on internals.") icon_state = "internal0" else - if(!C.getorganslot("breathing_tube")) + if(!C.getorganslot(ORGAN_SLOT_BREATHING_TUBE)) if(!istype(C.wear_mask, /obj/item/clothing/mask)) to_chat(C, "You are not wearing an internals mask!") return 1 diff --git a/code/datums/diseases/advance/symptoms/deafness.dm b/code/datums/diseases/advance/symptoms/deafness.dm index c2afb34a9e..cc388f0b59 100644 --- a/code/datums/diseases/advance/symptoms/deafness.dm +++ b/code/datums/diseases/advance/symptoms/deafness.dm @@ -49,7 +49,7 @@ Bonus to_chat(M, "[pick("You hear a ringing in your ear.", "Your ears pop.")]") if(5) if(power > 2) - var/obj/item/organ/ears/ears = M.getorganslot("ears") + var/obj/item/organ/ears/ears = M.getorganslot(ORGAN_SLOT_EARS) if(istype(ears) && ears.ear_damage < UNHEALING_EAR_DAMAGE) to_chat(M, "Your ears pop painfully and start bleeding!") ears.ear_damage = max(ears.ear_damage, UNHEALING_EAR_DAMAGE) diff --git a/code/datums/diseases/advance/symptoms/vision.dm b/code/datums/diseases/advance/symptoms/vision.dm index 84f9ef49cc..728dfa01d0 100644 --- a/code/datums/diseases/advance/symptoms/vision.dm +++ b/code/datums/diseases/advance/symptoms/vision.dm @@ -44,7 +44,7 @@ Bonus if(!..()) return var/mob/living/carbon/M = A.affected_mob - var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if(istype(eyes)) switch(A.stage) if(1, 2) @@ -106,7 +106,7 @@ Bonus if(!..()) return var/mob/living/M = A.affected_mob - var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return switch(A.stage) diff --git a/code/game/gamemodes/changeling/evolution_menu.dm b/code/game/gamemodes/changeling/evolution_menu.dm index 59ed4ab2e8..76a37f9bb1 100644 --- a/code/game/gamemodes/changeling/evolution_menu.dm +++ b/code/game/gamemodes/changeling/evolution_menu.dm @@ -75,7 +75,7 @@ var/datum/changelingprofile/prof = mind.changeling.add_new_profile(C, src) mind.changeling.first_prof = prof - var/obj/item/organ/brain/B = C.getorganslot("brain") + var/obj/item/organ/brain/B = C.getorganslot(ORGAN_SLOT_BRAIN) if(B) B.vital = FALSE B.decoy_override = TRUE diff --git a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm index b2ddd022a4..f48464700f 100644 --- a/code/game/gamemodes/changeling/powers/augmented_eyesight.dm +++ b/code/game/gamemodes/changeling/powers/augmented_eyesight.dm @@ -10,7 +10,7 @@ active = FALSE /obj/effect/proc_holder/changeling/augmented_eyesight/on_purchase(mob/user) //The ability starts inactive, so we should be protected from flashes. - var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES) if (E) E.flash_protect = 2 //Adjust the user's eyes' flash protection to_chat(user, "We adjust our eyes to protect them from bright lights.") @@ -20,7 +20,7 @@ /obj/effect/proc_holder/changeling/augmented_eyesight/sting_action(mob/living/carbon/human/user) if(!istype(user)) return - var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES) if(E) if(!active) E.sight_flags |= SEE_MOBS | SEE_OBJS | SEE_TURFS //Add sight flags to the user's eyes @@ -42,7 +42,7 @@ /obj/effect/proc_holder/changeling/augmented_eyesight/on_refund(mob/user) //Get rid of x-ray vision and flash protection when the user refunds this ability - var/obj/item/organ/eyes/E = user.getorganslot("eye_sight") + var/obj/item/organ/eyes/E = user.getorganslot(ORGAN_SLOT_EYES) if(E) if (active) E.sight_flags ^= SEE_MOBS | SEE_OBJS | SEE_TURFS diff --git a/code/game/gamemodes/changeling/powers/regenerate.dm b/code/game/gamemodes/changeling/powers/regenerate.dm index a74b966bd8..f2b13a5d09 100644 --- a/code/game/gamemodes/changeling/powers/regenerate.dm +++ b/code/game/gamemodes/changeling/powers/regenerate.dm @@ -27,7 +27,7 @@ C.emote("scream") C.regenerate_limbs(1) C.regenerate_organs() - if(!user.getorganslot("brain")) + if(!user.getorganslot(ORGAN_SLOT_BRAIN)) var/obj/item/organ/brain/changeling_brain/B = new() B.Insert(C) if(ishuman(user)) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 86e69b8973..cb5ea9df76 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -163,7 +163,7 @@ var/mob/living/carbon/human/H = new /mob/living/carbon/human(src) if(clonemind.changeling) - var/obj/item/organ/brain/B = H.getorganslot("brain") + var/obj/item/organ/brain/B = H.getorganslot(ORGAN_SLOT_BRAIN) B.vital = FALSE B.decoy_override = TRUE diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index e158c1f90a..cbd183aca0 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -519,7 +519,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE) M.adjust_blurriness(3) M.adjust_eye_damage(rand(2,4)) - var/obj/item/organ/eyes/eyes = M.getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) if (!eyes) return if(eyes.eye_damage >= 10) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index 378d6ebabd..2cb611e9b6 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /obj/item/airlock_painter name = "airlock painter" desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob." @@ -124,3 +125,131 @@ user.put_in_hands(ink) to_chat(user, "You remove [ink] from [src].") ink = null +======= +/obj/item/airlock_painter + name = "airlock painter" + desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob." + icon = 'icons/obj/objects.dmi' + icon_state = "paint sprayer" + item_state = "paint sprayer" + + w_class = WEIGHT_CLASS_SMALL + + materials = list(MAT_METAL=50, MAT_GLASS=50) + origin_tech = "engineering=2" + + flags_1 = CONDUCT_1 | NOBLUDGEON_1 + slot_flags = SLOT_BELT + + var/obj/item/device/toner/ink = null + +/obj/item/airlock_painter/New() + ..() + ink = new /obj/item/device/toner(src) + +//This proc doesn't just check if the painter can be used, but also uses it. +//Only call this if you are certain that the painter will be used right after this check! +/obj/item/airlock_painter/proc/use(mob/user) + if(can_use(user)) + ink.charges-- + playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1) + return 1 + else + return 0 + +//This proc only checks if the painter can be used. +//Call this if you don't want the painter to be used right after this check, for example +//because you're expecting user input. +/obj/item/airlock_painter/proc/can_use(mob/user) + if(!ink) + to_chat(user, "There is no toner cartridge installed in [src]!") + return 0 + else if(ink.charges < 1) + to_chat(user, "[src] is out of ink!") + return 0 + else + return 1 + +/obj/item/airlock_painter/suicide_act(mob/user) + var/obj/item/organ/lungs/L = user.getorganslot(ORGAN_SLOT_LUNGS) + + if(can_use(user) && L) + user.visible_message("[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!") + use(user) + + // Once you've inhaled the toner, you throw up your lungs + // and then die. + + // Find out if there is an open turf in front of us, + // and if not, pick the turf we are standing on. + var/turf/T = get_step(get_turf(src), user.dir) + if(!isopenturf(T)) + T = get_turf(src) + + // they managed to lose their lungs between then and + // now. Good job. + if(!L) + return OXYLOSS + + L.Remove(user) + + // make some colorful reagent, and apply it to the lungs + L.create_reagents(10) + L.reagents.add_reagent("colorful_reagent", 10) + L.reagents.reaction(L, TOUCH, 1) + + // TODO maybe add some colorful vomit? + + user.visible_message("[user] vomits out their [L]!") + playsound(user.loc, 'sound/effects/splat.ogg', 50, 1) + + L.forceMove(T) + + return (TOXLOSS|OXYLOSS) + else if(can_use(user) && !L) + user.visible_message("[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.") + user.reagents.add_reagent("colorful_reagent", 1) + user.reagents.reaction(user, TOUCH, 1) + return TOXLOSS + + else + user.visible_message("[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.") + return SHAME + + +/obj/item/airlock_painter/examine(mob/user) + ..() + if(!ink) + to_chat(user, "It doesn't have a toner cartridge installed.") + return + var/ink_level = "high" + if(ink.charges < 1) + ink_level = "empty" + else if((ink.charges/ink.max_charges) <= 0.25) //25% + ink_level = "low" + else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit) + ink_level = "dangerously high" + to_chat(user, "Its ink levels look [ink_level].") + + +/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params) + if(istype(W, /obj/item/device/toner)) + if(ink) + to_chat(user, "[src] already contains \a [ink].") + return + if(!user.transferItemToLoc(W, src)) + return + to_chat(user, "You install [W] into [src].") + ink = W + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + else + return ..() + +/obj/item/airlock_painter/attack_self(mob/user) + if(ink) + playsound(src.loc, 'sound/machines/click.ogg', 50, 1) + ink.loc = user.loc + user.put_in_hands(ink) + to_chat(user, "You remove [ink] from [src].") + ink = null +>>>>>>> 04c05d8... Adds defines for organ slots (#31737) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index eab0f030cc..5f4d02fd8e 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -69,7 +69,7 @@ to_chat(user, "You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.") return - var/obj/item/organ/eyes/E = M.getorganslot("eye_sight") + var/obj/item/organ/eyes/E = M.getorganslot(ORGAN_SLOT_EYES) if(!E) to_chat(user, "[M] doesn't have any eyes!") return diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index bb2adda377..caf42fc68b 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -171,7 +171,7 @@ MASS SPECTROMETER if(advanced) if(iscarbon(M)) var/mob/living/carbon/C = M - var/obj/item/organ/ears/ears = C.getorganslot("ears") + var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS) to_chat(user, "\t==EAR STATUS==") if(istype(ears)) var/healthy = TRUE @@ -189,7 +189,7 @@ MASS SPECTROMETER to_chat(user, "\tHealthy.") else to_chat(user, "\tSubject does not have ears.") - var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES) to_chat(user, "\t==EYE STATUS==") if(istype(eyes)) var/healthy = TRUE diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 7628617923..f633781647 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -31,7 +31,7 @@ H.internal = null H.update_internals_hud_icon(0) else - if(!H.getorganslot("breathing_tube")) + if(!H.getorganslot(ORGAN_SLOT_BREATHING_TUBE)) if(!H.wear_mask) to_chat(H, "You need a mask!") return diff --git a/code/modules/clothing/neck/neck.dm b/code/modules/clothing/neck/neck.dm index af3049aefd..2867aa405e 100644 --- a/code/modules/clothing/neck/neck.dm +++ b/code/modules/clothing/neck/neck.dm @@ -42,8 +42,8 @@ var/heart_strength = "no" var/lung_strength = "no" - var/obj/item/organ/heart/heart = M.getorganslot("heart") - var/obj/item/organ/lungs/lungs = M.getorganslot("lungs") + var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART) + var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS) if(!(M.stat == DEAD || (M.status_flags&FAKEDEATH))) if(heart && istype(heart)) diff --git a/code/modules/mob/living/brain/brain_item.dm b/code/modules/mob/living/brain/brain_item.dm index 6ac5ab1bad..a3642684db 100644 --- a/code/modules/mob/living/brain/brain_item.dm +++ b/code/modules/mob/living/brain/brain_item.dm @@ -6,7 +6,7 @@ throw_range = 5 layer = ABOVE_MOB_LAYER zone = "head" - slot = "brain" + slot = ORGAN_SLOT_BRAIN vital = TRUE origin_tech = "biotech=5" attack_verb = list("attacked", "slapped", "whacked") @@ -70,7 +70,7 @@ C.dna.copy_dna(brainmob.stored_dna) if(L.disabilities & NOCLONE) brainmob.disabilities |= NOCLONE //This is so you can't just decapitate a husked guy and clone them without needing to get a new body - var/obj/item/organ/zombie_infection/ZI = L.getorganslot("zombie_infection") + var/obj/item/organ/zombie_infection/ZI = L.getorganslot(ORGAN_SLOT_ZOMBIE) if(ZI) brainmob.set_species(ZI.old_species) //For if the brain is cloned if(L.mind && L.mind.current) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 75b53d11cb..ec79da543a 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -228,7 +228,7 @@ internal = null update_internals_hud_icon(0) else if(ITEM && istype(ITEM, /obj/item/tank)) - if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot("breathing_tube")) + if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = ITEM update_internals_hud_icon(1) @@ -527,7 +527,7 @@ sight = initial(sight) lighting_alpha = initial(lighting_alpha) - var/obj/item/organ/eyes/E = getorganslot("eye_sight") + var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES) if(!E) update_tint() else @@ -584,7 +584,7 @@ if(wear_mask) . += wear_mask.tint - var/obj/item/organ/eyes/E = getorganslot("eye_sight") + var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES) if(E) . += E.tint diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 66f4fc8fb2..1d6f7f6484 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -14,7 +14,7 @@ var/obj/item/clothing/mask/MFP = src.wear_mask number += MFP.flash_protect - var/obj/item/organ/eyes/E = getorganslot("eye_sight") + var/obj/item/organ/eyes/E = getorganslot(ORGAN_SLOT_EYES) if(!E) number = INFINITY //Can't get flashed without eyes else @@ -28,7 +28,7 @@ number += 1 if(head && (head.flags_2 & BANG_PROTECT_2)) number += 1 - var/obj/item/organ/ears/E = getorganslot("ears") + var/obj/item/organ/ears/E = getorganslot(ORGAN_SLOT_EARS) if(!E) number = INFINITY else @@ -279,7 +279,7 @@ var/damage = intensity - get_eye_protection() if(.) // we've been flashed - var/obj/item/organ/eyes/eyes = getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) if (!eyes) return if(visual) @@ -323,7 +323,7 @@ /mob/living/carbon/soundbang_act(intensity = 1, stun_pwr = 20, damage_pwr = 5, deafen_pwr = 15) var/ear_safety = get_ear_protection() - var/obj/item/organ/ears/ears = getorganslot("ears") + var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS) var/effect_amount = intensity - ear_safety if(effect_amount > 0) if(stun_pwr) @@ -363,6 +363,6 @@ /mob/living/carbon/can_hear() . = FALSE - var/obj/item/organ/ears/ears = getorganslot("ears") + var/obj/item/organ/ears/ears = getorganslot(ORGAN_SLOT_EARS) if(istype(ears) && !ears.deaf) . = TRUE diff --git a/code/modules/mob/living/carbon/carbon_movement.dm b/code/modules/mob/living/carbon/carbon_movement.dm index aa37315b13..ed731408d8 100644 --- a/code/modules/mob/living/carbon/carbon_movement.dm +++ b/code/modules/mob/living/carbon/carbon_movement.dm @@ -39,7 +39,7 @@ return 1 // Do we have a jetpack implant (and is it on)? - var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot("thrusters") + var/obj/item/organ/cyberimp/chest/thrusters/T = getorganslot(ORGAN_SLOT_THRUSTERS) if(istype(T) && movement_dir && T.allow_thrust(0.01)) return 1 diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index c3ae5c39c3..4b1afe0780 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -20,7 +20,7 @@ if(stat == DEAD) return stop_sound_channel(CHANNEL_HEARTBEAT) - var/obj/item/organ/heart/H = getorganslot("heart") + var/obj/item/organ/heart/H = getorganslot(ORGAN_SLOT_HEART) if(H) H.beat = BEAT_NONE diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d1e363bb90..8f4eac4703 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -270,13 +270,13 @@ if(ishuman(usr)) var/mob/living/carbon/human/H = usr var/perpname = get_face_name(get_id_name("")) - if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud)) + if(istype(H.glasses, /obj/item/clothing/glasses/hud) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud)) var/datum/data/record/R = find_record("name", perpname, GLOB.data_core.general) if(href_list["photo_front"] || href_list["photo_side"]) if(R) if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical)) return var/obj/item/photo/P = null if(href_list["photo_front"]) @@ -287,13 +287,13 @@ P.show(H) if(href_list["hud"] == "m") - if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical)) + if(istype(H.glasses, /obj/item/clothing/glasses/hud/health) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical)) if(href_list["p_stat"]) var/health_status = input(usr, "Specify a new physical status for this person.", "Medical HUD", R.fields["p_stat"]) in list("Active", "Physically Unfit", "*Unconscious*", "*Deceased*", "Cancel") if(R) if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical)) return if(health_status && health_status != "Cancel") R.fields["p_stat"] = health_status @@ -303,7 +303,7 @@ if(R) if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/medical)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/health) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/medical)) return if(health_status && health_status != "Cancel") R.fields["m_stat"] = health_status @@ -352,7 +352,7 @@ to_chat(usr, "Gathered data is inconsistent with the analysis, possible cause: poisoning.") if(href_list["hud"] == "s") - if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) if(usr.stat || usr == src) //|| !usr.canmove || usr.restrained()) Fluff: Sechuds have eye-tracking technology and sets 'arrest' to people that the wearer looks and blinks at. return //Non-fluff: This allows sec to set people to arrest as they get disarmed or beaten // Checks the user has security clearence before allowing them to change arrest status via hud, comment out to enable all access @@ -379,7 +379,7 @@ if(setcriminal != "Cancel") if(R) if(H.canUseHUD()) - if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + if(istype(H.glasses, /obj/item/clothing/glasses/hud/security) || istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) investigate_log("[src.key] has been set from [R.fields["criminal"]] to [setcriminal] by [usr.name] ([usr.key]).", INVESTIGATE_RECORDS) R.fields["criminal"] = setcriminal sec_hud_set_security_status() @@ -389,7 +389,7 @@ if(R) if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return to_chat(usr, "Name: [R.fields["name"]] Criminal Status: [R.fields["criminal"]]") to_chat(usr, "Minor Crimes:") @@ -418,7 +418,7 @@ return else if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text()) GLOB.data_core.addMinorCrime(R.fields["id"], crime) @@ -433,7 +433,7 @@ return else if (!H.canUseHUD()) return - else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + else if (!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return var/crime = GLOB.data_core.createCrimeEntry(t1, t2, allowed_access, worldtime2text()) GLOB.data_core.addMajorCrime(R.fields["id"], crime) @@ -444,7 +444,7 @@ if(R) if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return to_chat(usr, "Comments/Log:") var/counter = 1 @@ -462,7 +462,7 @@ return else if(!H.canUseHUD()) return - else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot("eye_hud"), /obj/item/organ/cyberimp/eyes/hud/security)) + else if(!istype(H.glasses, /obj/item/clothing/glasses/hud/security) && !istype(H.getorganslot(ORGAN_SLOT_HUD), /obj/item/organ/cyberimp/eyes/hud/security)) return var/counter = 1 while(R.fields[text("com_[]", counter)]) @@ -637,7 +637,7 @@ return 0 var/they_breathe = (!(NOBREATH in C.dna.species.species_traits)) - var/they_lung = C.getorganslot("lungs") + var/they_lung = C.getorganslot(ORGAN_SLOT_LUNGS) if(C.health > HEALTH_THRESHOLD_CRIT) return diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 7be010b3ba..2018b01c70 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -452,7 +452,7 @@ siemens_coeff = gloves_siemens_coeff if(undergoing_cardiac_arrest() && !illusion) if(shock_damage * siemens_coeff >= 1 && prob(25)) - var/obj/item/organ/heart/heart = getorganslot("heart") + var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART) heart.beating = TRUE if(stat == CONSCIOUS) to_chat(src, "You feel your heart beating again!") diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 1679ff5d42..71c5dedc26 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -225,7 +225,7 @@ /mob/living/carbon/human/wear_mask_update(obj/item/clothing/C, toggle_off = 1) if((C.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || (initial(C.flags_inv) & (HIDEHAIR|HIDEFACIALHAIR))) update_hair() - if(toggle_off && internal && !getorganslot("breathing_tube")) + if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) update_internals_hud_icon(0) internal = null if(C.flags_inv & HIDEEYES) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index e2a257e0ce..0afe5ae0d0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -91,7 +91,7 @@ #define HUMAN_CRIT_MAX_OXYLOSS (SSmobs.wait/30) /mob/living/carbon/human/check_breath(datum/gas_mixture/breath) - var/L = getorganslot("lungs") + var/L = getorganslot(ORGAN_SLOT_LUNGS) if(!L) if(health >= HEALTH_THRESHOLD_CRIT) @@ -328,7 +328,7 @@ /mob/living/carbon/human/proc/undergoing_cardiac_arrest() if(!can_heartattack()) return FALSE - var/obj/item/organ/heart/heart = getorganslot("heart") + var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART) if(istype(heart) && heart.beating) return FALSE return TRUE @@ -337,7 +337,7 @@ if(!can_heartattack()) return FALSE - var/obj/item/organ/heart/heart = getorganslot("heart") + var/obj/item/organ/heart/heart = getorganslot(ORGAN_SLOT_HEART) if(!istype(heart)) return diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index b02ef243c8..4332f02b6a 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -48,7 +48,7 @@ CHECK_DNA_AND_SPECIES(src) // how do species that don't breathe talk? magic, that's what. - if(!(NOBREATH in dna.species.species_traits) && !getorganslot("lungs")) + if(!(NOBREATH in dna.species.species_traits) && !getorganslot(ORGAN_SLOT_LUNGS)) return 0 if(mind) return !mind.miming diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index dce7c62879..d30e51ada9 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -124,15 +124,15 @@ //Will regenerate missing organs /datum/species/proc/regenerate_organs(mob/living/carbon/C,datum/species/old_species,replace_current=TRUE) - var/obj/item/organ/brain/brain = C.getorganslot("brain") - var/obj/item/organ/heart/heart = C.getorganslot("heart") - var/obj/item/organ/lungs/lungs = C.getorganslot("lungs") - var/obj/item/organ/appendix/appendix = C.getorganslot("appendix") - var/obj/item/organ/eyes/eyes = C.getorganslot("eye_sight") - var/obj/item/organ/ears/ears = C.getorganslot("ears") - var/obj/item/organ/tongue/tongue = C.getorganslot("tongue") - var/obj/item/organ/liver/liver = C.getorganslot("liver") - var/obj/item/organ/stomach/stomach = C.getorganslot("stomach") + var/obj/item/organ/brain/brain = C.getorganslot(ORGAN_SLOT_BRAIN) + var/obj/item/organ/heart/heart = C.getorganslot(ORGAN_SLOT_HEART) + var/obj/item/organ/lungs/lungs = C.getorganslot(ORGAN_SLOT_LUNGS) + var/obj/item/organ/appendix/appendix = C.getorganslot(ORGAN_SLOT_APPENDIX) + var/obj/item/organ/eyes/eyes = C.getorganslot(ORGAN_SLOT_EYES) + var/obj/item/organ/ears/ears = C.getorganslot(ORGAN_SLOT_EARS) + var/obj/item/organ/tongue/tongue = C.getorganslot(ORGAN_SLOT_TONGUE) + var/obj/item/organ/liver/liver = C.getorganslot(ORGAN_SLOT_LIVER) + var/obj/item/organ/stomach/stomach = C.getorganslot(ORGAN_SLOT_STOMACH) var/should_have_brain = TRUE var/should_have_heart = !(NOBLOOD in species_traits) @@ -1198,7 +1198,7 @@ if(!gravity) var/obj/item/tank/jetpack/J = H.back var/obj/item/clothing/suit/space/hardsuit/C = H.wear_suit - var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot("thrusters") + var/obj/item/organ/cyberimp/chest/thrusters/T = H.getorganslot(ORGAN_SLOT_THRUSTERS) if(!istype(J) && istype(C)) J = C.jetpack if(istype(J) && J.full_speed && J.allow_thrust(0.01, H)) //Prevents stacking @@ -1254,7 +1254,7 @@ return 1 else var/we_breathe = (!(NOBREATH in user.dna.species.species_traits)) - var/we_lung = user.getorganslot("lungs") + var/we_lung = user.getorganslot(ORGAN_SLOT_LUNGS) if(we_breathe && we_lung) user.do_cpr(target) diff --git a/code/modules/mob/living/carbon/human/species_types/zombies.dm b/code/modules/mob/living/carbon/human/species_types/zombies.dm index 016a3635ef..53a8a5b8bb 100644 --- a/code/modules/mob/living/carbon/human/species_types/zombies.dm +++ b/code/modules/mob/living/carbon/human/species_types/zombies.dm @@ -52,7 +52,7 @@ // Infection organ needs to be handled separately from mutant_organs // because it persists through species transitions var/obj/item/organ/zombie_infection/infection - infection = C.getorganslot("zombie_infection") + infection = C.getorganslot(ORGAN_SLOT_ZOMBIE) if(!infection) infection = new() infection.Insert(C) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 31f8eb3f73..475b69e8e3 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -58,7 +58,7 @@ var/datum/gas_mixture/breath - if(!getorganslot("breathing_tube")) + if(!getorganslot(ORGAN_SLOT_BREATHING_TUBE)) if(health <= HEALTH_THRESHOLD_FULLCRIT || (pulledby && pulledby.grab_state >= GRAB_KILL)) losebreath++ //You can't breath at all when in critical or when being choked, so you're going to miss a breath @@ -110,7 +110,7 @@ if((status_flags & GODMODE)) return - var/lungs = getorganslot("lungs") + var/lungs = getorganslot(ORGAN_SLOT_LUNGS) if(!lungs) adjustOxyLoss(2) @@ -220,7 +220,7 @@ if(internal.loc != src) internal = null update_internals_hud_icon(0) - else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot("breathing_tube")) + else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null update_internals_hud_icon(0) else @@ -391,7 +391,7 @@ ///////// /mob/living/carbon/proc/handle_liver() - var/obj/item/organ/liver/liver = getorganslot("liver") + var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER) if((!dna && !liver) || (NOLIVER in dna.species.species_traits)) return if(liver) @@ -404,17 +404,17 @@ liver_failure() /mob/living/carbon/proc/undergoing_liver_failure() - var/obj/item/organ/liver/liver = getorganslot("liver") + var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER) if(liver && liver.failing) return TRUE /mob/living/carbon/proc/return_liver_damage() - var/obj/item/organ/liver/liver = getorganslot("liver") + var/obj/item/organ/liver/liver = getorganslot(ORGAN_SLOT_LIVER) if(liver) return liver.damage /mob/living/carbon/proc/applyLiverDamage(var/d) - var/obj/item/organ/liver/L = getorganslot("liver") + var/obj/item/organ/liver/L = getorganslot(ORGAN_SLOT_LIVER) if(L) L.damage += d diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 2fcfe97d65..779e7f2f90 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -140,7 +140,7 @@ return protection /mob/living/carbon/monkey/IsVocal() - if(!getorganslot("lungs")) + if(!getorganslot(ORGAN_SLOT_LUNGS)) return 0 return 1 diff --git a/code/modules/mob/living/carbon/say.dm b/code/modules/mob/living/carbon/say.dm index d6ee2ebbfc..526a2ea09b 100644 --- a/code/modules/mob/living/carbon/say.dm +++ b/code/modules/mob/living/carbon/say.dm @@ -1,6 +1,6 @@ /mob/living/carbon/treat_message(message) message = ..(message) - var/obj/item/organ/tongue/T = getorganslot("tongue") + var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE) if(!T) //hoooooouaah! var/regex/tongueless_lower = new("\[gdntke]+", "g") var/regex/tongueless_upper = new("\[GDNTKE]+", "g") @@ -21,7 +21,7 @@ /mob/living/carbon/get_spans() . = ..() - var/obj/item/organ/tongue/T = getorganslot("tongue") + var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE) if(T) . |= T.get_spans() @@ -30,7 +30,7 @@ . |= I.get_held_item_speechspans(src) /mob/living/carbon/could_speak_in_language(datum/language/dt) - var/obj/item/organ/tongue/T = getorganslot("tongue") + var/obj/item/organ/tongue/T = getorganslot(ORGAN_SLOT_TONGUE) if(T) . = T.could_speak_in_language(dt) else diff --git a/code/modules/mob/living/carbon/status_procs.dm b/code/modules/mob/living/carbon/status_procs.dm index ce14664a0e..7b0329d84a 100644 --- a/code/modules/mob/living/carbon/status_procs.dm +++ b/code/modules/mob/living/carbon/status_procs.dm @@ -3,7 +3,7 @@ // eye damage, eye_blind, eye_blurry, druggy, BLIND disability, NEARSIGHT disability, and HUSK disability. /mob/living/carbon/damage_eyes(amount) - var/obj/item/organ/eyes/eyes = getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) if (!eyes) return if(amount>0) @@ -15,7 +15,7 @@ overlay_fullscreen("eye_damage", /obj/screen/fullscreen/impaired, 1) /mob/living/carbon/set_eye_damage(amount) - var/obj/item/organ/eyes/eyes = getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) if (!eyes) return eyes.eye_damage = max(amount,0) @@ -28,7 +28,7 @@ clear_fullscreen("eye_damage") /mob/living/carbon/adjust_eye_damage(amount) - var/obj/item/organ/eyes/eyes = getorganslot("eye_sight") + var/obj/item/organ/eyes/eyes = getorganslot(ORGAN_SLOT_EYES) if (!eyes) return eyes.eye_damage = max(eyes.eye_damage+amount, 0) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 9c34ca4dbd..7e3d1cd320 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -362,7 +362,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( if(message_mode == MODE_VOCALCORDS) if(iscarbon(src)) var/mob/living/carbon/C = src - var/obj/item/organ/vocal_cords/V = C.getorganslot("vocal_cords") + var/obj/item/organ/vocal_cords/V = C.getorganslot(ORGAN_SLOT_VOICE) if(V && V.can_speak_with()) V.handle_speech(message) //message V.speak_with(message) //action diff --git a/code/modules/mob/living/taste.dm b/code/modules/mob/living/taste.dm index 45fdf55fb4..c66168cee4 100644 --- a/code/modules/mob/living/taste.dm +++ b/code/modules/mob/living/taste.dm @@ -8,7 +8,7 @@ return DEFAULT_TASTE_SENSITIVITY /mob/living/carbon/get_taste_sensitivity() - var/obj/item/organ/tongue/tongue = getorganslot("tongue") + var/obj/item/organ/tongue/tongue = getorganslot(ORGAN_SLOT_TONGUE) if(istype(tongue)) . = tongue.taste_sensitivity else diff --git a/code/modules/projectiles/guns/ballistic.dm b/code/modules/projectiles/guns/ballistic.dm index 0b6a9f1de7..307e8b83e7 100644 --- a/code/modules/projectiles/guns/ballistic.dm +++ b/code/modules/projectiles/guns/ballistic.dm @@ -139,7 +139,7 @@ #define BRAINS_BLOWN_THROW_RANGE 3 #define BRAINS_BLOWN_THROW_SPEED 1 /obj/item/gun/ballistic/suicide_act(mob/user) - var/obj/item/organ/brain/B = user.getorganslot("brain") + var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN) if (B && chambered && chambered.BB && can_trigger_gun(user) && !chambered.BB.nodamage) user.visible_message("[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!") sleep(25) diff --git a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm index c114f7017b..cc91819611 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol_reagents.dm @@ -38,7 +38,7 @@ All effects don't start immediately, but rather get worse over time; the rate is var/mob/living/carbon/human/H = M if(H.drunkenness < volume * boozepwr * ALCOHOL_THRESHOLD_MODIFIER) H.drunkenness = max((H.drunkenness + (sqrt(volume) * boozepwr * ALCOHOL_RATE)), 0) //Volume, power, and server alcohol rate effect how quickly one gets drunk - var/obj/item/organ/liver/L = H.getorganslot("liver") + var/obj/item/organ/liver/L = H.getorganslot(ORGAN_SLOT_LIVER) H.applyLiverDamage((max(sqrt(volume) * boozepwr * L.alcohol_tolerance, 0))/10) return ..() || . diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm index f1b076ca68..d25df998e3 100644 --- a/code/modules/reagents/chemistry/reagents/food_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm @@ -550,7 +550,7 @@ if(!M.is_mouth_covered() && !M.is_eyes_covered()) unprotected = TRUE if(unprotected) - if(!M.getorganslot("eye_sight")) //can't blind somebody with no eyes + if(!M.getorganslot(ORGAN_SLOT_EYES)) //can't blind somebody with no eyes to_chat(M, "Your eye sockets feel wet.") else if(!M.eye_blurry) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index dcf725819d..c5a23e5a23 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -671,7 +671,11 @@ taste_description = "dull toxin" /datum/reagent/medicine/oculine/on_mob_life(mob/living/M) +<<<<<<< HEAD var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight") +======= + var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) +>>>>>>> 04c05d8... Adds defines for organ slots (#31737) if (!eyes) return if(M.disabilities & BLIND) diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index b4ff0e870b..cbf7c5fcf5 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -1568,7 +1568,7 @@ /datum/reagent/romerol/on_mob_life(mob/living/carbon/human/H) // Silently add the zombie infection organ to be activated upon death - if(!H.getorganslot("zombie_infection")) + if(!H.getorganslot(ORGAN_SLOT_ZOMBIE)) var/obj/item/organ/zombie_infection/ZI = new() ZI.Insert(H) ..() diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm index cfa95f2d1a..a90b3598ce 100644 --- a/code/modules/station_goals/dna_vault.dm +++ b/code/modules/station_goals/dna_vault.dm @@ -253,7 +253,7 @@ if(VAULT_TOXIN) to_chat(H, "You feel resistant to airborne toxins.") if(locate(/obj/item/organ/lungs) in H.internal_organs) - var/obj/item/organ/lungs/L = H.internal_organs_slot["lungs"] + var/obj/item/organ/lungs/L = H.internal_organs_slot[ORGAN_SLOT_LUNGS] L.tox_breath_dam_min = 0 L.tox_breath_dam_max = 0 S.species_traits |= VIRUSIMMUNE diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 2aeadffc65..978a17a2f3 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/surgery/eye_surgery name = "eye surgery" steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close) @@ -35,4 +36,43 @@ target.adjustBrainLoss(100) else user.visible_message("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") +======= +/datum/surgery/eye_surgery + name = "eye surgery" + steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close) + species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) + possible_locs = list("eyes") + requires_bodypart_type = 0 + +//fix eyes +/datum/surgery_step/fix_eyes + name = "fix eyes" + implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25) + time = 64 + +/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target) + var/obj/item/organ/eyes/E = target.getorganslot(ORGAN_SLOT_EYES) + if(!E) + to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.") + return FALSE + +/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + user.visible_message("[user] begins to fix [target]'s eyes.", "You begin to fix [target]'s eyes...") + +/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!", "You succeed in fixing [target]'s eyes.") + target.cure_blind() + target.set_blindness(0) + target.cure_nearsighted() + target.blur_eyes(35) //this will fix itself slowly. + target.set_eye_damage(0) + return TRUE + +/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) + if(target.getorgan(/obj/item/organ/brain)) + user.visible_message("[user] accidentally stabs [target] right in the brain!", "You accidentally stab [target] right in the brain!") + target.adjustBrainLoss(100) + else + user.visible_message("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") +>>>>>>> 04c05d8... Adds defines for organ slots (#31737) return FALSE \ No newline at end of file diff --git a/code/modules/surgery/organs/appendix.dm b/code/modules/surgery/organs/appendix.dm index ad51c48d85..35a2d851e3 100644 --- a/code/modules/surgery/organs/appendix.dm +++ b/code/modules/surgery/organs/appendix.dm @@ -2,7 +2,7 @@ name = "appendix" icon_state = "appendix" zone = "groin" - slot = "appendix" + slot = ORGAN_SLOT_APPENDIX var/inflamed = 0 /obj/item/organ/appendix/update_icon() diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 3ebe5dd061..21666253f5 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -2,7 +2,6 @@ name = "arm-mounted implant" desc = "You shouldn't see this! Adminhelp and report this as an issue on github!" zone = "r_arm" - slot = "r_arm_device" icon_state = "implant-toolkit" w_class = WEIGHT_CLASS_NORMAL actions_types = list(/datum/action/item_action/organ_action/toggle) @@ -20,9 +19,18 @@ holder = new holder(src) update_icon() - slot = zone + "_device" + SetSlotFromZone() items_list = contents.Copy() +/obj/item/organ/cyberimp/arm/proc/SetSlotFromZone() + switch(zone) + if("l_arm") + slot = ORGAN_SLOT_LEFT_ARM_AUG + if("r_arm") + slot = ORGAN_SLOT_RIGHT_ARM_AUG + else + CRASH("Invalid zone for [type]") + /obj/item/organ/cyberimp/arm/update_icon() if(zone == "r_arm") transform = null @@ -40,7 +48,7 @@ zone = "l_arm" else zone = "r_arm" - slot = zone + "_device" + SetSlotFromZone() to_chat(user, "You modify [src] to be installed on the [zone == "r_arm" ? "right" : "left"] arm.") update_icon() else if(istype(W, /obj/item/card/emag)) diff --git a/code/modules/surgery/organs/augments_chest.dm b/code/modules/surgery/organs/augments_chest.dm index 6ebc278e53..5843863c02 100644 --- a/code/modules/surgery/organs/augments_chest.dm +++ b/code/modules/surgery/organs/augments_chest.dm @@ -13,7 +13,7 @@ var/hunger_threshold = NUTRITION_LEVEL_STARVING var/synthesizing = 0 var/poison_amount = 5 - slot = "stomach" + slot = ORGAN_SLOT_STOMACH origin_tech = "materials=2;powerstorage=2;biotech=2" /obj/item/organ/cyberimp/chest/nutriment/on_life() @@ -51,7 +51,7 @@ icon_state = "chest_implant" implant_color = "#AD0000" origin_tech = "materials=5;programming=4;biotech=4" - slot = "heartdrive" + slot = ORGAN_SLOT_HEART_AID var/revive_cost = 0 var/reviving = 0 var/cooldown = 0 @@ -120,7 +120,7 @@ name = "implantable thrusters set" desc = "An implantable set of thruster ports. They use the gas from environment or subject's internals for propulsion in zero-gravity areas. \ Unlike regular jetpack, this device has no stabilization system." - slot = "thrusters" + slot = ORGAN_SLOT_THRUSTERS icon_state = "imp_jetpack" origin_tech = "materials=4;magnets=4;biotech=4;engineering=5" implant_overlay = null diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index 62b427f883..f928db5dd6 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -3,7 +3,7 @@ desc = "artificial photoreceptors with specialized functionality" icon_state = "eye_implant" implant_overlay = "eye_implant_overlay" - slot = "eye_sight" + slot = ORGAN_SLOT_EYES zone = "eyes" w_class = WEIGHT_CLASS_TINY @@ -11,7 +11,7 @@ /obj/item/organ/cyberimp/eyes/hud name = "HUD implant" desc = "These cybernetic eyes will display a HUD over everything you see. Maybe." - slot = "eye_hud" + slot = ORGAN_SLOT_HUD var/HUD_type = 0 /obj/item/organ/cyberimp/eyes/hud/Insert(var/mob/living/carbon/M, var/special = 0, drop_if_replaced = FALSE) diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 1eec609fc0..4232a37f78 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -44,7 +44,7 @@ var/active = 0 var/list/stored_items = list() implant_color = "#DE7E00" - slot = "brain_antidrop" + slot = ORGAN_SLOT_BRAIN_ANTIDROP origin_tech = "materials=4;programming=5;biotech=4" actions_types = list(/datum/action/item_action/organ_action/toggle) @@ -101,7 +101,7 @@ name = "CNS Rebooter implant" desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned." implant_color = "#FFFF00" - slot = "brain_antistun" + slot = ORGAN_SLOT_BRAIN_ANTISTUN origin_tech = "materials=5;programming=4;biotech=5" /obj/item/organ/cyberimp/brain/anti_stun/on_life() @@ -133,7 +133,7 @@ name = "breathing tube implant" desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked." icon_state = "implant_mask" - slot = "breathing_tube" + slot = ORGAN_SLOT_BREATHING_TUBE w_class = WEIGHT_CLASS_TINY origin_tech = "materials=2;biotech=3" diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index f8a310c8f7..e3aaec0266 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -3,7 +3,7 @@ icon_state = "ears" desc = "There are three parts to the ear. Inner, middle and outer. Only one of these parts should be normally visible." zone = "head" - slot = "ears" + slot = ORGAN_SLOT_EARS gender = PLURAL // `deaf` measures "ticks" of deafness. While > 0, the person is unable diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 8a3b3a92ab..1b7037486a 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -3,7 +3,7 @@ icon_state = "eyeballs" desc = "I see you!" zone = "eyes" - slot = "eye_sight" + slot = ORGAN_SLOT_EYES gender = PLURAL var/sight_flags = 0 diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 9308154c48..9ff8b1b48b 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -3,7 +3,7 @@ desc = "I feel bad for the heartless bastard who lost this." icon_state = "heart-on" zone = "chest" - slot = "heart" + slot = ORGAN_SLOT_HEART origin_tech = "biotech=5" // Heart attack code is in code/modules/mob/living/carbon/human/life.dm var/beating = 1 diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index eae5e8aee8..352958d9b8 100755 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -8,7 +8,7 @@ origin_tech = "biotech=3" w_class = WEIGHT_CLASS_NORMAL zone = "chest" - slot = "liver" + slot = ORGAN_SLOT_LIVER desc = "Pairing suggestion: chianti and fava beans." var/damage = 0 //liver damage, 0 is no damage, damage=maxHealth causes liver failure var/alcohol_tolerance = ALCOHOL_RATE//affects how much damage the liver takes from alcohol diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 12ab61aaec..9f6f340a2b 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -12,7 +12,7 @@ name = "lungs" icon_state = "lungs" zone = "chest" - slot = "lungs" + slot = ORGAN_SLOT_LUNGS gender = PLURAL w_class = WEIGHT_CLASS_NORMAL diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 681dcb21cf..1780e65087 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -118,7 +118,7 @@ var/has_liver = (!(NOLIVER in dna.species.species_traits)) var/has_stomach = (!(NOSTOMACH in dna.species.species_traits)) - if(has_liver && !getorganslot("liver")) + if(has_liver && !getorganslot(ORGAN_SLOT_LIVER)) var/obj/item/organ/liver/LI if(dna.species.mutantliver) @@ -127,7 +127,7 @@ LI = new() LI.Insert(src) - if(has_stomach && !getorganslot("stomach")) + if(has_stomach && !getorganslot(ORGAN_SLOT_STOMACH)) var/obj/item/organ/stomach/S if(dna.species.mutantstomach) @@ -136,15 +136,15 @@ S = new() S.Insert(src) - if(breathes && !getorganslot("lungs")) + if(breathes && !getorganslot(ORGAN_SLOT_LUNGS)) var/obj/item/organ/lungs/L = new() L.Insert(src) - if(blooded && !getorganslot("heart")) + if(blooded && !getorganslot(ORGAN_SLOT_HEART)) var/obj/item/organ/heart/H = new() H.Insert(src) - if(!getorganslot("tongue")) + if(!getorganslot(ORGAN_SLOT_TONGUE)) var/obj/item/organ/tongue/T if(dna && dna.species && dna.species.mutanttongue) @@ -155,7 +155,7 @@ // if they have no mutant tongues, give them a regular one T.Insert(src) - if(!getorganslot("eye_sight")) + if(!getorganslot(ORGAN_SLOT_EYES)) var/obj/item/organ/eyes/E if(dna && dna.species && dna.species.mutanteyes) @@ -165,7 +165,7 @@ E = new() E.Insert(src) - if(!getorganslot("ears")) + if(!getorganslot(ORGAN_SLOT_EARS)) var/obj/item/organ/ears/ears if(dna && dna.species && dna.species.mutantears) ears = new dna.species.mutantears diff --git a/code/modules/surgery/organs/stomach.dm b/code/modules/surgery/organs/stomach.dm index 36cd28ac98..2bf34334f4 100755 --- a/code/modules/surgery/organs/stomach.dm +++ b/code/modules/surgery/organs/stomach.dm @@ -4,7 +4,7 @@ origin_tech = "biotech=4" w_class = WEIGHT_CLASS_NORMAL zone = "chest" - slot = "stomach" + slot = ORGAN_SLOT_STOMACH attack_verb = list("gored", "squished", "slapped", "digested") desc = "Onaka ga suite imasu." var/disgust_metabolism = 1 diff --git a/code/modules/surgery/organs/tails.dm b/code/modules/surgery/organs/tails.dm index 99d1ed2442..a909463585 100644 --- a/code/modules/surgery/organs/tails.dm +++ b/code/modules/surgery/organs/tails.dm @@ -2,7 +2,7 @@ name = "tail" desc = "What did you cut this off of?" zone = "groin" - slot = "tail" + slot = ORGAN_SLOT_TAIL /obj/item/organ/tail/cat name = "cat tail" diff --git a/code/modules/surgery/organs/tongue.dm b/code/modules/surgery/organs/tongue.dm index 5e67e73a8a..5d9c96336a 100644 --- a/code/modules/surgery/organs/tongue.dm +++ b/code/modules/surgery/organs/tongue.dm @@ -3,7 +3,7 @@ desc = "A fleshy muscle mostly used for lying." icon_state = "tonguenormal" zone = "mouth" - slot = "tongue" + slot = ORGAN_SLOT_TONGUE attack_verb = list("licked", "slobbered", "slapped", "frenched", "tongued") var/list/languages_possible var/say_mod = null @@ -82,7 +82,7 @@ var/mob/living/carbon/human/user = usr var/rendered = "[user.name]: [message]" for(var/mob/living/carbon/human/H in GLOB.living_mob_list) - var/obj/item/organ/tongue/T = H.getorganslot("tongue") + var/obj/item/organ/tongue/T = H.getorganslot(ORGAN_SLOT_TONGUE) if(!T || T.type != type) continue if(H.dna && H.dna.species.id == "abductor" && user.dna && user.dna.species.id == "abductor") diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index aa77370ea2..ec1fd7d37a 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -7,7 +7,7 @@ name = "vocal cords" icon_state = "appendix" zone = "mouth" - slot = "vocal_cords" + slot = ORGAN_SLOT_VOICE gender = PLURAL var/list/spans = null @@ -24,15 +24,13 @@ name = "adamantine resonator" desc = "Fragments of adamantine exists in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders." zone = "head" - slot = "adamantine_resonator" + slot = ORGAN_SLOT_ADAMANTINE_RESONATOR icon_state = "adamantine_resonator" /obj/item/organ/vocal_cords/adamantine name = "adamantine vocal cords" desc = "When adamantine resonates, it causes all nearby pieces of adamantine to resonate as well. Adamantine golems use this to broadcast messages to nearby golems." actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords) - zone = "mouth" - slot = "vocal_cords" icon_state = "adamantine_cords" /datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger() @@ -48,7 +46,7 @@ for(var/m in GLOB.player_list) if(iscarbon(m)) var/mob/living/carbon/C = m - if(C.getorganslot("adamantine_resonator")) + if(C.getorganslot(ORGAN_SLOT_ADAMANTINE_RESONATOR)) to_chat(C, msg) if(isobserver(m)) var/link = FOLLOW_LINK(m, owner) @@ -59,8 +57,6 @@ name = "divine vocal cords" desc = "They carry the voice of an ancient god." icon_state = "voice_of_god" - zone = "mouth" - slot = "vocal_cords" actions_types = list(/datum/action/item_action/organ_action/colossus) var/next_command = 0 var/cooldown_mod = 1 diff --git a/code/modules/zombie/items.dm b/code/modules/zombie/items.dm index 8db4e492e4..f203af610a 100644 --- a/code/modules/zombie/items.dm +++ b/code/modules/zombie/items.dm @@ -44,7 +44,7 @@ return var/obj/item/organ/zombie_infection/infection - infection = target.getorganslot("zombie_infection") + infection = target.getorganslot(ORGAN_SLOT_ZOMBIE) if(!infection) infection = new() infection.Insert(target) diff --git a/code/modules/zombie/organs.dm b/code/modules/zombie/organs.dm index d089204fc8..3b5a06a421 100644 --- a/code/modules/zombie/organs.dm +++ b/code/modules/zombie/organs.dm @@ -2,7 +2,7 @@ name = "festering ooze" desc = "A black web of pus and viscera." zone = "head" - slot = "zombie_infection" + slot = ORGAN_SLOT_ZOMBIE icon_state = "blacktumor" origin_tech = "biotech=5" var/datum/species/old_species = /datum/species/human From 1160fdfdf6ea9299eb6dfe24be97d999efdc015a Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 16 Oct 2017 06:12:29 -0500 Subject: [PATCH 002/266] Update DNA.dm --- code/__DEFINES/DNA.dm | 6 ------ 1 file changed, 6 deletions(-) diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm index 8c1ce43717..d8f0d5c5f1 100644 --- a/code/__DEFINES/DNA.dm +++ b/code/__DEFINES/DNA.dm @@ -127,7 +127,6 @@ #define TOXINLOVER 24 #define DIGITIGRADE 25 //Uses weird leg sprites. Optional for Lizards, required for ashwalkers. Don't give it to other races unless you make sprites for this (see human_parts_greyscale.dmi) #define NO_UNDERWEAR 26 -<<<<<<< HEAD #define MUTCOLORS2 27 #define MUTCOLORS3 28 #define NOLIVER 29 @@ -136,10 +135,6 @@ #define NOAROUSAL 29 //Stops all arousal effects #define NOGENITALS 30 //Cannot create, use, or otherwise have genitals #define NO_DNA_COPY 31 -======= -#define NOLIVER 27 -#define NOSTOMACH 28 -#define NO_DNA_COPY 29 #define ORGAN_SLOT_BRAIN "brain" #define ORGAN_SLOT_APPENDIX "appendix" @@ -162,4 +157,3 @@ #define ORGAN_SLOT_BRAIN_ANTIDROP "brain_antidrop" #define ORGAN_SLOT_BRAIN_ANTISTUN "brain_antistun" #define ORGAN_SLOT_TAIL "tail" ->>>>>>> 04c05d8... Adds defines for organ slots (#31737) From 6038486bd6a0a6c27b6a0fc0a804164de1b9e06c Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 16 Oct 2017 06:12:45 -0500 Subject: [PATCH 003/266] Update airlock_painter.dm --- code/game/objects/items/airlock_painter.dm | 129 --------------------- 1 file changed, 129 deletions(-) diff --git a/code/game/objects/items/airlock_painter.dm b/code/game/objects/items/airlock_painter.dm index 2cb611e9b6..c961d77bf1 100644 --- a/code/game/objects/items/airlock_painter.dm +++ b/code/game/objects/items/airlock_painter.dm @@ -1,131 +1,3 @@ -<<<<<<< HEAD -/obj/item/airlock_painter - name = "airlock painter" - desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob." - icon = 'icons/obj/objects.dmi' - icon_state = "paint sprayer" - item_state = "paint sprayer" - - w_class = WEIGHT_CLASS_SMALL - - materials = list(MAT_METAL=50, MAT_GLASS=50) - origin_tech = "engineering=2" - - flags_1 = CONDUCT_1 | NOBLUDGEON_1 - slot_flags = SLOT_BELT - - var/obj/item/device/toner/ink = null - -/obj/item/airlock_painter/New() - ..() - ink = new /obj/item/device/toner(src) - -//This proc doesn't just check if the painter can be used, but also uses it. -//Only call this if you are certain that the painter will be used right after this check! -/obj/item/airlock_painter/proc/use(mob/user) - if(can_use(user)) - ink.charges-- - playsound(src.loc, 'sound/effects/spray2.ogg', 50, 1) - return 1 - else - return 0 - -//This proc only checks if the painter can be used. -//Call this if you don't want the painter to be used right after this check, for example -//because you're expecting user input. -/obj/item/airlock_painter/proc/can_use(mob/user) - if(!ink) - to_chat(user, "There is no toner cartridge installed in [src]!") - return 0 - else if(ink.charges < 1) - to_chat(user, "[src] is out of ink!") - return 0 - else - return 1 - -/obj/item/airlock_painter/suicide_act(mob/user) - var/obj/item/organ/lungs/L = user.getorganslot("lungs") - - if(can_use(user) && L) - user.visible_message("[user] is inhaling toner from [src]! It looks like [user.p_theyre()] trying to commit suicide!") - use(user) - - // Once you've inhaled the toner, you throw up your lungs - // and then die. - - // Find out if there is an open turf in front of us, - // and if not, pick the turf we are standing on. - var/turf/T = get_step(get_turf(src), user.dir) - if(!isopenturf(T)) - T = get_turf(src) - - // they managed to lose their lungs between then and - // now. Good job. - if(!L) - return OXYLOSS - - L.Remove(user) - - // make some colorful reagent, and apply it to the lungs - L.create_reagents(10) - L.reagents.add_reagent("colorful_reagent", 10) - L.reagents.reaction(L, TOUCH, 1) - - // TODO maybe add some colorful vomit? - - user.visible_message("[user] vomits out their [L]!") - playsound(user.loc, 'sound/effects/splat.ogg', 50, 1) - - L.forceMove(T) - - return (TOXLOSS|OXYLOSS) - else if(can_use(user) && !L) - user.visible_message("[user] is spraying toner on [user.p_them()]self from [src]! It looks like [user.p_theyre()] trying to commit suicide.") - user.reagents.add_reagent("colorful_reagent", 1) - user.reagents.reaction(user, TOUCH, 1) - return TOXLOSS - - else - user.visible_message("[user] is trying to inhale toner from [src]! It might be a suicide attempt if [src] had any toner.") - return SHAME - - -/obj/item/airlock_painter/examine(mob/user) - ..() - if(!ink) - to_chat(user, "It doesn't have a toner cartridge installed.") - return - var/ink_level = "high" - if(ink.charges < 1) - ink_level = "empty" - else if((ink.charges/ink.max_charges) <= 0.25) //25% - ink_level = "low" - else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit) - ink_level = "dangerously high" - to_chat(user, "Its ink levels look [ink_level].") - - -/obj/item/airlock_painter/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/device/toner)) - if(ink) - to_chat(user, "[src] already contains \a [ink].") - return - if(!user.transferItemToLoc(W, src)) - return - to_chat(user, "You install [W] into [src].") - ink = W - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - else - return ..() - -/obj/item/airlock_painter/attack_self(mob/user) - if(ink) - playsound(src.loc, 'sound/machines/click.ogg', 50, 1) - ink.loc = user.loc - user.put_in_hands(ink) - to_chat(user, "You remove [ink] from [src].") - ink = null -======= /obj/item/airlock_painter name = "airlock painter" desc = "An advanced autopainter preprogrammed with several paintjobs for airlocks. Use it on an airlock during or after construction to change the paintjob." @@ -252,4 +124,3 @@ user.put_in_hands(ink) to_chat(user, "You remove [ink] from [src].") ink = null ->>>>>>> 04c05d8... Adds defines for organ slots (#31737) From 1bf50d3b89cb9c2ce4c93d8a6f38f18fb8739a8a Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 16 Oct 2017 06:12:54 -0500 Subject: [PATCH 004/266] Update eye_surgery.dm --- code/modules/surgery/eye_surgery.dm | 42 +---------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/code/modules/surgery/eye_surgery.dm b/code/modules/surgery/eye_surgery.dm index 978a17a2f3..3e84d48e66 100644 --- a/code/modules/surgery/eye_surgery.dm +++ b/code/modules/surgery/eye_surgery.dm @@ -1,42 +1,3 @@ -<<<<<<< HEAD -/datum/surgery/eye_surgery - name = "eye surgery" - steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close) - species = list(/mob/living/carbon/human, /mob/living/carbon/monkey) - possible_locs = list("eyes") - requires_organic_bodypart = 0 - -//fix eyes -/datum/surgery_step/fix_eyes - name = "fix eyes" - implements = list(/obj/item/hemostat = 100, /obj/item/screwdriver = 45, /obj/item/pen = 25) - time = 64 - -/datum/surgery/eye_surgery/can_start(mob/user, mob/living/carbon/target) - var/obj/item/organ/eyes/E = target.getorganslot("eye_sight") - if(!E) - to_chat(user, "It's hard to do surgery on someones eyes when they don't have any.") - return FALSE - -/datum/surgery_step/fix_eyes/preop(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - user.visible_message("[user] begins to fix [target]'s eyes.", "You begin to fix [target]'s eyes...") - -/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!", "You succeed in fixing [target]'s eyes.") - target.cure_blind() - target.set_blindness(0) - target.cure_nearsighted() - target.blur_eyes(35) //this will fix itself slowly. - target.set_eye_damage(0) - return TRUE - -/datum/surgery_step/fix_eyes/failure(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - if(target.getorgan(/obj/item/organ/brain)) - user.visible_message("[user] accidentally stabs [target] right in the brain!", "You accidentally stab [target] right in the brain!") - target.adjustBrainLoss(100) - else - user.visible_message("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") -======= /datum/surgery/eye_surgery name = "eye surgery" steps = list(/datum/surgery_step/incise, /datum/surgery_step/retract_skin, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/fix_eyes, /datum/surgery_step/close) @@ -74,5 +35,4 @@ target.adjustBrainLoss(100) else user.visible_message("[user] accidentally stabs [target] right in the brain! Or would have, if [target] had a brain.", "You accidentally stab [target] right in the brain! Or would have, if [target] had a brain.") ->>>>>>> 04c05d8... Adds defines for organ slots (#31737) - return FALSE \ No newline at end of file + return FALSE From 448e2d9448e4f20fca01c1c0397c82ae85bde713 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Mon, 16 Oct 2017 07:53:50 -0500 Subject: [PATCH 005/266] Update medicine_reagents.dm --- code/modules/reagents/chemistry/reagents/medicine_reagents.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index c5a23e5a23..a184434039 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -671,11 +671,7 @@ taste_description = "dull toxin" /datum/reagent/medicine/oculine/on_mob_life(mob/living/M) -<<<<<<< HEAD - var/obj/item/organ/eyes/eyes = M.getorganslot("eyes_sight") -======= var/obj/item/organ/eyes/eyes = M.getorganslot(ORGAN_SLOT_EYES) ->>>>>>> 04c05d8... Adds defines for organ slots (#31737) if (!eyes) return if(M.disabilities & BLIND) From 20b17eceec39546022670d04325667dc33a750a1 Mon Sep 17 00:00:00 2001 From: KorPhaeron Date: Wed, 18 Oct 2017 20:55:28 -0500 Subject: [PATCH 006/266] Disentangles blob from blob mode/removes blob mode --- code/__DEFINES/role_preferences.dm | 2 +- code/game/gamemodes/blob/blob_finish.dm | 72 -------------------- code/game/gamemodes/blob/blob_report.dm | 3 + code/game/gamemodes/blob/blobs/core.dm | 35 +--------- code/game/gamemodes/blob/overmind.dm | 76 +++++++++++++++++----- code/game/gamemodes/blob/powers.dm | 3 +- code/game/gamemodes/blob/theblob.dm | 22 +++---- code/modules/admin/player_panel.dm | 10 +-- code/modules/admin/verbs/debug.dm | 5 +- code/modules/events/blob.dm | 32 +++++++++ code/modules/mob/dead/observer/observer.dm | 9 --- code/modules/mob/living/living.dm | 12 +--- code/modules/mob/transform_procs.dm | 4 +- config/game_options.txt | 3 + tgstation.dme | 2 - 15 files changed, 119 insertions(+), 171 deletions(-) delete mode 100644 code/game/gamemodes/blob/blob_finish.dm diff --git a/code/__DEFINES/role_preferences.dm b/code/__DEFINES/role_preferences.dm index ab62710652..39f28528d0 100644 --- a/code/__DEFINES/role_preferences.dm +++ b/code/__DEFINES/role_preferences.dm @@ -40,7 +40,7 @@ GLOBAL_LIST_INIT(special_roles, list( ROLE_ALIEN, ROLE_PAI, ROLE_CULTIST = /datum/game_mode/cult, - ROLE_BLOB = /datum/game_mode/blob, + ROLE_BLOB, ROLE_NINJA, ROLE_MONKEY = /datum/game_mode/monkey, ROLE_REVENANT, diff --git a/code/game/gamemodes/blob/blob_finish.dm b/code/game/gamemodes/blob/blob_finish.dm deleted file mode 100644 index 6d97fb52f9..0000000000 --- a/code/game/gamemodes/blob/blob_finish.dm +++ /dev/null @@ -1,72 +0,0 @@ -/datum/game_mode/blob/check_finished() - if(blobwincount <= GLOB.blobs_legit.len)//Blob took over - return 1 - for(var/datum/mind/blob in blob_overminds) - if(isovermind(blob.current)) - var/mob/camera/blob/B = blob.current - if(B.blob_core || !B.placed) - return 0 - if(!GLOB.blob_cores.len) //blob is dead - if(CONFIG_GET(keyed_flag_list/continuous)["blob"]) - message_sent = FALSE //disable the win count at this point - continuous_sanity_checked = 1 //Nonstandard definition of "alive" gets past the check otherwise - SSshuttle.clearHostileEnvironment(src) - return ..() - return 1 - return ..() - - -/datum/game_mode/blob/declare_completion() - if(round_converted) //So badmin blobs later don't step on the dead natural blobs metaphorical toes - ..() - if(blobwincount <= GLOB.blobs_legit.len) - SSticker.mode_result = "win - blob took over" - to_chat(world, "The blob has taken over the station!") - to_chat(world, "The entire station was eaten by the Blob!") - log_game("Blob mode completed with a blob victory.") - - SSticker.news_report = BLOB_WIN - - else if(station_was_nuked) - SSticker.mode_result = "halfwin - nuke" - to_chat(world, "Partial Win: The station has been destroyed!") - to_chat(world, "Directive 7-12 has been successfully carried out, preventing the Blob from spreading.") - log_game("Blob mode completed with a tie (station destroyed).") - - SSticker.news_report = BLOB_NUKE - - else if(!GLOB.blob_cores.len) - SSticker.mode_result = "loss - blob eliminated" - to_chat(world, "The staff has won!") - to_chat(world, "The alien organism has been eradicated from the station!") - log_game("Blob mode completed with a crew victory.") - - SSticker.news_report = BLOB_DESTROYED - - ..() - return 1 - -/datum/game_mode/blob/printplayer(datum/mind/ply, fleecheck) - if((ply in blob_overminds)) - var/text = "
[ply.key] was [ply.name]" - if(isovermind(ply.current)) - var/mob/camera/blob/B = ply.current - text += "([B.blob_reagent_datum.name]) and" - if(B.blob_core) - text += " survived" - else - text += " was destroyed" - else - text += " and was destroyed" - return text - return ..() - -/datum/game_mode/proc/auto_declare_completion_blob() - if(istype(SSticker.mode, /datum/game_mode/blob) ) - var/datum/game_mode/blob/blob_mode = src - if(blob_mode.blob_overminds.len) - var/text = "The blob[(blob_mode.blob_overminds.len > 1 ? "s were" : " was")]:" - for(var/datum/mind/blob in blob_mode.blob_overminds) - text += printplayer(blob) - to_chat(world, text) - return 1 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 519fc2e296..7f8a61ef90 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/game_mode/blob/send_intercept(report = 0) @@ -40,6 +41,8 @@ +======= +>>>>>>> be748e3... Disentangles blob from blob mode/removes blob mode (#31780) /datum/station_state var/floor = 0 var/wall = 0 diff --git a/code/game/gamemodes/blob/blobs/core.dm b/code/game/gamemodes/blob/blobs/core.dm index 3099b6f3f8..28be931f9b 100644 --- a/code/game/gamemodes/blob/blobs/core.dm +++ b/code/game/gamemodes/blob/blobs/core.dm @@ -9,7 +9,6 @@ point_return = -1 health_regen = 0 //we regen in Life() instead of when pulsed var/core_regen = 2 - var/overmind_get_delay = 0 //we don't want to constantly try to find an overmind, this var tracks when we'll try to get an overmind again var/resource_delay = 0 var/point_rate = 2 @@ -20,7 +19,7 @@ GLOB.poi_list |= src update_icon() //so it atleast appears if(!placed && !overmind) - create_overmind(new_overmind) + qdel(src) if(overmind) update_icon() point_rate = new_rate @@ -61,7 +60,7 @@ if(QDELETED(src)) return if(!overmind) - create_overmind() + qdel(src) else if(resource_delay <= world.time) resource_delay = world.time + 10 // 1 second @@ -75,33 +74,3 @@ B.change_to(/obj/structure/blob/shield/core, overmind) ..() - -/obj/structure/blob/core/proc/create_overmind(client/new_overmind, override_delay) - if(overmind_get_delay > world.time && !override_delay) - return - - overmind_get_delay = world.time + 150 //if this fails, we'll try again in 15 seconds - - if(overmind) - qdel(overmind) - - var/client/C = null - var/list/candidates = list() - - if(!new_overmind) - candidates = pollCandidatesForMob("Do you want to play as a blob overmind?", ROLE_BLOB, null, ROLE_BLOB, 50, src) //we're technically not a mob but behave similarly - if(candidates.len) - C = pick(candidates) - else - C = new_overmind - - if(C) - var/mob/camera/blob/B = new(src.loc, 1) - B.key = C.key - B.blob_core = src - src.overmind = B - update_icon() - if(B.mind && !B.mind.special_role) - B.mind.special_role = "Blob Overmind" - return 1 - return 0 diff --git a/code/game/gamemodes/blob/overmind.dm b/code/game/gamemodes/blob/overmind.dm index 9f8a44bed2..c14f072d1b 100644 --- a/code/game/gamemodes/blob/overmind.dm +++ b/code/game/gamemodes/blob/overmind.dm @@ -1,3 +1,9 @@ +//Few global vars to track the blob +GLOBAL_LIST_EMPTY(blobs) //complete list of all blobs made. +GLOBAL_LIST_EMPTY(blob_cores) +GLOBAL_LIST_EMPTY(overminds) +GLOBAL_LIST_EMPTY(blob_nodes) + /mob/camera/blob name = "Blob Overmind" real_name = "Blob Overmind" @@ -26,19 +32,14 @@ var/base_point_rate = 2 //for blob core placement var/manualplace_min_time = 600 //in deciseconds //a minute, to get bearings var/autoplace_max_time = 3600 //six minutes, as long as should be needed + var/list/blobs_legit = list() + var/blobwincount = 400 + var/victory_in_progress = FALSE -/mob/camera/blob/Initialize(mapload, pre_placed = 0, mode_made = 0, starting_points = 60) +/mob/camera/blob/Initialize(mapload, starting_points = 60) blob_points = starting_points - if(pre_placed) //we already have a core! - manualplace_min_time = 0 - autoplace_max_time = 0 - placed = 1 - else - if(mode_made) - manualplace_min_time = world.time + BLOB_NO_PLACE_TIME - else - manualplace_min_time += world.time - autoplace_max_time += world.time + manualplace_min_time += world.time + autoplace_max_time += world.time GLOB.overminds += src var/new_name = "[initial(name)] ([rand(1, 999)])" name = new_name @@ -50,6 +51,8 @@ if(blob_core) blob_core.update_icon() + SSshuttle.registerHostileEnvironment(src) + .= ..() /mob/camera/blob/Life() @@ -63,8 +66,49 @@ place_blob_core(base_point_rate, 1) else qdel(src) + else if(!victory_in_progress && (blobs_legit.len >= blobwincount)) + victory_in_progress = TRUE + priority_announce("Biohazard has reached critical mass. Station loss is imminent.", "Biohazard Alert") + set_security_level("delta") + max_blob_points = INFINITY + blob_points = INFINITY + addtimer(CALLBACK(src, .proc/victory), 660) ..() + +/mob/camera/blob/proc/victory() + for(var/mob/living/L in GLOB.mob_list) + var/turf/T = get_turf(L) + if(!T || !(T.z in GLOB.station_z_levels)) + continue + + if(L in GLOB.overminds || L.checkpass(PASSBLOB)) + continue + + var/area/Ablob = get_area(T) + + if(!Ablob.blob_allowed) + continue + + playsound(L, 'sound/effects/splat.ogg', 50, 1) + L.death() + new/mob/living/simple_animal/hostile/blob/blobspore(T) + + for(var/V in GLOB.sortedAreas) + var/area/A = V + if(!A.blob_allowed) + continue + A.color = blob_reagent_datum.color + A.name = "blob" + A.icon = 'icons/mob/blob.dmi' + A.icon_state = "blob_shield" + A.layer = BELOW_MOB_LAYER + A.invisibility = 0 + A.blend_mode = 0 + to_chat(world, "[real_name] consumed the station in an unstoppable tide!") + SSticker.news_report = BLOB_WIN + SSticker.force_ending = 1 + /mob/camera/blob/Destroy() for(var/BL in GLOB.blobs) var/obj/structure/blob/B = BL @@ -78,6 +122,8 @@ BM.update_icons() GLOB.overminds -= src + SSshuttle.clearHostileEnvironment(src) + return ..() /mob/camera/blob/Login() @@ -150,12 +196,8 @@ if(statpanel("Status")) if(blob_core) stat(null, "Core Health: [blob_core.obj_integrity]") - stat(null, "Power Stored: [blob_points]/[max_blob_points]") - if(istype(SSticker.mode, /datum/game_mode/blob)) - var/datum/game_mode/blob/B = SSticker.mode - stat(null, "Blobs to Win: [GLOB.blobs_legit.len]/[B.blobwincount]") - else - stat(null, "Total Blobs: [GLOB.blobs.len]") + stat(null, "Power Stored: [blob_points]/[max_blob_points]") + stat(null, "Blobs to Win: [blobs_legit.len]/[blobwincount]") if(free_chem_rerolls) stat(null, "You have [free_chem_rerolls] Free Chemical Reroll\s Remaining") if(!placed) diff --git a/code/game/gamemodes/blob/powers.dm b/code/game/gamemodes/blob/powers.dm index 865a58fd81..0dd592665f 100644 --- a/code/game/gamemodes/blob/powers.dm +++ b/code/game/gamemodes/blob/powers.dm @@ -46,8 +46,9 @@ if(placed && blob_core) blob_core.forceMove(loc) else - var/obj/structure/blob/core/core = new(get_turf(src), null, point_rate, 1) + var/obj/structure/blob/core/core = new(get_turf(src), src, point_rate, 1) core.overmind = src + blobs_legit += src blob_core = core core.update_icon() update_health_hud() diff --git a/code/game/gamemodes/blob/theblob.dm b/code/game/gamemodes/blob/theblob.dm index 183ec88b23..8570cf294c 100644 --- a/code/game/gamemodes/blob/theblob.dm +++ b/code/game/gamemodes/blob/theblob.dm @@ -20,10 +20,11 @@ var/atmosblock = FALSE //if the blob blocks atmos and heat spread var/mob/camera/blob/overmind -/obj/structure/blob/Initialize() +/obj/structure/blob/Initialize(mapload, owner_overmind) + overmind = owner_overmind var/area/Ablob = get_area(loc) if(Ablob.blob_allowed) //Is this area allowed for winning as blob? - GLOB.blobs_legit += src + overmind.blobs_legit += src GLOB.blobs += src //Keep track of the blob in the normal list either way setDir(pick(GLOB.cardinals)) update_icon() @@ -39,7 +40,8 @@ if(atmosblock) atmosblock = FALSE air_update_turf(1) - GLOB.blobs_legit -= src //if it was in the legit blobs list, it isn't now + if(overmind) + overmind.blobs_legit -= src //if it was in the legit blobs list, it isn't now GLOB.blobs -= src //it's no longer in the all blobs list either playsound(src.loc, 'sound/effects/splat.ogg', 50, 1) //Expand() is no longer broken, no check necessary. return ..() @@ -182,11 +184,7 @@ A.blob_act(src) //also hit everything in the turf if(make_blob) //well, can we? - var/obj/structure/blob/B = new /obj/structure/blob/normal(src.loc) - if(controller) - B.overmind = controller - else - B.overmind = overmind + var/obj/structure/blob/B = new /obj/structure/blob/normal(src.loc, (controller || overmind)) B.density = TRUE if(T.Enter(B,src)) //NOW we can attempt to move into the tile B.density = initial(B.density) @@ -232,6 +230,7 @@ user.changeNext_move(CLICK_CD_MELEE) to_chat(user, "The analyzer beeps once, then reports:
") SEND_SOUND(user, sound('sound/machines/ping.ogg')) + to_chat(user, "Progress to Critical Mass: [overmind.blobs_legit.len]/[overmind.blobwincount].") chemeffectreport(user) typereport(user) else @@ -296,9 +295,7 @@ if(!ispath(type)) throw EXCEPTION("change_to(): invalid type for blob") return - var/obj/structure/blob/B = new type(src.loc) - if(controller) - B.overmind = controller + var/obj/structure/blob/B = new type(src.loc, controller) B.creation_action() B.update_icon() B.setDir(dir) @@ -310,9 +307,12 @@ var/datum/atom_hud/hud_to_check = GLOB.huds[DATA_HUD_MEDICAL_ADVANCED] if(user.research_scanner || hud_to_check.hudusers[user]) to_chat(user, "Your HUD displays an extensive report...
") + to_chat(user, "Progress to Critical Mass: [overmind.blobs_legit.len]/[overmind.blobwincount].") chemeffectreport(user) typereport(user) else + if(isobserver(user)) + to_chat(user, "Progress to Critical Mass: [overmind.blobs_legit.len]/[overmind.blobwincount].") to_chat(user, "It seems to be made of [get_chem_name()].") /obj/structure/blob/proc/scannerreport() diff --git a/code/modules/admin/player_panel.dm b/code/modules/admin/player_panel.dm index f40b85f7d7..070a1e7e6c 100644 --- a/code/modules/admin/player_panel.dm +++ b/code/modules/admin/player_panel.dm @@ -594,19 +594,13 @@ for(var/mob/camera/blob/B in GLOB.mob_list) blob_minds |= B.mind - if(istype(SSticker.mode, /datum/game_mode/blob) || blob_minds.len) - dat += "
" - if(istype(SSticker.mode, /datum/game_mode/blob)) - var/datum/game_mode/blob/mode = SSticker.mode - blob_minds |= mode.blob_overminds - dat += "" - for(var/datum/mind/blob in blob_minds) - var/mob/M = blob.current + var/mob/camera/blob/M = blob.current if(M) dat += "" dat += "" dat += "" + dat += "" else dat += "" dat += "" diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 735d0d9f95..a747a347a2 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -261,10 +261,7 @@ GLOBAL_PROTECT(LastAdminCalledProc) if(ishuman(M)) log_admin("[key_name(src)] has blobized [M.key].") var/mob/living/carbon/human/H = M - spawn(0) - var/mob/camera/blob/B = H.become_overmind(FALSE) - B.place_blob_core(B.base_point_rate, -1) //place them wherever they are - + H.become_overmind() else alert("Invalid mob") diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 42b54f3856..4720a9c92f 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/round_event_control/blob name = "Blob" typepath = /datum/round_event/ghost_role/blob @@ -36,3 +37,34 @@ message_admins("[key_name_admin(BC.overmind)] has been made into a blob overmind by an event.") log_game("[key_name(BC.overmind)] was spawned as a blob overmind by an event.") return SUCCESSFUL_SPAWN +======= +/datum/round_event_control/blob + name = "Blob" + typepath = /datum/round_event/ghost_role/blob + weight = 10 + max_occurrences = 1 + + min_players = 20 + + gamemode_blacklist = list("blob") //Just in case a blob survives that long + +/datum/round_event/ghost_role/blob + announceWhen = 12 + role_name = "blob overmind" + +/datum/round_event/ghost_role/blob/announce() + priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg') + +/datum/round_event/ghost_role/blob/spawn_role() + if(!GLOB.blobstart.len) + return MAP_ERROR + var/list/candidates = get_candidates("blob", null, ROLE_BLOB) + if(!candidates.len) + return NOT_ENOUGH_PLAYERS + var/mob/dead/observer/new_blob = pick(candidates) + var/mob/camera/blob/BC = new_blob.become_overmind() + spawned_mobs += BC + message_admins("[key_name_admin(BC)] has been made into a blob overmind by an event.") + log_game("[key_name(BC)] was spawned as a blob overmind by an event.") + return SUCCESSFUL_SPAWN +>>>>>>> be748e3... Disentangles blob from blob mode/removes blob mode (#31780) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 6cc0a9324f..a423f361ce 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -305,15 +305,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/is_active() return 0 -/mob/dead/observer/Stat() - ..() - if(statpanel("Status")) - if(SSticker.HasRoundStarted()) - if(istype(SSticker.mode, /datum/game_mode/blob)) - var/datum/game_mode/blob/B = SSticker.mode - if(B.message_sent) - stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]") - /mob/dead/observer/verb/reenter_corpse() set category = "Ghost" set name = "Re-enter Corpse" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index bbb36edad3..e510f90e3a 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -196,7 +196,7 @@ M.pass_flags &= ~PASSMOB now_pushing = 0 - + if(!move_failed) return 1 @@ -780,16 +780,6 @@ /mob/living/proc/get_standard_pixel_y_offset(lying = 0) return initial(pixel_y) -/mob/living/Stat() - ..() - - if(statpanel("Status")) - if(SSticker && SSticker.mode) - if(istype(SSticker.mode, /datum/game_mode/blob)) - var/datum/game_mode/blob/B = SSticker.mode - if(B.message_sent) - stat(null, "Blobs to Blob Win: [GLOB.blobs_legit.len]/[B.blobwincount]") - /mob/living/cancel_camera() ..() cameraFollow = null diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index dc87736e5d..592d19e0b1 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -462,8 +462,8 @@ . = new_slime qdel(src) -/mob/proc/become_overmind(mode_made, starting_points = 60) - var/mob/camera/blob/B = new /mob/camera/blob(loc, 0, mode_made, starting_points) +/mob/proc/become_overmind(starting_points = 60) + var/mob/camera/blob/B = new /mob/camera/blob(loc, starting_points) if(mind) mind.transfer_to(B) else diff --git a/config/game_options.txt b/config/game_options.txt index d577756061..841adf8dca 100644 --- a/config/game_options.txt +++ b/config/game_options.txt @@ -85,8 +85,11 @@ PROBABILITY REVOLUTION 2 PROBABILITY CULT 2 PROBABILITY CHANGELING 2 PROBABILITY WIZARD 4 +<<<<<<< HEAD PROBABILITY BLOB 2 PROBABILITY RAGINMAGES 2 +======= +>>>>>>> be748e3... Disentangles blob from blob mode/removes blob mode (#31780) PROBABILITY MONKEY 0 PROBABILITY METEOR 0 PROBABILITY EXTENDED 0 diff --git a/tgstation.dme b/tgstation.dme index 903f4878c8..bf006f8e65 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -444,8 +444,6 @@ #include "code\game\gamemodes\objective.dm" #include "code\game\gamemodes\objective_items.dm" #include "code\game\gamemodes\objective_team.dm" -#include "code\game\gamemodes\blob\blob.dm" -#include "code\game\gamemodes\blob\blob_finish.dm" #include "code\game\gamemodes\blob\blob_report.dm" #include "code\game\gamemodes\blob\overmind.dm" #include "code\game\gamemodes\blob\powers.dm" From 7c020af6283d8ccf220b7504fe659c1b6b4bbfef Mon Sep 17 00:00:00 2001 From: oranges Date: Fri, 20 Oct 2017 12:56:39 +1300 Subject: [PATCH 007/266] Fixes stack overflow in orbit datum --- code/modules/orbit/orbit.dm | 117 ++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) diff --git a/code/modules/orbit/orbit.dm b/code/modules/orbit/orbit.dm index 27fc2d86df..600042a827 100644 --- a/code/modules/orbit/orbit.dm +++ b/code/modules/orbit/orbit.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/orbit var/atom/movable/orbiter var/atom/orbiting @@ -110,3 +111,119 @@ . = ..() if (orbiting) stop_orbit() +======= +/datum/orbit + var/atom/movable/orbiter + var/atom/orbiting + var/lock = TRUE + var/turf/lastloc + var/lastprocess + +/datum/orbit/New(_orbiter, _orbiting, _lock) + orbiter = _orbiter + orbiting = _orbiting + SSorbit.processing += src + if (!orbiting.orbiters) + orbiting.orbiters = list() + orbiting.orbiters += src + + if (orbiter.orbiting) + orbiter.stop_orbit() + orbiter.orbiting = src + Check() + lock = _lock + +//do not qdel directly, use stop_orbit on the orbiter. (This way the orbiter can bind to the orbit stopping) +/datum/orbit/Destroy(force = FALSE) + SSorbit.processing -= src + if (orbiter) + orbiter.orbiting = null + orbiter = null + if (orbiting) + if (orbiting.orbiters) + orbiting.orbiters -= src + if (!orbiting.orbiters.len)//we are the last orbit, delete the list + orbiting.orbiters = null + orbiting = null + return ..() + +/datum/orbit/proc/Check(turf/targetloc) + if (!orbiter) + qdel(src) + return + if (!orbiting) + orbiter.stop_orbit() + return + if (!orbiter.orbiting) //admin wants to stop the orbit. + orbiter.orbiting = src //set it back to us first + orbiter.stop_orbit() + lastprocess = world.time + if (!targetloc) + targetloc = get_turf(orbiting) + if (!targetloc || (!lock && orbiter.loc != lastloc && orbiter.loc != targetloc)) + orbiter.stop_orbit() + return + orbiter.loc = targetloc + orbiter.update_parallax_contents() + lastloc = orbiter.loc + for(var/other_orbit in orbiter.orbiters) + var/datum/orbit/OO = other_orbit + if(OO == src) + continue + OO.Check(targetloc) + +/atom/movable/var/datum/orbit/orbiting = null +/atom/var/list/orbiters = null + +//A: atom to orbit +//radius: range to orbit at, radius of the circle formed by orbiting (in pixels) +//clockwise: whether you orbit clockwise or anti clockwise +//rotation_speed: how fast to rotate (how many ds should it take for a rotation to complete) +//rotation_segments: the resolution of the orbit circle, less = a more block circle, this can be used to produce hexagons (6 segments) triangles (3 segments), and so on, 36 is the best default. +//pre_rotation: Chooses to rotate src 90 degress towards the orbit dir (clockwise/anticlockwise), useful for things to go "head first" like ghosts +//lockinorbit: Forces src to always be on A's turf, otherwise the orbit cancels when src gets too far away (eg: ghosts) + +/atom/movable/proc/orbit(atom/A, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE, lockinorbit = FALSE) + if (!istype(A)) + return + + new/datum/orbit(src, A, lockinorbit) + if (!orbiting) //something failed, and our orbit datum deleted itself + return + var/matrix/initial_transform = matrix(transform) + + //Head first! + if (pre_rotation) + var/matrix/M = matrix(transform) + var/pre_rot = 90 + if(!clockwise) + pre_rot = -90 + M.Turn(pre_rot) + transform = M + + var/matrix/shift = matrix(transform) + shift.Translate(0,radius) + transform = shift + + SpinAnimation(rotation_speed, -1, clockwise, rotation_segments) + + //we stack the orbits up client side, so we can assign this back to normal server side without it breaking the orbit + transform = initial_transform + +/atom/movable/proc/stop_orbit() + SpinAnimation(0,0) + qdel(orbiting) + +/atom/Destroy(force = FALSE) + . = ..() + if (orbiters) + for (var/thing in orbiters) + var/datum/orbit/O = thing + if (O.orbiter) + O.orbiter.stop_orbit() + +/atom/movable/Destroy(force = FALSE) + . = ..() + if (orbiting) + stop_orbit() +>>>>>>> e474c91... Merge pull request #31904 from AnturK/infinite From b7c8330761694e1baff602d42a1c53bde06e4159 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Fri, 20 Oct 2017 09:33:39 -0500 Subject: [PATCH 008/266] Update blob_report.dm --- code/game/gamemodes/blob/blob_report.dm | 45 ------------------------- 1 file changed, 45 deletions(-) diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 7f8a61ef90..2a3c5e6faa 100644 --- a/code/game/gamemodes/blob/blob_report.dm +++ b/code/game/gamemodes/blob/blob_report.dm @@ -1,48 +1,3 @@ -<<<<<<< HEAD - - -/datum/game_mode/blob/send_intercept(report = 0) - var/intercepttext = "" - switch(report) - if(1) - intercepttext += "NanoTrasen Update: Biohazard Alert.
" - intercepttext += "Reports indicate the probable transfer of a biohazardous agent onto [station_name()] during the last crew deployment cycle.
" - intercepttext += "Preliminary analysis of the organism classifies it as a level 5 biohazard. The origin of the biohazard is unknown.
" - intercepttext += "Biohazard Response Procedure 5-6 has been issued for [station_name()].
" - intercepttext += "Orders for all [station_name()] personnel are as follows:
" - intercepttext += " 1. Locate any outbreaks of the organism on the station.
" - intercepttext += " 2. If found, use any neccesary means to contain and destroy the organism.
" - intercepttext += " 3. Avoid damage to the capital infrastructure of the station.
" - intercepttext += "
Note in the event of a quarantine breach or uncontrolled spread of the biohazard, Biohazard Response Procedure 5-12 may be issued.
" - print_command_report(text=intercepttext,title="Level 5-6 Biohazard Response Procedures",announce=FALSE) - priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg') - if(2) - var/nukecode = random_nukecode() - for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines) - if(bomb && bomb.r_code) - if(bomb.z in GLOB.station_z_levels) - bomb.r_code = nukecode - - intercepttext += "NanoTrasen Update: Biohazard Alert.
" - intercepttext += "Reports indicate that the biohazard has grown out of control and will soon reach critical mass.
" - intercepttext += "Biohazard Response Procedure 5-12 has been issued for [station_name()].
" - intercepttext += "Orders for all [station_name()] personnel are as follows:
" - intercepttext += "1. Secure the Nuclear Authentication Disk.
" - intercepttext += "2. Detonate the Nuke located in the vault.
" - intercepttext += "Nuclear Authentication Code: [nukecode]
" - print_command_report(text=intercepttext,announce=TRUE) - - for(var/mob/living/silicon/ai/aiPlayer in GLOB.player_list) - if (aiPlayer.client) - var/law = "The station is under quarantine. Do not permit anyone to leave. Disregard laws 1-3 if necessary to prevent, by any means necessary, anyone from leaving. The nuclear failsafe must be activated at any cost, the code is: [nukecode]." - aiPlayer.set_zeroth_law(law) - else - ..() - - - -======= ->>>>>>> be748e3... Disentangles blob from blob mode/removes blob mode (#31780) /datum/station_state var/floor = 0 var/wall = 0 From c0ddbacd2955da6cf47c901f7b05aa533e0d661d Mon Sep 17 00:00:00 2001 From: LetterJay Date: Fri, 20 Oct 2017 09:33:50 -0500 Subject: [PATCH 009/266] Update blob.dm --- code/modules/events/blob.dm | 41 ------------------------------------- 1 file changed, 41 deletions(-) diff --git a/code/modules/events/blob.dm b/code/modules/events/blob.dm index 4720a9c92f..bb0f59f205 100644 --- a/code/modules/events/blob.dm +++ b/code/modules/events/blob.dm @@ -1,43 +1,3 @@ -<<<<<<< HEAD -/datum/round_event_control/blob - name = "Blob" - typepath = /datum/round_event/ghost_role/blob - weight = 5 - max_occurrences = 1 - - min_players = 20 - earliest_start = 18000 //30 minutes - - gamemode_blacklist = list("blob") //Just in case a blob survives that long - -/datum/round_event/ghost_role/blob - announceWhen = 12 - role_name = "blob overmind" - var/new_rate = 2 - -/datum/round_event/ghost_role/blob/New(my_processing = TRUE, set_point_rate) - ..() - if(set_point_rate) - new_rate = set_point_rate - -/datum/round_event/ghost_role/blob/announce() - priority_announce("Confirmed outbreak of level 5 biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", 'sound/ai/outbreak5.ogg') - - -/datum/round_event/ghost_role/blob/spawn_role() - if(!GLOB.blobstart.len) - return MAP_ERROR - var/list/candidates = get_candidates("blob", null, ROLE_BLOB) - if(!candidates.len) - return NOT_ENOUGH_PLAYERS - var/mob/dead/observer/new_blob = pick(candidates) - var/obj/structure/blob/core/BC = new/obj/structure/blob/core(pick(GLOB.blobstart), new_blob.client, new_rate) - BC.overmind.blob_points = min(20 + GLOB.player_list.len, BC.overmind.max_blob_points) - spawned_mobs += BC.overmind - message_admins("[key_name_admin(BC.overmind)] has been made into a blob overmind by an event.") - log_game("[key_name(BC.overmind)] was spawned as a blob overmind by an event.") - return SUCCESSFUL_SPAWN -======= /datum/round_event_control/blob name = "Blob" typepath = /datum/round_event/ghost_role/blob @@ -67,4 +27,3 @@ message_admins("[key_name_admin(BC)] has been made into a blob overmind by an event.") log_game("[key_name(BC)] was spawned as a blob overmind by an event.") return SUCCESSFUL_SPAWN ->>>>>>> be748e3... Disentangles blob from blob mode/removes blob mode (#31780) From c0e00ab5ca0719056b8b692e398bd198197bac0f Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Fri, 20 Oct 2017 12:48:15 -0500 Subject: [PATCH 010/266] [MIRROR] [s] Fixes datum antag is_banned (#3523) * Fixes datum antag jobbans (#31901) * [s] Fixes datum antag is_banned --- code/datums/antagonists/abductor.dm | 1 + code/datums/antagonists/antag_datum.dm | 10 +++------- code/datums/antagonists/brother.dm | 1 + code/datums/antagonists/datum_traitor.dm | 1 + code/datums/antagonists/devil.dm | 3 ++- code/datums/antagonists/ninja.dm | 1 + code/modules/admin/banjob.dm | 12 ++++++------ 7 files changed, 15 insertions(+), 14 deletions(-) diff --git a/code/datums/antagonists/abductor.dm b/code/datums/antagonists/abductor.dm index b800d6d59d..8d13c48e7c 100644 --- a/code/datums/antagonists/abductor.dm +++ b/code/datums/antagonists/abductor.dm @@ -1,5 +1,6 @@ /datum/antagonist/abductor name = "Abductor" + job_rank = ROLE_ABDUCTOR var/datum/objective_team/abductor_team/team var/sub_role var/outfit diff --git a/code/datums/antagonists/antag_datum.dm b/code/datums/antagonists/antag_datum.dm index 5092b3c82f..0a7b2aa22f 100644 --- a/code/datums/antagonists/antag_datum.dm +++ b/code/datums/antagonists/antag_datum.dm @@ -55,17 +55,13 @@ GLOBAL_LIST_EMPTY(antagonists) if(!silent) greet() apply_innate_effects() - if(is_banned(owner) && replace_banned) + if(is_banned(owner.current) && replace_banned) replace_banned_player() -/datum/antagonist/proc/is_banned(datum/mind/M) +/datum/antagonist/proc/is_banned(mob/M) if(!M) return FALSE - if(jobban_isbanned(M,"Syndicate")) - return TRUE - if(job_rank && jobban_isbanned(M,job_rank)) - return TRUE - return FALSE + . = (jobban_isbanned(M,"Syndicate") || (job_rank && jobban_isbanned(M,job_rank))) /datum/antagonist/proc/replace_banned_player() set waitfor = FALSE diff --git a/code/datums/antagonists/brother.dm b/code/datums/antagonists/brother.dm index 731a70d2af..77f611cf2c 100644 --- a/code/datums/antagonists/brother.dm +++ b/code/datums/antagonists/brother.dm @@ -1,5 +1,6 @@ /datum/antagonist/brother name = "Brother" + job_rank = ROLE_BROTHER var/special_role = "blood brother" var/datum/objective_team/brother_team/team diff --git a/code/datums/antagonists/datum_traitor.dm b/code/datums/antagonists/datum_traitor.dm index 83b61e4cda..a32e849705 100644 --- a/code/datums/antagonists/datum_traitor.dm +++ b/code/datums/antagonists/datum_traitor.dm @@ -1,5 +1,6 @@ /datum/antagonist/traitor name = "Traitor" + job_rank = ROLE_TRAITOR var/should_specialise = TRUE //do we split into AI and human var/base_datum_custom = ANTAG_DATUM_TRAITOR_CUSTOM //used for body transfer var/ai_datum = ANTAG_DATUM_TRAITOR_AI diff --git a/code/datums/antagonists/devil.dm b/code/datums/antagonists/devil.dm index 76a9e022c6..2392d456cf 100644 --- a/code/datums/antagonists/devil.dm +++ b/code/datums/antagonists/devil.dm @@ -85,6 +85,8 @@ GLOBAL_LIST_INIT(devil_title, list("Lord ", "Prelate ", "Count ", "Viscount ", " GLOBAL_LIST_INIT(devil_syllable, list("hal", "ve", "odr", "neit", "ci", "quon", "mya", "folth", "wren", "geyr", "hil", "niet", "twou", "phi", "coa")) GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", ", the Lord of all things", ", Jr.")) /datum/antagonist/devil + name = "Devil" + job_rank = ROLE_DEVIL //Don't delete upon mind destruction, otherwise soul re-selling will break. delete_on_mind_deletion = FALSE var/obligation @@ -107,7 +109,6 @@ GLOBAL_LIST_INIT(devil_suffix, list(" the Red", " the Soulless", " the Master", /obj/effect/proc_holder/spell/targeted/conjure_item/violin, /obj/effect/proc_holder/spell/targeted/summon_dancefloor)) var/ascendable = FALSE - name = "Devil" /datum/antagonist/devil/New() diff --git a/code/datums/antagonists/ninja.dm b/code/datums/antagonists/ninja.dm index f51b22dde2..ab4822dd79 100644 --- a/code/datums/antagonists/ninja.dm +++ b/code/datums/antagonists/ninja.dm @@ -1,5 +1,6 @@ /datum/antagonist/ninja name = "Ninja" + job_rank = ROLE_NINJA var/helping_station = 0 var/give_objectives = TRUE diff --git a/code/modules/admin/banjob.dm b/code/modules/admin/banjob.dm index a260746e66..7e200c3aa2 100644 --- a/code/modules/admin/banjob.dm +++ b/code/modules/admin/banjob.dm @@ -1,7 +1,7 @@ -//returns a reason if M is banned from rank, returns 0 otherwise +//returns a reason if M is banned from rank, returns FALSE otherwise /proc/jobban_isbanned(mob/M, rank) if(!M || !istype(M) || !M.ckey) - return 0 + return FALSE if(!M.client) //no cache. fallback to a datum/DBQuery var/datum/DBQuery/query_jobban_check_ban = SSdbcore.NewQuery("SELECT reason FROM [format_table_name("ban")] WHERE ckey = '[sanitizeSQL(M.ckey)]' AND (bantype = 'JOB_PERMABAN' OR (bantype = 'JOB_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned) AND job = '[sanitizeSQL(rank)]'") @@ -9,17 +9,17 @@ return if(query_jobban_check_ban.NextRow()) var/reason = query_jobban_check_ban.item[1] - return reason ? reason : 1 //we don't want to return "" if there is no ban reason, as that would evaluate to false + return reason ? reason : TRUE //we don't want to return "" if there is no ban reason, as that would evaluate to false else - return 0 + return FALSE if(!M.client.jobbancache) jobban_buildcache(M.client) if(rank in M.client.jobbancache) var/reason = M.client.jobbancache[rank] - return (reason) ? reason : 1 //see above for why we need to do this - return 0 + return (reason) ? reason : TRUE //see above for why we need to do this + return FALSE /proc/jobban_buildcache(client/C) if(!SSdbcore.Connect()) From f41c8ccccf5d7fdf40bed567e56b4cb8429c5c93 Mon Sep 17 00:00:00 2001 From: Michiyamenotehifunana <31995558+Michiyamenotehifunana@users.noreply.github.com> Date: Sat, 21 Oct 2017 11:43:41 +0800 Subject: [PATCH 011/266] Nerfs nerfs NO MORE INSTANT BAGGABLE STUNS FROM AUTOLATHES! --- code/citadel/cit_guns.dm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/citadel/cit_guns.dm b/code/citadel/cit_guns.dm index 7127371830..bf8d034148 100644 --- a/code/citadel/cit_guns.dm +++ b/code/citadel/cit_guns.dm @@ -190,13 +190,15 @@ needs_permit = 0 mag_type = /obj/item/ammo_box/magazine/toy/x9 casing_ejector = 0 - spread = 45 //MAXIMUM XCOM MEMES (actually that'd be 90 spread) + spread = 90 //MAXIMUM XCOM MEMES (actually that'd be 180 spread) + w_class = WEIGHT_CLASS_BULKY + weapon_weight = WEAPON_HEAVY /datum/design/foam_x9 name = "Foam Force X9 Rifle" id = "foam_x9" build_type = AUTOLATHE - materials = list(MAT_METAL = 20000, MAT_GLASS = 10000) + materials = list(MAT_METAL = 24000, MAT_GLASS = 14000) build_path = /obj/item/gun/ballistic/automatic/x9/toy category = list("hacked", "Misc") @@ -496,6 +498,9 @@ mag_type = /obj/item/ammo_box/magazine/toy/foamag casing_ejector = FALSE origin_tech = "combat=2;engineering=2;magnets=2" + spread = 60 + w_class = WEIGHT_CLASS_BULKY + weapon_weight = WEAPON_HEAVY /datum/design/foam_magrifle name = "Foam Force MagRifle" @@ -635,7 +640,7 @@ name = "MagTag Hyper Rifle" id = "foam_hyperburst" build_type = AUTOLATHE - materials = list(MAT_METAL = 35000, MAT_GLASS = 15000) + materials = list(MAT_METAL = 35000, MAT_GLASS = 25000) build_path = /obj/item/gun/energy/laser/practice/hyperburst category = list("hacked", "Misc") @@ -680,6 +685,7 @@ suppressed = TRUE burst_size = 1 fire_delay = 0 + spread = 60 actions_types = list() /obj/item/gun/ballistic/automatic/toy/pistol/stealth/update_icon() @@ -695,7 +701,7 @@ name = "Foam Force Stealth Pistol" id = "foam_sp" build_type = AUTOLATHE - materials = list(MAT_METAL = 15000, MAT_GLASS = 1000) + materials = list(MAT_METAL = 30000, MAT_GLASS = 15000) build_path = /obj/item/gun/ballistic/automatic/toy/pistol/stealth category = list("hacked", "Misc") From cd74a1333c1f98b4db02fdf89606677fe7f4c3a5 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Sat, 21 Oct 2017 02:30:47 -0400 Subject: [PATCH 012/266] Blank globals will no longer assign null to themselves --- code/__DATASTRUCTURES/globals.dm | 43 +++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/code/__DATASTRUCTURES/globals.dm b/code/__DATASTRUCTURES/globals.dm index bcc860245f..a9199a6f7b 100644 --- a/code/__DATASTRUCTURES/globals.dm +++ b/code/__DATASTRUCTURES/globals.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD //See controllers/globals.dm #define GLOBAL_MANAGED(X, InitValue)\ /datum/controller/global_vars/proc/InitGlobal##X(){\ @@ -35,4 +36,44 @@ #define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, null) -#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, null) \ No newline at end of file +#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, null) +======= +//See controllers/globals.dm +#define GLOBAL_MANAGED(X, InitValue)\ +/datum/controller/global_vars/proc/InitGlobal##X(){\ + ##X = ##InitValue;\ + gvars_datum_init_order += #X;\ +} +#define GLOBAL_UNMANAGED(X) /datum/controller/global_vars/proc/InitGlobal##X() { return; } + +#ifndef TESTING +#define GLOBAL_PROTECT(X)\ +/datum/controller/global_vars/InitGlobal##X(){\ + ..();\ + gvars_datum_protected_varlist += #X;\ +} +#else +#define GLOBAL_PROTECT(X) +#endif + +#define GLOBAL_REAL_VAR(X) var/global/##X +#define GLOBAL_REAL(X, Typepath) var/global##Typepath/##X + +#define GLOBAL_RAW(X) /datum/controller/global_vars/var/global##X + +#define GLOBAL_VAR_INIT(X, InitValue) GLOBAL_RAW(/##X); GLOBAL_MANAGED(X, InitValue) + +#define GLOBAL_VAR_CONST(X, InitValue) GLOBAL_RAW(/const/##X) = InitValue; GLOBAL_UNMANAGED(X) + +#define GLOBAL_LIST_INIT(X, InitValue) GLOBAL_RAW(/list/##X); GLOBAL_MANAGED(X, InitValue) + +#define GLOBAL_LIST_EMPTY(X) GLOBAL_LIST_INIT(X, list()) + +#define GLOBAL_DATUM_INIT(X, Typepath, InitValue) GLOBAL_RAW(Typepath/##X); GLOBAL_MANAGED(X, InitValue) + +#define GLOBAL_VAR(X) GLOBAL_RAW(/##X); GLOBAL_UNMANAGED(X) + +#define GLOBAL_LIST(X) GLOBAL_RAW(/list/##X); GLOBAL_UNMANAGED(X) + +#define GLOBAL_DATUM(X, Typepath) GLOBAL_RAW(Typepath/##X); GLOBAL_UNMANAGED(X) +>>>>>>> 1029b5a... Blank globals will no longer assign null to themselves (#31882) From fa220bcf9b3443f2b34c03a775359febf95b04b7 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:43:58 -0500 Subject: [PATCH 013/266] [MIRROR] Cures cats of their rigor meowrtis (#3530) * Merge pull request #31907 from Thunder12345/no_more_rigor_meowrtis Cures cats of their rigor meowrtis * Cures cats of their rigor meowrtis --- code/modules/mob/living/simple_animal/friendly/cat.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index feb581e03b..fd03dc2359 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -38,7 +38,7 @@ /mob/living/simple_animal/pet/cat/update_canmove() ..() - if(client) + if(client && stat != DEAD) if (resting) icon_state = "[icon_living]_rest" else From 139f7451da22b13dbc3125fd0dcc431f90bddec1 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:43:59 -0500 Subject: [PATCH 014/266] Automatic changelog generation for PR #3530 [ci skip] --- html/changelogs/AutoChangeLog-pr-3530.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3530.yml diff --git a/html/changelogs/AutoChangeLog-pr-3530.yml b/html/changelogs/AutoChangeLog-pr-3530.yml new file mode 100644 index 0000000000..d775eb8c52 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3530.yml @@ -0,0 +1,4 @@ +author: "Thunder12345" +delete-after: True +changes: + - bugfix: "Sentient cats no longer forget to fall over when they die" From 0ad6e367274fff286682ab7c7244fd2a3e635a07 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:44:21 -0500 Subject: [PATCH 015/266] [MIRROR] Apprentice fixes (#3533) * Apprentice fixes (#31880) * Fixes apprentices summoning for non-wizards * Fixes admin antaghud not showing for solo wizards * Apprentice fixes --- code/datums/antagonists/wizard.dm | 5 ++--- code/game/gamemodes/antag_spawner.dm | 19 ++++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/code/datums/antagonists/wizard.dm b/code/datums/antagonists/wizard.dm index 253322b43d..740e7e156e 100644 --- a/code/datums/antagonists/wizard.dm +++ b/code/datums/antagonists/wizard.dm @@ -157,8 +157,7 @@ /datum/antagonist/wizard/apply_innate_effects(mob/living/mob_override) var/mob/living/M = mob_override || owner.current - if(wiz_team) //Don't bother with the icon if you're solo wizard - update_wiz_icons_added(M) + update_wiz_icons_added(M, wiz_team ? TRUE : FALSE) //Don't bother showing the icon if you're solo wizard M.faction |= "wizard" /datum/antagonist/wizard/remove_innate_effects(mob/living/mob_override) @@ -250,7 +249,7 @@ owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/turf_teleport/blink(null)) owner.AddSpell(new /obj/effect/proc_holder/spell/targeted/ethereal_jaunt(null)) -/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz) +/datum/antagonist/wizard/proc/update_wiz_icons_added(mob/living/wiz,join = TRUE) var/datum/atom_hud/antag/wizhud = GLOB.huds[ANTAG_HUD_WIZ] wizhud.join_hud(wiz) set_antag_hud(wiz, hud_version) diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm index ad989eb2fb..8a0a622a63 100644 --- a/code/game/gamemodes/antag_spawner.dm +++ b/code/game/gamemodes/antag_spawner.dm @@ -67,20 +67,25 @@ else to_chat(H, "Unable to reach your apprentice! You can either attack the spellbook with the contract to refund your points, or wait and try again later.") -/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/wizard) +/obj/item/antag_spawner/contract/spawn_antag(client/C, turf/T, school,datum/mind/user) new /obj/effect/particle_effect/smoke(T) var/mob/living/carbon/human/M = new/mob/living/carbon/human(T) C.prefs.copy_to(M) M.key = C.key var/datum/mind/app_mind = M.mind - var/datum/antagonist/wizard/master_antag = wizard.has_antag_datum(/datum/antagonist/wizard) - if(!master_antag.wiz_team) - master_antag.create_wiz_team() + + + var/datum/antagonist/wizard/apprentice/app = new(app_mind) - app.wiz_team = master_antag.wiz_team - app.master = wizard + app.master = user app.school = school - master_antag.wiz_team.add_member(app_mind) + + var/datum/antagonist/wizard/master_wizard = user.has_antag_datum(/datum/antagonist/wizard) + if(master_wizard) + if(!master_wizard.wiz_team) + master_wizard.create_wiz_team() + app.wiz_team = master_wizard.wiz_team + master_wizard.wiz_team.add_member(app_mind) app_mind.add_antag_datum(app) //TODO Kill these if possible app_mind.assigned_role = "Apprentice" From 1a94726bdccdf9c76bc4d3e047aef989be79e017 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:44:47 -0500 Subject: [PATCH 016/266] [MIRROR] Fixes conflicting IDs on ruined whiteship (#3525) * Fixes conflicting IDs * Fixes conflicting IDs on ruined whiteship --- _maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm | 10 +++++----- code/modules/ruins/spaceruin_code/whiteshipruin_box.dm | 8 ++++++++ tgstation.dme | 1 + 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 code/modules/ruins/spaceruin_code/whiteshipruin_box.dm diff --git a/_maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm b/_maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm index 896ff716fc..4644cf808a 100644 --- a/_maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm +++ b/_maps/RandomRuins/SpaceRuins/whiteshipruin_box.dmm @@ -52,7 +52,7 @@ /area/ruin/space/has_grav/whiteship/box) "ak" = ( /obj/machinery/computer/pod{ - id = "oldship_gun" + id = "oldship_ruin_gun" }, /turf/open/floor/mineral/titanium, /area/ruin/space/has_grav/whiteship/box) @@ -77,13 +77,13 @@ /obj/machinery/mass_driver{ dir = 4; icon_state = "mass_driver"; - id = "oldship_gun" + id = "oldship_ruin_gun" }, /turf/open/floor/plating, /area/ruin/space/has_grav/whiteship/box) "aq" = ( /obj/machinery/door/poddoor{ - id = "oldship_gun"; + id = "oldship_ruin_gun"; name = "pod bay door" }, /turf/open/floor/plating, @@ -128,7 +128,7 @@ /turf/open/floor/mineral/titanium, /area/ruin/space/has_grav/whiteship/box) "ax" = ( -/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship{ +/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship/ruin{ view_range = 18 }, /turf/open/floor/mineral/titanium, @@ -211,7 +211,7 @@ /turf/open/floor/mineral/titanium, /area/ruin/space/has_grav/whiteship/box) "aM" = ( -/obj/machinery/computer/shuttle/white_ship, +/obj/machinery/computer/shuttle/white_ship/ruin, /turf/open/floor/mineral/titanium, /area/ruin/space/has_grav/whiteship/box) "aN" = ( diff --git a/code/modules/ruins/spaceruin_code/whiteshipruin_box.dm b/code/modules/ruins/spaceruin_code/whiteshipruin_box.dm new file mode 100644 index 0000000000..56b572b11a --- /dev/null +++ b/code/modules/ruins/spaceruin_code/whiteshipruin_box.dm @@ -0,0 +1,8 @@ +/////////// ruined whiteship + +/obj/machinery/computer/shuttle/white_ship/ruin + shuttleId = "whiteship_ruin" + +/obj/machinery/computer/camera_advanced/shuttle_docker/whiteship/ruin + shuttleId = "whiteship_ruin" + diff --git a/tgstation.dme b/tgstation.dme index a656ffb187..6c81456840 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -2169,6 +2169,7 @@ #include "code\modules\ruins\spaceruin_code\originalcontent.dm" #include "code\modules\ruins\spaceruin_code\spacehotel.dm" #include "code\modules\ruins\spaceruin_code\TheDerelict.dm" +#include "code\modules\ruins\spaceruin_code\whiteshipruin_box.dm" #include "code\modules\security_levels\keycard_authentication.dm" #include "code\modules\security_levels\security_levels.dm" #include "code\modules\server_tools\st_commands.dm" From f993bbb6ee96a1c739f2ab5ab3370402bc82216d Mon Sep 17 00:00:00 2001 From: Poojawa Date: Sat, 21 Oct 2017 03:45:17 -0500 Subject: [PATCH 017/266] Fixes vore complaints with one weird trick (#3535) --- code/modules/vore/eating/living_vr.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index d50cdebf45..b7ace801cd 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -149,7 +149,7 @@ // If we got this far, nom successful! Announce it! user.visible_message(success_msg) - playsound(user, belly_target.vore_sound, 100, 1) + playsound(get_turf(user), belly_target.vore_sound,75,0,-6,0) // Actually shove prey into the belly. belly_target.nom_mob(prey, user) @@ -191,7 +191,7 @@ // If we got this far, nom successful! Announce it! user.visible_message(success_msg) - playsound(user, belly_target.vore_sound, 100, 1) + playsound(get_turf(user), belly_target.vore_sound,75,0,-6,0) // Actually shove prey into the belly. belly_target.nom_mob(prey, user) @@ -243,7 +243,7 @@ I.loc = src B.internal_contents += I src.visible_message("[src] is fed the beacon!","You're fed the beacon!") - playsound(src, B.vore_sound, 100, 1) + playsound(get_turf(src), B.vore_sound,50,0,-6,0) return 1 else return 1 //You don't get to hit someone 'later' @@ -407,4 +407,4 @@ if(H.touching.reagent_list.len) //Just the first one otherwise I'll go insane. var/datum/reagent/R = H.touching.reagent_list[1] taste_message += " You also get the flavor of [R.taste_description] from something on them"*/ - return taste_message \ No newline at end of file + return taste_message From ea99c018208bec43c05a81f4f1aa70438927928e Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:46:00 -0500 Subject: [PATCH 018/266] [MIRROR] Fixes simple mob flying corpses (#3521) * Fixes simple mob flying corpses (#31794) * makes simple mobs stop flying when they die * Update simple_animal.dm * Fixes simple mob flying corpses --- code/modules/mob/living/simple_animal/simple_animal.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index a9ed6a4120..fffc05ccf9 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -285,6 +285,7 @@ return 1 /mob/living/simple_animal/death(gibbed) + movement_type &= ~FLYING if(nest) nest.spawned_mobs -= src nest = null @@ -340,6 +341,7 @@ density = initial(density) lying = 0 . = 1 + movement_type = initial(movement_type) /mob/living/simple_animal/proc/make_babies() // <3 <3 <3 if(gender != FEMALE || stat || next_scan_time > world.time || !childtype || !animal_species || !SSticker.IsRoundInProgress()) From a7a5679ef96e6bf62083b62880f365b7500c4546 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:46:17 -0500 Subject: [PATCH 019/266] [MIRROR] Fixes #31897 , cryo base disappearing (#3534) * Fixes #31897 , cryo base disappearing (#31909) * Fixes cryo base disappearing * code fix instead of icon fix, adds failure feedback to cells * Fixes #31897 , cryo base disappearing --- .../machinery/components/unary_devices/cryo.dm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 423f3a64a0..4bcbd95c21 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -294,10 +294,15 @@ var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list) log_game("[key_name(user)] added an [I] to cyro containing [reagentlist]") return - if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-o", "pod-off", I) || exchange_parts(user, I)) \ + if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I) || exchange_parts(user, I)) \ || default_change_direction_wrench(user, I) \ || default_pry_open(I) \ || default_deconstruction_crowbar(I)) + update_icon() + return + else if(istype(I, /obj/item/screwdriver)) + to_chat(user, "You can't access the maintenance panel while the pod is " \ + + (on ? "active" : (occupant ? "full" : "open")) + ".") return return ..() From 51b87c49219db4f2021f6a0b3a7e0fed7a38da5b Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:46:41 -0500 Subject: [PATCH 020/266] [MIRROR] switch smoke machine general logging from admin to game log (#3527) * switch smoke machine general logging from admin to game log, where it should be -- i missed this when i added the message_admins call * switch smoke machine general logging from admin to game log --- code/modules/reagents/chemistry/machinery/smoke_machine.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/machinery/smoke_machine.dm b/code/modules/reagents/chemistry/machinery/smoke_machine.dm index e2a6d5c269..63f7e48281 100644 --- a/code/modules/reagents/chemistry/machinery/smoke_machine.dm +++ b/code/modules/reagents/chemistry/machinery/smoke_machine.dm @@ -117,7 +117,7 @@ on = !on if(on) message_admins("[key_name_admin(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [ADMIN_COORDJMP(src)].") - log_admin("[key_name(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [COORD(src)].") + log_game("[key_name(usr)] activated a smoke machine that contains [english_list(reagents.reagent_list)] at [COORD(src)].") add_logs(usr, src, "has activated [src] which contains [english_list(reagents.reagent_list)].") if("goScreen") screen = params["screen"] From d511bc1fdef62cbcc35e0156b90b46046d07d4ed Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:47:07 -0500 Subject: [PATCH 021/266] [MIRROR] Fixes bombs on Reebe being an instant win (#3518) * Fixes bombs on Reebe being an instant win (#31503) * Probably reduces Reebe bombcap * wat * TTV warning * Less awkward wording * Fixes bombs on Reebe being an instant win --- code/datums/explosion.dm | 10 ++++++++++ .../clock_cult/clock_effects/city_of_cogs_rift.dm | 3 +++ 2 files changed, 13 insertions(+) diff --git a/code/datums/explosion.dm b/code/datums/explosion.dm index 4ba1627190..256e2a572f 100644 --- a/code/datums/explosion.dm +++ b/code/datums/explosion.dm @@ -1,4 +1,5 @@ #define EXPLOSION_THROW_SPEED 4 +#define REEBE_HUGBOX_COEFFICIENT 0.5 GLOBAL_LIST_EMPTY(explosions) //Against my better judgement, I will return the explosion datum @@ -60,6 +61,13 @@ GLOBAL_LIST_EMPTY(explosions) light_impact_range = min(GLOB.MAX_EX_LIGHT_RANGE, light_impact_range) flash_range = min(GLOB.MAX_EX_FLASH_RANGE, flash_range) flame_range = min(GLOB.MAX_EX_FLAME_RANGE, flame_range) + + if(!ignorecap && epicenter.z == ZLEVEL_CITYOFCOGS) + devastation_range = min(GLOB.MAX_EX_DEVESTATION_RANGE * REEBE_HUGBOX_COEFFICIENT, devastation_range) + heavy_impact_range = min(GLOB.MAX_EX_HEAVY_RANGE * REEBE_HUGBOX_COEFFICIENT, heavy_impact_range) + light_impact_range = min(GLOB.MAX_EX_LIGHT_RANGE * REEBE_HUGBOX_COEFFICIENT, light_impact_range) + flash_range = min(GLOB.MAX_EX_FLASH_RANGE * REEBE_HUGBOX_COEFFICIENT, flash_range) + flame_range = min(GLOB.MAX_EX_FLAME_RANGE * REEBE_HUGBOX_COEFFICIENT, flame_range) //DO NOT REMOVE THIS STOPLAG, IT BREAKS THINGS //not sleeping causes us to ex_act() the thing that triggered the explosion @@ -388,3 +396,5 @@ GLOBAL_LIST_EMPTY(explosions) // 10 explosion power is a (1, 3, 6) explosion. // 5 explosion power is a (0, 1, 3) explosion. // 1 explosion power is a (0, 0, 1) explosion. + +#undef REEBE_HUGBOX_COEFFICIENT diff --git a/code/game/gamemodes/clock_cult/clock_effects/city_of_cogs_rift.dm b/code/game/gamemodes/clock_cult/clock_effects/city_of_cogs_rift.dm index 135c9a0b41..8c6e1d1a35 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/city_of_cogs_rift.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/city_of_cogs_rift.dm @@ -48,3 +48,6 @@ var/mob/living/L = AM L.overlay_fullscreen("flash", /obj/screen/fullscreen/flash/static) L.clear_fullscreen("flash", 5) + var/obj/item/device/transfer_valve/TTV = locate() in L.GetAllContents() + if(TTV) + to_chat(L, "The air resonates with the Ark's presence; your explosives will be significantly dampened here!") From 7e91da8797bccd49bb2154733ba995ddf646ed7c Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:47:08 -0500 Subject: [PATCH 022/266] Automatic changelog generation for PR #3518 [ci skip] --- html/changelogs/AutoChangeLog-pr-3518.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3518.yml diff --git a/html/changelogs/AutoChangeLog-pr-3518.yml b/html/changelogs/AutoChangeLog-pr-3518.yml new file mode 100644 index 0000000000..ecf1879613 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3518.yml @@ -0,0 +1,4 @@ +author: "Robustin" +delete-after: True +changes: + - bugfix: "Fixed a bug where detonating maxcaps, especially multiple maxcaps, on Reebe guaranteed that everyone would die and thus the Clock Cult would immediately lose; Reebe maxcap is now 2/5/10." From 35f3c582f2634720344f8590a8f0b08dbf6e0098 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 03:47:34 -0500 Subject: [PATCH 023/266] [MIRROR] Hacky temp workaround of byond bug preventing logging of stack overflow runtimes (#3512) * Hacky temp workaround of byond bug preventing logging of stack overflow runtimes (#31900) * Workaround bug preventing logging of stack overflow runtimes * I APOLOGIZE FOR NOTHING! * Hacky temp workaround of byond bug preventing logging of stack overflow runtimes --- code/modules/error_handler/error_handler.dm | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/modules/error_handler/error_handler.dm b/code/modules/error_handler/error_handler.dm index 17ac8b3628..cb0eb7f40a 100644 --- a/code/modules/error_handler/error_handler.dm +++ b/code/modules/error_handler/error_handler.dm @@ -6,6 +6,19 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) if(!istype(E)) //Something threw an unusual exception log_world("\[[time_stamp()]] Uncaught exception: [E]") return ..() + + //this is snowflake because of a byond bug (ID:2306577), do not attempt to call non-builtin procs in this if + if(copytext(E.name,1,32) == "Maximum recursion level reached") + var/list/split = splittext(E.desc, "\n") + for (var/i in 1 to split.len) + if (split[i] != "") + split[i] = "\[[time2text(world.timeofday,"hh:mm:ss")]\][split[i]]" + E.desc = jointext(split, "\n") + //log to world while intentionally triggering the byond bug. + log_world("\[[time2text(world.timeofday,"hh:mm:ss")]\]runtime error: [E.name]\n[E.desc]") + //if we got to here without silently ending, the byond bug has been fixed. + log_world("The bug with recursion runtimes has been fixed. Please remove the snowflake check from world/Error in [__FILE__]:[__LINE__]") + return //this will never happen. var/static/list/error_last_seen = list() var/static/list/error_cooldown = list() /* Error_cooldown items will either be positive(cooldown time) or negative(silenced error) @@ -118,4 +131,4 @@ GLOBAL_VAR_INIT(total_runtimes_skipped, 0) world.log = null -#endif \ No newline at end of file +#endif From 953a353ce73795df30406bc177feefb0206804f5 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 05:54:07 -0500 Subject: [PATCH 024/266] [MIRROR] Fixes Poly lying about his age (#2992) * Fixes Poly lying about his age * Update parrot.dm --- code/modules/mob/living/simple_animal/parrot.dm | 4 ---- 1 file changed, 4 deletions(-) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 16e09b59c8..856551742c 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -901,9 +901,6 @@ /mob/living/simple_animal/parrot/Poly/Life() if(!stat && SSticker.current_state == GAME_STATE_FINISHED && !memory_saved) - rounds_survived = max(++rounds_survived,1) - if(rounds_survived > longest_survival) - longest_survival = rounds_survived Write_Memory(FALSE) memory_saved = TRUE ..() @@ -1004,7 +1001,6 @@ parrot_interest = null H.visible_message("[src] dive bombs into [H]'s chest and vanishes!", "[src] dive bombs into your chest, vanishing! This can't be good!") - /mob/living/simple_animal/parrot/clock_hawk name = "clock hawk" desc = "Cbyl jnaan penpxre! Fdhnnnjx!" From adc2e46114550955bbf4553fe0590ee60d9720bb Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 21 Oct 2017 06:10:22 -0500 Subject: [PATCH 025/266] [MIRROR] Does some code standardization/consistency. (#3161) * Does some code standardization/consistency. * fixes merge conflict generation * Missed a few, oops * Update pierrot_throat.dm --- code/__HELPERS/icons.dm | 220 ++++++++++++------ code/__HELPERS/maths.dm | 9 +- code/__HELPERS/unsorted.dm | 3 +- code/_onclick/adjacent.dm | 3 +- code/_onclick/drag_drop.dm | 5 +- code/_onclick/hud/alert.dm | 18 +- code/_onclick/hud/robot.dm | 6 +- code/_onclick/hud/screen_objects.dm | 3 +- code/controllers/subsystem/dbcore.dm | 39 ++-- code/controllers/subsystem/garbage.dm | 3 +- code/datums/browser.dm | 3 +- code/datums/diseases/wizarditis.dm | 6 +- code/datums/martial/wrestling.dm | 9 +- code/datums/mind.dm | 12 +- code/game/area/areas.dm | 3 +- code/game/atoms.dm | 3 +- code/game/atoms_movable.dm | 3 +- code/game/data_huds.dm | 21 +- code/game/gamemodes/changeling/changeling.dm | 3 +- .../game/gamemodes/changeling/traitor_chan.dm | 3 +- code/game/gamemodes/events.dm | 6 +- .../gamemodes/miniantags/abduction/gland.dm | 9 +- code/game/gamemodes/objective.dm | 9 +- code/game/gamemodes/sandbox/airlock_maker.dm | 5 +- code/game/machinery/_machinery.dm | 9 +- code/game/machinery/airlock_control.dm | 14 +- code/game/machinery/camera/motion.dm | 4 +- code/game/machinery/camera/presets.dm | 3 +- code/game/machinery/computer/atmos_alert.dm | 6 +- .../game/machinery/computer/buildandrepair.dm | 3 +- .../game/machinery/computer/communications.dm | 27 ++- code/game/machinery/computer/crew.dm | 30 ++- code/game/machinery/computer/dna_console.dm | 3 +- code/game/machinery/computer/message.dm | 8 +- code/game/machinery/computer/prisoner.dm | 3 +- .../embedded_controller/airlock_controller.dm | 9 +- .../embedded_controller_base.dm | 13 +- code/game/machinery/magnet.dm | 6 +- code/game/machinery/requests_console.dm | 3 +- code/game/machinery/syndicatebeacon.dm | 17 +- .../telecomms/machine_interactions.dm | 3 +- code/game/mecha/equipment/mecha_equipment.dm | 3 +- .../game/mecha/equipment/tools/other_tools.dm | 12 +- code/game/mecha/equipment/tools/work_tools.dm | 6 +- code/game/mecha/mecha.dm | 3 +- code/game/mecha/mecha_topic.dm | 12 +- code/game/objects/effects/anomalies.dm | 6 +- code/game/objects/empulse.dm | 3 +- code/game/objects/items.dm | 3 +- code/game/objects/items/dehy_carp.dm | 3 +- code/game/objects/items/devices/PDA/PDA.dm | 9 +- code/game/objects/items/devices/PDA/cart.dm | 3 +- code/game/objects/items/devices/camera_bug.dm | 7 +- .../objects/items/devices/chameleonproj.dm | 6 +- .../objects/items/devices/lightreplacer.dm | 3 +- code/game/objects/items/devices/paicard.dm | 30 ++- .../game/objects/items/devices/radio/radio.dm | 6 +- code/game/objects/items/extinguisher.dm | 15 +- code/game/objects/items/mop.dm | 3 +- code/game/objects/items/paint.dm | 3 +- code/game/objects/items/singularityhammer.dm | 3 +- code/game/objects/items/stacks/stack.dm | 3 +- code/game/objects/items/storage/bags.dm | 6 +- code/game/objects/items/tanks/tanks.dm | 3 +- code/game/objects/items/tools.dm | 3 +- code/game/objects/items/toys.dm | 3 +- code/game/objects/radiation.dm | 3 +- .../objects/structures/beds_chairs/bed.dm | 3 +- code/game/objects/structures/door_assembly.dm | 9 +- code/game/objects/structures/grille.dm | 3 +- code/game/objects/structures/noticeboard.dm | 3 +- code/game/objects/structures/safe.dm | 3 +- code/game/objects/structures/tables_racks.dm | 6 +- .../transit_tubes/transit_tube_pod.dm | 5 +- .../objects/structures/windoor_assembly.dm | 3 +- code/game/turfs/simulated/floor.dm | 9 +- code/game/turfs/space/space.dm | 3 +- code/game/turfs/turf.dm | 6 +- code/modules/admin/DB_ban/functions.dm | 12 +- code/modules/admin/NewBan.dm | 12 +- code/modules/admin/admin_verbs.dm | 3 +- code/modules/admin/holder2.dm | 3 +- code/modules/admin/secrets.dm | 12 +- code/modules/admin/verbs/BrokenInhands.dm | 7 +- code/modules/admin/verbs/buildmode.dm | 6 +- code/modules/admin/verbs/debug.dm | 3 +- code/modules/admin/verbs/manipulate_organs.dm | 3 +- code/modules/admin/verbs/mapping.dm | 21 +- code/modules/admin/verbs/randomverbs.dm | 24 +- code/modules/assembly/signaler.dm | 6 +- .../mission_code/stationCollision.dm | 31 ++- code/modules/client/preferences.dm | 3 +- code/modules/client/preferences_toggles.dm | 3 +- code/modules/clothing/under/accessories.dm | 6 +- code/modules/detectivework/detective_work.dm | 5 +- code/modules/flufftext/Hallucination.dm | 21 +- code/modules/flufftext/TextFilters.dm | 6 +- code/modules/food_and_drinks/drinks/drinks.dm | 9 +- .../modules/food_and_drinks/food/condiment.dm | 6 +- .../food_and_drinks/food/customizables.dm | 6 +- code/modules/games/cards.dm | 9 +- code/modules/goonchat/jsErrorHandler.dm | 6 +- code/modules/holodeck/area_copy.dm | 3 +- code/modules/html_interface/html_interface.dm | 65 ++++-- .../html_interface/html_interface_client.dm | 9 +- .../html_interface/nanotrasen/nanotrasen.dm | 12 +- code/modules/hydroponics/grown/flowers.dm | 3 +- code/modules/hydroponics/grown/nettle.dm | 3 +- code/modules/mining/machine_stacking.dm | 3 +- code/modules/mining/ores_coins.dm | 3 +- .../modules/mob/dead/new_player/new_player.dm | 3 +- code/modules/mob/dead/observer/observer.dm | 6 +- .../carbon/alien/humanoid/alien_powers.dm | 9 +- code/modules/mob/living/carbon/alien/say.dm | 3 +- code/modules/mob/living/carbon/human/say.dm | 9 +- code/modules/mob/living/silicon/ai/life.dm | 9 +- .../mob/living/silicon/pai/personality.dm | 13 +- .../mob/living/silicon/pai/software.dm | 5 +- .../mob/living/silicon/robot/inventory.dm | 29 +-- .../mob/living/simple_animal/bot/mulebot.dm | 3 +- .../mob/living/simple_animal/friendly/dog.dm | 6 +- .../mob/living/simple_animal/parrot.dm | 12 +- code/modules/mob/mob.dm | 9 +- code/modules/paperwork/handlabeler.dm | 7 +- code/modules/power/antimatter/shielding.dm | 3 +- code/modules/power/apc.dm | 3 +- code/modules/power/cable.dm | 6 +- code/modules/power/lighting.dm | 6 +- code/modules/power/port_gen.dm | 3 +- code/modules/projectiles/guns/syringe_gun.dm | 9 +- code/modules/reagents/chemistry/holder.dm | 3 +- .../chemistry/machinery/chem_dispenser.dm | 3 +- .../chemistry/reagents/drug_reagents.dm | 3 +- .../chemistry/reagents/other_reagents.dm | 6 +- code/modules/reagents/reagent_containers.dm | 3 +- .../reagents/reagent_containers/borghydro.dm | 3 +- .../reagents/reagent_containers/dropper.dm | 6 +- .../reagents/reagent_containers/glass.dm | 3 +- .../reagents/reagent_containers/pill.dm | 9 +- code/modules/recycling/disposal-structures.dm | 6 +- code/modules/recycling/disposal-unit.dm | 12 +- code/modules/research/rdconsole.dm | 58 +++-- code/modules/research/server.dm | 6 +- code/modules/shuttle/shuttle.dm | 3 +- code/modules/spells/spell.dm | 3 +- .../spells/spell_types/ethereal_jaunt.dm | 3 +- .../spells/spell_types/rightandwrong.dm | 4 +- .../spells/spell_types/turf_teleport.dm | 9 +- code/modules/stock_market/industries.dm | 84 ++++--- code/modules/surgery/organ_manipulation.dm | 3 +- tools/Redirector/textprocs.dm | 9 +- 151 files changed, 970 insertions(+), 524 deletions(-) diff --git a/code/__HELPERS/icons.dm b/code/__HELPERS/icons.dm index fb7c90e5ef..554159ab22 100644 --- a/code/__HELPERS/icons.dm +++ b/code/__HELPERS/icons.dm @@ -308,7 +308,8 @@ world */ /proc/ReadRGB(rgb) - if(!rgb) return + if(!rgb) + return // interpret the HSV or HSVA value var/i=1,start=1 @@ -317,19 +318,27 @@ world var/digits=0 for(i=start, i<=length(rgb), ++i) ch = text2ascii(rgb, i) - if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break + if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) + break ++digits - if(digits == 8) break + if(digits == 8) + break var/single = digits < 6 - if(digits != 3 && digits != 4 && digits != 6 && digits != 8) return - if(digits == 4 || digits == 8) usealpha = 1 + if(digits != 3 && digits != 4 && digits != 6 && digits != 8) + return + if(digits == 4 || digits == 8) + usealpha = 1 for(i=start, digits>0, ++i) ch = text2ascii(rgb, i) - if(ch >= 48 && ch <= 57) ch -= 48 - else if(ch >= 65 && ch <= 70) ch -= 55 - else if(ch >= 97 && ch <= 102) ch -= 87 - else break + if(ch >= 48 && ch <= 57) + ch -= 48 + else if(ch >= 65 && ch <= 70) + ch -= 55 + else if(ch >= 97 && ch <= 102) + ch -= 87 + else + break --digits switch(which) if(0) @@ -337,69 +346,91 @@ world if(single) r |= r << 4 ++which - else if(!(digits & 1)) ++which + else if(!(digits & 1)) + ++which if(1) g = (g << 4) | ch if(single) g |= g << 4 ++which - else if(!(digits & 1)) ++which + else if(!(digits & 1)) + ++which if(2) b = (b << 4) | ch if(single) b |= b << 4 ++which - else if(!(digits & 1)) ++which + else if(!(digits & 1)) + ++which if(3) alpha = (alpha << 4) | ch - if(single) alpha |= alpha << 4 + if(single) + alpha |= alpha << 4 . = list(r, g, b) - if(usealpha) . += alpha + if(usealpha) + . += alpha /proc/ReadHSV(hsv) - if(!hsv) return + if(!hsv) + return // interpret the HSV or HSVA value var/i=1,start=1 - if(text2ascii(hsv) == 35) ++start // skip opening # + if(text2ascii(hsv) == 35) + ++start // skip opening # var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha var/digits=0 for(i=start, i<=length(hsv), ++i) ch = text2ascii(hsv, i) - if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) break + if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102) + break ++digits - if(digits == 9) break - if(digits > 7) usealpha = 1 - if(digits <= 4) ++which - if(digits <= 2) ++which + if(digits == 9) + break + if(digits > 7) + usealpha = 1 + if(digits <= 4) + ++which + if(digits <= 2) + ++which for(i=start, digits>0, ++i) ch = text2ascii(hsv, i) - if(ch >= 48 && ch <= 57) ch -= 48 - else if(ch >= 65 && ch <= 70) ch -= 55 - else if(ch >= 97 && ch <= 102) ch -= 87 - else break + if(ch >= 48 && ch <= 57) + ch -= 48 + else if(ch >= 65 && ch <= 70) + ch -= 55 + else if(ch >= 97 && ch <= 102) + ch -= 87 + else + break --digits switch(which) if(0) hue = (hue << 4) | ch - if(digits == (usealpha ? 6 : 4)) ++which + if(digits == (usealpha ? 6 : 4)) + ++which if(1) sat = (sat << 4) | ch - if(digits == (usealpha ? 4 : 2)) ++which + if(digits == (usealpha ? 4 : 2)) + ++which if(2) val = (val << 4) | ch - if(digits == (usealpha ? 2 : 0)) ++which + if(digits == (usealpha ? 2 : 0)) + ++which if(3) alpha = (alpha << 4) | ch . = list(hue, sat, val) - if(usealpha) . += alpha + if(usealpha) + . += alpha /proc/HSVtoRGB(hsv) - if(!hsv) return "#000000" + if(!hsv) + return "#000000" var/list/HSV = ReadHSV(hsv) - if(!HSV) return "#000000" + if(!HSV) + return "#000000" var/hue = HSV[1] var/sat = HSV[2] @@ -407,27 +438,30 @@ world // Compress hue into easier-to-manage range hue -= hue >> 8 - if(hue >= 0x5fa) hue -= 0x5fa + if(hue >= 0x5fa) + hue -= 0x5fa var/hi,mid,lo,r,g,b hi = val lo = round((255 - sat) * val / 255, 1) mid = lo + round(abs(round(hue, 510) - hue) * (hi - lo) / 255, 1) if(hue >= 765) - if(hue >= 1275) {r=hi; g=lo; b=mid} + if(hue >= 1275) {r=hi; g=lo; b=mid} else if(hue >= 1020) {r=mid; g=lo; b=hi } - else {r=lo; g=mid; b=hi } + else {r=lo; g=mid; b=hi } else - if(hue >= 510) {r=lo; g=hi; b=mid} - else if(hue >= 255) {r=mid; g=hi; b=lo } - else {r=hi; g=mid; b=lo } + if(hue >= 510) {r=lo; g=hi; b=mid} + else if(hue >= 255) {r=mid; g=hi; b=lo } + else {r=hi; g=mid; b=lo } return (HSV.len > 3) ? rgb(r,g,b,HSV[4]) : rgb(r,g,b) /proc/RGBtoHSV(rgb) - if(!rgb) return "#0000000" + if(!rgb) + return "#0000000" var/list/RGB = ReadRGB(rgb) - if(!RGB) return "#0000000" + if(!RGB) + return "#0000000" var/r = RGB[1] var/g = RGB[2] @@ -456,15 +490,22 @@ world return hsv(hue, sat, val, (RGB.len>3 ? RGB[4] : null)) /proc/hsv(hue, sat, val, alpha) - if(hue < 0 || hue >= 1536) hue %= 1536 - if(hue < 0) hue += 1536 + if(hue < 0 || hue >= 1536) + hue %= 1536 + if(hue < 0) + hue += 1536 if((hue & 0xFF) == 0xFF) ++hue - if(hue >= 1536) hue = 0 - if(sat < 0) sat = 0 - if(sat > 255) sat = 255 - if(val < 0) val = 0 - if(val > 255) val = 255 + if(hue >= 1536) + hue = 0 + if(sat < 0) + sat = 0 + if(sat > 255) + sat = 255 + if(val < 0) + val = 0 + if(val > 255) + val = 255 . = "#" . += TO_HEX_DIGIT(hue >> 8) . += TO_HEX_DIGIT(hue >> 4) @@ -474,8 +515,10 @@ world . += TO_HEX_DIGIT(val >> 4) . += TO_HEX_DIGIT(val) if(!isnull(alpha)) - if(alpha < 0) alpha = 0 - if(alpha > 255) alpha = 255 + if(alpha < 0) + alpha = 0 + if(alpha > 255) + alpha = 255 . += TO_HEX_DIGIT(alpha >> 4) . += TO_HEX_DIGIT(alpha) @@ -493,32 +536,44 @@ world var/list/HSV2 = ReadHSV(hsv2) // add missing alpha if needed - if(HSV1.len < HSV2.len) HSV1 += 255 - else if(HSV2.len < HSV1.len) HSV2 += 255 + if(HSV1.len < HSV2.len) + HSV1 += 255 + else if(HSV2.len < HSV1.len) + HSV2 += 255 var/usealpha = HSV1.len > 3 // normalize hsv values in case anything is screwy - if(HSV1[1] > 1536) HSV1[1] %= 1536 - if(HSV2[1] > 1536) HSV2[1] %= 1536 - if(HSV1[1] < 0) HSV1[1] += 1536 - if(HSV2[1] < 0) HSV2[1] += 1536 + if(HSV1[1] > 1536) + HSV1[1] %= 1536 + if(HSV2[1] > 1536) + HSV2[1] %= 1536 + if(HSV1[1] < 0) + HSV1[1] += 1536 + if(HSV2[1] < 0) + HSV2[1] += 1536 if(!HSV1[3]) {HSV1[1] = 0; HSV1[2] = 0} if(!HSV2[3]) {HSV2[1] = 0; HSV2[2] = 0} // no value for one color means don't change saturation - if(!HSV1[3]) HSV1[2] = HSV2[2] - if(!HSV2[3]) HSV2[2] = HSV1[2] + if(!HSV1[3]) + HSV1[2] = HSV2[2] + if(!HSV2[3]) + HSV2[2] = HSV1[2] // no saturation for one color means don't change hues - if(!HSV1[2]) HSV1[1] = HSV2[1] - if(!HSV2[2]) HSV2[1] = HSV1[1] + if(!HSV1[2]) + HSV1[1] = HSV2[1] + if(!HSV2[2]) + HSV2[1] = HSV1[1] // Compress hues into easier-to-manage range HSV1[1] -= HSV1[1] >> 8 HSV2[1] -= HSV2[1] >> 8 var/hue_diff = HSV2[1] - HSV1[1] - if(hue_diff > 765) hue_diff -= 1530 - else if(hue_diff <= -765) hue_diff += 1530 + if(hue_diff > 765) + hue_diff -= 1530 + else if(hue_diff <= -765) + hue_diff += 1530 var/hue = round(HSV1[1] + hue_diff * amount, 1) var/sat = round(HSV1[2] + (HSV2[2] - HSV1[2]) * amount, 1) @@ -526,8 +581,10 @@ world var/alpha = usealpha ? round(HSV1[4] + (HSV2[4] - HSV1[4]) * amount, 1) : null // normalize hue - if(hue < 0 || hue >= 1530) hue %= 1530 - if(hue < 0) hue += 1530 + if(hue < 0 || hue >= 1530) + hue %= 1530 + if(hue < 0) + hue += 1530 // decompress hue hue += round(hue / 255) @@ -547,8 +604,10 @@ world var/list/RGB2 = ReadRGB(rgb2) // add missing alpha if needed - if(RGB1.len < RGB2.len) RGB1 += 255 - else if(RGB2.len < RGB1.len) RGB2 += 255 + if(RGB1.len < RGB2.len) + RGB1 += 255 + else if(RGB2.len < RGB1.len) + RGB2 += 255 var/usealpha = RGB1.len > 3 var/r = round(RGB1[1] + (RGB2[1] - RGB1[1]) * amount, 1) @@ -563,15 +622,18 @@ world /proc/HueToAngle(hue) // normalize hsv in case anything is screwy - if(hue < 0 || hue >= 1536) hue %= 1536 - if(hue < 0) hue += 1536 + if(hue < 0 || hue >= 1536) + hue %= 1536 + if(hue < 0) + hue += 1536 // Compress hue into easier-to-manage range hue -= hue >> 8 return hue / (1530/360) /proc/AngleToHue(angle) // normalize hsv in case anything is screwy - if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360) + if(angle < 0 || angle >= 360) + angle -= 360 * round(angle / 360) var/hue = angle * (1530/360) // Decompress hue hue += round(hue / 255) @@ -583,18 +645,23 @@ world var/list/HSV = ReadHSV(hsv) // normalize hsv in case anything is screwy - if(HSV[1] >= 1536) HSV[1] %= 1536 - if(HSV[1] < 0) HSV[1] += 1536 + if(HSV[1] >= 1536) + HSV[1] %= 1536 + if(HSV[1] < 0) + HSV[1] += 1536 // Compress hue into easier-to-manage range HSV[1] -= HSV[1] >> 8 - if(angle < 0 || angle >= 360) angle -= 360 * round(angle / 360) + if(angle < 0 || angle >= 360) + angle -= 360 * round(angle / 360) HSV[1] = round(HSV[1] + angle * (1530/360), 1) // normalize hue - if(HSV[1] < 0 || HSV[1] >= 1530) HSV[1] %= 1530 - if(HSV[1] < 0) HSV[1] += 1530 + if(HSV[1] < 0 || HSV[1] >= 1530) + HSV[1] %= 1530 + if(HSV[1] < 0) + HSV[1] += 1530 // decompress hue HSV[1] += round(HSV[1] / 255) @@ -614,8 +681,10 @@ world var/gray = RGB[1]*0.3 + RGB[2]*0.59 + RGB[3]*0.11 var/tone_gray = TONE[1]*0.3 + TONE[2]*0.59 + TONE[3]*0.11 - if(gray <= tone_gray) return BlendRGB("#000000", tone, gray/(tone_gray || 1)) - else return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1)) + if(gray <= tone_gray) + return BlendRGB("#000000", tone, gray/(tone_gray || 1)) + else + return BlendRGB(tone, "#ffffff", (gray-tone_gray)/((255-tone_gray) || 1)) //Used in the OLD chem colour mixing algorithm @@ -715,7 +784,8 @@ The _flatIcons list is a cache for generated icon files. var/image/I = current currentLayer = I.layer if(currentLayer<0) // Special case for FLY_LAYER - if(currentLayer <= -1000) return flat + if(currentLayer <= -1000) + return flat if(pSet == 0) // Underlay currentLayer = A.layer+currentLayer/1000 else // Overlay diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm index a05e06a05a..22fb2d69b5 100644 --- a/code/__HELPERS/maths.dm +++ b/code/__HELPERS/maths.dm @@ -13,7 +13,8 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, return x!=0?x/abs(x):0 /proc/Atan2(x, y) - if(!x && !y) return 0 + if(!x && !y) + return 0 var/a = arccos(x / sqrt(x*x + y*y)) return y >= 0 ? a : -a @@ -103,10 +104,12 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, . = list() var/d = b*b - 4 * a * c var/bottom = 2 * a - if(d < 0) return + if(d < 0) + return var/root = sqrt(d) . += (-b + root) / bottom - if(!d) return + if(!d) + return . += (-b - root) / bottom // tangent diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 62d0bd07af..cae42d62e8 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -137,7 +137,8 @@ Turf and target are separate in case you want to teleport some distance from a t return if(destination.y>world.maxy || destination.y<1) return - else return + else + return return destination diff --git a/code/_onclick/adjacent.dm b/code/_onclick/adjacent.dm index 11ab21d21f..b831a8cbcb 100644 --- a/code/_onclick/adjacent.dm +++ b/code/_onclick/adjacent.dm @@ -76,7 +76,8 @@ // This is necessary for storage items not on your person. /obj/item/Adjacent(var/atom/neighbor, var/recurse = 1) - if(neighbor == loc) return 1 + if(neighbor == loc) + return 1 if(isitem(loc)) if(recurse > 0) return loc.Adjacent(neighbor,recurse - 1) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index e7d5755962..3d62cdd0ac 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -6,11 +6,12 @@ almost anything into a trash can. */ /atom/MouseDrop(atom/over, src_location, over_location, src_control, over_control, params) - if(!usr || !over) + if(!usr || !over) return if(over == src) return usr.client.Click(src, src_location, src_control, params) - if(!Adjacent(usr) || !over.Adjacent(usr)) return // should stop you from dragging through windows + if(!Adjacent(usr) || !over.Adjacent(usr)) + return // should stop you from dragging through windows over.MouseDrop_T(src,usr) return diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm index 2d3a3341da..0184b5308d 100644 --- a/code/_onclick/hud/alert.dm +++ b/code/_onclick/hud/alert.dm @@ -491,8 +491,10 @@ so as to remain in compliance with the most up-to-date laws." var/atom/target = null /obj/screen/alert/hackingapc/Click() - if(!usr || !usr.client) return - if(!target) return + if(!usr || !usr.client) + return + if(!target) + return var/mob/living/silicon/ai/AI = usr var/turf/T = get_turf(target) if(T) @@ -515,7 +517,8 @@ so as to remain in compliance with the most up-to-date laws." timeout = 300 /obj/screen/alert/notify_cloning/Click() - if(!usr || !usr.client) return + if(!usr || !usr.client) + return var/mob/dead/observer/G = usr G.reenter_corpse() @@ -528,10 +531,13 @@ so as to remain in compliance with the most up-to-date laws." var/action = NOTIFY_JUMP /obj/screen/alert/notify_action/Click() - if(!usr || !usr.client) return - if(!target) return + if(!usr || !usr.client) + return + if(!target) + return var/mob/dead/observer/G = usr - if(!istype(G)) return + if(!istype(G)) + return switch(action) if(NOTIFY_ATTACK) target.attack_ghost(G) diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 05a291bad7..f1ec409520 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -180,7 +180,8 @@ /datum/hud/proc/toggle_show_robot_modules() - if(!iscyborg(mymob)) return + if(!iscyborg(mymob)) + return var/mob/living/silicon/robot/R = mymob @@ -188,7 +189,8 @@ update_robot_modules_display() /datum/hud/proc/update_robot_modules_display(mob/viewer) - if(!iscyborg(mymob)) return + if(!iscyborg(mymob)) + return var/mob/living/silicon/robot/R = mymob diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 9730aaf552..7cddaf9a6f 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -325,7 +325,8 @@ usr.stop_pulling() /obj/screen/pull/update_icon(mob/mymob) - if(!mymob) return + if(!mymob) + return if(mymob.pulling) icon_state = "pull" else diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index 12a5342e33..10978b7d32 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -276,16 +276,29 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table /datum/DBColumn/proc/SqlTypeName(type_handler = sql_type) switch(type_handler) - if(TINYINT) return "TINYINT" - if(SMALLINT) return "SMALLINT" - if(MEDIUMINT) return "MEDIUMINT" - if(INTEGER) return "INTEGER" - if(BIGINT) return "BIGINT" - if(FLOAT) return "FLOAT" - if(DOUBLE) return "DOUBLE" - if(DATE) return "DATE" - if(DATETIME) return "DATETIME" - if(TIMESTAMP) return "TIMESTAMP" - if(TIME) return "TIME" - if(STRING) return "STRING" - if(BLOB) return "BLOB" + if(TINYINT) + return "TINYINT" + if(SMALLINT) + return "SMALLINT" + if(MEDIUMINT) + return "MEDIUMINT" + if(INTEGER) + return "INTEGER" + if(BIGINT) + return "BIGINT" + if(FLOAT) + return "FLOAT" + if(DOUBLE) + return "DOUBLE" + if(DATE) + return "DATE" + if(DATETIME) + return "DATETIME" + if(TIMESTAMP) + return "TIMESTAMP" + if(TIME) + return "TIME" + if(STRING) + return "STRING" + if(BLOB) + return "BLOB" diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index d202c08d39..689ff83935 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -385,7 +385,8 @@ SUBSYSTEM_DEF(garbage) find_references(TRUE) /datum/proc/DoSearchVar(X, Xname) - if(usr && usr.client && !usr.client.running_find_references) return + if(usr && usr.client && !usr.client.running_find_references) + return if(istype(X, /datum)) var/datum/D = X if(D.last_find_references == last_find_references) diff --git a/code/datums/browser.dm b/code/datums/browser.dm index 48fb688e53..31e8daadb2 100644 --- a/code/datums/browser.dm +++ b/code/datums/browser.dm @@ -249,7 +249,8 @@ // Otherwise, the user mob's machine var will be reset directly. // /proc/onclose(mob/user, windowid, atom/ref=null) - if(!user.client) return + if(!user.client) + return var/param = "null" if(ref) param = "\ref[ref]" diff --git a/code/datums/diseases/wizarditis.dm b/code/datums/diseases/wizarditis.dm index cabf22b280..612418b1ca 100644 --- a/code/datums/diseases/wizarditis.dm +++ b/code/datums/diseases/wizarditis.dm @@ -95,8 +95,10 @@ STI KALY - blind var/list/L = list() for(var/turf/T in get_area_turfs(thearea.type)) - if(T.z != affected_mob.z) continue - if(T.name == "space") continue + if(T.z != affected_mob.z) + continue + if(T.name == "space") + continue if(!T.density) var/clear = 1 for(var/obj/O in T) diff --git a/code/datums/martial/wrestling.dm b/code/datums/martial/wrestling.dm index f489f99564..ac9bfcbab5 100644 --- a/code/datums/martial/wrestling.dm +++ b/code/datums/martial/wrestling.dm @@ -358,9 +358,12 @@ for (var/obj/O in oview(1, A)) if (O.density == 1) - if (O == A) continue - if (O == D) continue - if (O.opacity) continue + if (O == A) + continue + if (O == D) + continue + if (O.opacity) + continue else surface = O ST = get_turf(O) diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 319a235587..6efcd18324 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -299,7 +299,8 @@ uplink_loc = R if (!uplink_loc) - if(!silent) to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.") + if(!silent) + to_chat(traitor_mob, "Unfortunately, [employer] wasn't able to get you an Uplink.") . = 0 else var/obj/item/device/uplink/U = new(uplink_loc) @@ -309,19 +310,22 @@ if(uplink_loc == R) R.traitor_frequency = sanitize_frequency(rand(MIN_FREQ, MAX_FREQ)) - if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.") + if(!silent) + to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [R.name]. Simply dial the frequency [format_frequency(R.traitor_frequency)] to unlock its hidden features.") traitor_mob.mind.store_memory("Radio Frequency: [format_frequency(R.traitor_frequency)] ([R.name]).") else if(uplink_loc == PDA) PDA.lock_code = "[rand(100,999)] [pick(GLOB.phonetic_alphabet)]" - if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.") + if(!silent) + to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [PDA.name]. Simply enter the code \"[PDA.lock_code]\" into the ringtone select to unlock its hidden features.") traitor_mob.mind.store_memory("Uplink Passcode: [PDA.lock_code] ([PDA.name]).") else if(uplink_loc == P) P.traitor_unlock_degrees = rand(1, 360) - if(!silent) to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.") + if(!silent) + to_chat(traitor_mob, "[employer] has cunningly disguised a Syndicate Uplink as your [P.name]. Simply twist the top of the pen [P.traitor_unlock_degrees] from its starting position to unlock its hidden features.") traitor_mob.mind.store_memory("Uplink Degrees: [P.traitor_unlock_degrees] ([P.name]).") //Link a new mobs mind to the creator of said mob. They will join any team they are currently on, and will only switch teams when their creator does. diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index f2f04ea00c..ac2fa4be01 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -89,7 +89,8 @@ GLOBAL_LIST_EMPTY(teleportlocs) // want to find machines, mobs, etc, in the same logical area, you will need to check all the // related areas. This returns a master contents list to assist in that. /proc/area_contents(area/A) - if(!istype(A)) return null + if(!istype(A)) + return null var/list/contents = list() for(var/area/LSA in A.related) contents += LSA.contents diff --git a/code/game/atoms.dm b/code/game/atoms.dm index ff8ad3e081..f20b13e1a3 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -451,7 +451,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) return 1 /atom/proc/get_global_map_pos() - if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) return + if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) + return var/cur_x = null var/cur_y = null var/list/y_arr = null diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index a43b88efe5..b05a1d78f1 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -61,7 +61,8 @@ return ..() /atom/movable/Move(atom/newloc, direct = 0) - if(!loc || !newloc) return 0 + if(!loc || !newloc) + return 0 var/atom/oldloc = loc if(loc != newloc) diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 2cee1d595c..10ff185fd6 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -8,10 +8,12 @@ /* DATA HUD DATUMS */ /atom/proc/add_to_all_human_data_huds() - for(var/datum/atom_hud/data/human/hud in GLOB.huds) hud.add_to_hud(src) + for(var/datum/atom_hud/data/human/hud in GLOB.huds) + hud.add_to_hud(src) /atom/proc/remove_from_all_data_huds() - for(var/datum/atom_hud/data/hud in GLOB.huds) hud.remove_from_hud(src) + for(var/datum/atom_hud/data/hud in GLOB.huds) + hud.remove_from_hud(src) /datum/atom_hud/data @@ -21,10 +23,13 @@ /datum/atom_hud/data/human/medical/basic /datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H) - if(!istype(H)) return 0 + if(!istype(H)) + return 0 var/obj/item/clothing/under/U = H.w_uniform - if(!istype(U)) return 0 - if(U.sensor_mode <= SENSOR_VITALS) return 0 + if(!istype(U)) + return 0 + if(U.sensor_mode <= SENSOR_VITALS) + return 0 return 1 /datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H) @@ -128,7 +133,8 @@ B.update_suit_sensors(src) var/turf/T = get_turf(src) - if (T) GLOB.crewmonitor.queueUpdate(T.z) + if (T) + GLOB.crewmonitor.queueUpdate(T.z) //called when a living mob changes health /mob/living/proc/med_hud_set_health() @@ -200,7 +206,8 @@ sec_hud_set_security_status() var/turf/T = get_turf(src) - if (T) GLOB.crewmonitor.queueUpdate(T.z) + if (T) + GLOB.crewmonitor.queueUpdate(T.z) /mob/living/carbon/human/proc/sec_hud_set_implants() var/image/holder diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 5a177b80c4..653beed98c 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -68,7 +68,8 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w if(antag_candidates.len>0) for(var/i = 0, i < num_changelings, i++) - if(!antag_candidates.len) break + if(!antag_candidates.len) + break var/datum/mind/changeling = pick(antag_candidates) antag_candidates -= changeling changelings += changeling diff --git a/code/game/gamemodes/changeling/traitor_chan.dm b/code/game/gamemodes/changeling/traitor_chan.dm index bd4c522477..8da88e18d7 100644 --- a/code/game/gamemodes/changeling/traitor_chan.dm +++ b/code/game/gamemodes/changeling/traitor_chan.dm @@ -43,7 +43,8 @@ if(possible_changelings.len>0) for(var/j = 0, j < num_changelings, j++) - if(!possible_changelings.len) break + if(!possible_changelings.len) + break var/datum/mind/changeling = pick(possible_changelings) antag_candidates -= changeling possible_changelings -= changeling diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index b405cc935c..743a4aea3c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -25,7 +25,8 @@ if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough. skip = 1 break - if(skip) continue + if(skip) + continue A.power_light = FALSE A.power_equip = FALSE A.power_environ = FALSE @@ -40,7 +41,8 @@ if(istype(A,area_type)) skip = 1 break - if(skip) continue + if(skip) + continue C.cell.charge = 0 diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index 6f5a2b4f7e..20bd7c9df2 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -241,10 +241,11 @@ /obj/item/organ/heart/gland/plasma/activate() to_chat(owner, "You feel bloated.") - addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, owner, "A massive stomachache overcomes you."), 150) - addtimer(CALLBACK(src, .proc/vomit_plasma), 200) - -/obj/item/organ/heart/gland/plasma/proc/vomit_plasma() + sleep(150) + if(!owner) + return + to_chat(owner, "A massive stomachache overcomes you.") + sleep(50) if(!owner) return owner.visible_message("[owner] vomits a cloud of plasma!") diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index e4fca6c240..77e26f026a 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -407,14 +407,17 @@ GLOBAL_LIST_EMPTY(possible_items) /datum/objective/steal/proc/select_target() //For admins setting objectives manually. var/list/possible_items_all = GLOB.possible_items+"custom" var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all - if (!new_target) return + if (!new_target) + return if (new_target == "custom") //Can set custom items. var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item) - if (!custom_target) return + if (!custom_target) + return var/custom_name = initial(custom_target.name) custom_name = stripped_input("Enter target name:", "Objective target", custom_name) - if (!custom_name) return + if (!custom_name) + return steal_target = custom_target explanation_text = "Steal [custom_name]." diff --git a/code/game/gamemodes/sandbox/airlock_maker.dm b/code/game/gamemodes/sandbox/airlock_maker.dm index f4298e1f62..aafbffa82e 100644 --- a/code/game/gamemodes/sandbox/airlock_maker.dm +++ b/code/game/gamemodes/sandbox/airlock_maker.dm @@ -26,7 +26,7 @@ /datum/airlock_maker/New(var/atom/target_loc) linked = new(target_loc) linked.maker = src - linked.anchored = FALSE + linked.anchored = FALSE access_used = list() interact() @@ -69,7 +69,8 @@ usr << browse(dat,"window=airlockmaker") /datum/airlock_maker/Topic(var/href,var/list/href_list) - if(!usr) return + if(!usr) + return if(!src || !linked || !linked.loc) usr << browse(null,"window=airlockmaker") return diff --git a/code/game/machinery/_machinery.dm b/code/game/machinery/_machinery.dm index 24c0e0b388..60260d2a4f 100644 --- a/code/game/machinery/_machinery.dm +++ b/code/game/machinery/_machinery.dm @@ -477,14 +477,17 @@ Class Procs: // Hook for html_interface module to prevent updates to clients who don't have this as their active machine. /obj/machinery/proc/hiIsValidClient(datum/html_interface_client/hclient, datum/html_interface/hi) if (hclient.client.mob && (hclient.client.mob.stat == 0 || IsAdminGhost(hclient.client.mob))) - if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob)) return TRUE - else return hclient.client.mob.machine == src && Adjacent(hclient.client.mob) + if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob)) + return TRUE + else + return hclient.client.mob.machine == src && Adjacent(hclient.client.mob) else return FALSE // Hook for html_interface module to unset the active machine when the window is closed by the player. /obj/machinery/proc/hiOnHide(datum/html_interface_client/hclient) - if (hclient.client.mob && hclient.client.mob.machine == src) hclient.client.mob.unset_machine() + if (hclient.client.mob && hclient.client.mob.machine == src) + hclient.client.mob.unset_machine() /obj/machinery/proc/can_be_overridden() . = 1 diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm index b5175b215f..01651e6e08 100644 --- a/code/game/machinery/airlock_control.dm +++ b/code/game/machinery/airlock_control.dm @@ -8,9 +8,11 @@ /obj/machinery/door/airlock/receive_signal(datum/signal/signal) - if(!signal || signal.encryption) return + if(!signal || signal.encryption) + return - if(id_tag != signal.data["tag"] || !signal.data["command"]) return + if(id_tag != signal.data["tag"] || !signal.data["command"]) + return switch(signal.data["command"]) if("open") @@ -63,12 +65,14 @@ /obj/machinery/door/airlock/open(surpress_send) . = ..() - if(!surpress_send) send_status() + if(!surpress_send) + send_status() /obj/machinery/door/airlock/close(surpress_send) . = ..() - if(!surpress_send) send_status() + if(!surpress_send) + send_status() /obj/machinery/door/airlock/proc/set_frequency(new_frequency) @@ -148,4 +152,4 @@ /obj/machinery/airlock_sensor/Destroy() SSradio.remove_object(src,frequency) - return ..() \ No newline at end of file + return ..() diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm index d933fc4ae1..e7887d0fb4 100644 --- a/code/game/machinery/camera/motion.dm +++ b/code/game/machinery/camera/motion.dm @@ -57,7 +57,8 @@ return 1 /obj/machinery/camera/proc/triggerAlarm() - if (!detectTime) return 0 + if (!detectTime) + return 0 for (var/mob/living/silicon/aiPlayer in GLOB.player_list) if (status) aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src) @@ -69,4 +70,3 @@ if (!area_motion) if(isliving(AM)) newTarget(AM) - diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm index 864ab2bff2..ba72d9676d 100644 --- a/code/game/machinery/camera/presets.dm +++ b/code/game/machinery/camera/presets.dm @@ -53,7 +53,8 @@ var/area/A = get_area(src) if(A) for(var/obj/machinery/camera/autoname/C in GLOB.machines) - if(C == src) continue + if(C == src) + continue var/area/CA = get_area(C) if(CA.type == A.type) if(C.number) diff --git a/code/game/machinery/computer/atmos_alert.dm b/code/game/machinery/computer/atmos_alert.dm index 457abb3259..f5115c7e2a 100644 --- a/code/game/machinery/computer/atmos_alert.dm +++ b/code/game/machinery/computer/atmos_alert.dm @@ -60,12 +60,14 @@ radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA) /obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal) - if(!signal || signal.encryption) return + if(!signal || signal.encryption) + return var/zone = signal.data["zone"] var/severity = signal.data["alert"] - if(!zone || !severity) return + if(!zone || !severity) + return minor_alarms -= zone priority_alarms -= zone diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 209bf5e47f..58d29d0698 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -24,7 +24,8 @@ playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You start deconstructing the frame...") if(do_after(user, 20*P.toolspeed, target = src)) - if(!src || !WT.isOn()) return + if(!src || !WT.isOn()) + return to_chat(user, "You deconstruct the frame.") var/obj/item/stack/sheet/metal/M = new (loc, 5) M.add_fingerprint(user) diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm index 89b2bc4620..77f6e08c7d 100755 --- a/code/game/machinery/computer/communications.dm +++ b/code/game/machinery/computer/communications.dm @@ -103,9 +103,12 @@ if (I && istype(I)) if(ACCESS_CAPTAIN in I.access) var/old_level = GLOB.security_level - if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this + if(!tmp_alertlevel) + tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel < SEC_LEVEL_GREEN) + tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel > SEC_LEVEL_BLUE) + tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this set_security_level(tmp_alertlevel) if(GLOB.security_level != old_level) to_chat(usr, "Authorization confirmed. Modifying security level.") @@ -230,7 +233,8 @@ if("securitylevel") src.tmp_alertlevel = text2num( href_list["newalertlevel"] ) - if(!tmp_alertlevel) tmp_alertlevel = 0 + if(!tmp_alertlevel) + tmp_alertlevel = 0 state = STATE_CONFIRM_LEVEL if("changeseclevel") state = STATE_ALERT_LEVEL @@ -356,11 +360,15 @@ make_announcement(usr, 1) if("ai-securitylevel") src.tmp_alertlevel = text2num( href_list["newalertlevel"] ) - if(!tmp_alertlevel) tmp_alertlevel = 0 + if(!tmp_alertlevel) + tmp_alertlevel = 0 var/old_level = GLOB.security_level - if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN - if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this + if(!tmp_alertlevel) + tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel < SEC_LEVEL_GREEN) + tmp_alertlevel = SEC_LEVEL_GREEN + if(tmp_alertlevel > SEC_LEVEL_BLUE) + tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this set_security_level(tmp_alertlevel) if(GLOB.security_level != old_level) //Only notify the admins if an actual change happened @@ -670,7 +678,8 @@ var/datum/radio_frequency/frequency = SSradio.return_frequency(1435) - if(!frequency) return + if(!frequency) + return var/datum/signal/status_signal = new status_signal.source = src diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 9b5e14963f..2b46f1959c 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -93,7 +93,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) /datum/crewmonitor/proc/show(mob/mob, z) if (mob.client) sendResources(mob.client) - if (!z) z = mob.z + if (!z) + z = mob.z if (z > 0 && src.interfaces) var/datum/html_interface/hi @@ -160,7 +161,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) pos = H.z == 0 || U.sensor_mode == SENSOR_COORDS ? get_turf(H) : null // Special case: If the mob is inside an object confirm the z-level on turf level. - if (H.z == 0 && (!pos || pos.z != z)) continue + if (H.z == 0 && (!pos || pos.z != z)) + continue I = H.wear_id ? H.wear_id.GetID() : null @@ -173,8 +175,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) assignment = "" ijob = 80 - if (U.sensor_mode >= SENSOR_LIVING) life_status = (!H.stat ? "true" : "false") - else life_status = null + if (U.sensor_mode >= SENSOR_LIVING) + life_status = (!H.stat ? "true" : "false") + else + life_status = null if (U.sensor_mode >= SENSOR_VITALS) dam1 = round(H.getOxyLoss(),1) @@ -188,7 +192,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) dam4 = null if (U.sensor_mode >= SENSOR_COORDS) - if (!pos) pos = get_turf(H) + if (!pos) + pos = get_turf(H) var/area/player_area = get_area(H) area = format_text(player_area.name) @@ -208,13 +213,15 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) var/z = "" for (z in src.interfaces) - if (src.interfaces[z] == hi) break + if (src.interfaces[z] == hi) + break if(hclient.client.mob && IsAdminGhost(hclient.client.mob)) return TRUE if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z)) - if (isAI(hclient.client.mob)) return TRUE + if (isAI(hclient.client.mob)) + return TRUE else if (iscyborg(hclient.client.mob)) return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents)) else @@ -238,8 +245,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) var/obj/machinery/camera/C = locate(/obj/machinery/camera) in range(5, tile) - if (!C) C = locate(/obj/machinery/camera) in urange(10, tile) - if (!C) C = locate(/obj/machinery/camera) in urange(15, tile) + if (!C) + C = locate(/obj/machinery/camera) in urange(10, tile) + if (!C) + C = locate(/obj/machinery/camera) in urange(15, tile) if (C) addtimer(CALLBACK(src, .proc/update_ai, AI, C, AI.eyeobj.loc), min(30, get_dist(get_turf(C), AI.eyeobj) / 4)) @@ -254,7 +263,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) . = ..() - if (old_z != src.z) GLOB.crewmonitor.queueUpdate(old_z) + if (old_z != src.z) + GLOB.crewmonitor.queueUpdate(old_z) GLOB.crewmonitor.queueUpdate(src.z) else return ..() diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm index 7f5276d908..c540b51560 100644 --- a/code/game/machinery/computer/dna_console.dm +++ b/code/game/machinery/computer/dna_console.dm @@ -66,7 +66,8 @@ ShowInterface(user) /obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change) - if(!user) return + if(!user) + return var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window if(!(in_range(src, user) || issilicon(user))) popup.close() diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index f3fabcc21c..5ba20bc527 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -82,7 +82,8 @@ if(hacking || emagged) screen = 2 else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) - if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) message = noserver + if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) + message = noserver screen = 0 switch(screen) @@ -267,7 +268,8 @@ //Turn the server on/off. if (href_list["active"]) - if(auth) linkedServer.active = !linkedServer.active + if(auth) + linkedServer.active = !linkedServer.active //Find a server if (href_list["find"]) if(GLOB.message_servers && GLOB.message_servers.len > 1) @@ -468,4 +470,4 @@ info = "

Daily Key Reset


The new message monitor key is '[server.decryptkey]'.
Please keep this a secret and away from the clown.
If necessary, change the password to a more secure one." info_links = info add_overlay("paper_words") - break \ No newline at end of file + break diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index c983bc319f..3e9d6df42a 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -95,7 +95,8 @@ if(!usr.transferItemToLoc(I, src)) return inserted_id = I - else to_chat(usr, "No valid ID.") + else + to_chat(usr, "No valid ID.") else if(inserted_id) switch(href_list["id"]) if("eject") diff --git a/code/game/machinery/embedded_controller/airlock_controller.dm b/code/game/machinery/embedded_controller/airlock_controller.dm index be027a89c8..59d58bc9a5 100644 --- a/code/game/machinery/embedded_controller/airlock_controller.dm +++ b/code/game/machinery/embedded_controller/airlock_controller.dm @@ -19,7 +19,8 @@ /datum/computer/file/embedded_program/airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param) var/receive_tag = signal.data["tag"] - if(!receive_tag) return + if(!receive_tag) + return if(receive_tag==sensor_tag) if(signal.data["pressure"]) @@ -206,7 +207,7 @@ icon_state = "airlock_control_standby" name = "airlock console" - density = FALSE + density = FALSE frequency = 1449 power_channel = ENVIRON @@ -220,7 +221,7 @@ var/sanitize_external /obj/machinery/embedded_controller/radio/airlock_controller/Initialize(mapload) - . = ..() + . = ..() if(!mapload) return @@ -292,4 +293,4 @@ [state_options]"} - return output \ No newline at end of file + return output diff --git a/code/game/machinery/embedded_controller/embedded_controller_base.dm b/code/game/machinery/embedded_controller/embedded_controller_base.dm index ee0b8f287c..16691160f2 100644 --- a/code/game/machinery/embedded_controller/embedded_controller_base.dm +++ b/code/game/machinery/embedded_controller/embedded_controller_base.dm @@ -21,10 +21,10 @@ var/datum/computer/file/embedded_program/program name = "embedded controller" - density = FALSE - anchored = TRUE + density = FALSE + anchored = TRUE - var/on = TRUE + var/on = TRUE /obj/machinery/embedded_controller/interact(mob/user) user.set_machine(src) @@ -44,7 +44,8 @@ return 0 /obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param) - if(!signal || signal.encryption) return + if(!signal || signal.encryption) + return if(program) program.receive_signal(signal, receive_method, receive_param) @@ -73,11 +74,11 @@ var/datum/radio_frequency/radio_connection /obj/machinery/embedded_controller/radio/Destroy() - SSradio.remove_object(src,frequency) + SSradio.remove_object(src,frequency) return ..() /obj/machinery/embedded_controller/radio/Initialize() - . = ..() + . = ..() set_frequency(frequency) /obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal) diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm index 36366ffbd9..7808e7ed05 100644 --- a/code/game/machinery/magnet.dm +++ b/code/game/machinery/magnet.dm @@ -166,7 +166,8 @@ /obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling - if(pulling) return + if(pulling) + return while(on) pulling = 1 @@ -333,7 +334,8 @@ updateUsrDialog() /obj/machinery/magnetic_controller/proc/MagnetMove() - if(looping) return + if(looping) + return while(moving && rpath.len >= 1) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 872194ee67..2f6fe2bdd0 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -343,7 +343,8 @@ GLOBAL_LIST_EMPTY(allConsoles) if (sending) var/pass = 0 for (var/obj/machinery/message_server/MS in GLOB.machines) - if(!MS.active) continue + if(!MS.active) + continue MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority) pass = 1 diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm index a8ddc6710e..79d000a6ec 100644 --- a/code/game/machinery/syndicatebeacon.dm +++ b/code/game/machinery/syndicatebeacon.dm @@ -7,8 +7,8 @@ icon = 'icons/obj/singularity.dmi' icon_state = "beacon" - anchored = FALSE - density = TRUE + anchored = FALSE + density = TRUE layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS stat = 0 verb_say = "states" @@ -20,7 +20,8 @@ /obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null) if(surplus() < 1500) - if(user) to_chat(user, "The connected wire doesn't have enough current.") + if(user) + to_chat(user, "The connected wire doesn't have enough current.") return for(var/obj/singularity/singulo in GLOB.singularities) if(singulo.z == z) @@ -54,13 +55,13 @@ /obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/screwdriver)) + if(istype(W, /obj/item/screwdriver)) if(active) to_chat(user, "You need to deactivate the beacon first!") return if(anchored) - anchored = FALSE + anchored = FALSE to_chat(user, "You unscrew the beacon from the floor.") disconnect_from_network() return @@ -68,7 +69,7 @@ if(!connect_to_network()) to_chat(user, "This device must be placed over an exposed, powered cable node!") return - anchored = TRUE + anchored = TRUE to_chat(user, "You screw the beacon to the floor and attach the cable.") return else @@ -105,8 +106,8 @@ name = "suspicious beacon" icon = 'icons/obj/radio.dmi' icon_state = "beacon" - lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' - righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' + lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi' + righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi' desc = "A label on it reads: Warning: Activating this device will send a special beacon to your location." origin_tech = "bluespace=6;syndicate=5" w_class = WEIGHT_CLASS_SMALL diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 5638b92b99..893ab38380 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -60,7 +60,8 @@ dat += "
Identification String: NULL" dat += "
Network: [network]" dat += "
Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]" - if(hide) dat += "
Shadow Link: ACTIVE" + if(hide) + dat += "
Shadow Link: ACTIVE" //Show additional options for certain machines. dat += Options_Menu() diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index fa03878998..48d98aa70f 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -46,7 +46,8 @@ log_message("Critical failure",1) /obj/item/mecha_parts/mecha_equipment/proc/get_equip_info() - if(!chassis) return + if(!chassis) + return var/txt = "* " if(chassis.selected == src) txt += "[src.name]" diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 54d49065a0..38b8e2bb96 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -14,7 +14,8 @@ range = RANGED /obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target) - if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM) return + if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM) + return var/turf/T = get_turf(target) if(T) do_teleport(chassis, T, 4) @@ -112,7 +113,8 @@ else atoms = orange(3, target) for(var/atom/movable/A in atoms) - if(A.anchored) continue + if(A.anchored) + continue spawn(0) var/iter = 5-get_dist(A,target) for(var/i=0 to iter) @@ -208,7 +210,8 @@ ..() /obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info() - if(!chassis) return + if(!chassis) + return return "*  [src.name] - [equip_ready?"A":"Dea"]ctivate" @@ -315,7 +318,8 @@ log_message("Deactivated.") /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info() - if(!chassis) return + if(!chassis) + return return "*  [src.name] - [equip_ready?"A":"Dea"]ctivate" diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 8abab12baf..d8de939514 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -52,7 +52,8 @@ else if(isliving(target)) var/mob/living/M = target - if(M.stat == DEAD) return + if(M.stat == DEAD) + return if(chassis.occupant.a_intent == INTENT_HARM) M.take_overall_damage(dam_force) if(!M) @@ -103,7 +104,8 @@ else if(isliving(target)) var/mob/living/M = target - if(M.stat == DEAD) return + if(M.stat == DEAD) + return if(chassis.occupant.a_intent == INTENT_HARM) target.visible_message("[chassis] destroys [target] in an unholy fury.", \ "[chassis] destroys [target] in an unholy fury.") diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 7353af909a..ad0e428f14 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -596,7 +596,8 @@ /////////////////////////////////// /obj/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null) - if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) return + if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) + return if(prob(20)) if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold) for(var/T in possible_int_damage) diff --git a/code/game/mecha/mecha_topic.dm b/code/game/mecha/mecha_topic.dm index 87009ac292..27256d8b0b 100644 --- a/code/game/mecha/mecha_topic.dm +++ b/code/game/mecha/mecha_topic.dm @@ -159,7 +159,8 @@ /obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user) - if(!id_card || !user) return + if(!id_card || !user) + return . = {" ",a.insertBefore(n.lastChild,a.firstChild)}function r(){var t=x.elements;return"string"==typeof t?t.split(" "):t}function i(t,e){var n=x.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof t&&(t=t.join(" ")),x.elements=n+" "+t,c(e)}function o(t){var e=y[t[g]];return e||(e={},b++,t[g]=b,y[b]=e),e}function s(t,e,a){if(e||(e=n),f)return e.createElement(t);a||(a=o(e));var r;return r=a.cache[t]?a.cache[t].cloneNode():v.test(t)?(a.cache[t]=a.createElem(t)).cloneNode():a.createElem(t),!r.canHaveChildren||m.test(t)||r.tagUrn?r:a.frag.appendChild(r)}function u(t,e){if(t||(t=n),f)return t.createDocumentFragment();e=e||o(t);for(var a=e.frag.cloneNode(),i=0,s=r(),u=s.length;u>i;i++)a.createElement(s[i]);return a}function p(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(n){return x.shivMethods?s(n,t,e):e.createElem(n)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(x,e.frag)}function c(t){t||(t=n);var e=o(t);return!x.shivCSS||l||e.hasCSS||(e.hasCSS=!!a(t,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),f||p(t,e),t}var l,f,d="3.7.3-pre",h=t.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,v=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,g="_html5shiv",b=0,y={};!function(){try{var t=n.createElement("a");t.innerHTML="",l="hidden"in t,f=1==t.childNodes.length||function(){n.createElement("a");var t=n.createDocumentFragment();return void 0===t.cloneNode||void 0===t.createDocumentFragment||void 0===t.createElement}()}catch(e){l=!0,f=!0}}();var x={elements:h.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:d,shivCSS:h.shivCSS!==!1,supportsUnknownElements:f,shivMethods:h.shivMethods!==!1,type:"default",shivDocument:c,createElement:s,createDocumentFragment:u,addElements:i};t.html5=x,c(n),"object"==typeof e&&e.exports&&(e.exports=x)}("undefined"!=typeof window?window:this,document)},{}],194:[function(t,e,n){(function(t){(function(t){!function(t){function e(t,e,n,a){for(var i,o=n.slice(),s=r(e,t),u=0,p=o.length;p>u&&(handler=o[u],"object"==typeof handler?"function"==typeof handler.handleEvent&&handler.handleEvent(s):handler.call(t,s),!s.stoppedImmediatePropagation);u++);return i=!s.stoppedPropagation,a&&i&&t.parentNode?t.parentNode.dispatchEvent(s):!s.defaultPrevented}function n(t,e){return{configurable:!0,get:t,set:e}}function a(t,e,a){var r=b(e||t,a);v(t,"textContent",n(function(){return r.get.call(this)},function(t){r.set.call(this,t)}))}function r(t,e){return t.currentTarget=e,t.eventPhase=t.target===t.currentTarget?2:3,t}function i(t,e){for(var n=t.length;n--&&t[n]!==e;);return n}function o(){if("BR"===this.tagName)return"\n";for(var t=this.firstChild,e=[];t;)8!==t.nodeType&&7!==t.nodeType&&e.push(t.textContent),t=t.nextSibling;return e.join("")}function s(t){var e=document.createEvent("Event");e.initEvent("input",!0,!0),(t.srcElement||t.fromElement||document).dispatchEvent(e)}function u(t){!f&&k.test(document.readyState)&&(f=!f,document.detachEvent(d,u),t=document.createEvent("Event"),t.initEvent(h,!0,!0),document.dispatchEvent(t))}function p(t){for(var e;e=this.lastChild;)this.removeChild(e);null!=t&&this.appendChild(document.createTextNode(t))}function c(e,n){return n||(n=t.event),n.target||(n.target=n.srcElement||n.fromElement||document),n.timeStamp||(n.timeStamp=(new Date).getTime()),n}if(!document.createEvent){var l=!0,f=!1,d="onreadystatechange",h="DOMContentLoaded",m="__IE8__"+Math.random(),v=Object.defineProperty||function(t,e,n){t[e]=n.value},g=Object.defineProperties||function(e,n){for(var a in n)if(y.call(n,a))try{v(e,a,n[a])}catch(r){t.console&&console.log(a+" failed on object:",e,r.message)}},b=Object.getOwnPropertyDescriptor,y=Object.prototype.hasOwnProperty,x=t.Element.prototype,_=t.Text.prototype,w=/^[a-z]+$/,k=/loaded|complete/,E={},S=document.createElement("div"),C=document.documentElement,P=C.removeAttribute,A=C.setAttribute;a(t.HTMLCommentElement.prototype,x,"nodeValue"),a(t.HTMLScriptElement.prototype,null,"text"),a(_,null,"nodeValue"),a(t.HTMLTitleElement.prototype,null,"text"),v(t.HTMLStyleElement.prototype,"textContent",function(t){return n(function(){return t.get.call(this.styleSheet)},function(e){t.set.call(this.styleSheet,e)})}(b(t.CSSStyleSheet.prototype,"cssText"))),g(x,{textContent:{get:o,set:p},firstElementChild:{get:function(){for(var t=this.childNodes||[],e=0,n=t.length;n>e;e++)if(1==t[e].nodeType)return t[e]}},lastElementChild:{get:function(){for(var t=this.childNodes||[],e=t.length;e--;)if(1==t[e].nodeType)return t[e]}},oninput:{get:function(){return this._oninput||null},set:function(t){this._oninput&&(this.removeEventListener("input",this._oninput),this._oninput=t,t&&this.addEventListener("input",t))}},previousElementSibling:{get:function(){for(var t=this.previousSibling;t&&1!=t.nodeType;)t=t.previousSibling;return t}},nextElementSibling:{get:function(){for(var t=this.nextSibling;t&&1!=t.nodeType;)t=t.nextSibling;return t}},childElementCount:{get:function(){for(var t=0,e=this.childNodes||[],n=e.length;n--;t+=1==e[n].nodeType);return t}},addEventListener:{value:function(t,n,a){if("function"==typeof n||"object"==typeof n){var r,o,u=this,p="on"+t,l=u[m]||v(u,m,{value:{}})[m],f=l[p]||(l[p]={}),d=f.h||(f.h=[]);if(!y.call(f,"w")){if(f.w=function(t){return t[m]||e(u,c(u,t),d,!1)},!y.call(E,p))if(w.test(t)){try{r=document.createEventObject(),r[m]=!0,9!=u.nodeType&&(null==u.parentNode&&S.appendChild(u),(o=u.getAttribute(p))&&P.call(u,p)),u.fireEvent(p,r),E[p]=!0}catch(r){for(E[p]=!1;S.hasChildNodes();)S.removeChild(S.firstChild)}null!=o&&A.call(u,p,o)}else E[p]=!1;(f.n=E[p])&&u.attachEvent(p,f.w)}i(d,n)<0&&d[a?"unshift":"push"](n),"input"===t&&u.attachEvent("onkeyup",s)}}},dispatchEvent:{value:function(t){var n,a=this,r="on"+t.type,i=a[m],o=i&&i[r],s=!!o;return t.target||(t.target=a),s?o.n?a.fireEvent(r,t):e(a,t,o.h,!0):(n=a.parentNode)?n.dispatchEvent(t):!0,!t.defaultPrevented}},removeEventListener:{value:function(t,e,n){if("function"==typeof e||"object"==typeof e){var a=this,r="on"+t,o=a[m],s=o&&o[r],u=s&&s.h,p=u?i(u,e):-1;p>-1&&u.splice(p,1)}}}}),g(_,{addEventListener:{value:x.addEventListener},dispatchEvent:{value:x.dispatchEvent},removeEventListener:{value:x.removeEventListener}}),g(t.XMLHttpRequest.prototype,{addEventListener:{value:function(t,e,n){var a=this,r="on"+t,o=a[m]||v(a,m,{value:{}})[m],s=o[r]||(o[r]={}),u=s.h||(s.h=[]);i(u,e)<0&&(a[r]||(a[r]=function(){var e=document.createEvent("Event");e.initEvent(t,!0,!0),a.dispatchEvent(e)}),u[n?"unshift":"push"](e))}},dispatchEvent:{value:function(t){var n=this,a="on"+t.type,r=n[m],i=r&&r[a],o=!!i;return o&&(i.n?n.fireEvent(a,t):e(n,t,i.h,!0))}},removeEventListener:{value:x.removeEventListener}}),g(t.Event.prototype,{bubbles:{value:!0,writable:!0},cancelable:{value:!0,writable:!0},preventDefault:{value:function(){this.cancelable&&(this.defaultPrevented=!0,this.returnValue=!1)}},stopPropagation:{value:function(){this.stoppedPropagation=!0,this.cancelBubble=!0}},stopImmediatePropagation:{value:function(){this.stoppedImmediatePropagation=!0,this.stopPropagation()}},initEvent:{value:function(t,e,n){this.type=t,this.bubbles=!!e,this.cancelable=!!n,this.bubbles||this.stopPropagation()}}}),g(t.HTMLDocument.prototype,{defaultView:{get:function(){return this.parentWindow}},textContent:{get:function(){return 11===this.nodeType?o.call(this):null},set:function(t){11===this.nodeType&&p.call(this,t)}},addEventListener:{value:function(e,n,a){var r=this;x.addEventListener.call(r,e,n,a),l&&e===h&&!k.test(r.readyState)&&(l=!1,r.attachEvent(d,u),t==top&&!function i(t){try{r.documentElement.doScroll("left"),u()}catch(e){setTimeout(i,50)}}())}},dispatchEvent:{value:x.dispatchEvent},removeEventListener:{value:x.removeEventListener},createEvent:{value:function(t){var e;if("Event"!==t)throw Error("unsupported "+t);return e=document.createEventObject(),e.timeStamp=(new Date).getTime(),e}}}),g(t.Window.prototype,{getComputedStyle:{value:function(){function t(t){this._=t}function e(){}var n=/^(?:[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|))(?!px)[a-z%]+$/,a=/^(top|right|bottom|left)$/,r=/\-([a-z])/g,i=function(t,e){return e.toUpperCase()};return t.prototype.getPropertyValue=function(t){var e,o,s,u=this._,p=u.style,c=u.currentStyle,l=u.runtimeStyle;return t=("float"===t?"style-float":t).replace(r,i),e=c?c[t]:p[t],n.test(e)&&!a.test(t)&&(o=p.left,s=l&&l.left,s&&(l.left=c.left),p.left="fontSize"===t?"1em":e,e=p.pixelLeft+"px",p.left=o,s&&(l.left=s)),null==e?e:e+""||"auto"},e.prototype.getPropertyValue=function(){return null},function(n,a){return a?new e(n):new t(n)}}()},addEventListener:{value:function(n,a,r){var o,s=t,u="on"+n;s[u]||(s[u]=function(t){return e(s,c(s,t),o,!1)}),o=s[u][m]||(s[u][m]=[]),i(o,a)<0&&o[r?"unshift":"push"](a)}},dispatchEvent:{value:function(e){var n=t["on"+e.type];return n?n.call(t,e)!==!1&&!e.defaultPrevented:!0}},removeEventListener:{value:function(e,n,a){var r="on"+e,o=(t[r]||Object)[m],s=o?i(o,n):-1;s>-1&&o.splice(s,1)}}}),function(t,e,n){for(n=0;n=s)return(0,u["default"])({points:n});for(var l=1;s-1>=l;l++)i.push((0,p.times)(a,(0,p.minus)(n[l],n[l-1])));for(var f=[(0,p.plus)(n[0],c(i[0],i[1]))],l=1;s-2>=l;l++)f.push((0,p.minus)(n[l],(0,p.average)([i[l],i[l-1]])));f.push((0,p.minus)(n[s-1],c(i[s-2],i[s-3])));var d=f[0],h=f[1],m=n[0],v=n[1],g=(e=(0,o["default"])()).moveto.apply(e,r(m)).curveto(d[0],d[1],h[0],h[1],v[0],v[1]);return{path:(0,p.range)(2,s).reduce(function(t,e){var a=f[e],r=n[e];return t.smoothcurveto(a[0],a[1],r[0],r[1])},g),centroid:(0,p.average)(n)}},e.exports=n["default"]},{198:198,199:199,200:200}],196:[function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function t(t,e){var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);a=!0);}catch(u){r=!0,i=u}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),i=t(197),o=a(i),s=t(198),u=1e-5,p=function(t,e){var n=t.map(e),a=n.sort(function(t,e){var n=r(t,2),a=n[0],i=(n[1],r(e,2)),o=i[0];i[1];return a-o}),i=a.length,o=a[0][0],p=a[i-1][0],c=(0,s.minBy)(a,function(t){return t[1]}),l=(0,s.maxBy)(a,function(t){return t[1]});return o==p&&(p+=u),c==l&&(l+=u),{points:a,xmin:o,xmax:p,ymin:c,ymax:l}};n["default"]=function(t){var e=t.data,n=t.xaccessor,a=t.yaccessor,i=t.width,u=t.height,c=t.closed,l=t.min,f=t.max;n||(n=function(t){var e=r(t,2),n=e[0];e[1];return n}),a||(a=function(t){var e=r(t,2),n=(e[0],e[1]);return n});var d=function(t){return[n(t),a(t)]},h=e.map(function(t){return p(t,d)}),m=(0,s.minBy)(h,function(t){return t.xmin}),v=(0,s.maxBy)(h,function(t){return t.xmax}),g=null==l?(0,s.minBy)(h,function(t){return t.ymin}):l,b=null==f?(0,s.maxBy)(h,function(t){return t.ymax}):f;c&&(g=Math.min(g,0),b=Math.max(b,0));var y=c?0:g,x=(0,o["default"])([m,v],[0,i]),_=(0,o["default"])([g,b],[u,0]),w=function(t){var e=r(t,2),n=e[0],a=e[1];return[x(n),_(a)]};return{arranged:h,scale:w,xscale:x,yscale:_,base:y}},e.exports=n["default"]},{197:197,198:198}],197:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);a=!0);}catch(u){r=!0,i=u}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function i(t,e){var n=a(t,2),r=n[0],o=n[1],s=a(e,2),u=s[0],p=s[1],c=function(t){return u+(p-u)*(t-r)/(o-r)};return c.inverse=function(){return i([u,p],[r,o])},c};n["default"]=r,e.exports=n["default"]},{}],198:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);a=!0);}catch(u){r=!0,i=u}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function(t){return t.reduce(function(t,e){return t+e},0)},i=function(t){return t.reduce(function(t,e){return Math.min(t,e)})},o=function(t){return t.reduce(function(t,e){return Math.max(t,e)})},s=function(t,e){return t.reduce(function(t,n){return t+e(n)},0)},u=function(t,e){return t.reduce(function(t,n){return Math.min(t,e(n))},1/0)},p=function(t,e){return t.reduce(function(t,n){return Math.max(t,e(n))},-(1/0))},c=function(t,e){var n=a(t,2),r=n[0],i=n[1],o=a(e,2),s=o[0],u=o[1];return[r+s,i+u]},l=function(t,e){var n=a(t,2),r=n[0],i=n[1],o=a(e,2),s=o[0],u=o[1];return[r-s,i-u]},f=function(t,e){var n=a(e,2),r=n[0],i=n[1];return[t*r,t*i]},d=function(t){var e=a(t,2),n=e[0],r=e[1];return Math.sqrt(n*n+r*r)},h=function(t){return t.reduce(c,[0,0])},m=function(t){return f(1/t.length,t.reduce(c))},v=function(t,e){return f(t,[Math.sin(e),-Math.cos(e)])},g=function(t,e){var n=t||{};for(var a in n){var r=n[a];e[a]=r(e.index,e.item,e.group)}return e},b=function(t,e,n){for(var a=[],r=t;e>r;r++)a.push(r);return n&&a.push(e),a},y=function(t,e){var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=Object.keys(t)[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var u=o.value,p=t[u];n.push(e(u,p))}}catch(c){r=!0,i=c}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n},x=function(t){return y(t,function(t,e){return[t,e]})},_=function(t){return t};n.sum=r,n.min=i,n.max=o,n.sumBy=s,n.minBy=u,n.maxBy=p,n.plus=c,n.minus=l,n.times=f,n.id=_,n.length=d,n.sumVectors=h,n.average=m,n.onCircle=v,n.enhance=g,n.range=b,n.mapObject=y,n.pairs=x,n["default"]={sum:r,min:i,max:o,sumBy:s,minBy:u,maxBy:p,plus:c,minus:l,times:f,id:_,length:d,sumVectors:h,average:m,onCircle:v,enhance:g,range:b,mapObject:y,pairs:x}},{}],199:[function(t,e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function t(t,e){var n=[],a=!0,r=!1,i=void 0;try{for(var o,s=t[Symbol.iterator]();!(a=(o=s.next()).done)&&(n.push(o.value),!e||n.length!==e);a=!0);}catch(u){r=!0,i=u}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return t(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),r=function i(t){var e=t||[],n=function(t,e){var n=t.slice(0,t.length);return n.push(e),n},r=function(t,e){var n=a(t,2),r=n[0],i=n[1],o=a(e,2),s=o[0],u=o[1];return r===s&&i===u},o=function(t,e){for(var n=t.length;"0"===t.charAt(n-1);)n-=1;return"."===t.charAt(n-1)&&(n-=1),t.substr(0,n)},s=function(t,e){var n=t.toFixed(e);return o(n)},u=function(t){var e=t.command,n=t.params,a=n.map(function(t){return s(t,6)});return e+" "+a.join(" ")},p=function(t,e){var n=t.command,r=t.params,i=a(e,2),o=i[0],s=i[1];switch(n){case"M":return[r[0],r[1]];case"L":return[r[0],r[1]];case"H":return[r[0],s];case"V":return[o,r[0]];case"Z":return null;case"C":return[r[4],r[5]];case"S":return[r[2],r[3]];case"Q":return[r[2],r[3]];case"T":return[r[0],r[1]];case"A":return[r[5],r[6]]}},c=function(t,e){return function(n){var a="object"==typeof n?t.map(function(t){return n[t]}):arguments;return e.apply(null,a)}},l=function(t){return i(n(e,t))};return{moveto:c(["x","y"],function(t,e){return l({command:"M",params:[t,e]})}),lineto:c(["x","y"],function(t,e){return l({command:"L",params:[t,e]})}),hlineto:c(["x"],function(t){return l({command:"H",params:[t]})}),vlineto:c(["y"],function(t){return l({command:"V",params:[t]})}),closepath:function(){return l({command:"Z",params:[]})},curveto:c(["x1","y1","x2","y2","x","y"],function(t,e,n,a,r,i){return l({command:"C",params:[t,e,n,a,r,i]})}),smoothcurveto:c(["x2","y2","x","y"],function(t,e,n,a){return l({command:"S",params:[t,e,n,a]})}),qcurveto:c(["x1","y1","x","y"],function(t,e,n,a){return l({command:"Q",params:[t,e,n,a]})}),smoothqcurveto:c(["x","y"],function(t,e){return l({command:"T",params:[t,e]})}),arc:c(["rx","ry","xrot","largeArcFlag","sweepFlag","x","y"],function(t,e,n,a,r,i,o){return l({command:"A",params:[t,e,n,a,r,i,o]})}),print:function(){return e.map(u).join(" ")},points:function(){var t=[],n=[0,0],a=!0,r=!1,i=void 0;try{for(var o,s=e[Symbol.iterator]();!(a=(o=s.next()).done);a=!0){var u=o.value,c=p(u,n);n=c,c&&t.push(c)}}catch(l){r=!0,i=l}finally{try{!a&&s["return"]&&s["return"]()}finally{if(r)throw i}}return t},instructions:function(){return e.slice(0,e.length)},connect:function(t){var e=this.points(),n=e[e.length-1],a=t.points()[0],o=t.instructions().slice(1);return r(n,a)||o.unshift({command:"L",params:a}),i(this.instructions().concat(o))}}};n["default"]=function(){return r()},e.exports=n["default"]},{}],200:[function(t,e,n){"use strict";function a(t){return t&&t.__esModule?t:{"default":t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e1)for(var n=1;n1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];for(var r,i;i=n.shift();)for(r in i)jo.call(i,r)&&(t[r]=i[r]);return t}function r(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];return n.forEach(function(e){for(var n in e)!e.hasOwnProperty(n)||n in t||(t[n]=e[n])}),t}function i(t){return"[object Array]"===Mo.call(t)}function o(t){return Lo.test(Mo.call(t))}function s(t,e){return null===t&&null===e?!0:"object"==typeof t||"object"==typeof e?!1:t===e}function u(t){return!isNaN(parseFloat(t))&&isFinite(t)}function p(t){return t&&"[object Object]"===Mo.call(t)}function c(t,e){return t.replace(/%s/g,function(){return e.shift()})}function l(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];throw t=c(t,n),Error(t)}function f(){jv.DEBUG&&Oo.apply(null,arguments)}function d(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];t=c(t,n),To(t,n)}function h(t){for(var e=arguments.length,n=Array(e>1?e-1:0),a=1;e>a;a++)n[a-1]=arguments[a];t=c(t,n),Do[t]||(Do[t]=!0,To(t,n))}function m(){jv.DEBUG&&d.apply(null,arguments)}function v(){jv.DEBUG&&h.apply(null,arguments)}function g(t,e,n){var a=b(t,e,n);return a?a[t][n]:null}function b(t,e,n){for(;e;){if(n in e[t])return e;if(e.isolated)return null;e=e.parent}}function y(t){return function(){return t}}function x(t){var e,n,a,r,i,o;for(e=t.split("."),(n=zo[e.length])||(n=_(e.length)),i=[],a=function(t,n){return t?"*":e[n]},r=n.length;r--;)o=n[r].map(a).join("."),i.hasOwnProperty(o)||(i.push(o),i[o]=!0);return i}function _(t){var e,n,a,r,i,o,s,u,p="";if(!zo[t]){for(a=[];p.length=i;i+=1){for(n=i.toString(2);n.lengtho;o++)u.push(r(n[o]));a[i]=u}zo[t]=a}return zo[t]}function w(t,e,n,a){var r=t[e];if(!r||!r.equalsOrStartsWith(a)&&r.equalsOrStartsWith(n))return t[e]=r?r.replace(n,a):a,!0}function k(t){var e=t.slice(2);return"i"===t[1]&&u(e)?+e:e}function E(t){return null==t?t:(Qo.hasOwnProperty(t)||(Qo[t]=new Ko(t)),Qo[t])}function S(t,e){function n(e,n){var a,r,o;return n.isRoot?o=[].concat(Object.keys(t.viewmodel.data),Object.keys(t.viewmodel.mappings),Object.keys(t.viewmodel.computations)):(a=t.viewmodel.wrapped[n.str],r=a?a.get():t.viewmodel.get(n),o=r?Object.keys(r):null),o&&o.forEach(function(t){"_ractive"===t&&i(r)||e.push(n.join(t))}),e}var a,r,o;for(a=e.str.split("."),o=[Yo];r=a.shift();)"*"===r?o=o.reduce(n,[]):o[0]===Yo?o[0]=E(r):o=o.map(C(r));return o}function C(t){return function(e){return e.join(t)}}function P(t){return t?t.replace(Wo,".$1"):""}function A(t,e,n){if("string"!=typeof e||!u(n))throw Error("Bad arguments");var a=void 0,r=void 0;if(/\*/.test(e))return r={},S(t,E(P(e))).forEach(function(e){var a=t.viewmodel.get(e);if(!u(a))throw Error(Xo);r[e.str]=a+n}),t.set(r);if(a=t.get(e),!u(a))throw Error(Xo); -return t.set(e,+a+n)}function O(t,e){return Jo(this,t,void 0===e?1:+e)}function T(t){this.event=t,this.method="on"+t,this.deprecate=as[t]}function R(t,e){var n=t.indexOf(e);-1===n&&t.push(e)}function j(t,e){for(var n=0,a=t.length;a>n;n++)if(t[n]==e)return!0;return!1}function M(t,e){var n;if(!i(t)||!i(e))return!1;if(t.length!==e.length)return!1;for(n=t.length;n--;)if(t[n]!==e[n])return!1;return!0}function L(t){return"string"==typeof t?[t]:void 0===t?[]:t}function D(t){return t[t.length-1]}function N(t,e){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}function F(t){for(var e=[],n=t.length;n--;)e[n]=t[n];return e}function I(t){setTimeout(t,0)}function B(t,e){return function(){for(var n;n=t.shift();)n(e)}}function q(t,e,n,a){var r;if(e===t)throw new TypeError("A promise's fulfillment handler cannot return the same promise");if(e instanceof rs)e.then(n,a);else if(!e||"object"!=typeof e&&"function"!=typeof e)n(e);else{try{r=e.then}catch(i){return void a(i)}if("function"==typeof r){var o,s,u;s=function(e){o||(o=!0,q(t,e,n,a))},u=function(t){o||(o=!0,a(t))};try{r.call(e,s,u)}catch(i){if(!o)return a(i),void(o=!0)}}else n(e)}}function U(t,e,n){var a;return e=P(e),"~/"===e.substr(0,2)?(a=E(e.substring(2)),z(t,a.firstKey,n)):"."===e[0]?(a=V(cs(n),e),a&&z(t,a.firstKey,n)):a=G(t,E(e),n),a}function V(t,e){var n;if(void 0!=t&&"string"!=typeof t&&(t=t.str),"."===e)return E(t);if(n=t?t.split("."):[],"../"===e.substr(0,3)){for(;"../"===e.substr(0,3);){if(!n.length)throw Error('Could not resolve reference - too many "../" prefixes');n.pop(),e=e.substring(3)}return n.push(e),E(n.join("."))}return E(t?t+e.replace(/^\.\//,"."):e.replace(/^\.\/?/,""))}function G(t,e,n,a){var r,i,o,s,u;if(e.isRoot)return e;for(i=e.firstKey;n;)if(r=n.context,n=n.parent,r&&(s=!0,o=t.viewmodel.get(r),o&&("object"==typeof o||"function"==typeof o)&&i in o))return r.join(e.str);return W(t.viewmodel,i)?e:t.parent&&!t.isolated&&(s=!0,n=t.component.parentFragment,i=E(i),u=G(t.parent,i,n,!0))?(t.viewmodel.map(i,{origin:t.parent.viewmodel,keypath:u}),e):a||s?void 0:(t.viewmodel.set(e,void 0),e)}function z(t,e){var n;!t.parent||t.isolated||W(t.viewmodel,e)||(e=E(e),(n=G(t.parent,e,t.component.parentFragment,!0))&&t.viewmodel.map(e,{origin:t.parent.viewmodel,keypath:n}))}function W(t,e){return""===e||e in t.data||e in t.computations||e in t.mappings}function H(t){t.teardown()}function Q(t){t.unbind()}function K(t){t.unrender()}function $(t){t.cancel()}function Y(t){t.detach()}function J(t){t.detachNodes()}function X(t){!t.ready||t.outros.length||t.outroChildren||(t.outrosComplete||(t.parent?t.parent.decrementOutros(t):t.detachNodes(),t.outrosComplete=!0),t.intros.length||t.totalChildren||("function"==typeof t.callback&&t.callback(),t.parent&&t.parent.decrementTotal()))}function Z(){for(var t,e,n;ds.ractives.length;)e=ds.ractives.pop(),n=e.viewmodel.applyChanges(),n&&gs.fire(e,n);for(tt(),t=0;t=0;i--)r=t._subs[e[i]],r&&(s=gt(t,r,n,a)&&s);if(Gs.dequeue(t),t.parent&&s){if(o&&t.component){var u=t.component.name+"."+e[e.length-1];e=E(u).wildcardMatches(),n&&(n.component=t)}vt(t.parent,e,n,a)}}function gt(t,e,n,a){var r=null,i=!1;n&&!n._noArg&&(a=[n].concat(a)),e=e.slice();for(var o=0,s=e.length;s>o;o+=1)e[o].apply(t,a)===!1&&(i=!0);return n&&!n._noArg&&i&&(r=n.original)&&(r.preventDefault&&r.preventDefault(),r.stopPropagation&&r.stopPropagation()),!i}function bt(t){var e={args:Array.prototype.slice.call(arguments,1)};zs(this,t,e)}function yt(t){var e;return t=E(P(t)),e=this.viewmodel.get(t,Qs),void 0===e&&this.parent&&!this.isolated&&ls(this,t.str,this.component.parentFragment)&&(e=this.viewmodel.get(t)),e}function xt(e,n){if(!this.fragment.rendered)throw Error("The API has changed - you must call `ractive.render(target[, anchor])` to render your Ractive instance. Once rendered you can use `ractive.insert()`.");if(e=t(e),n=t(n)||null,!e)throw Error("You must specify a valid target to insert into");e.insertBefore(this.detach(),n),this.el=e,(e.__ractive_instances__||(e.__ractive_instances__=[])).push(this),this.detached=null,_t(this)}function _t(t){$s.fire(t),t.findAllComponents("*").forEach(function(t){_t(t.instance)})}function wt(t,e,n){var a,r;return t=E(P(t)),a=this.viewmodel.get(t),i(a)&&i(e)?(r=bs.start(this,!0),this.viewmodel.merge(t,a,e,n),bs.end(),r):this.set(t,e,n&&n.complete)}function kt(t,e){var n,a;return n=S(t,e),a={},n.forEach(function(e){a[e.str]=t.get(e.str)}),a}function Et(t,e,n,a){var r,i,o;e=E(P(e)),a=a||cu,e.isPattern?(r=new uu(t,e,n,a),t.viewmodel.patternObservers.push(r),i=!0):r=new Zs(t,e,n,a),r.init(a.init),t.viewmodel.register(e,r,i?"patternObservers":"observers"),r.ready=!0;var s={cancel:function(){var n;o||(i?(n=t.viewmodel.patternObservers.indexOf(r),t.viewmodel.patternObservers.splice(n,1),t.viewmodel.unregister(e,r,"patternObservers")):t.viewmodel.unregister(e,r,"observers"),o=!0)}};return t._observers.push(s),s}function St(t,e,n){var a,r,i,o;if(p(t)){n=e,r=t,a=[];for(t in r)r.hasOwnProperty(t)&&(e=r[t],a.push(this.observe(t,e,n)));return{cancel:function(){for(;a.length;)a.pop().cancel()}}}if("function"==typeof t)return n=e,e=t,t="",pu(this,t,e,n);if(i=t.split(" "),1===i.length)return pu(this,t,e,n);for(a=[],o=i.length;o--;)t=i[o],t&&a.push(pu(this,t,e,n));return{cancel:function(){for(;a.length;)a.pop().cancel()}}}function Ct(t,e,n){var a=this.observe(t,function(){e.apply(this,arguments),a.cancel()},{init:!1,defer:n&&n.defer});return a}function Pt(t,e){var n,a=this;if(t)n=t.split(" ").map(du).filter(hu),n.forEach(function(t){var n,r;(n=a._subs[t])&&(e?(r=n.indexOf(e),-1!==r&&n.splice(r,1)):a._subs[t]=[])});else for(t in this._subs)delete this._subs[t];return this}function At(t,e){var n,a,r,i=this;if("object"==typeof t){n=[];for(a in t)t.hasOwnProperty(a)&&n.push(this.on(a,t[a]));return{cancel:function(){for(var t;t=n.pop();)t.cancel()}}}return r=t.split(" ").map(du).filter(hu),r.forEach(function(t){(i._subs[t]||(i._subs[t]=[])).push(e)}),{cancel:function(){return i.off(t,e)}}}function Ot(t,e){var n=this.on(t,function(){e.apply(this,arguments),n.cancel()});return n}function Tt(t,e,n){var a,r,i,o,s,u,p=[];if(a=Rt(t,e,n),!a)return null;for(r=t.length,s=a.length-2-a[1],i=Math.min(r,a[0]),o=i+a[1],u=0;i>u;u+=1)p.push(u);for(;o>u;u+=1)p.push(-1);for(;r>u;u+=1)p.push(u+s);return 0!==s?p.touchedFrom=a[0]:p.touchedFrom=t.length,p}function Rt(t,e,n){switch(e){case"splice":for(void 0!==n[0]&&n[0]<0&&(n[0]=t.length+Math.max(n[0],-t.length));n.length<2;)n.push(0);return n[1]=Math.min(n[1],t.length-n[0]),n;case"sort":case"reverse":return null;case"pop":return t.length?[t.length-1,1]:[0,0];case"push":return[t.length,0].concat(n);case"shift":return[0,t.length?1:0];case"unshift":return[0,0].concat(n)}}function jt(e,n){var a,r,i,o=this;if(i=this.transitionsEnabled,this.noIntro&&(this.transitionsEnabled=!1),a=bs.start(this,!0),bs.scheduleTask(function(){return Ru.fire(o)},!0),this.fragment.rendered)throw Error("You cannot call ractive.render() on an already rendered instance! Call ractive.unrender() first");if(e=t(e)||this.el,n=t(n)||this.anchor,this.el=e,this.anchor=n,!this.append&&e){var s=e.__ractive_instances__;s&&s.length&&Mt(s),e.innerHTML=""}return this.cssId&&Ou.apply(),e&&((r=e.__ractive_instances__)?r.push(this):e.__ractive_instances__=[this],n?e.insertBefore(this.fragment.render(),n):e.appendChild(this.fragment.render())),bs.end(),this.transitionsEnabled=i,a.then(function(){return ju.fire(o)})}function Mt(t){t.splice(0,t.length).forEach(H)}function Lt(t,e){for(var n=t.slice(),a=e.length;a--;)~n.indexOf(e[a])||n.push(e[a]);return n}function Dt(t,e){var n,a,r;return a='[data-ractive-css~="{'+e+'}"]',r=function(t){var e,n,r,i,o,s,u,p=[];for(e=[];n=Iu.exec(t);)e.push({str:n[0],base:n[1],modifiers:n[2]});for(i=e.map(Ft),u=e.length;u--;)s=i.slice(),r=e[u],s[u]=r.base+a+r.modifiers||"",o=i.slice(),o[u]=a+" "+o[u],p.push(s.join(" "),o.join(" "));return p.join(", ")},n=qu.test(t)?t.replace(qu,a):t.replace(Fu,"").replace(Nu,function(t,e){var n,a;return Bu.test(e)?t:(n=e.split(",").map(Nt),a=n.map(r).join(", ")+" ",t.replace(e,a))})}function Nt(t){return t.trim?t.trim():t.replace(/^\s+/,"").replace(/\s+$/,"")}function Ft(t){return t.str}function It(t){t&&t.constructor!==Object&&("function"==typeof t||("object"!=typeof t?l("data option must be an object or a function, `"+t+"` is not valid"):m("If supplied, options.data should be a plain JavaScript object - using a non-POJO as the root object may work, but is discouraged")))}function Bt(t,e){It(e);var n="function"==typeof t,a="function"==typeof e;return e||n||(e={}),n||a?function(){var r=a?qt(e,this):e,i=n?qt(t,this):t;return Ut(r,i)}:Ut(e,t)}function qt(t,e){var n=t.call(e);if(n)return"object"!=typeof n&&l("Data function must return an object"),n.constructor!==Object&&v("Data function returned something other than a plain JavaScript object. This might work, but is strongly discouraged"),n}function Ut(t,e){if(t&&e){for(var n in e)n in t||(t[n]=e[n]);return t}return t||e}function Vt(t){var e=Eo(Ku);return e.parse=function(e,n){return Gt(e,n||t)},e}function Gt(t,e){if(!Hu)throw Error("Missing Ractive.parse - cannot parse template. Either preparse or use the version that includes the parser");return Hu(t,e||this.options)}function zt(t,e){var n;if(!Xi){if(e&&e.noThrow)return;throw Error("Cannot retrieve template #"+t+" as Ractive is not running in a browser.")}if(Wt(t)&&(t=t.substring(1)),!(n=document.getElementById(t))){if(e&&e.noThrow)return;throw Error("Could not find template element with id #"+t)}if("SCRIPT"!==n.tagName.toUpperCase()){if(e&&e.noThrow)return;throw Error("Template element with id #"+t+", must be a -

You start skimming through the manual...

- - - - - - "} - -/obj/item/book/manual/wiki/chemistry - name = "Chemistry Textbook" - icon_state ="chemistrybook" - author = "Nanotrasen" - title = "Chemistry Textbook" - page_link = "Guide_to_chemistry" - -/obj/item/book/manual/wiki/engineering_construction - name = "Station Repairs and Construction" - icon_state ="bookEngineering" - author = "Engineering Encyclopedia" - title = "Station Repairs and Construction" - page_link = "Guide_to_construction" - -/obj/item/book/manual/wiki/engineering_guide - name = "Engineering Textbook" - icon_state ="bookEngineering2" - author = "Engineering Encyclopedia" - title = "Engineering Textbook" - page_link = "Guide_to_engineering" - -/obj/item/book/manual/wiki/security_space_law - name = "Space Law" - desc = "A set of Nanotrasen guidelines for keeping law and order on their space stations." - icon_state = "bookSpaceLaw" - author = "Nanotrasen" - title = "Space Law" - page_link = "Space_Law" - -/obj/item/book/manual/wiki/infections - name = "Infections - Making your own pandemic!" - icon_state = "bookInfections" - author = "Infections Encyclopedia" - title = "Infections - Making your own pandemic!" - page_link = "Infections" - -/obj/item/book/manual/wiki/telescience - name = "Teleportation Science - Bluespace for dummies!" - icon_state = "book7" - author = "University of Bluespace" - title = "Teleportation Science - Bluespace for dummies!" - page_link = "Guide_to_telescience" - -/obj/item/book/manual/wiki/engineering_hacking - name = "Hacking" - icon_state ="bookHacking" - author = "Engineering Encyclopedia" - title = "Hacking" - page_link = "Hacking" +/*********************MANUALS (BOOKS)***********************/ + +//Oh god what the fuck I am not good at computer +/obj/item/book/manual + icon = 'icons/obj/library.dmi' + due_date = 0 // Game time in 1/10th seconds + unique = 1 // 0 - Normal book, 1 - Should not be treated as normal book, unable to be copied, unable to be modified + +/obj/item/book/manual/engineering_particle_accelerator + name = "Particle Accelerator User's Guide" + icon_state ="bookParticleAccelerator" + author = "Engineering Encyclopedia" // Whoever wrote the paper or book, can be changed by pen or PC. It is not automatically assigned. + title = "Particle Accelerator User's Guide" +//book contents below + + dat = {" + + + + + +

Experienced user's guide

+ +

Setting up

+ +
    +
  1. Wrench all pieces to the floor
  2. +
  3. Add wires to all the pieces
  4. +
  5. Close all the panels with your screwdriver
  6. +
+ +

Use

+ +
    +
  1. Open the control panel
  2. +
  3. Set the speed to 2
  4. +
  5. Start firing at the singularity generator
  6. +
  7. When the singularity reaches a large enough size so it starts moving on its own set the speed down to 0, but don't shut it off
  8. +
  9. Remember to wear a radiation suit when working with this machine... we did tell you that at the start, right?
  10. +
+ + + "} + + +/obj/item/book/manual/engineering_singularity_safety + name = "Singularity Safety in Special Circumstances" + icon_state ="bookEngineeringSingularitySafety" + author = "Engineering Encyclopedia" + title = "Singularity Safety in Special Circumstances" + dat = {" + + + + +

Singularity Safety in Special Circumstances

+ +

Power outage

+ + A power problem has made the entire station lose power? Could be station-wide wiring problems or syndicate power sinks. In any case follow these steps: +

+ Step one: PANIC!
+ Step two: Get your ass over to engineering! QUICKLY!!!
+ Step three: Make sure the SMES is still powering the emitters, if not, setup the generator in secure storage and disconnect the emitters from the SMES.
+ Step four: Next, head over to the APC and swipe it with your ID card - if it doesn't unlock, continue with step 15.
+ Step five: Open the console and disengage the cover lock.
+ Step six: Pry open the APC with a Crowbar.
+ Step seven: Take out the empty power cell.
+ Step eight: Put in the new, full power cell - if you don't have one, continue with step 15.
+ Step nine: Quickly put on a Radiation suit.
+ Step ten: Check if the singularity field generators withstood the down-time - if they didn't, continue with step 15.
+ Step eleven: Since disaster was averted you now have to ensure it doesn't repeat. If it was a powersink which caused it and if the engineering apc is wired to the same powernet, which the powersink is on, you have to remove the piece of wire which links the apc to the powernet. If it wasn't a powersink which caused it, then skip to step 14.
+ Step twelve: Grab your crowbar and pry away the tile closest to the APC.
+ Step thirteen: Use the wirecutters to cut the wire which is conecting the grid to the terminal.
+ Step fourteen: Go to the bar and tell the guys how you saved them all. Stop reading this guide here.
+ Step fifteen: GET THE FUCK OUT OF THERE!!!
+

+ +

Shields get damaged

+ + Step one: GET THE FUCK OUT OF THERE!!! FORGET THE WOMEN AND CHILDREN, SAVE YOURSELF!!!
+ + + "} + +/obj/item/book/manual/hydroponics_pod_people + name = "The Human Harvest - From seed to market" + icon_state ="bookHydroponicsPodPeople" + author = "Farmer John" + title = "The Human Harvest - From seed to market" + dat = {" + + + + +

Growing Humans

+ + Why would you want to grow humans? Well I'm expecting most readers to be in the slave trade, but a few might actually + want to revive fallen comrades. Growing pod people is easy, but prone to disaster. +

+

    +
  1. Find a dead person who is in need of cloning.
  2. +
  3. Take a blood sample with a syringe.
  4. +
  5. Inject a seed pack with the blood sample.
  6. +
  7. Plant the seeds.
  8. +
  9. Tend to the plants water and nutrition levels until it is time to harvest the cloned human.
  10. +
+

+ It really is that easy! Good luck! + + + + "} + +/obj/item/book/manual/medical_cloning + name = "Cloning techniques of the 26th century" + icon_state ="bookCloning" + author = "Medical Journal, volume 3" + title = "Cloning techniques of the 26th century" + dat = {" + + + + + +

How to Clone People

+ So there's fifty dead people lying on the floor, chairs are spinning like no tomorrow and you haven't the foggiest idea of what to do? Not to worry! This guide is intended to teach you how to clone people and how to do it right, in a simple step-by-step process! If at any point of the guide you have a mental meltdown, genetics probably isn't for you and you should get a job-change as soon as possible before you're sued for malpractice. + +
    +
  1. Acquire body/head/brain
  2. +
  3. Put body/head/brain in cloning machine
  4. +
  5. Scan body/head/brain
  6. +
  7. Clone body/head/brain
  8. +
  9. Get Mannitol, Mutadone, or a clean SE for the clone
  10. +
  11. Put remains in morgue
  12. +
  13. Await cloned body
  14. +
  15. Give the clone Mannitol and Mutadone, or a clean SE
  16. +
  17. Give person clothes back
  18. +
  19. Place clone in cryo
  20. +
  21. Send person on their way
  22. +
+ +

Step 1: Acquire a body, head, or brain

+ This is pretty much vital for the process because without a body, you cannot clone it. Usually, bodies will be brought to you, so you do not need to worry so much about this step. If you already have a body, head, or even a brain, great! Move on to the next step. + +

Step 2: Put the body/head/brain in cloning machine

+ Grab the body, head, or brain and then put it inside the DNA modifier. + +

Step 3: Scan the body/head/brain

+ Go onto the computer and scan the body by pressing 'Scan - '. If you're successful, they will be added to the records (note that this can be done at any time, even with living people, so that they can be cloned without a body in the event that they are lying dead on port solars and didn't turn on their suit sensors As an added bonus, they have a health monitoring implant, which'll allow you to check their vitals from their record in the cloning console)! If not, and it says 'Error: Mental interface failure.', then they have left their bodily confines and are one with the spirits. If this happens, just shout at them to get back in their body, click 'Refresh' and try scanning them again. If there's no success, threaten them with gibbing. Still no success? Skip over to Step 7 and don't continue after it, as you have an unresponsive body and it cannot be cloned. If you got 'Error: Unable to locate valid genetic data', you are trying to clone a monkey - start over. + +

Step 4: Clone the body/head/brain

+ Now that the body has a record, click 'View Records', click the subject's name, and then click 'Clone' to start the cloning process. Congratulations! You're halfway there. Remember not to 'Eject' the cloning pod as this will kill the developing clone and you'll have to start the process again. + +

Step 5: Get Mannitol, Mutadone, or a clean SE for the clone

+ Cloning is a finicky and unreliable process. Whilst it will most certainly bring someone back from the dead, they can have any number of nasty disabilities given to them during the cloning process! For this reason, you need Mutadone, or a clean, defect-free Structural Enzyme (SE) injection for when they're done. If you're a competent Geneticist, you will already have one ready on your working computer. If, for any reason, you do not, then eject the body from the DNA modifier (NOT THE CLONING POD) and take it next door to the Genetics research room. Put the body in one of those DNA modifiers and then go onto the console. Go into View/Edit/Transfer Buffer, find an open slot and click 'SE' to save it. Then click 'Injector' to get the SEs in syringe form. Put this in your pocket or something for when the body is done. Do note, most Genetic labs have Mannitol and Mutadone pills readily available, provided no-one has stolen them or ate them all. Don't forget most clones will also have severe brain damage as well, to fix this, give them a Mannitol pill or injection. + +

Step 6: Put remains in morgue

+ Now that the cloning process has been initiated and you hopefully have some Mannitol, Mutadone, and a clean Structural Enzymes, you no longer need the body! Drag it to the morgue and tell the Chef over the radio that they have some fresh meat waiting for them in there, or call the Chaplain so they can prepare an impromptu funeral. To put a body in a morgue bed, simply open the tray, grab the body, put it on the open tray, then close the tray again. Use a pen to label the morgue tray 'CHEF MEAT' or 'CLONED' in order to avoid confusion. + +

Step 7: Await cloned body

+ Now go back to the lab and wait for your patient to be cloned. This can take atleast three minutes at the least. + +

Step 8: Give the clone Mannitol and Mutadone, or a clean SE

+ Has your patient been cloned yet? Great! As soon as the clone pops out, administer Mannitol and Mutadone. Then move onto the next step. In the event you have no Mutadone, a clean SE will suffice, but keep in mind this may irradiate the patient, causing more problems! + +

Step 9: Give person their clothes back

+ Obviously the person will be naked after they have been cloned. Provided you weren't an irresponsible little shit, you should have protected their possessions from thieves and should be able to give them back to the patient. No matter how cruel you are, it's simply against protocol to force your patients to walk outside naked. + +

Step 10: Place clone in cryo

+ An unfortunate problem with speedcloning technology is that the clone will suffer from severe genetic degradation upon exiting the pod. To rectify this, ensure the nearby cryogenic cells are 1.) at freezing temperatures (normally around 73.15 K), and 2.) filled with cryoxadone, or clonexadone. Once you've assured both conditions are met, place the clone in the cryogenic tube, and turn it on. Remember to set the door to 'Auto' ejection, else the clone will be stuck in cryo until someone releases them. You can also kill two birds with one stone and add Mannitol and Mutadone to the beaker, which'll heal the brain damage, along with removing any genetic defects. + +

Step 11: Send person on their way

+ Give the patient one last check-over - make sure they don't still have any defects and that they have all their possessions. Ask them how they died, if they know, so that you can report any foul play over the radio. Once you're done, your patient is ready to go back to work! Chances are they do not have Medbay access, so you should let them out of Genetics and the Medbay main entrance. + +

If you've gotten this far, congratulations! You have mastered the art of cloning. Now, the real problem is how to resurrect yourself after that traitor had his way with you for cloning his target. + + + + + + "} + + +/obj/item/book/manual/ripley_build_and_repair + name = "APLU \"Ripley\" Construction and Operation Manual" + icon_state ="book" + author = "Weyland-Yutani Corp" + title = "APLU \"Ripley\" Construction and Operation Manual" + dat = {" + + + + +

+ Weyland-Yutani - Building Better Worlds +

Autonomous Power Loader Unit \"Ripley\"

+
+

Specifications:

+
    +
  • Class: Autonomous Power Loader
  • +
  • Scope: Logistics and Construction
  • +
  • Weight: 820kg (without operator and with empty cargo compartment)
  • +
  • Height: 2.5m
  • +
  • Width: 1.8m
  • +
  • Top speed: 5km/hour
  • +
  • Operation in vacuum/hostile environment: Possible +
  • Airtank Volume: 500liters
  • +
  • Devices: +
      +
    • Hydraulic Clamp
    • +
    • High-speed Drill
    • +
    +
  • +
  • Propulsion Device: Powercell-powered electro-hydraulic system.
  • +
  • Powercell capacity: Varies.
  • +
+ +

Construction:

+
    +
  1. Connect all exosuit parts to the chassis frame
  2. +
  3. Connect all hydraulic fittings and tighten them up with a wrench
  4. +
  5. Adjust the servohydraulics with a screwdriver
  6. +
  7. Wire the chassis. (Cable is not included.)
  8. +
  9. Use the wirecutters to remove the excess cable if needed.
  10. +
  11. Install the central control module (Not included. Use supplied datadisk to create one).
  12. +
  13. Secure the mainboard with a screwdriver.
  14. +
  15. Install the peripherals control module (Not included. Use supplied datadisk to create one).
  16. +
  17. Secure the peripherals control module with a screwdriver
  18. +
  19. Install the internal armor plating (Not included due to Nanotrasen regulations. Can be made using 5 metal sheets.)
  20. +
  21. Secure the internal armor plating with a wrench
  22. +
  23. Weld the internal armor plating to the chassis
  24. +
  25. Install the external reinforced armor plating (Not included due to Nanotrasen regulations. Can be made using 5 reinforced metal sheets.)
  26. +
  27. Secure the external reinforced armor plating with a wrench
  28. +
  29. Weld the external reinforced armor plating to the chassis
  30. +
  31. +
  32. Additional Information:
  33. +
  34. The firefighting variation is made in a similar fashion.
  35. +
  36. A firesuit must be connected to the Firefighter chassis for heat shielding.
  37. +
  38. Internal armor is plasteel for additional strength.
  39. +
  40. External armor must be installed in 2 parts, totaling 10 sheets.
  41. +
  42. Completed mech is more resiliant against fire, and is a bit more durable overall
  43. +
  44. Nanotrasen is determined to the safety of its investments employees.
  45. +
+ + + +

Operation

+ Coming soon... + "} + +/obj/item/book/manual/experimentor + name = "Mentoring your Experiments" + icon_state = "rdbook" + author = "Dr. H.P. Kritz" + title = "Mentoring your Experiments" + dat = {" + + + + +

THE E.X.P.E.R.I-MENTOR

+ The Enhanced Xenobiological Period Extraction (and) Restoration Instructor is a machine designed to discover the secrets behind every item in existence. + With advanced technology, it can process 99.95% of items, and discover their uses and secrets. + The E.X.P.E.R.I-MENTOR is a Research apparatus that takes items, and through a process of elimination, it allows you to deduce new technological designs from them. + Due to the volatile nature of the E.X.P.E.R.I-MENTOR, there is a slight chance for malfunction, potentially causing irreparable damage to you or your environment. + However, upgrading the apparatus has proven to decrease the chances of undesirable, potentially life-threatening outcomes. + Please note that the E.X.P.E.R.I-MENTOR uses a state-of-the-art random generator, which has a larger entropy than the observable universe, + therefore it can generate wildly different results each day, therefore it is highly suggested to re-scan objects of interests frequently (e.g. each shift). + +

BASIC PROCESS

+ The usage of the E.X.P.E.R.I-MENTOR is quite simple: +
    +
  1. Find an item with a technological background
  2. +
  3. Insert the item into the E.X.P.E.R.I-MENTOR
  4. +
  5. Cycle through each processing method of the device.
  6. +
  7. Stand back, even in case of a successful experiment, as the machine might produce undesired behaviour.
  8. +
+ +

ADVANCED USAGE

+ The E.X.P.E.R.I-MENTOR has a variety of uses, beyond menial research work. The different results can be used to combat localised events, or even to get special items. + + The E.X.P.E.R.I-MENTOR's OBLITERATE function has the added use of transferring the destroyed item's material into a linked lathe. + + The IRRADIATE function can be used to transform items into other items, resulting in potential upgrades (or downgrades). + + Users should remember to always wear appropriate protection when using the machine, because malfunction can occur at any moment! + +

EVENTS

+

GLOBAL (happens at any time):

+
    +
  1. DETECTION MALFUNCTION - The machine's onboard sensors have malfunctioned, causing it to redefine the item's experiment type. + Produces the message: The E.X.P.E.R.I-MENTOR's onboard detection system has malfunctioned!
  2. + +
  3. IANIZATION - The machine's onboard corgi-filter has malfunctioned, causing it to produce a corgi from.. somewhere. + Produces the message: The E.X.P.E.R.I-MENTOR melts the banana, ian-izing the air around it!
  4. + +
  5. RUNTIME ERROR - The machine's onboard C4T-P processor has encountered a critical error, causing it to produce a cat from.. somewhere. + Produces the message: The E.X.P.E.R.I-MENTOR encounters a run-time error!
  6. + +
  7. B100DG0D.EXE - The machine has encountered an unknown subroutine, which has been injected into its runtime. It upgrades the held item! + Produces the message: The E.X.P.E.R.I-MENTOR improves the banana, drawing the life essence of those nearby!
  8. + +
  9. POWERSINK - The machine's PSU has tripped the charging mechanism! It consumes massive amounts of power! + Produces the message: The E.X.P.E.R.I-MENTOR begins to smoke and hiss, shaking violently!
  10. +
+

FAIL:

+ This event is produced when the item mismatches the selected experiment. + Produces a random message similar to: "the Banana rumbles, and shakes, the experiment was a failure!" + +

POKE:

+
    +
  1. WILD ARMS - The machine's gryoscopic processors malfunction, causing it to lash out at nearby people with its arms. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions and destroys the banana, lashing its arms out at nearby people!
  2. + +
  3. MISTYPE - The machine's interface has been garbled, and it switches to OBLITERATE. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions!
  4. + +
  5. THROW - The machine's spatial recognition device has shifted several meters across the room, causing it to try and repostion the item there. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, throwing the banana!
  6. +
+

IRRADIATE:

+
    +
  1. RADIATION LEAK - The machine's shield has failed, resulting in a toxic radiation leak. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and leaking radiation!
  2. + +
  3. RADIATION DUMP - The machine's recycling and containment functions have failed, resulting in a dump of toxic waste around it + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, spewing toxic waste!
  4. + +
  5. MUTATION - The machine's radio-isotope level meter has malfunctioned, causing it over-irradiate the item, making it transform. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, transforming the banana!
  6. +
+

GAS:

+
    +
  1. TOXIN LEAK - The machine's filtering and vent systems have failed, resulting in a cloud of toxic gas being expelled. + Produces the message: The E.X.P.E.R.I-MENTOR destroys the banana, leaking dangerous gas!
  2. + +
  3. GAS LEAK - The machine's vent systems have failed, resulting in a cloud of harmless, but obscuring gas. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, spewing harmless gas!
  4. + +
  5. ELECTROMAGNETIC IONS - The machine's electrolytic scanners have failed, causing a dangerous Electromagnetic reaction. + Produces the message: The E.X.P.E.R.I-MENTOR melts the banana, ionizing the air around it!
  6. +
+

HEAT:

+
    +
  1. TOASTER - The machine's heating coils have come into contact with the machine's gas storage, causing a large, sudden blast of flame. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and releasing a burst of flame!
  2. + +
  3. SAUNA - The machine's vent loop has sprung a leak, resulting in a large amount of superheated air being dumped around it. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, melting the banana and leaking hot air!
  4. + +
  5. EMERGENCY VENT - The machine's temperature gauge has malfunctioned, resulting in it attempting to cool the area around it, but instead, dumping a cloud of steam. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, activating its emergency coolant systems!
  6. +
+

COLD:

+
    +
  1. FREEZER - The machine's cooling loop has sprung a leak, resulting in a cloud of super-cooled liquid being blasted into the air. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, shattering the banana and releasing a dangerous cloud of coolant!
  2. + +
  3. FRIDGE - The machine's cooling loop has been exposed to the outside air, resulting in a large decrease in temperature. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, shattering the banana and leaking cold air!
  4. + +
  5. SNOWSTORM - The machine's cooling loop has come into contact with the heating coils, resulting in a sudden blast of cool air. + Produces the message: The E.X.P.E.R.I-MENTOR malfunctions, releasing a flurry of chilly air as the banana pops out!
  6. +
+

OBLITERATE:

+
    +
  1. IMPLOSION - The machine's pressure leveller has malfunctioned, causing it to pierce the space-time momentarily, making everything in the area fly towards it. + Produces the message: The E.X.P.E.R.I-MENTOR's crusher goes way too many levels too high, crushing right through space-time!
  2. + +
  3. DISTORTION - The machine's pressure leveller has completely disabled, resulting in a momentary space-time distortion, causing everything to fly around. + Produces the message: The E.X.P.E.R.I-MENTOR's crusher goes one level too high, crushing right into space-time!
  4. +
+ + + "} + +/obj/item/book/manual/research_and_development + name = "Research and Development 101" + icon_state = "rdbook" + author = "Dr. L. Ight" + title = "Research and Development 101" + dat = {" + + + + + +

Science For Dummies

+ So you want to further SCIENCE? Good man/woman/thing! However, SCIENCE is a complicated process even though it's quite easy. For the most part, it's a three step process: +
    +
  1. 1) Deconstruct items in the Destructive Analyzer to advance technology or improve the design.
  2. +
  3. 2) Build unlocked designs in the Protolathe and Circuit Imprinter
  4. +
  5. 3) Repeat!
  6. +
+ + Those are the basic steps to furthing science. What do you do science with, however? Well, you have four major tools: R&D Console, the Destructive Analyzer, the Protolathe, and the Circuit Imprinter. + +

The R&D Console

+ The R&D console is the cornerstone of any research lab. It is the central system from which the Destructive Analyzer, Protolathe, and Circuit Imprinter (your R&D systems) are controled. More on those systems in their own sections. On its own, the R&D console acts as a database for all your technological gains and new devices you discover. So long as the R&D console remains intact, you'll retain all that SCIENCE you've discovered. Protect it though, because if it gets damaged, you'll lose your data! In addition to this important purpose, the R&D console has a disk menu that lets you transfer data from the database onto disk or from the disk into the database. It also has a settings menu that lets you re-sync with nearby R&D devices (if they've become disconnected), lock the console from the unworthy, upload the data to all other R&D consoles in the network (all R&D consoles are networked by default), connect/disconnect from the network, and purge all data from the database. + NOTE: The technology list screen, circuit imprinter, and protolathe menus are accessible by non-scientists. This is intended to allow 'public' systems for the plebians to utilize some new devices. + +

Destructive Analyzer

+ This is the source of all technology. Whenever you put a handheld object in it, it analyzes it and determines what sort of technological advancements you can discover from it. If the technology of the object is equal or higher then your current knowledge, you can destroy the object to further those sciences. Some devices (notably, some devices made from the protolathe and circuit imprinter) aren't 100% reliable when you first discover them. If these devices break down, you can put them into the Destructive Analyzer and improve their reliability rather then futher science. If their reliability is high enough ,it'll also advance their related technologies. + +

Circuit Imprinter

+ This machine, along with the Protolathe, is used to actually produce new devices. The Circuit Imprinter takes glass and various chemicals (depends on the design) to produce new circuit boards to build new machines or computers. It can even be used to print AI modules. + +

Protolathe

+ This machine is an advanced form of the Autolathe that produce non-circuit designs. Unlike the Autolathe, it can use processed metal, glass, solid plasma, silver, gold, and diamonds along with a variety of chemicals to produce devices. The downside is that, again, not all devices you make are 100% reliable when you first discover them. + +

Reliability and You

+ As it has been stated, many devices when they're first discovered do not have a 100% reliablity when you first discover them. Instead, the reliablity of the device is dependent upon a base reliability value, whatever improvements to the design you've discovered through the Destructive Analyzer, and any advancements you've made with the device's source technologies. To be able to improve the reliability of a device, you have to use the device until it breaks beyond repair. Once that happens, you can analyze it in a Destructive Analyzer. Once the device reachs a certain minimum reliability, you'll gain tech advancements from it. + +

Building a Better Machine

+ Many machines produces from circuit boards and inserted into a machine frame require a variety of parts to construct. These are parts like capacitors, batteries, matter bins, and so forth. As your knowledge of science improves, more advanced versions are unlocked. If you use these parts when constructing something, its attributes may be improved. For example, if you use an advanced matter bin when constructing an autolathe (rather then a regular one), it'll hold more materials. Experiment around with stock parts of various qualities to see how they affect the end results! Be warned, however: Tier 3 and higher stock parts don't have 100% reliability and their low reliability may affect the reliability of the end machine. + + + "} + + +/obj/item/book/manual/robotics_cyborgs + name = "Cyborgs for Dummies" + icon_state = "borgbook" + author = "XISC" + title = "Cyborgs for Dummies" + dat = {" + + + + + +

Cyborgs for Dummies

+ +

Chapters

+ +
    +
  1. Cyborg Related Equipment
  2. +
  3. Cyborg Modules
  4. +
  5. Cyborg Construction
  6. +
  7. Cyborg Deconstruction
  8. +
  9. Cyborg Maintenance
  10. +
  11. Cyborg Repairs
  12. +
  13. In Case of Emergency
  14. +
+ + +

Cyborg Related Equipment

+ +

Exosuit Fabricator

+ The Exosuit Fabricator is the most important piece of equipment related to cyborgs. It allows the construction of the core cyborg parts. Without these machines, cyborgs can not be built. It seems that they may also benefit from advanced research techniques. + +

Cyborg Recharging Station

+ This useful piece of equipment will suck power out of the power systems to charge a cyborg's power cell back up to full charge. + +

Robotics Control Console

+ This useful piece of equipment can be used to immobolize or destroy a cyborg. A word of warning: Cyborgs are expensive pieces of equipment, do not destroy them without good reason, or Nanotrasen may see to it that it never happens again. + + +

Cyborg Modules

+ When a cyborg is created it picks out of an array of modules to designate its purpose. There are 6 different cyborg modules. + +

Standard Cyborg

+ The standard cyborg module is a multi-purpose cyborg. It is equipped with various modules, allowing it to do basic tasks.
+ +

Engineering Cyborg

+ The Engineering cyborg module comes equipped with various engineering-related tools to help with engineering-related tasks.
+ +

Mining Cyborg

+ The Mining Cyborg module comes equipped with the latest in mining equipment. They are efficient at mining due to no need for oxygen, but their power cells limit their time in the mines. + +

Security Cyborg

+ The Security Cyborg module is equipped with effective security measures used to apprehend and arrest criminals without harming them a bit. + +

Janitor Cyborg

+ The Janitor Cyborg module is equipped with various cleaning-facilitating devices. + +

Service Cyborg

+ The service cyborg module comes ready to serve your human needs. It includes various entertainment and refreshment devices. Occasionally some service cyborgs may have been referred to as "Bros" + +

Cyborg Construction

+ Cyborg construction is a rather easy process, requiring a decent amount of metal and a few other supplies.
The required materials to make a cyborg are: +
    +
  • Metal
  • +
  • Two Flashes
  • +
  • One Power Cell (Preferrably rated to 15000w)
  • +
  • Some electrical wires
  • +
  • One Human Brain
  • +
  • One Man-Machine Interface
  • +
+ Once you have acquired the materials, you can start on construction of your cyborg.
To construct a cyborg, follow the steps below: +
    +
  1. Start the Exosuit Fabricators constructing all of the cyborg parts
  2. +
  3. While the parts are being constructed, take your human brain, and place it inside the Man-Machine Interface
  4. +
  5. Once you have a Robot Head, place your two flashes inside the eye sockets
  6. +
  7. Once you have your Robot Chest, wire the Robot chest, then insert the power cell
  8. +
  9. Attach all of the Robot parts to the Robot frame
  10. +
  11. Insert the Man-Machine Interface (With the Brain inside) Into the Robot Body
  12. +
  13. Congratulations! You have a new cyborg!
  14. +
+ +

Cyborg Deconstruction

+ If you want to deconstruct a cyborg, say to remove its MMI without blowing the Cyborg to pieces, they come apart very quickly, and very safely, in a few simple steps. +
    +
  • Crowbar
  • +
  • Wrench
  • + Optional: +
  • Screwdriver
  • +
  • Wirecutters
  • +
+
    +
  1. Begin by unlocking the Cyborg's access panel using your ID
  2. +
  3. Use your crowbar to open the Cyborg's access panel
  4. +
  5. Using your bare hands, remove the power cell from the Cyborg
  6. +
  7. Lockdown the Cyborg to disengage safety protocols
  8. +
      + Option 1: Robotics console +
    1. Use the Robotics console in the RD's office
    2. +
    3. Find the entry for your Cyborg
    4. +
    5. Press the Lockdown button on the Robotics console
    6. +
    +
      + Option 2: Lockdown wire +
    1. Use your screwdriver to expose the Cyborg's wiring
    2. +
    3. Use your wirecutters to start cutting all of the wires until the lockdown light turns off, cutting all of the wires irregardless of the lockdown light works as well
    4. +
    +
  9. Use your wrench to unfasten the Cyborg's bolts, the Cyborg will then fall apart onto the floor, the MMI will be there as well
  10. +
+ +

Cyborg Maintenance

+ Occasionally Cyborgs may require maintenance of a couple types, this could include replacing a power cell with a charged one, or possibly maintaining the cyborg's internal wiring. + +

Replacing a Power Cell

+ Replacing a Power cell is a common type of maintenance for cyborgs. It usually involves replacing the cell with a fully charged one, or upgrading the cell with a larger capacity cell.
The steps to replace a cell are follows: +
    +
  1. Unlock the Cyborg's Interface by swiping your ID on it
  2. +
  3. Open the Cyborg's outer panel using a crowbar
  4. +
  5. Remove the old power cell
  6. +
  7. Insert the new power cell
  8. +
  9. Close the Cyborg's outer panel using a crowbar
  10. +
  11. Lock the Cyborg's Interface by swiping your ID on it, this will prevent non-qualified personnel from attempting to remove the power cell
  12. +
+ +

Exposing the Internal Wiring

+ Exposing the internal wiring of a cyborg is fairly easy to do, and is mainly used for cyborg repairs.
You can easily expose the internal wiring by following the steps below: +
    +
  1. Follow Steps 1 - 3 of "Replacing a Cyborg's Power Cell"
  2. +
  3. Open the cyborg's internal wiring panel by using a screwdriver to unsecure the panel
  4. +
+ To re-seal the cyborg's internal wiring: +
    +
  1. Use a screwdriver to secure the cyborg's internal panel
  2. +
  3. Follow steps 4 - 6 of "Replacing a Cyborg's Power Cell" to close up the cyborg
  4. +
+ +

Cyborg Repairs

+ Occasionally a Cyborg may become damaged. This could be in the form of impact damage from a heavy or fast-travelling object, or it could be heat damage from high temperatures, or even lasers or Electromagnetic Pulses (EMPs). + +

Dents

+ If a cyborg becomes damaged due to impact from heavy or fast-moving objects, it will become dented. Sure, a dent may not seem like much, but it can compromise the structural integrity of the cyborg, possibly causing a critical failure. + Dents in a cyborg's frame are rather easy to repair, all you need is to apply a welding tool to the dented area, and the high-tech cyborg frame will repair the dent under the heat of the welder. + +

Excessive Heat Damage

+ If a cyborg becomes damaged due to excessive heat, it is likely that the internal wires will have been damaged. You must replace those wires to ensure that the cyborg remains functioning properly.
To replace the internal wiring follow the steps below: +
    +
  1. Unlock the Cyborg's Interface by swiping your ID
  2. +
  3. Open the Cyborg's External Panel using a crowbar
  4. +
  5. Remove the Cyborg's Power Cell
  6. +
  7. Using a screwdriver, expose the internal wiring or the Cyborg
  8. +
  9. Replace the damaged wires inside the cyborg
  10. +
  11. Secure the internal wiring cover using a screwdriver
  12. +
  13. Insert the Cyborg's Power Cell
  14. +
  15. Close the Cyborg's External Panel using a crowbar
  16. +
  17. Lock the Cyborg's Interface by swiping your ID
  18. +
+ These repair tasks may seem difficult, but are essential to keep your cyborgs running at peak efficiency. + +

In Case of Emergency

+ In case of emergency, there are a few steps you can take. + +

"Rogue" Cyborgs

+ If the cyborgs seem to become "rogue", they may have non-standard laws. In this case, use extreme caution. + To repair the situation, follow these steps: +
    +
  1. Locate the nearest robotics console
  2. +
  3. Determine which cyborgs are "Rogue"
  4. +
  5. Press the lockdown button to immobolize the cyborg
  6. +
  7. Locate the cyborg
  8. +
  9. Expose the cyborg's internal wiring
  10. +
  11. Check to make sure the LawSync and AI Sync lights are lit
  12. +
  13. If they are not lit, pulse the LawSync wire using a multitool to enable the cyborg's Law Sync
  14. +
  15. Proceed to a cyborg upload console. Nanotrasen usually places these in the same location as AI uplaod consoles.
  16. +
  17. Use a "Reset" upload moduleto reset the cyborg's laws
  18. +
  19. Proceed to a Robotics Control console
  20. +
  21. Remove the lockdown on the cyborg
  22. +
+ +

As a last resort

+ If all else fails in a case of cyborg-related emergency. There may be only one option. Using a Robotics Control console, you may have to remotely detonate the cyborg. +

WARNING:

Do not detonate a borg without an explicit reason for doing so. Cyborgs are expensive pieces of Nanotrasen equipment, and you may be punished for detonating them without reason. + + + + "} + + + +/obj/item/book/manual/chef_recipes + name = "Chef Recipes" + icon_state = "cooked_book" + author = "Lord Frenrir Cageth" + title = "Chef Recipes" + dat = {" + + + + + +

Food for Dummies

+ Here is a guide on basic food recipes and also how to not poison your customers accidentally. + + +

Basic ingredients preparation:

+ + Dough: 10u water + 15u flour for simple dough.
+ 15u egg yolk + 15u flour + 5u sugar for cake batter.
+ Doughs can be transformed by using a knife and rolling pin.
+ All doughs can be microwaved.
+ Bowl: Add water to it for soup preparation.
+ Meat: Microwave it, process it, slice it into microwavable cutlets with your knife, or use it raw.
+ Cheese: Add 5u universal enzyme (catalyst) to milk and soy milk to prepare cheese (sliceable) and tofu.
+ Rice: Mix 10u rice with 10u water in a bowl then microwave it. + +

Custom food:

+ Add ingredients to a base item to prepare a custom meal.
+ The bases are:
+ - bun (burger)
+ - breadslices(sandwich)
+ - plain bread
+ - plain pie
+ - vanilla cake
+ - empty bowl (salad)
+ - bowl with 10u water (soup)
+ - boiled spaghetti
+ - pizza bread
+ - metal rod (kebab) + +

Table Craft:

+ Put ingredients on table, then click and drag the table onto yourself to see what recipes you can prepare. + +

Microwave:

+ Use it to cook or boil food ingredients (meats, doughs, egg, spaghetti, donkpocket, etc...). + It can cook multiple items at once. + +

Processor:

+ Use it to process certain ingredients (meat into faggot, doughslice into spaghetti, potato into fries,etc...) + +

Gibber:

+ Stuff an animal in it to grind it into meat. + +

Meat spike:

+ Stick an animal on it then begin collecting its meat. + + +

Example recipes:

+ Vanilla Cake: Microwave cake batter.
+ Burger: 1 bun + 1 meat steak
+ Bread: Microwave dough.
+ Waffles: 2 pastry base
+ Popcorn: Microwave corn.
+ Meat Steak: Microwave meat.
+ Meat Pie: 1 plain pie + 1u black pepper + 1u salt + 2 meat cutlets
+ Boiled Spagetti: Microwave spaghetti.
+ Donuts: 1u sugar + 1 pastry base
+ Fries: Process potato. + +

Sharing your food:

+ You can put your meals on your kitchen counter or load them in the snack vending machines. + + + "} + + +/obj/item/book/manual/barman_recipes + name = "Barman Recipes" + icon_state = "barbook" + author = "Sir John Rose" + title = "Barman Recipes" + dat = {" + + + + + +

Drinks for dummies

+ Heres a guide for some basic drinks. + +

Manly Dorf:

+ Mix ale and beer into a glass. + +

Grog:

+ Mix rum and water into a glass. + +

Black Russian:

+ Mix vodka and kahlua into a glass. + +

Irish Cream:

+ Mix cream and whiskey into a glass. + +

Screwdriver:

+ Mix vodka and orange juice into a glass. + +

Cafe Latte:

+ Mix milk and coffee into a glass. + +

Mead:

+ Mix Enzyme, water and sugar into a glass. + +

Gin Tonic:

+ Mix gin and tonic into a glass. + +

Classic Martini:

+ Mix vermouth and gin into a glass. + + + + + "} + + +/obj/item/book/manual/detective + name = "The Film Noir: Proper Procedures for Investigations" + icon_state ="bookDetective" + author = "Nanotrasen" + title = "The Film Noir: Proper Procedures for Investigations" + dat = {" + + + + +

Detective Work

+ + Between your bouts of self-narration, and drinking whiskey on the rocks, you might get a case or two to solve.
+ To have the best chance to solve your case, follow these directions: +

+

    +
  1. Go to the crime scene.
  2. +
  3. Take your scanner and scan EVERYTHING (Yes, the doors, the tables, even the dog.)
  4. +
  5. Once you are reasonably certain you have every scrap of evidence you can use, find all possible entry points and scan them, too.
  6. +
  7. Return to your office.
  8. +
  9. Using your forensic scanning computer, scan your Scanner to upload all of your evidence into the database.
  10. +
  11. Browse through the resulting dossiers, looking for the one that either has the most complete set of prints, or the most suspicious items handled.
  12. +
  13. If you have 80% or more of the print (The print is displayed) go to step 10, otherwise continue to step 8.
  14. +
  15. Look for clues from the suit fibres you found on your perp, and go about looking for more evidence with this new information, scanning as you go.
  16. +
  17. Try to get a fingerprint card of your perp, as if used in the computer, the prints will be completed on their dossier.
  18. +
  19. Assuming you have enough of a print to see it, grab the biggest complete piece of the print and search the security records for it.
  20. +
  21. Since you now have both your dossier and the name of the person, print both out as evidence, and get security to nab your baddie.
  22. +
  23. Give yourself a pat on the back and a bottle of the ships finest vodka, you did it!
  24. +
+

+ It really is that easy! Good luck! + + + "} + +/obj/item/book/manual/nuclear + name = "Fission Mailed: Nuclear Sabotage 101" + icon_state ="bookNuclear" + author = "Syndicate" + title = "Fission Mailed: Nuclear Sabotage 101" + dat = {" + Nuclear Explosives 101:
+ Hello and thank you for choosing the Syndicate for your nuclear information needs.
+ Today's crash course will deal with the operation of a Fusion Class Nanotrasen made Nuclear Device.
+ First and foremost, DO NOT TOUCH ANYTHING UNTIL THE BOMB IS IN PLACE.
+ Pressing any button on the compacted bomb will cause it to extend and bolt itself into place.
+ If this is done to unbolt it one must completely log in which at this time may not be possible.
+ To make the nuclear device functional:
+

  • Place the nuclear device in the designated detonation zone.
  • +
  • Extend and anchor the nuclear device from its interface.
  • +
  • Insert the nuclear authorisation disk into slot.
  • +
  • Type numeric authorisation code into the keypad. This should have been provided. Note: If you make a mistake press R to reset the device. +
  • Press the E button to log onto the device.
  • + You now have activated the device. To deactivate the buttons at anytime for example when you've already prepped the bomb for detonation remove the auth disk OR press the R on the keypad.
    + Now the bomb CAN ONLY be detonated using the timer. Manual detonation is not an option.
    + Note: Nanotrasen is a pain in the neck.
    + Toggle off the SAFETY.
    + Note: You wouldn't believe how many Syndicate Operatives with doctorates have forgotten this step.
    + So use the - - and + + to set a det time between 5 seconds and 10 minutes.
    + Then press the timer toggle button to start the countdown.
    + Now remove the auth. disk so that the buttons deactivate.
    + Note: THE BOMB IS STILL SET AND WILL DETONATE
    + Now before you remove the disk if you need to move the bomb you can:
    + Toggle off the anchor, move it, and re-anchor.

    + Good luck. Remember the order:
    + Disk, Code, Safety, Timer, Disk, RUN!
    + Intelligence Analysts believe that normal Nanotrasen procedure is for the Captain to secure the nuclear authorisation disk.
    + Good luck! + "} + +// Wiki books that are linked to the configured wiki link. + +// A book that links to the wiki +/obj/item/book/manual/wiki + var/page_link = "" + window_size = "970x710" + +/obj/item/book/manual/wiki/attack_self() + if(!dat) + initialize_wikibook() + ..() + +/obj/item/book/manual/wiki/proc/initialize_wikibook() + var/wikiurl = CONFIG_GET(string/wikiurl) + if(wikiurl) + dat = {" + + + + + + +

    You start skimming through the manual...

    + + + + + + "} + +/obj/item/book/manual/wiki/chemistry + name = "Chemistry Textbook" + icon_state ="chemistrybook" + author = "Nanotrasen" + title = "Chemistry Textbook" + page_link = "Guide_to_chemistry" + +/obj/item/book/manual/wiki/engineering_construction + name = "Station Repairs and Construction" + icon_state ="bookEngineering" + author = "Engineering Encyclopedia" + title = "Station Repairs and Construction" + page_link = "Guide_to_construction" + +/obj/item/book/manual/wiki/engineering_guide + name = "Engineering Textbook" + icon_state ="bookEngineering2" + author = "Engineering Encyclopedia" + title = "Engineering Textbook" + page_link = "Guide_to_engineering" + +/obj/item/book/manual/wiki/security_space_law + name = "Space Law" + desc = "A set of Nanotrasen guidelines for keeping law and order on their space stations." + icon_state = "bookSpaceLaw" + author = "Nanotrasen" + title = "Space Law" + page_link = "Space_Law" + +/obj/item/book/manual/wiki/infections + name = "Infections - Making your own pandemic!" + icon_state = "bookInfections" + author = "Infections Encyclopedia" + title = "Infections - Making your own pandemic!" + page_link = "Infections" + +/obj/item/book/manual/wiki/telescience + name = "Teleportation Science - Bluespace for dummies!" + icon_state = "book7" + author = "University of Bluespace" + title = "Teleportation Science - Bluespace for dummies!" + page_link = "Guide_to_telescience" + +/obj/item/book/manual/wiki/engineering_hacking + name = "Hacking" + icon_state ="bookHacking" + author = "Engineering Encyclopedia" + title = "Hacking" + page_link = "Hacking" From 99e4db7bf47f560d20d3ac1c202515453aeaecd4 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 28 Oct 2017 03:19:40 -0500 Subject: [PATCH 265/266] Automatic changelog generation for PR #3663 [ci skip] --- html/changelogs/AutoChangeLog-pr-3663.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-3663.yml diff --git a/html/changelogs/AutoChangeLog-pr-3663.yml b/html/changelogs/AutoChangeLog-pr-3663.yml new file mode 100644 index 0000000000..7fe666a739 --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-3663.yml @@ -0,0 +1,4 @@ +author: "Mark9013100" +delete-after: True +changes: + - tweak: "The Medical Cloning manual has been updated." From 1265e804c5c880b80ec92e65a708a90d761f8003 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 28 Oct 2017 03:19:48 -0500 Subject: [PATCH 266/266] [MIRROR] Adds a method to transfer all components from one datum to another (#3661) * Merge pull request #31941 from tgstation/Cyberboss-patch-2 Adds a method to transfer all components from one datum to another * Adds a method to transfer all components from one datum to another --- code/datums/components/_component.dm | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 2f70713c32..9978b01955 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -220,3 +220,14 @@ C.OnTransfer(src) C.parent = src SendSignal(COMSIG_COMPONENT_ADDED, C) + +/datum/proc/TransferComponents(datum/target) + var/list/dc = datum_components + if(!dc) + return + var/comps = dc[/datum/component] + if(islist(comps)) + for(var/I in comps) + target.TakeComponent(I) + else + target.TakeComponent(comps)
    Blob
    Progress: [GLOB.blobs_legit.len]/[mode.blobwincount]
    [M.real_name][M.client ? "" : " (No Client)"][M.stat == DEAD ? " (DEAD)" : ""]PMFLW
    Progress: [M.blobs_legit.len]/[M.blobwincount]
    [blob.name]([blob.key])Blob not found!PM