diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index 3e2742de11..46e509cb8f 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -125,6 +125,9 @@ var/path_type = /obj/item/baseball_bat
var/path_type = "/obj/item/baseball_bat"
```
+### Use var/name format when declaring variables
+While DM allows other ways of declaring variables, this one should be used for consistency.
+
### Tabs, not spaces
You must use tabs to indent your code, NOT SPACES.
diff --git a/.travis.yml b/.travis.yml
index ba11b40c97..b353761b2d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,5 @@
language: generic
sudo: false
-dist: precise
-
env:
global:
- BYOND_MAJOR="511"
@@ -23,12 +21,15 @@ cache:
addons:
apt:
+ sources:
+ - sourceline: 'ppa:ondrej/php'
packages:
- libc6-i386
- libgcc1:i386
- libstdc++6:i386
- python
- python-pip
+ - php5.6
install:
- tools/travis/install_build_tools.sh
diff --git a/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm b/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
index 5ed42e8922..214ff213c8 100644
--- a/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
+++ b/_maps/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
@@ -47,7 +47,7 @@
/area/ruin/powered/animal_hospital)
"al" = (
/obj/structure/table/wood,
-/obj/item/toy/carpplushie,
+/obj/item/toy/plush/carpplushie,
/turf/open/floor/plasteel/cmo,
/area/ruin/powered/animal_hospital)
"am" = (
diff --git a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm
index d2a416bba2..2f395e4f1c 100644
--- a/_maps/RandomRuins/SpaceRuins/caravanambush.dmm
+++ b/_maps/RandomRuins/SpaceRuins/caravanambush.dmm
@@ -590,9 +590,9 @@
"bW" = (
/obj/structure/closet/crate/secure/gear,
/obj/item/ammo_box/c10mm,
-/obj/item/ammo_casing/shotgun/meteorshot,
-/obj/item/ammo_casing/shotgun/meteorshot,
-/obj/item/ammo_casing/shotgun/meteorshot,
+/obj/item/ammo_casing/shotgun/meteorslug,
+/obj/item/ammo_casing/shotgun/meteorslug,
+/obj/item/ammo_casing/shotgun/meteorslug,
/turf/open/floor/mineral/titanium/yellow/airless,
/area/ruin/unpowered)
"bX" = (
diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm
index 6f385e23ee..a4ec56f95e 100644
--- a/_maps/map_files/Deltastation/DeltaStation2.dmm
+++ b/_maps/map_files/Deltastation/DeltaStation2.dmm
@@ -5118,7 +5118,7 @@
/area/maintenance/starboard/fore)
"alA" = (
/obj/structure/table/wood,
-/obj/item/toy/carpplushie,
+/obj/item/toy/plush/carpplushie,
/obj/effect/decal/cleanable/cobweb,
/turf/open/floor/plasteel/vault{
dir = 8
diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm
index 17572d65f0..b12cbde21c 100644
--- a/_maps/map_files/MetaStation/MetaStation.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.dmm
@@ -49068,7 +49068,7 @@
/area/bridge/showroom/corporate)
"bQl" = (
/obj/structure/table/wood,
-/obj/item/toy/carpplushie{
+/obj/item/toy/plush/carpplushie{
color = "red";
name = "Nanotrasen wildlife department space carp plushie"
},
@@ -122233,7 +122233,7 @@ cRu
cRi
cRi
cRi
-bpu
+cRi
aaf
aaa
aaf
@@ -129583,7 +129583,7 @@ arI
atd
bai
ate
-dDM
+dDL
axP
dnS
axY
diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm
index 9509e69220..13bd789d72 100644
--- a/_maps/map_files/OmegaStation/OmegaStation.dmm
+++ b/_maps/map_files/OmegaStation/OmegaStation.dmm
@@ -2243,7 +2243,6 @@
req_access = null;
req_access_txt = "57"
},
-/obj/machinery/atmospherics/pipe/simple/supply/hidden,
/obj/effect/turf_decal/stripes/line{
dir = 2
},
@@ -5297,9 +5296,6 @@
icon_state = "0-2"
},
/obj/effect/spawner/structure/window/reinforced,
-/obj/machinery/atmospherics/pipe/simple/supply/hidden{
- dir = 4
- },
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 4
},
@@ -10506,6 +10502,7 @@
/obj/machinery/atmospherics/components/unary/vent_pump/on{
dir = 1
},
+/obj/structure/closet/l3closet/security,
/turf/open/floor/plasteel/vault{
dir = 5
},
@@ -27154,6 +27151,7 @@
/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden{
dir = 5
},
+/obj/structure/closet/l3closet,
/turf/open/floor/plasteel/vault{
dir = 5
},
@@ -34636,6 +34634,7 @@
/turf/open/floor/plasteel/whitepurple/side,
/area/science/xenobiology)
"bjG" = (
+/obj/structure/closet/l3closet/scientist,
/turf/open/floor/plasteel/whitepurple/side{
dir = 6
},
@@ -80685,13 +80684,13 @@ aDc
aYc
aYW
byo
-byt
+byo
bbx
bcm
bdd
beb
-byy
-byA
+byo
+bys
bfK
aQd
bgT
@@ -80941,14 +80940,14 @@ aWQ
abt
aYc
aYW
-byp
+byo
baI
bby
bcn
bde
bec
beH
-byB
+byo
bfK
aQd
bgU
@@ -81455,14 +81454,14 @@ aWS
abt
aYe
aYW
-byr
+byo
baK
bbA
bcp
bdg
bee
beJ
-byC
+byo
bfK
avV
bgU
@@ -81713,13 +81712,13 @@ aIZ
aYc
aYW
bys
-byu
-byv
-byw
+byo
+byo
+byo
bdh
-byx
-byz
-byD
+byo
+byo
+byo
bfM
avV
bgV
@@ -86304,7 +86303,7 @@ ape
aqm
abt
abN
-atu
+acw
abt
aad
aad
diff --git a/_maps/map_files/generic/CentCom.dmm b/_maps/map_files/generic/CentCom.dmm
index e482dcc0bc..f0476df53d 100644
--- a/_maps/map_files/generic/CentCom.dmm
+++ b/_maps/map_files/generic/CentCom.dmm
@@ -6423,7 +6423,7 @@
"qX" = (
/obj/structure/table,
/obj/item/toy/katana,
-/obj/item/toy/carpplushie,
+/obj/item/toy/plush/carpplushie,
/obj/effect/turf_decal/stripes/line{
dir = 1
},
diff --git a/code/__DEFINES/DNA.dm b/code/__DEFINES/DNA.dm
index d305bfa69c..dd5a25d8ff 100644
--- a/code/__DEFINES/DNA.dm
+++ b/code/__DEFINES/DNA.dm
@@ -132,5 +132,6 @@
#define NOLIVER 29
#define NOSTOMACH 30
//citadel code
-#define NOAROUSAL 29//Stops all arousal effects
-#define NOGENITALS 30//Cannot create, use, or otherwise have genitals
+#define NOAROUSAL 29 //Stops all arousal effects
+#define NOGENITALS 30 //Cannot create, use, or otherwise have genitals
+#define NO_DNA_COPY 31
diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm
index 641454a799..6f20117d36 100644
--- a/code/__DEFINES/components.dm
+++ b/code/__DEFINES/components.dm
@@ -12,33 +12,55 @@
// When the signal is called: (signal arguments)
// /datum signals
-#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (datum/component)
-#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (datum/component)
+#define COMSIG_COMPONENT_ADDED "component_added" //when a component is added to a datum: (/datum/component)
+#define COMSIG_COMPONENT_REMOVING "component_removing" //before a component is removed from a datum because of RemoveComponent: (/datum/component)
#define COMSIG_PARENT_QDELETED "parent_qdeleted" //before a datum's Destroy() is called: ()
// /atom signals
-#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (obj/item, mob/living, params)
-#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (mob/living/carbon/human)
-#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (mob)
-#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (atom/movable, atom)
+#define COMSIG_PARENT_ATTACKBY "atom_attackby" //from base of atom/attackby(): (/obj/item, /mob/living, params)
+#define COMSIG_ATOM_HULK_ATTACK "hulk_attack" //from base of atom/attack_hulk(): (/mob/living/carbon/human)
+#define COMSIG_PARENT_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
+#define COMSIG_ATOM_ENTERED "atom_entered" //from base of atom/Entered(): (/atom/movable, /atom)
#define COMSIG_ATOM_EX_ACT "atom_ex_act" //from base of atom/ex_act(): (severity, target)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act" //from base of atom/emp_act(): (severity)
#define COMSIG_ATOM_FIRE_ACT "atom_fire_act" //from base of atom/fire_act(): (exposed_temperature, exposed_volume)
-#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (obj/item/projectile, def_zone)
-#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (obj/structure/blob)
+#define COMSIG_ATOM_BULLET_ACT "atom_bullet_act" //from base of atom/bullet_act(): (/obj/item/projectile, def_zone)
+#define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob)
#define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume)
#define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): ()
#define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): ()
#define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): ()
-#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (mob, obj/item/construction/rcd, passed_mode)
+#define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode)
#define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size)
+#define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params)
+#define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob)
+#define COMSIG_CLICK_CTRL "ctrl_click" //from base of atom/CtrlClickOn(): (/mob)
+#define COMSIG_CLICK_ALT "alt_click" //from base of atom/AltClick(): (/mob)
+#define COMSIG_CLICK_CTRL_SHIFT "ctrl_shift_click" //from base of atom/CtrlShiftClick(/mob)
+
// /atom/movable signals
-#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (atom, dir)
-#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (atom/movable)
-#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (atom)
-#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (atom, throwingdatum)
+#define COMSIG_MOVABLE_MOVED "movable_moved" //from base of atom/movable/Moved(): (/atom, dir)
+#define COMSIG_MOVABLE_CROSSED "movable_crossed" //from base of atom/movable/Crossed(): (/atom/movable)
+#define COMSIG_MOVABLE_COLLIDE "movable_collide" //from base of atom/movable/Collide(): (/atom)
+#define COMSIG_MOVABLE_IMPACT "movable_impact" //from base of atom/movable/throw_impact(): (/atom, throwingdatum)
+
+// /obj/item signals
+#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (/mob/living/target, /mob/living/user)
+#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (/mob)
+#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (/obj, /mob)
+
+// /obj/item/clothing signals
+#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
+
+// /obj/item signals
+#define COMSIG_ITEM_ATTACK "item_attack" //from base of obj/item/attack(): (mob/living/target, mob/living/user)
+#define COMSIG_ITEM_ATTACK_SELF "item_attack_self" //from base of obj/item/attack_self(): (mob)
+#define COMSIG_ITEM_ATTACK_OBJ "item_attack_obj" //from base of obj/item/attack_obj(): (obj, mob)
+
+// /obj/item/clothing signals
+#define COMSIG_SHOES_STEP_ACTION "shoes_step_action" //from base of obj/item/clothing/shoes/proc/step_action(): ()
// /obj/machinery signals
#define COMSIG_MACHINE_PROCESS "machine_process" //from machinery subsystem fire(): ()
-#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
\ No newline at end of file
+#define COMSIG_MACHINE_PROCESS_ATMOS "machine_process_atmos" //from air subsystem process_atmos_machinery(): ()
diff --git a/code/__DEFINES/voreconstants.dm b/code/__DEFINES/voreconstants.dm
index ea4c26d79e..edcf4f7fd2 100644
--- a/code/__DEFINES/voreconstants.dm
+++ b/code/__DEFINES/voreconstants.dm
@@ -3,6 +3,7 @@
#define DM_DIGEST "Digest"
#define DM_HEAL "Heal"
#define DM_NOISY "Noisy"
+#define DM_DRAGON "Dragon"
#define VORE_STRUGGLE_EMOTE_CHANCE 40
diff --git a/code/__HELPERS/maths.dm b/code/__HELPERS/maths.dm
index 41d2f721f5..8374b305ad 100644
--- a/code/__HELPERS/maths.dm
+++ b/code/__HELPERS/maths.dm
@@ -155,7 +155,6 @@ GLOBAL_LIST_INIT(sqrtTable, list(1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4,
var/size_factor = ((-cos(inputToDegrees) +1) /2) //returns a value from 0 to 1
return size_factor + scaling_modifier //scale mod of 0 results in a number from 0 to 1. A scale modifier of +0.5 returns 0.5 to 1.5
- //to_chat(world, "Transform multiplier of [src] is [size_factor + scaling_modifer]")
//converts a uniform distributed random number into a normal distributed one
//since this method produces two random numbers, one is saved for subsequent calls
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 0eeca2eaf7..2bc6e144dd 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -32,6 +32,7 @@
*/
/atom/Click(location,control,params)
if(initialized)
+ SendSignal(COMSIG_CLICK, location, control, params)
usr.ClickOn(src, params)
/atom/DblClick(location,control,params)
@@ -305,6 +306,7 @@
A.ShiftClick(src)
return
/atom/proc/ShiftClick(mob/user)
+ SendSignal(COMSIG_CLICK_SHIFT, user)
if(user.client && user.client.eye == user || user.client.eye == user.loc)
user.examinate(src)
return
@@ -319,6 +321,7 @@
return
/atom/proc/CtrlClick(mob/user)
+ SendSignal(COMSIG_CLICK_CTRL, user)
var/mob/living/ML = user
if(istype(ML))
ML.pulled(src)
@@ -348,6 +351,7 @@
..()
/atom/proc/AltClick(mob/user)
+ SendSignal(COMSIG_CLICK_ALT, user)
var/turf/T = get_turf(src)
if(T && user.TurfAdjacent(T))
if(user.listed_turf == T)
@@ -373,6 +377,7 @@
return
/atom/proc/CtrlShiftClick(mob/user)
+ SendSignal(COMSIG_CLICK_CTRL_SHIFT)
return
/*
diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm
index 85ecd036de..d4d2c2d8a5 100644
--- a/code/_onclick/hud/action_button.dm
+++ b/code/_onclick/hud/action_button.dm
@@ -78,7 +78,7 @@
/obj/screen/movable/action_button/hide_toggle/proc/InitialiseIcon(datum/hud/owner_hud)
- var settings = owner_hud.get_action_buttons_icons()
+ var/settings = owner_hud.get_action_buttons_icons()
icon = settings["bg_icon"]
icon_state = settings["bg_state"]
hide_icon = settings["toggle_icon"]
diff --git a/code/_onclick/hud/alert.dm b/code/_onclick/hud/alert.dm
index 638b4a31cf..b361ef1a78 100644
--- a/code/_onclick/hud/alert.dm
+++ b/code/_onclick/hud/alert.dm
@@ -242,9 +242,12 @@ or shoot a gun to move around via Newton's 3rd Law of Motion."
icon_state = "fire"
/obj/screen/alert/fire/Click()
- if(isliving(usr))
- var/mob/living/L = usr
- return L.resist()
+ var/mob/living/L = usr
+ if(!L.can_resist())
+ return
+ L.changeNext_move(CLICK_CD_RESIST)
+ if(L.canmove)
+ return L.resist_fire() //I just want to start a flame in your hearrrrrrtttttt.
//ALIENS
@@ -644,9 +647,20 @@ so as to remain in compliance with the most up-to-date laws."
desc = "You're legcuffed, which slows you down considerably. Click the alert to free yourself."
/obj/screen/alert/restrained/Click()
- if(isliving(usr))
- var/mob/living/L = usr
- return L.resist()
+ var/mob/living/L = usr
+ if(!L.can_resist())
+ return
+ L.changeNext_move(CLICK_CD_RESIST)
+ if((L.canmove) && (L.last_special <= world.time))
+ return L.resist_restraints()
+
+/obj/screen/alert/restrained/buckled/Click()
+ var/mob/living/L = usr
+ if(!L.can_resist())
+ return
+ L.changeNext_move(CLICK_CD_RESIST)
+ if(L.last_special <= world.time)
+ return L.resist_buckle()
// PRIVATE = only edit, use, or override these if you're editing the system as a whole
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index 5265a8e8ea..987818924f 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -9,17 +9,18 @@
// Called when the item is in the active hand, and clicked; alternately, there is an 'activate held object' verb or you can hit pagedown.
/obj/item/proc/attack_self(mob/user)
- return
+ SendSignal(COMSIG_ITEM_ATTACK_SELF, user)
+ interact(user)
/obj/item/proc/pre_attackby(atom/A, mob/living/user, params) //do stuff before attackby!
return TRUE //return FALSE to avoid calling attackby after this proc does stuff
// No comment
/atom/proc/attackby(obj/item/W, mob/user, params)
- return
+ return SendSignal(COMSIG_PARENT_ATTACKBY, W, user, params)
/obj/attackby(obj/item/I, mob/living/user, params)
- return I.attack_obj(src, user)
+ return ..() || I.attack_obj(src, user)
/mob/living/attackby(obj/item/I, mob/living/user, params)
user.changeNext_move(CLICK_CD_MELEE)
@@ -35,6 +36,7 @@
/obj/item/proc/attack(mob/living/M, mob/living/user)
+ SendSignal(COMSIG_ITEM_ATTACK, M, user)
if(flags_1 & NOBLUDGEON_1)
return
if(!force)
@@ -54,6 +56,7 @@
//the equivalent of the standard version of attack() but for object targets.
/obj/item/proc/attack_obj(obj/O, mob/living/user)
+ SendSignal(COMSIG_ITEM_ATTACK_OBJ, O, user)
if(flags_1 & NOBLUDGEON_1)
return
user.changeNext_move(CLICK_CD_MELEE)
diff --git a/code/citadel/custom_loadout/custom_items.dm b/code/citadel/custom_loadout/custom_items.dm
index 5ee9f3f508..dcc275c03b 100644
--- a/code/citadel/custom_loadout/custom_items.dm
+++ b/code/citadel/custom_loadout/custom_items.dm
@@ -68,3 +68,13 @@
attack_verb = list("slapped")
resistance_flags = FLAMMABLE
var/bitesound = 'sound/items/bikehorn.ogg'
+
+
+
+/*Zigfie*/
+
+/obj/item/clothing/mask/luchador/zigfie
+ name = "Alboroto Rosa mask"
+ icon = 'icons/mob/mask.dmi'
+ icon_state = "lucharzigfie"
+ item_state = "lucharzigfie"
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 6a9cf9b963..0c0baccc56 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(config_dir)
var/list/probabilities = list() // relative probability of each mode
var/list/min_pop = list() // overrides for acceptible player counts in a mode
var/list/max_pop = list()
-
+ var/list/repeated_mode_adjust = list() // weight adjustments for recent modes
var/humans_need_surnames = 0
var/allow_ai = 0 // allow ai job
var/forbid_secborg = 0 // disallow secborg module to be chosen.
@@ -278,6 +278,7 @@ GLOBAL_PROTECT(config_dir)
var/error_msg_delay = 50 // How long to wait between messaging admins about occurrences of a unique error
var/arrivals_shuttle_dock_window = 55 //Time from when a player late joins on the arrivals shuttle to when the shuttle docks on the station
+ var/arrivals_shuttle_require_undocked = FALSE //Require the arrivals shuttle to be undocked before latejoiners can join
var/arrivals_shuttle_require_safe_latejoin = FALSE //Require the arrivals shuttle to be operational in order for latejoiners to join
var/mice_roundstart = 10 // how many wire chewing rodents spawn at roundstart.
@@ -722,7 +723,14 @@ GLOBAL_PROTECT(config_dir)
WRITE_FILE(GLOB.config_error_log, "Unknown game mode probability configuration definition: [prob_name].")
else
WRITE_FILE(GLOB.config_error_log, "Incorrect probability configuration definition: [prob_name] [prob_value].")
-
+ if("repeated_mode_adjust")
+ if(value)
+ repeated_mode_adjust.Cut()
+ var/values = splittext(value," ")
+ for(var/v in values)
+ repeated_mode_adjust += text2num(v)
+ else
+ WRITE_FILE(GLOB.config_error_log, "Incorrect round weight adjustment configuration definition for [value].")
if("protect_roles_from_antagonist")
protect_roles_from_antagonist = 1
if("protect_assistant_from_antagonist")
@@ -818,6 +826,8 @@ GLOBAL_PROTECT(config_dir)
GLOB.MAX_EX_FLAME_RANGE = BombCap
if("arrivals_shuttle_dock_window")
arrivals_shuttle_dock_window = max(PARALLAX_LOOP_TIME, text2num(value))
+ if("arrivals_shuttle_require_undocked")
+ arrivals_shuttle_require_undocked = TRUE
if("arrivals_shuttle_require_safe_latejoin")
arrivals_shuttle_require_safe_latejoin = TRUE
if("mice_roundstart")
@@ -962,7 +972,6 @@ GLOBAL_PROTECT(config_dir)
var/list/datum/game_mode/runnable_modes = new
for(var/T in gamemode_cache)
var/datum/game_mode/M = new T()
- //to_chat(world, "DEBUG: [T], tag=[M.config_tag], prob=[probabilities[M.config_tag]]")
if(!(M.config_tag in modes))
qdel(M)
continue
@@ -974,8 +983,15 @@ GLOBAL_PROTECT(config_dir)
if(max_pop[M.config_tag])
M.maximum_players = max_pop[M.config_tag]
if(M.can_start())
- runnable_modes[M] = probabilities[M.config_tag]
- //to_chat(world, "DEBUG: runnable_mode\[[runnable_modes.len]\] = [M.config_tag]")
+ var/final_weight = probabilities[M.config_tag]
+ if(SSpersistence.saved_modes.len == 3 && repeated_mode_adjust.len == 3)
+ var/recent_round = min(SSpersistence.saved_modes.Find(M.config_tag),3)
+ var/adjustment = 0
+ while(recent_round)
+ adjustment += repeated_mode_adjust[recent_round]
+ recent_round = SSpersistence.saved_modes.Find(M.config_tag,recent_round+1,0)
+ final_weight *= ((100-adjustment)/100)
+ runnable_modes[M] = final_weight
return runnable_modes
/datum/configuration/proc/get_runnable_midround_modes(crew)
diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm
index 8143385486..2870305c3e 100644
--- a/code/controllers/subsystem/blackbox.dm
+++ b/code/controllers/subsystem/blackbox.dm
@@ -274,7 +274,7 @@ SUBSYSTEM_DEF(blackbox)
details += "\"[deets]\""
/datum/feedback_variable/proc/get_details()
- return details.Join(" | ")
+ return details ? details.Join(" | ") : null
/datum/feedback_variable/proc/get_parsed()
return list(variable,value,details.Join(" | "))
diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm
index 13762b83f9..df7121455c 100644
--- a/code/controllers/subsystem/persistence.dm
+++ b/code/controllers/subsystem/persistence.dm
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(persistence)
var/list/obj/structure/chisel_message/chisel_messages = list()
var/list/saved_messages = list()
-
+ var/list/saved_modes = list(1,2,3)
var/list/saved_trophies = list()
/datum/controller/subsystem/persistence/Initialize()
@@ -16,6 +16,7 @@ SUBSYSTEM_DEF(persistence)
LoadPoly()
LoadChiselMessages()
LoadTrophies()
+ LoadRecentModes()
..()
/datum/controller/subsystem/persistence/proc/LoadSatchels()
@@ -41,8 +42,7 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/SecretSatchels[SSmapping.config.map_name].json")
if(!fexists(json_file))
return
- var/list/json = list()
- json = json_decode(file2text(json_file))
+ var/list/json = json_decode(file2text(json_file))
old_secret_satchels = json["data"]
if(old_secret_satchels.len)
if(old_secret_satchels.len >= 20) //guards against low drop pools assuring that one player cannot reliably find his own gear.
@@ -84,8 +84,7 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/ChiselMessages[SSmapping.config.map_name].json")
if(!fexists(json_file))
return
- var/list/json
- json = json_decode(file2text(json_file))
+ var/list/json = json_decode(file2text(json_file))
if(!json)
return
@@ -129,13 +128,22 @@ SUBSYSTEM_DEF(persistence)
var/json_file = file("data/npc_saves/TrophyItems.json")
if(!fexists(json_file))
return
- var/list/json = list()
- json = json_decode(file2text(json_file))
+ var/list/json = json_decode(file2text(json_file))
if(!json)
return
saved_trophies = json["data"]
SetUpTrophies(saved_trophies.Copy())
+/datum/controller/subsystem/persistence/proc/LoadRecentModes()
+ var/json_file = file("data/RecentModes.json")
+ if(!fexists(json_file))
+ return
+ var/list/json = json_decode(file2text(json_file))
+ if(!json)
+ return
+ saved_modes = json["data"]
+
+
/datum/controller/subsystem/persistence/proc/SetUpTrophies(list/trophy_items)
for(var/A in GLOB.trophy_cases)
var/obj/structure/displaycase/trophy/T = A
@@ -165,6 +173,7 @@ SUBSYSTEM_DEF(persistence)
CollectChiselMessages()
CollectSecretSatchels()
CollectTrophies()
+ CollectRoundtype()
/datum/controller/subsystem/persistence/proc/CollectSecretSatchels()
var/list/satchels = list()
@@ -224,3 +233,13 @@ SUBSYSTEM_DEF(persistence)
data["message"] = T.trophy_message
data["placer_key"] = T.placer_key
saved_trophies += list(data)
+
+/datum/controller/subsystem/persistence/proc/CollectRoundtype()
+ saved_modes[3] = saved_modes[2]
+ saved_modes[2] = saved_modes[1]
+ saved_modes[1] = SSticker.mode.config_tag
+ var/json_file = file("data/RecentModes.json")
+ var/list/file_data = list()
+ file_data["data"] = saved_modes
+ fdel(json_file)
+ WRITE_FILE(json_file, json_encode(file_data))
\ No newline at end of file
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index de6445831d..4770689778 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -430,17 +430,14 @@ SUBSYSTEM_DEF(shuttle)
continue base
if(!(T.flags_1 & UNUSED_TRANSIT_TURF_1))
continue base
- //to_chat(world, "[COORD(topleft)] and [COORD(bottomright)]")
break base
if((!proposed_zone) || (!proposed_zone.len))
return FALSE
var/turf/topleft = proposed_zone[1]
- //to_chat(world, "[COORD(topleft)] is TOPLEFT")
// Then create a transit docking port in the middle
var/coords = M.return_coords(0, 0, dock_dir)
- //to_chat(world, json_encode(coords))
/* 0------2
| |
| |
@@ -478,11 +475,9 @@ SUBSYSTEM_DEF(shuttle)
if(WEST)
transit_path = /turf/open/space/transit/west
- //to_chat(world, "Docking port at [transit_x], [transit_y], [topleft.z]")
var/turf/midpoint = locate(transit_x, transit_y, topleft.z)
if(!midpoint)
return FALSE
- //to_chat(world, "Making transit dock at [COORD(midpoint)]")
var/area/shuttle/transit/A = new()
A.parallax_movedir = travel_dir
A.contents = proposed_zone
diff --git a/code/controllers/subsystem/squeak.dm b/code/controllers/subsystem/squeak.dm
index d94efd0a4a..16b722c71b 100644
--- a/code/controllers/subsystem/squeak.dm
+++ b/code/controllers/subsystem/squeak.dm
@@ -1,6 +1,6 @@
// The Squeak
// because this is about placement of mice mobs, and nothing to do with
-// mice - the computer peripheral
+// mice - the computer peripheral
SUBSYSTEM_DEF(squeak)
name = "Squeak"
@@ -32,8 +32,9 @@ SUBSYSTEM_DEF(squeak)
/datum/controller/subsystem/squeak/proc/find_exposed_wires()
exposed_wires.Cut()
-
- var/list/all_turfs = block(locate(1,1,1), locate(world.maxx,world.maxy,1))
+ var/list/all_turfs
+ for (var/z in GLOB.station_z_levels)
+ all_turfs += block(locate(1,1,z), locate(world.maxx,world.maxy,z))
for(var/turf/open/floor/plating/T in all_turfs)
if(is_blocked_turf(T))
continue
diff --git a/code/datums/ai_laws.dm b/code/datums/ai_laws.dm
index 24daad00f9..2222a959bc 100644
--- a/code/datums/ai_laws.dm
+++ b/code/datums/ai_laws.dm
@@ -310,7 +310,7 @@
replaceable_groups[LAW_INHERENT] = inherent.len
if(supplied.len && (LAW_SUPPLIED in groups))
replaceable_groups[LAW_SUPPLIED] = supplied.len
- var picked_group = pickweight(replaceable_groups)
+ var/picked_group = pickweight(replaceable_groups)
switch(picked_group)
if(LAW_ZEROTH)
. = zeroth
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index c854d20f18..cae6e04e9b 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -256,7 +256,6 @@
winset(user, windowid, "on-close=\".windowclose [param]\"")
- //to_chat(world, "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]")
// the on-close client verb
@@ -268,12 +267,10 @@
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
- //to_chat(world, "windowclose: [atomref]")
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
var/href = "close=1"
if(hsrc)
- //to_chat(world, "[src] Topic [href] [hsrc]")
usr = src.mob
src.Topic(href, params2list(href), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()
@@ -281,6 +278,5 @@
// no atomref specified (or not found)
// so just reset the user mob's machine var
if(src && src.mob)
- //to_chat(world, "[src] was [src.mob.machine], setting to null")
src.mob.unset_machine()
return
diff --git a/code/datums/material_container.dm b/code/datums/components/material_container.dm
similarity index 61%
rename from code/datums/material_container.dm
rename to code/datums/components/material_container.dm
index a8863c70bc..55504d47d5 100644
--- a/code/datums/material_container.dm
+++ b/code/datums/components/material_container.dm
@@ -5,22 +5,34 @@
amount - raw amount of the mineral this container is holding, calculated by the defined value MINERAL_MATERIAL_AMOUNT=2000.
max_amount - max raw amount of mineral this container can hold.
sheet_type - type of the mineral sheet the container handles, used for output.
- owner - object that this container is being used by, used for output.
+ parent - object that this container is being used by, used for output.
MAX_STACK_SIZE - size of a stack of mineral sheets. Constant.
*/
-/datum/material_container
+/datum/component/material_container
var/total_amount = 0
var/max_amount
var/sheet_type
- var/obj/owner
- var/list/materials = list()
+ var/list/materials
+ var/show_on_examine
+ var/list/allowed_typecache
+ var/last_inserted_type
+ var/last_amount_inserted
+ var/last_insert_success
+ var/datum/callback/precondition
//MAX_STACK_SIZE = 50
//MINERAL_MATERIAL_AMOUNT = 2000
-/datum/material_container/New(obj/O, list/mat_list, max_amt = 0)
- owner = O
+/datum/component/material_container/Initialize(list/mat_list, max_amt = 0, _show_on_examine = FALSE, list/allowed_types, datum/callback/_precondition)
+ materials = list()
max_amount = max(0, max_amt)
+ show_on_examine = _show_on_examine
+ if(allowed_types)
+ allowed_typecache = typecacheof(allowed_types)
+ precondition = _precondition
+
+ RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/OnAttackBy)
+ RegisterSignal(COMSIG_PARENT_EXAMINE, .proc/OnExamine)
var/list/possible_mats = list()
for(var/mat_type in subtypesof(/datum/material))
@@ -31,12 +43,47 @@
var/mat_path = possible_mats[id]
materials[id] = new mat_path()
-/datum/material_container/Destroy()
- owner = null
- return ..()
+/datum/component/material_container/proc/OnExamine(mob/user)
+ for(var/I in materials)
+ var/datum/material/M = materials[I]
+ var/amt = amount(M.id)
+ if(amt)
+ to_chat(user, "It has [amt] units of [lowertext(M.name)] stored.")
+
+/datum/component/material_container/proc/OnAttackBy(obj/item/I, mob/living/user)
+ var/list/tc = allowed_typecache
+ if(user.a_intent == INTENT_HARM || (I.flags_2 & HOLOGRAM_2) || (tc && !is_type_in_typecache(I, tc)))
+ return FALSE
+ . = TRUE
+ last_insert_success = FALSE
+ var/datum/callback/pc = precondition
+ if(pc && !pc.Invoke())
+ return
+ var/material_amount = get_item_material_amount(I)
+ if(!material_amount)
+ to_chat(user, "[I] does not contain sufficient amounts of metal or glass to be accepted by [parent].")
+ return
+ if(!has_space(material_amount))
+ to_chat(user, "[parent] is full. Please remove metal or glass from [parent] in order to insert more.")
+ return
+ if(!user.temporarilyRemoveItemFromInventory(I))
+ to_chat(user, "[I] is stuck to you and cannot be placed into [parent].")
+ return
+ var/inserted = insert_item(I)
+ if(inserted)
+ last_insert_success = TRUE
+ if(istype(I, /obj/item/stack))
+ to_chat(user, "You insert [inserted] sheet[inserted>1 ? "s" : ""] into [parent].")
+ if(!QDELETED(I))
+ user.put_in_active_hand(I)
+ else
+ to_chat(user, "You insert a material total of [inserted] into [parent].")
+ qdel(I)
+ else
+ user.put_in_active_hand(I)
//For inserting an amount of material
-/datum/material_container/proc/insert_amount(amt, id = null)
+/datum/component/material_container/proc/insert_amount(amt, id = null)
if(amt > 0 && has_space(amt))
var/total_amount_saved = total_amount
if(id)
@@ -52,7 +99,7 @@
return (total_amount - total_amount_saved)
return 0
-/datum/material_container/proc/insert_stack(obj/item/stack/S, amt = 0)
+/datum/component/material_container/proc/insert_stack(obj/item/stack/S, amt = 0)
if(amt <= 0)
return 0
if(amt > S.amount)
@@ -67,10 +114,12 @@
return 0
insert_materials(S,amt)
+ last_inserted_type = S.type
S.use(amt)
+ last_amount_inserted = amt
return amt
-/datum/material_container/proc/insert_item(obj/item/I, multiplier = 1)
+/datum/component/material_container/proc/insert_item(obj/item/I, multiplier = 1)
if(!I)
return 0
if(istype(I, /obj/item/stack))
@@ -82,9 +131,11 @@
return 0
insert_materials(I, multiplier)
+ last_inserted_type = I.type
+ last_amount_inserted = material_amount
return material_amount
-/datum/material_container/proc/insert_materials(obj/item/I, multiplier = 1) //for internal usage only
+/datum/component/material_container/proc/insert_materials(obj/item/I, multiplier = 1) //for internal usage only
var/datum/material/M
for(var/MAT in materials)
M = materials[MAT]
@@ -93,7 +144,7 @@
//For consuming material
//mats is a list of types of material to use and the corresponding amounts, example: list(MAT_METAL=100, MAT_GLASS=200)
-/datum/material_container/proc/use_amount(list/mats, multiplier=1)
+/datum/component/material_container/proc/use_amount(list/mats, multiplier=1)
if(!mats || !mats.len)
return 0
@@ -112,7 +163,7 @@
return total_amount_save - total_amount
-/datum/material_container/proc/use_amount_type(amt, id)
+/datum/component/material_container/proc/use_amount_type(amt, id)
var/datum/material/M = materials[id]
if(M)
if(M.amount >= amt)
@@ -121,7 +172,7 @@
return amt
return 0
-/datum/material_container/proc/can_use_amount(amt, id, list/mats)
+/datum/component/material_container/proc/can_use_amount(amt, id, list/mats)
if(amt && id)
var/datum/material/M = materials[id]
if(M && M.amount >= amt)
@@ -136,7 +187,7 @@
return FALSE
//For spawning mineral sheets; internal use only
-/datum/material_container/proc/retrieve(sheet_amt, datum/material/M, target = null)
+/datum/component/material_container/proc/retrieve(sheet_amt, datum/material/M, target = null)
if(!M.sheet_type)
return 0
if(sheet_amt > 0)
@@ -144,12 +195,12 @@
sheet_amt = round(M.amount / MINERAL_MATERIAL_AMOUNT)
var/count = 0
while(sheet_amt > MAX_STACK_SIZE)
- new M.sheet_type(get_turf(owner), MAX_STACK_SIZE)
+ new M.sheet_type(get_turf(parent), MAX_STACK_SIZE)
count += MAX_STACK_SIZE
use_amount_type(sheet_amt * MINERAL_MATERIAL_AMOUNT, M.id)
sheet_amt -= MAX_STACK_SIZE
if(round((sheet_amt * MINERAL_MATERIAL_AMOUNT) / MINERAL_MATERIAL_AMOUNT))
- var/obj/item/stack/sheet/s = new M.sheet_type(get_turf(owner), sheet_amt)
+ var/obj/item/stack/sheet/s = new M.sheet_type(get_turf(parent), sheet_amt)
if(target)
s.forceMove(target)
count += sheet_amt
@@ -157,15 +208,15 @@
return count
return 0
-/datum/material_container/proc/retrieve_sheets(sheet_amt, id, target = null)
+/datum/component/material_container/proc/retrieve_sheets(sheet_amt, id, target = null)
if(materials[id])
return retrieve(sheet_amt, materials[id], target)
return 0
-/datum/material_container/proc/retrieve_amount(amt, id, target)
+/datum/component/material_container/proc/retrieve_amount(amt, id, target)
return retrieve_sheets(amount2sheet(amt), id, target)
-/datum/material_container/proc/retrieve_all(target = null)
+/datum/component/material_container/proc/retrieve_all(target = null)
var/result = 0
var/datum/material/M
for(var/MAT in materials)
@@ -173,10 +224,10 @@
result += retrieve_sheets(amount2sheet(M.amount), MAT, target)
return result
-/datum/material_container/proc/has_space(amt = 0)
+/datum/component/material_container/proc/has_space(amt = 0)
return (total_amount + amt) <= max_amount
-/datum/material_container/proc/has_materials(list/mats, multiplier=1)
+/datum/component/material_container/proc/has_materials(list/mats, multiplier=1)
if(!mats || !mats.len)
return 0
@@ -187,23 +238,23 @@
return 0
return 1
-/datum/material_container/proc/amount2sheet(amt)
+/datum/component/material_container/proc/amount2sheet(amt)
if(amt >= MINERAL_MATERIAL_AMOUNT)
return round(amt / MINERAL_MATERIAL_AMOUNT)
return 0
-/datum/material_container/proc/sheet2amount(sheet_amt)
+/datum/component/material_container/proc/sheet2amount(sheet_amt)
if(sheet_amt > 0)
return sheet_amt * MINERAL_MATERIAL_AMOUNT
return 0
-/datum/material_container/proc/amount(id)
+/datum/component/material_container/proc/amount(id)
var/datum/material/M = materials[id]
return M ? M.amount : 0
//returns the amount of material relevant to this container;
//if this container does not support glass, any glass in 'I' will not be taken into account
-/datum/material_container/proc/get_item_material_amount(obj/item/I)
+/datum/component/material_container/proc/get_item_material_amount(obj/item/I)
if(!istype(I))
return 0
var/material_amount = 0
diff --git a/code/datums/components/squeek.dm b/code/datums/components/squeek.dm
new file mode 100644
index 0000000000..40fd0af598
--- /dev/null
+++ b/code/datums/components/squeek.dm
@@ -0,0 +1,61 @@
+/datum/component/squeak
+ var/static/list/default_squeak_sounds = list('sound/items/toysqueak1.ogg'=1, 'sound/items/toysqueak2.ogg'=1, 'sound/items/toysqueak3.ogg'=1)
+ var/list/override_squeak_sounds
+ var/squeak_chance = 100
+ var/volume = 30
+
+ // This is so shoes don't squeak every step
+ var/steps = 0
+ var/step_delay = 1
+
+ // This is to stop squeak spam from inhand usage
+ var/last_use = 0
+ var/use_delay = 20
+
+/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
+ if(custom_sounds)
+ override_squeak_sounds = custom_sounds
+ if(chance_override)
+ squeak_chance = chance_override
+ if(volume_override)
+ volume = volume_override
+ if(step_delay_override)
+ step_delay = step_delay_override
+ if(use_delay_override)
+ use_delay = use_delay_override
+
+ if(istype(parent, /atom))
+ RegisterSignal(COMSIG_ATOM_BLOB_ACT, .proc/play_squeak)
+ RegisterSignal(COMSIG_ATOM_HULK_ATTACK, .proc/play_squeak)
+ RegisterSignal(COMSIG_PARENT_ATTACKBY, .proc/play_squeak)
+ if(istype(parent, /atom/movable))
+ RegisterSignal(COMSIG_MOVABLE_CROSSED, .proc/play_squeak)
+ RegisterSignal(COMSIG_MOVABLE_COLLIDE, .proc/play_squeak)
+ RegisterSignal(COMSIG_MOVABLE_IMPACT, .proc/play_squeak)
+ if(istype(parent, /obj/item))
+ RegisterSignal(COMSIG_ITEM_ATTACK, .proc/play_squeak)
+ RegisterSignal(COMSIG_ITEM_ATTACK_SELF, .proc/use_squeak)
+ RegisterSignal(COMSIG_ITEM_ATTACK_OBJ, .proc/play_squeak)
+ if(istype(parent, /obj/item/clothing/shoes))
+ RegisterSignal(COMSIG_SHOES_STEP_ACTION, .proc/step_squeak)
+ else
+ RegisterSignal(COMSIG_ATOM_ENTERED, .proc/play_squeak)
+
+/datum/component/squeak/proc/play_squeak()
+ if(prob(squeak_chance))
+ if(!override_squeak_sounds)
+ playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
+ else
+ playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
+
+/datum/component/squeak/proc/step_squeak()
+ if(steps > step_delay)
+ play_squeak()
+ steps = 0
+ else
+ steps++
+
+/datum/component/squeak/proc/use_squeak()
+ if(last_use + use_delay < world.time)
+ last_use = world.time
+ play_squeak()
\ No newline at end of file
diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm
index d55a32609a..b653e5c6ae 100644
--- a/code/datums/datumvars.dm
+++ b/code/datums/datumvars.dm
@@ -83,10 +83,10 @@
if(isliving(A))
atomsnowflake += "[D]"
if(A.dir)
- atomsnowflake += "
<< [dir2text(A.dir)] >>"
+ atomsnowflake += "
<< [dir2text(A.dir)] >>"
var/mob/living/M = A
atomsnowflake += {"
-
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]
+
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]
BRUTE:[M.getBruteLoss()]
FIRE:[M.getFireLoss()]
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 9be242a391..26f42fa059 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -245,7 +245,6 @@
/datum/disease/advance/proc/GenerateCure()
if(properties && properties.len)
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
- //to_chat(world, "Res = [res]")
cures = list(advance_cures[res])
// Get the cure name from the cure_id
@@ -333,9 +332,6 @@
// Mix a list of advance diseases and return the mixed result.
/proc/Advance_Mix(var/list/D_list)
-
- //to_chat(world, "Mixing!!!!")
-
var/list/diseases = list()
for(var/datum/disease/advance/A in D_list)
@@ -359,7 +355,6 @@
D2.Mix(D1)
// Should be only 1 entry left, but if not let's only return a single entry
- //to_chat(world, "END MIXING!!!!!")
var/datum/disease/advance/to_return = pick(diseases)
to_return.Refresh(1)
return to_return
diff --git a/code/datums/diseases/dna_spread.dm b/code/datums/diseases/dna_spread.dm
index 2b77885359..c96a22d472 100644
--- a/code/datums/diseases/dna_spread.dm
+++ b/code/datums/diseases/dna_spread.dm
@@ -1,74 +1,74 @@
-/datum/disease/dnaspread
- name = "Space Retrovirus"
- max_stages = 4
- spread_text = "On contact"
- spread_flags = CONTACT_GENERAL
- cure_text = "Mutadone"
- cures = list("mutadone")
- disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
- agent = "S4E1 retrovirus"
- viable_mobtypes = list(/mob/living/carbon/human)
- var/datum/dna/original_dna = null
- var/transformed = 0
- desc = "This disease transplants the genetic code of the initial vector into new hosts."
- severity = MEDIUM
-
-
-/datum/disease/dnaspread/stage_act()
- ..()
- if(!affected_mob.dna)
- cure()
- if(NOTRANSSTING in affected_mob.dna.species.species_traits) //Only species that can be spread by transformation sting can be spread by the retrovirus
- cure()
-
- if(!strain_data["dna"])
- //Absorbs the target DNA.
- strain_data["dna"] = new affected_mob.dna.type
- affected_mob.dna.copy_dna(strain_data["dna"])
+/datum/disease/dnaspread
+ name = "Space Retrovirus"
+ max_stages = 4
+ spread_text = "On contact"
+ spread_flags = CONTACT_GENERAL
+ cure_text = "Mutadone"
+ cures = list("mutadone")
+ disease_flags = CAN_CARRY|CAN_RESIST|CURABLE
+ agent = "S4E1 retrovirus"
+ viable_mobtypes = list(/mob/living/carbon/human)
+ var/datum/dna/original_dna = null
+ var/transformed = 0
+ desc = "This disease transplants the genetic code of the initial vector into new hosts."
+ severity = MEDIUM
+
+
+/datum/disease/dnaspread/stage_act()
+ ..()
+ if(!affected_mob.dna)
+ cure()
+ if((NOTRANSSTING in affected_mob.dna.species.species_traits) || (NO_DNA_COPY in affected_mob.dna.species.species_traits)) //Only species that can be spread by transformation sting can be spread by the retrovirus
+ cure()
+
+ if(!strain_data["dna"])
+ //Absorbs the target DNA.
+ strain_data["dna"] = new affected_mob.dna.type
+ affected_mob.dna.copy_dna(strain_data["dna"])
carrier = TRUE
stage = 4
- return
-
- switch(stage)
- if(2 || 3) //Pretend to be a cold and give time to spread.
- if(prob(8))
- affected_mob.emote("sneeze")
- if(prob(8))
- affected_mob.emote("cough")
- if(prob(1))
- to_chat(affected_mob, "Your muscles ache.")
- if(prob(20))
- affected_mob.take_bodypart_damage(1)
- if(prob(1))
- to_chat(affected_mob, "Your stomach hurts.")
- if(prob(20))
- affected_mob.adjustToxLoss(2)
- affected_mob.updatehealth()
- if(4)
- if(!transformed && !carrier)
- //Save original dna for when the disease is cured.
- original_dna = new affected_mob.dna.type
- affected_mob.dna.copy_dna(original_dna)
-
- to_chat(affected_mob, "You don't feel like yourself..")
- var/datum/dna/transform_dna = strain_data["dna"]
-
- transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
- affected_mob.real_name = affected_mob.dna.real_name
- affected_mob.updateappearance(mutcolor_update=1)
- affected_mob.domutcheck()
-
- transformed = 1
- carrier = 1 //Just chill out at stage 4
-
- return
-
-/datum/disease/dnaspread/Destroy()
- if (original_dna && transformed && affected_mob)
- original_dna.transfer_identity(affected_mob, transfer_SE = 1)
- affected_mob.real_name = affected_mob.dna.real_name
- affected_mob.updateappearance(mutcolor_update=1)
- affected_mob.domutcheck()
-
- to_chat(affected_mob, "You feel more like yourself.")
- return ..()
\ No newline at end of file
+ return
+
+ switch(stage)
+ if(2 || 3) //Pretend to be a cold and give time to spread.
+ if(prob(8))
+ affected_mob.emote("sneeze")
+ if(prob(8))
+ affected_mob.emote("cough")
+ if(prob(1))
+ to_chat(affected_mob, "Your muscles ache.")
+ if(prob(20))
+ affected_mob.take_bodypart_damage(1)
+ if(prob(1))
+ to_chat(affected_mob, "Your stomach hurts.")
+ if(prob(20))
+ affected_mob.adjustToxLoss(2)
+ affected_mob.updatehealth()
+ if(4)
+ if(!transformed && !carrier)
+ //Save original dna for when the disease is cured.
+ original_dna = new affected_mob.dna.type
+ affected_mob.dna.copy_dna(original_dna)
+
+ to_chat(affected_mob, "You don't feel like yourself..")
+ var/datum/dna/transform_dna = strain_data["dna"]
+
+ transform_dna.transfer_identity(affected_mob, transfer_SE = 1)
+ affected_mob.real_name = affected_mob.dna.real_name
+ affected_mob.updateappearance(mutcolor_update=1)
+ affected_mob.domutcheck()
+
+ transformed = 1
+ carrier = 1 //Just chill out at stage 4
+
+ return
+
+/datum/disease/dnaspread/Destroy()
+ if (original_dna && transformed && affected_mob)
+ original_dna.transfer_identity(affected_mob, transfer_SE = 1)
+ affected_mob.real_name = affected_mob.dna.real_name
+ affected_mob.updateappearance(mutcolor_update=1)
+ affected_mob.domutcheck()
+
+ to_chat(affected_mob, "You feel more like yourself.")
+ return ..()
diff --git a/code/datums/dna.dm b/code/datums/dna.dm
index 4bacf2d9e8..27a9338191 100644
--- a/code/datums/dna.dm
+++ b/code/datums/dna.dm
@@ -235,7 +235,9 @@
flavor_text = dna.features["flavor_text"] //Update the flavor_text to use new dna text
if(mrace)
- set_species(mrace, icon_update=0)
+ var/datum/species/newrace = new mrace.type
+ newrace.copy_properties_from(mrace)
+ set_species(newrace, icon_update=0)
if(newreal_name)
real_name = newreal_name
@@ -396,4 +398,4 @@
value = values
return value
-/////////////////////////// DNA HELPER-PROCS
+/////////////////////////// DNA HELPER-PROCS
\ No newline at end of file
diff --git a/code/datums/mind.dm b/code/datums/mind.dm
index e824cc9914..ad73b164b7 100644
--- a/code/datums/mind.dm
+++ b/code/datums/mind.dm
@@ -121,8 +121,9 @@
new_character.key = key //now transfer the key to link the client to our new body
if(isliving(new_character)) //New humans and such are by default enabled arousal. Let's always use the new mind's prefs.
var/mob/living/L = new_character
- L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
- L.update_arousal_hud() //Removes the old icon
+ if(L.client && L.client.prefs)
+ L.canbearoused = L.client.prefs.arousable //Technically this should make taking over a character mean the body gain the new minds setting...
+ L.update_arousal_hud() //Removes the old icon
/datum/mind/proc/store_memory(new_text)
memory += "[new_text]
"
@@ -1278,7 +1279,6 @@
src = null
M = H.monkeyize()
src = M.mind
- //to_chat(world, "DEBUG: \"healthy\": M=[M], M.mind=[M.mind], src=[src]!")
else if (istype(M) && length(M.viruses))
for(var/thing in M.viruses)
var/datum/disease/D = thing
diff --git a/code/datums/progressbar.dm b/code/datums/progressbar.dm
index e3e8d0e366..f9883cfe50 100644
--- a/code/datums/progressbar.dm
+++ b/code/datums/progressbar.dm
@@ -29,7 +29,6 @@
bar.pixel_y = 32 + (PROGRESSBAR_HEIGHT * (listindex - 1))
/datum/progressbar/proc/update(progress)
- //to_chat(world, "Update [progress] - [goal] - [(progress / goal)] - [((progress / goal) * 100)] - [round(((progress / goal) * 100), 5)]")
if (!user || !user.client)
shown = 0
return
diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm
index 9ca564cd2d..b8e51ac860 100644
--- a/code/datums/status_effects/debuffs.dm
+++ b/code/datums/status_effects/debuffs.dm
@@ -29,11 +29,20 @@
/datum/status_effect/incapacitating/knockdown
id = "knockdown"
+/datum/status_effect/incapacitating/knockdown/tick()
+ if(owner.staminaloss)
+ owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
+
+
//UNCONSCIOUS
/datum/status_effect/incapacitating/unconscious
id = "unconscious"
needs_update_stat = TRUE
+/datum/status_effect/incapacitating/unconscious/tick()
+ if(owner.staminaloss)
+ owner.adjustStaminaLoss(-0.3) //reduce stamina loss by 0.3 per tick, 6 per 2 seconds
+
//SLEEPING
/datum/status_effect/incapacitating/sleeping
id = "sleeping"
@@ -57,7 +66,7 @@
/datum/status_effect/incapacitating/sleeping/tick()
if(owner.staminaloss)
- owner.adjustStaminaLoss(-0.35) //reduce stamina loss by 0.35 per tick, 7 per 2 seconds
+ owner.adjustStaminaLoss(-0.5) //reduce stamina loss by 0.5 per tick, 10 per 2 seconds
if(human_owner && human_owner.drunkenness)
human_owner.drunkenness *= 0.997 //reduce drunkenness by 0.3% per tick, 6% per 2 seconds
if(prob(20))
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index a28f4d0dc7..508459188b 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -454,7 +454,6 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
cur_y = y_arr.Find(src.z)
if(cur_y)
break
-// to_chat(world, "X = [cur_x]; Y = [cur_y]")
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
@@ -637,4 +636,7 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
return L.AllowDrop() ? L : get_turf(L)
/atom/Entered(atom/movable/AM, atom/oldLoc)
- SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
\ No newline at end of file
+ SendSignal(COMSIG_ATOM_ENTERED, AM, oldLoc)
+
+/atom/proc/return_temperature()
+ return
diff --git a/code/game/gamemodes/antag_spawner.dm b/code/game/gamemodes/antag_spawner.dm
index 9b585ea653..64b405bbd5 100644
--- a/code/game/gamemodes/antag_spawner.dm
+++ b/code/game/gamemodes/antag_spawner.dm
@@ -261,7 +261,7 @@
/obj/item/antag_spawner/slaughter_demon/spawn_antag(client/C, turf/T, type = "")
- var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
+ var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter(T)
var/mob/living/simple_animal/slaughter/S = new demon_type(holder)
S.holder = holder
S.key = C.key
diff --git a/code/game/gamemodes/brother/traitor_bro.dm b/code/game/gamemodes/brother/traitor_bro.dm
index ccb6b774b3..4e8a0dc6b6 100644
--- a/code/game/gamemodes/brother/traitor_bro.dm
+++ b/code/game/gamemodes/brother/traitor_bro.dm
@@ -80,7 +80,7 @@
antag_candidates -= bro
team.members += bro
bro.restricted_roles = restricted_jobs
- log_game("[key_name(bro)] has been selected as a Brother")
+ log_game("[bro.key] (ckey) has been selected as a Brother")
pre_brother_teams += team
return ..()
@@ -95,6 +95,9 @@
brother_teams += pre_brother_teams
return ..()
+/datum/game_mode/traitor/bros/generate_report()
+ return "It's Syndicate recruiting season. Be alert for potential Syndicate infiltrators, but also watch out for disgruntled employees trying to defect. Unlike Nanotrasen, the Syndicate prides itself in teamwork and will only recruit pairs that share a brotherly trust."
+
/datum/game_mode/proc/auto_declare_completion_brother()
if(!LAZYLEN(brother_teams))
return
diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm
index 14126c69f3..e67ac26d3a 100644
--- a/code/game/gamemodes/changeling/changeling.dm
+++ b/code/game/gamemodes/changeling/changeling.dm
@@ -340,6 +340,10 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
return
if(!target)
return
+ if(NO_DNA_COPY in target.dna.species.species_traits)
+ if(verbose)
+ to_chat(user, "[target] is not compatible with our biology.")
+ return
if((target.disabilities & NOCLONE) || (target.disabilities & HUSK))
if(verbose)
to_chat(user, "DNA of [target] is ruined beyond usability!")
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 82350726d9..4ec01f09e2 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -121,7 +121,7 @@
var/list/datum/game_mode/runnable_modes = config.get_runnable_midround_modes(living_crew.len)
var/list/datum/game_mode/usable_modes = list()
for(var/datum/game_mode/G in runnable_modes)
- if(G.reroll_friendly && living_crew >= G.required_players)
+ if(G.reroll_friendly && living_crew.len >= G.required_players)
usable_modes += G
else
qdel(G)
diff --git a/code/game/gamemodes/gang/gang_datum.dm b/code/game/gamemodes/gang/gang_datum.dm
index b7b20a7311..510883ada5 100644
--- a/code/game/gamemodes/gang/gang_datum.dm
+++ b/code/game/gamemodes/gang/gang_datum.dm
@@ -331,16 +331,3 @@
adjust_influence(bawss, amount/bosses.len)
announce_to_mind(bawss, "[name] Gang: [amount/bosses.len] influence given from internal automatic restructuring.")
-//Multiverse
-
-/datum/gang/multiverse
- dom_attempts = 0
- fighting_style = "multiverse"
- is_deconvertible = FALSE
-
-/datum/gang/multiverse/New(loc, multiverse_override)
- name = multiverse_override
- ganghud = new()
-
-/datum/gang/multiverse/income()
- return
diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm
index 3bb3c8b43e..d33dd2127d 100644
--- a/code/game/gamemodes/meteor/meteors.dm
+++ b/code/game/gamemodes/meteor/meteors.dm
@@ -309,6 +309,7 @@ GLOBAL_LIST_INIT(meteorsC, list(/obj/effect/meteor/dust)) //for space dust event
/obj/effect/meteor/meaty/xeno/New()
meteordrop += subtypesof(/obj/item/organ/alien)
+ meteordrop -= /obj/item/organ/alien/eggsac
..()
/obj/effect/meteor/meaty/xeno/ram_turf(turf/T)
diff --git a/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm b/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm
index bcb2218fe6..888a10669e 100644
--- a/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm
+++ b/code/game/gamemodes/miniantags/slaughter/slaughterevent.dm
@@ -33,7 +33,7 @@
message_admins("No valid spawn locations found, aborting...")
return MAP_ERROR
- var /obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter((pick(spawn_locs)))
+ var/obj/effect/dummy/slaughter/holder = new /obj/effect/dummy/slaughter((pick(spawn_locs)))
var/mob/living/simple_animal/slaughter/S = new /mob/living/simple_animal/slaughter/(holder)
S.holder = holder
player_mind.transfer_to(S)
diff --git a/code/game/machinery/airlock_control.dm b/code/game/machinery/airlock_control.dm
index 69ccb4240a..b5175b215f 100644
--- a/code/game/machinery/airlock_control.dm
+++ b/code/game/machinery/airlock_control.dm
@@ -20,28 +20,28 @@
close(1)
if("unlock")
- locked = FALSE
+ locked = FALSE
update_icon()
if("lock")
- locked = TRUE
+ locked = TRUE
update_icon()
if("secure_open")
- locked = FALSE
+ locked = FALSE
update_icon()
sleep(2)
open(1)
- locked = TRUE
+ locked = TRUE
update_icon()
if("secure_close")
- locked = FALSE
+ locked = FALSE
close(1)
- locked = TRUE
+ locked = TRUE
sleep(2)
update_icon()
@@ -88,7 +88,7 @@
name = "airlock sensor"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
- anchored = TRUE
+ anchored = TRUE
power_channel = ENVIRON
var/id_tag
@@ -97,8 +97,8 @@
var/datum/radio_frequency/radio_connection
- var/on = TRUE
- var/alert = FALSE
+ var/on = TRUE
+ var/alert = FALSE
/obj/machinery/airlock_sensor/update_icon()
@@ -143,9 +143,9 @@
radio_connection = SSradio.add_object(src, frequency, GLOB.RADIO_AIRLOCK)
/obj/machinery/airlock_sensor/Initialize()
- ..()
+ . = ..()
set_frequency(frequency)
/obj/machinery/airlock_sensor/Destroy()
- SSradio.remove_object(src,frequency)
+ SSradio.remove_object(src,frequency)
return ..()
\ No newline at end of file
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index c185a8f734..9fa53765ed 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -32,8 +32,6 @@
var/selected_category
var/screen = 1
- var/datum/material_container/materials
-
var/list/categories = list(
"Tools",
"Electronics",
@@ -48,15 +46,15 @@
)
/obj/machinery/autolathe/Initialize()
- materials = new /datum/material_container(src, list(MAT_METAL, MAT_GLASS))
+ AddComponent(/datum/component/material_container, list(MAT_METAL, MAT_GLASS))
+ . = ..()
+
wires = new /datum/wires/autolathe(src)
files = new /datum/research/autolathe(src)
matching_designs = list()
- return ..()
/obj/machinery/autolathe/Destroy()
QDEL_NULL(wires)
- QDEL_NULL(materials)
return ..()
/obj/machinery/autolathe/interact(mob/user)
@@ -81,6 +79,7 @@
popup.open()
/obj/machinery/autolathe/on_deconstruction()
+ GET_COMPONENT(materials, /datum/component/material_container)
materials.retrieve_all()
/obj/machinery/autolathe/attackby(obj/item/O, mob/user, params)
@@ -123,42 +122,26 @@
busy = FALSE
return 1
- if(O.flags_2 & HOLOGRAM_2)
- return 1
+ return ..()
- var/material_amount = materials.get_item_material_amount(O)
- if(!material_amount)
- to_chat(user, "This object does not contain sufficient amounts of metal or glass to be accepted by the autolathe.")
- return 1
- if(!materials.has_space(material_amount))
- to_chat(user, "The autolathe is full. Please remove metal or glass from the autolathe in order to insert more.")
- return 1
- if(!user.temporarilyRemoveItemFromInventory(O))
- to_chat(user, "\The [O] is stuck to you and cannot be placed into the autolathe.")
- return 1
-
- busy = TRUE
- var/inserted = materials.insert_item(O)
- if(inserted)
- if(istype(O, /obj/item/stack))
- if (O.materials[MAT_METAL])
- flick("autolathe_o",src)//plays metal insertion animation
- if (O.materials[MAT_GLASS])
- flick("autolathe_r",src)//plays glass insertion animation
- to_chat(user, "You insert [inserted] sheet[inserted>1 ? "s" : ""] to the autolathe.")
- use_power(inserted*100)
- if(!QDELETED(O))
- user.put_in_active_hand(O)
+/obj/machinery/mecha_part_fabricator/ComponentActivated(datum/component/C)
+ ..()
+ if(istype(C, /datum/component/material_container))
+ var/datum/component/material_container/M = C
+ if(!M.last_insert_success)
+ return
+ var/lit = M.last_inserted_type
+ if(ispath(lit, /obj/item/ore/bluespace_crystal))
+ use_power(max(500,M.last_amount_inserted/10))
else
- to_chat(user, "You insert a material total of [inserted] to the autolathe.")
- use_power(max(500,inserted/10))
- qdel(O)
- else
- user.put_in_active_hand(O)
-
- busy = FALSE
- updateUsrDialog()
- return 1
+ var/obj/item/stack/S = lit
+ var/list/initmats = initial(S.materials)
+ if (initmats[MAT_METAL])
+ flick("autolathe_o",src)//plays metal insertion animation
+ if (initmats[MAT_GLASS])
+ flick("autolathe_r",src)//plays glass insertion animation
+ use_power(M.last_amount_inserted*100)
+ updateUsrDialog()
/obj/machinery/autolathe/Topic(href, href_list)
if(..())
@@ -193,6 +176,7 @@
var/power = max(2000, (metal_cost+glass_cost)*multiplier/5)
+ GET_COMPONENT(materials, /datum/component/material_container)
if((materials.amount(MAT_METAL) >= metal_cost*multiplier*coeff) && (materials.amount(MAT_GLASS) >= glass_cost*multiplier*coeff))
busy = TRUE
use_power(power)
@@ -246,6 +230,7 @@
var/T = 0
for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
T += MB.rating*75000
+ GET_COMPONENT(materials, /datum/component/material_container)
materials.max_amount = T
T=1.2
for(var/obj/item/stock_parts/manipulator/M in component_parts)
@@ -294,6 +279,7 @@
dat += "[D.name]"
if(ispath(D.build_path, /obj/item/stack))
+ GET_COMPONENT(materials, /datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " x10"
@@ -325,6 +311,7 @@
dat += "[D.name]"
if(ispath(D.build_path, /obj/item/stack))
+ GET_COMPONENT(materials, /datum/component/material_container)
var/max_multiplier = min(D.maxstack, D.materials[MAT_METAL] ?round(materials.amount(MAT_METAL)/D.materials[MAT_METAL]):INFINITY,D.materials[MAT_GLASS]?round(materials.amount(MAT_GLASS)/D.materials[MAT_GLASS]):INFINITY)
if (max_multiplier>10 && !disabled)
dat += " x10"
@@ -339,6 +326,7 @@
return dat
/obj/machinery/autolathe/proc/materials_printout()
+ GET_COMPONENT(materials, /datum/component/material_container)
var/dat = "Total amount: [materials.total_amount] / [materials.max_amount] cm3
"
for(var/mat_id in materials.materials)
var/datum/material/M = materials.materials[mat_id]
@@ -351,6 +339,7 @@
var/coeff = (ispath(D.build_path, /obj/item/stack) ? 1 : prod_coeff)
+ GET_COMPONENT(materials, /datum/component/material_container)
if(D.materials[MAT_METAL] && (materials.amount(MAT_METAL) < (D.materials[MAT_METAL] * coeff * amount)))
return 0
if(D.materials[MAT_GLASS] && (materials.amount(MAT_GLASS) < (D.materials[MAT_GLASS] * coeff * amount)))
diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm
index 2033fd7146..a8e9c7bcca 100644
--- a/code/game/machinery/computer/Operating.dm
+++ b/code/game/machinery/computer/Operating.dm
@@ -4,17 +4,17 @@
icon_screen = "crew"
icon_keyboard = "med_key"
circuit = /obj/item/circuitboard/computer/operating
- var/mob/living/carbon/human/patient
- var/obj/structure/table/optable/table
+ var/mob/living/carbon/human/patient
+ var/obj/structure/table/optable/table
light_color = LIGHT_COLOR_BLUE
/obj/machinery/computer/operating/Initialize()
- ..()
+ . = ..()
find_table()
/obj/machinery/computer/operating/proc/find_table()
- for(var/dir in GLOB.cardinals)
+ for(var/dir in GLOB.cardinals)
table = locate(/obj/structure/table/optable, get_step(src, dir))
if(table)
table.computer = src
@@ -63,4 +63,4 @@
var/datum/surgery_step/surgery_step = procedure.get_surgery_step()
dat += "Next step: [capitalize(surgery_step.name)]
"
dat += ""
- return dat
+ return dat
\ No newline at end of file
diff --git a/code/game/machinery/computer/atmos_control.dm b/code/game/machinery/computer/atmos_control.dm
index 8131dbd4a6..2d1d771203 100644
--- a/code/game/machinery/computer/atmos_control.dm
+++ b/code/game/machinery/computer/atmos_control.dm
@@ -84,7 +84,7 @@
light_color = LIGHT_COLOR_CYAN
/obj/machinery/computer/atmos_control/Initialize()
- ..()
+ . = ..()
set_frequency(frequency)
/obj/machinery/computer/atmos_control/Destroy()
@@ -227,4 +227,4 @@
else if(output_tag == id_tag)
output_info = signal.data
else
- ..(signal)
+ ..(signal)
\ No newline at end of file
diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm
index 44822d3771..f3fabcc21c 100644
--- a/code/game/machinery/computer/message.dm
+++ b/code/game/machinery/computer/message.dm
@@ -40,25 +40,25 @@
return ..()
/obj/machinery/computer/message_monitor/emag_act(mob/user)
- if(emagged)
- return
- if(!isnull(src.linkedServer))
- emagged = TRUE
- screen = 2
- spark_system.set_up(5, 0, src)
- src.spark_system.start()
- var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
- MK.loc = src.loc
- // Will help make emagging the console not so easy to get away with.
- MK.info += "
�%@%(*$%&(�&?*(%&�/{}"
- var/time = 100 * length(src.linkedServer.decryptkey)
- addtimer(CALLBACK(src, .proc/UnmagConsole), time)
- message = rebootmsg
- else
- to_chat(user, "A no server error appears on the screen.")
+ if(emagged)
+ return
+ if(!isnull(src.linkedServer))
+ emagged = TRUE
+ screen = 2
+ spark_system.set_up(5, 0, src)
+ src.spark_system.start()
+ var/obj/item/paper/monitorkey/MK = new/obj/item/paper/monitorkey
+ MK.loc = src.loc
+ // Will help make emagging the console not so easy to get away with.
+ MK.info += "
�%@%(*$%&(�&?*(%&�/{}"
+ var/time = 100 * length(src.linkedServer.decryptkey)
+ addtimer(CALLBACK(src, .proc/UnmagConsole), time)
+ message = rebootmsg
+ else
+ to_chat(user, "A no server error appears on the screen.")
/obj/machinery/computer/message_monitor/Initialize()
- ..()
+ . = ..()
//Is the server isn't linked to a server, and there's a server available, default it to the first one in the list.
if(!linkedServer)
if(GLOB.message_servers && GLOB.message_servers.len > 0)
@@ -236,7 +236,7 @@
src.screen = 0 // Return the screen back to normal
/obj/machinery/computer/message_monitor/proc/UnmagConsole()
- emagged = FALSE
+ emagged = FALSE
/obj/machinery/computer/message_monitor/proc/ResetMessage()
customsender = "System Administrator"
@@ -309,7 +309,7 @@
message = noserver
else
if(auth)
- var/dkey = trim(stripped_input(usr, "Please enter the decryption key."))
+ var/dkey = trim(stripped_input(usr, "Please enter the decryption key."))
if(dkey && dkey != "")
if(src.linkedServer.decryptkey == dkey)
var/newkey = trim(input(usr,"Please enter the new key (3 - 16 characters max):"))
@@ -414,11 +414,11 @@
customrecepient.tnote += "← From [customsender] ([customjob]):
[custommessage]
"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
+ customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
- to_chat(H, "[icon2html(customrecepient, viewers(H))] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)")
- log_talk(usr,"[key_name(usr)] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
+ to_chat(H, "[icon2html(customrecepient, viewers(H))] Message from [customsender] ([customjob]), \"[custommessage]\" (Reply)")
+ log_talk(usr,"[key_name(usr)] (PDA: [customsender]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Sender is faking as someone who exists
@@ -427,11 +427,11 @@
customrecepient.tnote += "← From [PDARec.owner] ([customjob]):
[custommessage]
"
if (!customrecepient.silent)
playsound(customrecepient.loc, 'sound/machines/twobeep.ogg', 50, 1)
- customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
+ customrecepient.audible_message("[icon2html(customrecepient, viewers(customrecepient))] *[customrecepient.ttone]*", null, 3)
if( customrecepient.loc && ishuman(customrecepient.loc) )
var/mob/living/carbon/human/H = customrecepient.loc
- to_chat(H, "[icon2html(customrecepient, H)] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)")
- log_talk(usr,"[key_name(usr)] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
+ to_chat(H, "[icon2html(customrecepient, H)] Message from [PDARec.owner] ([customjob]), \"[custommessage]\" (Reply)")
+ log_talk(usr,"[key_name(usr)] (PDA: [PDARec.owner]) sent \"[custommessage]\" to [customrecepient.owner]",LOGPDA)
customrecepient.cut_overlays()
customrecepient.add_overlay(mutable_appearance('icons/obj/pda.dmi', "pda-r"))
//Finally..
@@ -468,4 +468,4 @@
info = "