diff --git a/code/ATMOSPHERICS/mainspipe.dm b/code/ATMOSPHERICS/mainspipe.dm
index 520d7a55b2..a2976974bf 100644
--- a/code/ATMOSPHERICS/mainspipe.dm
+++ b/code/ATMOSPHERICS/mainspipe.dm
@@ -36,8 +36,6 @@ obj/machinery/atmospherics/mains_pipe
icon = 'icons/obj/atmospherics/mainspipe.dmi'
layer = 2.4 //under wires with their 2.5
- force = 20
-
var/volume = 0
var/alert_pressure = 80*ONE_ATMOSPHERE
diff --git a/code/ATMOSPHERICS/pipes.dm b/code/ATMOSPHERICS/pipes.dm
index 6f70f822ad..c445988c53 100644
--- a/code/ATMOSPHERICS/pipes.dm
+++ b/code/ATMOSPHERICS/pipes.dm
@@ -3,7 +3,6 @@
var/datum/gas_mixture/air_temporary // used when reconstructing a pipeline that broke
var/datum/pipeline/parent
var/volume = 0
- force = 20
layer = 2.4 //under wires with their 2.44
use_power = 0
diff --git a/code/ZAS/Airflow.dm b/code/ZAS/Airflow.dm
index 8831f8aa40..01a84fdf5d 100644
--- a/code/ZAS/Airflow.dm
+++ b/code/ZAS/Airflow.dm
@@ -43,7 +43,7 @@ mob/check_airflow_movable(n)
return 0
return 1
-mob/dead/observer/check_airflow_movable()
+mob/observer/check_airflow_movable()
return 0
mob/living/silicon/check_airflow_movable()
@@ -247,6 +247,6 @@ zone/proc/movables()
. = list()
for(var/turf/T in contents)
for(var/atom/movable/A in T)
- if(!A.simulated || A.anchored || istype(A, /obj/effect) || istype(A, /mob/eye))
+ if(!A.simulated || A.anchored || istype(A, /obj/effect) || istype(A, /mob/observer))
continue
. += A
diff --git a/code/ZAS/Fire.dm b/code/ZAS/Fire.dm
index 7222470f71..bb4ec95a84 100644
--- a/code/ZAS/Fire.dm
+++ b/code/ZAS/Fire.dm
@@ -406,7 +406,7 @@ datum/gas_mixture/proc/check_recombustability(list/fuel_objs)
//Get heat transfer coefficients for clothing.
for(var/obj/item/clothing/C in src)
- if(l_hand == C || r_hand == C)
+ if(item_is_in_hands(C))
continue
if( C.max_heat_protection_temperature >= last_temperature )
diff --git a/code/ZAS/Variable Settings.dm b/code/ZAS/Variable Settings.dm
index 7e91a26b3f..2bfbed9681 100644
--- a/code/ZAS/Variable Settings.dm
+++ b/code/ZAS/Variable Settings.dm
@@ -348,7 +348,7 @@ var/global/vs_control/vsc = new
else if(istext(vars["[V]_RANDOM"]))
var/txt = vars["[V]_RANDOM"]
if(findtextEx(txt,"PROB"))
- txt = text2list(txt,"/")
+ txt = splittext(txt,"/")
txt[1] = replacetext(txt[1],"PROB","")
var/p = text2num(txt[1])
var/r = txt[2]
@@ -358,7 +358,7 @@ var/global/vs_control/vsc = new
newvalue = vars[V]
else if(findtextEx(txt,"PICK"))
txt = replacetext(txt,"PICK","")
- txt = text2list(txt,",")
+ txt = splittext(txt,",")
newvalue = pick(txt)
else
newvalue = roll(txt)
diff --git a/code/__defines/gamemode.dm b/code/__defines/gamemode.dm
index 675b01563a..815c55b2ec 100644
--- a/code/__defines/gamemode.dm
+++ b/code/__defines/gamemode.dm
@@ -81,6 +81,7 @@ var/list/be_special_flags = list(
#define MODE_LOYALIST "loyalist"
#define MODE_MALFUNCTION "malf"
#define MODE_TRAITOR "traitor"
+#define MODE_AUTOTRAITOR "autotraitor"
#define DEFAULT_TELECRYSTAL_AMOUNT 12
diff --git a/code/modules/nano/JSON Reader.dm b/code/_compatibility/509/JSON Reader.dm
similarity index 98%
rename from code/modules/nano/JSON Reader.dm
rename to code/_compatibility/509/JSON Reader.dm
index 12edf1dd5c..544d197ccd 100644
--- a/code/modules/nano/JSON Reader.dm
+++ b/code/_compatibility/509/JSON Reader.dm
@@ -1,3 +1,5 @@
+#if DM_VERSION < 510
+
json_token
var
value
@@ -202,4 +204,6 @@ json_reader
die(json_token/T)
if(!T) T = get_token()
- CRASH("Unexpected token: [T.value].")
\ No newline at end of file
+ CRASH("Unexpected token: [T.value].")
+
+#endif
\ No newline at end of file
diff --git a/code/modules/nano/JSON Writer.dm b/code/_compatibility/509/JSON Writer.dm
similarity index 97%
rename from code/modules/nano/JSON Writer.dm
rename to code/_compatibility/509/JSON Writer.dm
index 97acc0b2cc..de3bb54a3e 100644
--- a/code/modules/nano/JSON Writer.dm
+++ b/code/_compatibility/509/JSON Writer.dm
@@ -1,3 +1,5 @@
+#if DM_VERSION < 510
+
json_writer
var
use_cache = 0
@@ -48,7 +50,7 @@ json_writer
var/lrep = length(json_escape[targ])
txt = copytext(txt, 1, i) + json_escape[targ] + copytext(txt, i + length(targ))
start = i + lrep
-
+
return {""[txt]""}
is_associative(list/L)
@@ -56,3 +58,5 @@ json_writer
// if the key is a list that means it's actually an array of lists (stupid Byond...)
if(!isnum(key) && !isnull(L[key]) && !istype(key, /list))
return TRUE
+
+#endif
\ No newline at end of file
diff --git a/code/modules/nano/_JSON.dm b/code/_compatibility/509/_JSON.dm
similarity index 54%
rename from code/modules/nano/_JSON.dm
rename to code/_compatibility/509/_JSON.dm
index 9579189981..46f488ac56 100644
--- a/code/modules/nano/_JSON.dm
+++ b/code/_compatibility/509/_JSON.dm
@@ -1,17 +1,14 @@
+#if DM_VERSION < 510
/*
n_Json v11.3.21
*/
proc
- json2list(json)
+ json_decode(json)
var/static/json_reader/_jsonr = new()
return _jsonr.ReadObject(_jsonr.ScanJson(json))
- list2json(list/L)
+ json_encode(list/L)
var/static/json_writer/_jsonw = new()
return _jsonw.write(L)
-
- list2json_usecache(list/L)
- var/static/json_writer/_jsonw = new()
- _jsonw.use_cache = 1
- return _jsonw.write(L)
+#endif
\ No newline at end of file
diff --git a/code/_compatibility/509/text.dm b/code/_compatibility/509/text.dm
new file mode 100644
index 0000000000..c22790ccb8
--- /dev/null
+++ b/code/_compatibility/509/text.dm
@@ -0,0 +1,6 @@
+#if DM_VERSION < 510
+
+/proc/replacetext(text, find, replacement)
+ return jointext(splittext(text, find), replacement)
+
+#endif
\ No newline at end of file
diff --git a/code/_compatibility/509/type2type.dm b/code/_compatibility/509/type2type.dm
new file mode 100644
index 0000000000..62d7a5e5c7
--- /dev/null
+++ b/code/_compatibility/509/type2type.dm
@@ -0,0 +1,102 @@
+#if DM_VERSION < 510
+// Concatenates a list of strings into a single string. A seperator may optionally be provided.
+/proc/jointext(list/ls, sep)
+ if (ls.len <= 1) // Early-out code for empty or singleton lists.
+ return ls.len ? ls[1] : ""
+
+ var/l = ls.len // Made local for sanic speed.
+ var/i = 0 // Incremented every time a list index is accessed.
+
+ if (sep <> null)
+ // Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
+ #define S1 sep, ls[++i]
+ #define S4 S1, S1, S1, S1
+ #define S16 S4, S4, S4, S4
+ #define S64 S16, S16, S16, S16
+
+ . = "[ls[++i]]" // Make sure the initial element is converted to text.
+
+ // Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
+ if (l-1 & 0x01) // 'i' will always be 1 here.
+ . = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
+ if (l-i & 0x02)
+ . = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
+ if (l-i & 0x04)
+ . = text("[][][][][][][][][]", ., S4) // And so on....
+ if (l-i & 0x08)
+ . = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
+ if (l-i & 0x10)
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
+ if (l-i & 0x20)
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
+ if (l-i & 0x40)
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
+ while (l > i) // Chomp through the rest of the list, 128 elements at a time.
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
+
+ #undef S64
+ #undef S16
+ #undef S4
+ #undef S1
+ else
+ // Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
+ #define S1 ls[++i]
+ #define S4 S1, S1, S1, S1
+ #define S16 S4, S4, S4, S4
+ #define S64 S16, S16, S16, S16
+
+ . = "[ls[++i]]" // Make sure the initial element is converted to text.
+
+ if (l-1 & 0x01) // 'i' will always be 1 here.
+ . += S1 // Append 1 element if the remaining elements are not a multiple of 2.
+ if (l-i & 0x02)
+ . = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
+ if (l-i & 0x04)
+ . = text("[][][][][]", ., S4) // And so on...
+ if (l-i & 0x08)
+ . = text("[][][][][][][][][]", ., S4, S4)
+ if (l-i & 0x10)
+ . = text("[][][][][][][][][][][][][][][][][]", ., S16)
+ if (l-i & 0x20)
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
+ if (l-i & 0x40)
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
+ while (l > i) // Chomp through the rest of the list, 128 elements at a time.
+ . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
+ [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
+
+ #undef S64
+ #undef S16
+ #undef S4
+ #undef S1
+
+// Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
+/proc/splittext(text, delimiter="\n")
+ var/delim_len = length(delimiter)
+ if (delim_len < 1)
+ return list(text)
+
+ . = list()
+ var/last_found = 1
+ var/found
+
+ do
+ found = findtext(text, delimiter, last_found, 0)
+ . += copytext(text, last_found, found)
+ last_found = found + delim_len
+ while (found)
+#endif
\ No newline at end of file
diff --git a/code/_helpers/game.dm b/code/_helpers/game.dm
index 79b3aa6540..3964ddeeba 100644
--- a/code/_helpers/game.dm
+++ b/code/_helpers/game.dm
@@ -244,7 +244,7 @@
var/turf/ear = get_turf(M)
if(ear)
// Ghostship is magic: Ghosts can hear radio chatter from anywhere
- if(speaker_coverage[ear] || (istype(M, /mob/dead/observer) && (M.client) && (M.client.prefs.toggles & CHAT_GHOSTRADIO)))
+ if(speaker_coverage[ear] || (istype(M, /mob/observer/dead) && (M.client) && (M.client.prefs.toggles & CHAT_GHOSTRADIO)))
. |= M // Since we're already looping through mobs, why bother using |= ? This only slows things down.
return .
@@ -323,7 +323,7 @@ proc/isInSight(var/atom/A, var/atom/B)
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
- for(var/mob/dead/observer/G in player_list)
+ for(var/mob/observer/dead/G in player_list)
if(((G.client.inactivity/10)/60) <= buffer + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
candidates += G.key
@@ -337,7 +337,7 @@ proc/isInSight(var/atom/A, var/atom/B)
var/list/candidates = list() //List of candidate KEYS to assume control of the new larva ~Carn
var/i = 0
while(candidates.len <= 0 && i < 5)
- for(var/mob/dead/observer/G in player_list)
+ for(var/mob/observer/dead/G in player_list)
if(G.client.prefs.be_special & BE_ALIEN)
if(((G.client.inactivity/10)/60) <= ALIEN_SELECT_AFK_BUFFER + i) // the most active players are more likely to become an alien
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
diff --git a/code/_helpers/global_lists.dm b/code/_helpers/global_lists.dm
index abb5bd4de6..57527aab42 100644
--- a/code/_helpers/global_lists.dm
+++ b/code/_helpers/global_lists.dm
@@ -46,13 +46,18 @@ var/global/list/facial_hair_styles_male_list = list()
var/global/list/facial_hair_styles_female_list = list()
var/global/list/skin_styles_female_list = list() //unused
//Underwear
-var/global/list/underwear_m = list(
- "White" = "m1", "Grey" = "m2", "Green" = "m3", "Blue" = "m4", "Black" = "m5", "Mankini" = "m6",
- "Boxers Heart" = "m7", "Boxers Black" = "m8", "Boxers Grey" = "m9", "Boxers Stripe" = "m10", "None") //Curse whoever made male/female underwear diffrent colours
-var/global/list/underwear_f = list(
- "Red" = "f1", "White" = "f2", "Yellow" = "f3", "Blue" = "f4", "Black" = "f5", "Thong" = "f6",
- "Black Sports" = "f7","White Sports" = "f8", "Black Sports Alt" = "f9", "White Sports Alt" = "f10", "Baby Blue" = "f11", "Green" = "f12", "Pink" = "f13",
- "Violet" = "f14", "Thong Alt" = "f15", "Thong Alt Violet" = "f16", "None")
+var/global/list/underwear_top_t = list(
+ "Bra, Red" = "t1", "Bra, White" = "t2", "Bra, Yellow" = "t3", "Bra, Blue" = "t4", "Bra, Black" = "t5", "Lacy Bra" = "t6", "Sports Bra, Black" = "t7", "Sports Bra, White" = "t8",
+ "Sports Bra Alt, Black" = "t9", "Sporta Bra Alt, White" = "t10", "Bra, Baby-Blue" = "t11", "Bra, Green" = "t12", "Bra, Pink" = "t13", "Bra, Violet" = "t14",
+ "Lacy Bra Alt" = "t15", "Lacy Bra Alt, Violet" = "t16", "Halterneck Bra, Black" = "t17", "Halterneck Bra, Blue" = "t18", "Halterneck Bra, Green" = "t19", "Halterneck Bra, Purple" = "t20",
+ "Halterneck Bra, Red" = "t21", "Halterneck Bra, Teal" = "t22", "Halterneck Bra, Violet" = "t23", "Halterneck Bra, White" = "t24", "None")
+var/global/list/underwear_bottom_t = list(
+ "Briefs, White" = "b1", "Briefs, Grey" = "b2", "Briefs, Green" = "b3", "Briefs, Blue" = "b4", "Briefs, Black" = "b5", "Boxers, Loveheart" = "b7", "Boxers, Black" = "b8",
+ "Boxers, Grey" = "b9", "Boxers, Green & Blue Striped" = "b10", "Panties, Red" = "b11", "Panties, White" = "b12", "Panties, Yellow" = "b13", "Panties, Blue" = "b14",
+ "Panties, Light-Black" = "b15", "Thong" = "b16", "Panties, Black" = "b17", "Panties Alt, White" = "b18", "Compression Shorts, Black" = "b19", "Compression Shorts, White" = "b20",
+ "Compression Shorts, Baby-Blue" = "b21", "Panties, Green" = "b22", "Compression Shorts, Pink" = "b23", "Thong, Violet" = "b24", "Thong Alt" = "b25", "Thong Alt, Violet" = "b26",
+ "Alt Thong, Black" = "b27", "Alt Thong, Blue" = "b28", "Alt Thong, Green" = "b29", "Alt Thong, Purple" = "b30", "Alt Thong, Red" = "b31", "Alt Thong, Teal" = "b32",
+ "Alt Thong, Violet" = "b33", "Alt Thong, White" = "b34", "None")
//undershirt
var/global/list/undershirt_t = list(
"White tank top" = "u1", "Black tank top" = "u2", "Black shirt" = "u3",
diff --git a/code/_helpers/lists.dm b/code/_helpers/lists.dm
index f8a4b12b96..a6d5ea89af 100644
--- a/code/_helpers/lists.dm
+++ b/code/_helpers/lists.dm
@@ -48,9 +48,7 @@ proc/listgetindex(var/list/list,index)
return
proc/islist(list/list)
- if(istype(list))
- return 1
- return 0
+ return(istype(list))
//Return either pick(list) or null if list is not of type /list or is empty
proc/safepick(list/list)
diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm
index 549060b0af..224301a898 100644
--- a/code/_helpers/text.dm
+++ b/code/_helpers/text.dm
@@ -175,13 +175,6 @@
/*
* Text modification
*/
-
-/proc/replacetext(text, find, replacement)
- return list2text(text2list(text, find), replacement)
-
-/proc/replacetextEx(text, find, replacement)
- return list2text(text2listEx(text, find), replacement)
-
/proc/replace_characters(var/t,var/list/repl_chars)
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
diff --git a/code/_helpers/type2type.dm b/code/_helpers/type2type.dm
index 4a6958aaad..ebdee3c659 100644
--- a/code/_helpers/type2type.dm
+++ b/code/_helpers/type2type.dm
@@ -50,141 +50,15 @@
while (left-- > 0)
. = "0[.]"
-// Concatenates a list of strings into a single string. A seperator may optionally be provided.
-/proc/list2text(list/ls, sep)
- if (ls.len <= 1) // Early-out code for empty or singleton lists.
- return ls.len ? ls[1] : ""
-
- var/l = ls.len // Made local for sanic speed.
- var/i = 0 // Incremented every time a list index is accessed.
-
- if (sep <> null)
- // Macros expand to long argument lists like so: sep, ls[++i], sep, ls[++i], sep, ls[++i], etc...
- #define S1 sep, ls[++i]
- #define S4 S1, S1, S1, S1
- #define S16 S4, S4, S4, S4
- #define S64 S16, S16, S16, S16
-
- . = "[ls[++i]]" // Make sure the initial element is converted to text.
-
- // Having the small concatenations come before the large ones boosted speed by an average of at least 5%.
- if (l-1 & 0x01) // 'i' will always be 1 here.
- . = text("[][][]", ., S1) // Append 1 element if the remaining elements are not a multiple of 2.
- if (l-i & 0x02)
- . = text("[][][][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
- if (l-i & 0x04)
- . = text("[][][][][][][][][]", ., S4) // And so on....
- if (l-i & 0x08)
- . = text("[][][][][][][][][][][][][][][][][]", ., S4, S4)
- if (l-i & 0x10)
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16)
- if (l-i & 0x20)
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
- if (l-i & 0x40)
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
- while (l > i) // Chomp through the rest of the list, 128 elements at a time.
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
-
- #undef S64
- #undef S16
- #undef S4
- #undef S1
- else
- // Macros expand to long argument lists like so: ls[++i], ls[++i], ls[++i], etc...
- #define S1 ls[++i]
- #define S4 S1, S1, S1, S1
- #define S16 S4, S4, S4, S4
- #define S64 S16, S16, S16, S16
-
- . = "[ls[++i]]" // Make sure the initial element is converted to text.
-
- if (l-1 & 0x01) // 'i' will always be 1 here.
- . += S1 // Append 1 element if the remaining elements are not a multiple of 2.
- if (l-i & 0x02)
- . = text("[][][]", ., S1, S1) // Append 2 elements if the remaining elements are not a multiple of 4.
- if (l-i & 0x04)
- . = text("[][][][][]", ., S4) // And so on...
- if (l-i & 0x08)
- . = text("[][][][][][][][][]", ., S4, S4)
- if (l-i & 0x10)
- . = text("[][][][][][][][][][][][][][][][][]", ., S16)
- if (l-i & 0x20)
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S16, S16)
- if (l-i & 0x40)
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64)
- while (l > i) // Chomp through the rest of the list, 128 elements at a time.
- . = text("[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]\
- [][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]", ., S64, S64)
-
- #undef S64
- #undef S16
- #undef S4
- #undef S1
-
-// Slower then list2text, but correctly processes associative lists.
-proc/tg_list2text(list/list, glue=",")
- if (!istype(list) || !list.len)
- return
- var/output
- for(var/i=1 to list.len)
- output += (i!=1? glue : null)+(!isnull(list["[list[i]]"])?"[list["[list[i]]"]]":"[list[i]]")
- return output
-
-// Converts a string into a list by splitting the string at each delimiter found. (discarding the seperator)
-/proc/text2list(text, delimiter="\n")
- var/delim_len = length(delimiter)
- if (delim_len < 1)
- return list(text)
-
- . = list()
- var/last_found = 1
- var/found
-
- do
- found = findtext(text, delimiter, last_found, 0)
- . += copytext(text, last_found, found)
- last_found = found + delim_len
- while (found)
-
-// Case sensitive version of /proc/text2list().
-/proc/text2listEx(text, delimiter="\n")
- var/delim_len = length(delimiter)
- if (delim_len < 1)
- return list(text)
-
- . = list()
- var/last_found = 1
- var/found
-
- do
- found = findtextEx(text, delimiter, last_found, 0)
- . += copytext(text, last_found, found)
- last_found = found + delim_len
- while (found)
-
/proc/text2numlist(text, delimiter="\n")
var/list/num_list = list()
- for(var/x in text2list(text, delimiter))
+ for(var/x in splittext(text, delimiter))
num_list += text2num(x)
return num_list
// Splits the text of a file at seperator and returns them in a list.
/proc/file2list(filename, seperator="\n")
- return text2list(return_file_text(filename),seperator)
+ return splittext(return_file_text(filename),seperator)
// Turns a direction into text
/proc/num2dir(direction)
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index bd6f014e0b..8057d65f96 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -462,7 +462,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
if (M.real_name && M.real_name != M.name)
name += " \[[M.real_name]\]"
if (M.stat == 2)
- if(istype(M, /mob/dead/observer/))
+ if(istype(M, /mob/observer/dead/))
name += " \[ghost\]"
else
name += " \[dead\]"
@@ -474,7 +474,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
/proc/sortmobs()
var/list/moblist = list()
var/list/sortmob = sortAtom(mob_list)
- for(var/mob/eye/M in sortmob)
+ for(var/mob/observer/eye/M in sortmob)
moblist.Add(M)
for(var/mob/living/silicon/ai/M in sortmob)
moblist.Add(M)
@@ -488,7 +488,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/living/carbon/alien/M in sortmob)
moblist.Add(M)
- for(var/mob/dead/observer/M in sortmob)
+ for(var/mob/observer/dead/M in sortmob)
moblist.Add(M)
for(var/mob/new_player/M in sortmob)
moblist.Add(M)
@@ -861,7 +861,7 @@ proc/GaussRandRound(var/sigma,var/roundto)
if(!istype(O,/obj)) continue
O.loc = X
for(var/mob/M in T)
- if(!istype(M,/mob) || istype(M, /mob/eye)) continue // If we need to check for more mobs, I'll add a variable
+ if(!istype(M,/mob) || istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
M.loc = X
// var/area/AR = X.loc
@@ -995,7 +995,7 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
for(var/mob/M in T)
- if(!istype(M,/mob) || istype(M, /mob/eye)) continue // If we need to check for more mobs, I'll add a variable
+ if(!istype(M,/mob) || istype(M, /mob/observer/eye)) continue // If we need to check for more mobs, I'll add a variable
mobs += M
for(var/mob/M in mobs)
diff --git a/code/_macros.dm b/code/_macros.dm
index b6ddf4f12c..7e8d581b90 100644
--- a/code/_macros.dm
+++ b/code/_macros.dm
@@ -13,7 +13,7 @@
#define iscorgi(A) istype(A, /mob/living/simple_animal/corgi)
-#define isEye(A) istype(A, /mob/eye)
+#define isEye(A) istype(A, /mob/observer/eye)
#define ishuman(A) istype(A, /mob/living/carbon/human)
@@ -23,7 +23,7 @@
#define isnewplayer(A) istype(A, /mob/new_player)
-#define isobserver(A) istype(A, /mob/dead/observer)
+#define isobserver(A) istype(A, /mob/observer/dead)
#define isorgan(A) istype(A, /obj/item/organ/external)
diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm
index 9fa5fa3654..7d7468b91a 100644
--- a/code/_onclick/click.dm
+++ b/code/_onclick/click.dm
@@ -94,10 +94,7 @@
if(W == A) // Handle attack_self
W.attack_self(src)
- if(hand)
- update_inv_l_hand(0)
- else
- update_inv_r_hand(0)
+ update_inv_active_hand(0)
return 1
//Atoms on your person
diff --git a/code/_onclick/cyborg.dm b/code/_onclick/cyborg.dm
index 414071a964..e64d4f946f 100644
--- a/code/_onclick/cyborg.dm
+++ b/code/_onclick/cyborg.dm
@@ -32,7 +32,7 @@
CtrlClickOn(A)
return
- if(stat || lockcharge || weakened || stunned || paralysis)
+ if(stat || lockdown || weakened || stunned || paralysis)
return
if(!canClick())
diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm
index 2ee17dedce..63ef549122 100644
--- a/code/_onclick/hud/human.dm
+++ b/code/_onclick/hud/human.dm
@@ -162,7 +162,7 @@
inv_box.name = "r_hand"
inv_box.icon = ui_style
inv_box.icon_state = "r_hand_inactive"
- if(mymob && !mymob.hand) //This being 0 or null means the right hand is in use
+ if(!target.hand) //This being 0 or null means the right hand is in use
inv_box.icon_state = "r_hand_active"
inv_box.screen_loc = ui_rhand
inv_box.slot_id = slot_r_hand
@@ -177,7 +177,7 @@
inv_box.name = "l_hand"
inv_box.icon = ui_style
inv_box.icon_state = "l_hand_inactive"
- if(mymob && mymob.hand) //This being 1 means the left hand is in use
+ if(target.hand) //This being 1 means the left hand is in use
inv_box.icon_state = "l_hand_active"
inv_box.screen_loc = ui_lhand
inv_box.slot_id = slot_l_hand
@@ -388,7 +388,8 @@
if(dna.species == "Human") //no more xenos losing ears/tentacles
h_style = pick("Bedhead", "Bedhead 2", "Bedhead 3")
undershirt = null
- underwear = null
+ underwear_top = null
+ underwear_bottom = null
socks = null
regenerate_icons()
diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm
index d543b8b12a..71eff4a392 100644
--- a/code/_onclick/hud/movable_screen_objects.dm
+++ b/code/_onclick/hud/movable_screen_objects.dm
@@ -27,13 +27,13 @@
return
//Split screen-loc up into X+Pixel_X and Y+Pixel_Y
- var/list/screen_loc_params = text2list(PM["screen-loc"], ",")
+ var/list/screen_loc_params = splittext(PM["screen-loc"], ",")
//Split X+Pixel_X up into list(X, Pixel_X)
- var/list/screen_loc_X = text2list(screen_loc_params[1],":")
+ var/list/screen_loc_X = splittext(screen_loc_params[1],":")
screen_loc_X[1] = encode_screen_X(text2num(screen_loc_X[1]))
//Split Y+Pixel_Y up into list(Y, Pixel_Y)
- var/list/screen_loc_Y = text2list(screen_loc_params[2],":")
+ var/list/screen_loc_Y = splittext(screen_loc_params[2],":")
screen_loc_Y[1] = encode_screen_Y(text2num(screen_loc_Y[1]))
if(snap2grid) //Discard Pixel Values
diff --git a/code/_onclick/hud/spell_screen_objects.dm b/code/_onclick/hud/spell_screen_objects.dm
index a59474749a..3365a4384d 100644
--- a/code/_onclick/hud/spell_screen_objects.dm
+++ b/code/_onclick/hud/spell_screen_objects.dm
@@ -57,15 +57,15 @@
overlays.Add(open_state)
/obj/screen/movable/spell_master/proc/open_spellmaster()
- var/list/screen_loc_xy = text2list(screen_loc,",")
+ var/list/screen_loc_xy = splittext(screen_loc,",")
//Create list of X offsets
- var/list/screen_loc_X = text2list(screen_loc_xy[1],":")
+ var/list/screen_loc_X = splittext(screen_loc_xy[1],":")
var/x_position = decode_screen_X(screen_loc_X[1])
var/x_pix = screen_loc_X[2]
//Create list of Y offsets
- var/list/screen_loc_Y = text2list(screen_loc_xy[2],":")
+ var/list/screen_loc_Y = splittext(screen_loc_xy[2],":")
var/y_position = decode_screen_Y(screen_loc_Y[1])
var/y_pix = screen_loc_Y[2]
diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index d1c0b7b505..5f18c2d9b8 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -1,5 +1,5 @@
/client/var/inquisitive_ghost = 1
-/mob/dead/observer/verb/toggle_inquisition() // warning: unexpected inquisition
+/mob/observer/dead/verb/toggle_inquisition() // warning: unexpected inquisition
set name = "Toggle Inquisitiveness"
set desc = "Sets whether your ghost examines everything on click by default"
set category = "Ghost"
@@ -10,7 +10,7 @@
else
src << "You will no longer examine things you click on."
-/mob/dead/observer/DblClickOn(var/atom/A, var/params)
+/mob/observer/dead/DblClickOn(var/atom/A, var/params)
if(client.buildmode)
build_click(src, client.buildmode, params, A)
return
@@ -28,7 +28,7 @@
following = null
forceMove(get_turf(A))
-/mob/dead/observer/ClickOn(var/atom/A, var/params)
+/mob/observer/dead/ClickOn(var/atom/A, var/params)
if(client.buildmode)
build_click(src, client.buildmode, params, A)
return
@@ -39,7 +39,7 @@
A.attack_ghost(src)
// Oh by the way this didn't work with old click code which is why clicking shit didn't spam you
-/atom/proc/attack_ghost(mob/dead/observer/user as mob)
+/atom/proc/attack_ghost(mob/observer/dead/user as mob)
if(user.client && user.client.inquisitive_ghost)
user.examinate(src)
return
diff --git a/code/controllers/Processes/garbage.dm b/code/controllers/Processes/garbage.dm
index 20e866c315..f306d49683 100644
--- a/code/controllers/Processes/garbage.dm
+++ b/code/controllers/Processes/garbage.dm
@@ -58,7 +58,7 @@ world/loop_checks = 0
if(A.loc != null)
testing("GC: [A] | [A.type] is located in [A.loc] instead of null")
if(A.contents.len)
- testing("GC: [A] | [A.type] has contents: [list2text(A.contents)]")
+ testing("GC: [A] | [A.type] has contents: [jointext(A.contents)]")
if(searching.len)
for(var/atom/D in world)
LookForRefs(D, searching)
diff --git a/code/controllers/Processes/inactivity.dm b/code/controllers/Processes/inactivity.dm
index cd01e24829..e61c2d4dc1 100644
--- a/code/controllers/Processes/inactivity.dm
+++ b/code/controllers/Processes/inactivity.dm
@@ -6,7 +6,7 @@
if(config.kick_inactive)
for(var/client/C in clients)
if(!C.holder && C.is_afk(config.kick_inactive MINUTES))
- if(!istype(C.mob, /mob/dead))
+ if(!istype(C.mob, /mob/observer/dead))
log_access("AFK: [key_name(C)]")
C << "You have been inactive for more than [config.kick_inactive] minute\s and have been disconnected."
del(C) // Don't qdel, cannot override finalize_qdel behaviour for clients.
diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm
index 28dadc5adb..bd817baf41 100644
--- a/code/controllers/configuration.dm
+++ b/code/controllers/configuration.dm
@@ -265,7 +265,7 @@ var/list/gamemode_cache = list()
if(type == "config")
switch (name)
if ("resource_urls")
- config.resource_urls = text2list(value, " ")
+ config.resource_urls = splittext(value, " ")
if ("admin_legacy_system")
config.admin_legacy_system = 1
@@ -337,7 +337,7 @@ var/list/gamemode_cache = list()
config.generate_asteroid = 1
if ("asteroid_z_levels")
- config.asteroid_z_levels = text2list(value, ";")
+ config.asteroid_z_levels = splittext(value, ";")
//Numbers get stored as strings, so we'll fix that right now.
for(var/z_level in config.asteroid_z_levels)
z_level = text2num(z_level)
@@ -696,7 +696,7 @@ var/list/gamemode_cache = list()
config.starlight = value >= 0 ? value : 0
if("ert_species")
- config.ert_species = text2list(value, ";")
+ config.ert_species = splittext(value, ";")
if(!config.ert_species.len)
config.ert_species += "Human"
@@ -707,7 +707,7 @@ var/list/gamemode_cache = list()
config.aggressive_changelog = 1
if("default_language_prefixes")
- var/list/values = text2list(value, " ")
+ var/list/values = splittext(value, " ")
if(values.len > 0)
language_prefixes = values
diff --git a/code/datums/helper_datums/getrev.dm b/code/datums/helper_datums/getrev.dm
index 5d6400886e..34082d12ba 100644
--- a/code/datums/helper_datums/getrev.dm
+++ b/code/datums/helper_datums/getrev.dm
@@ -14,7 +14,7 @@ var/global/datum/getrev/revdata = new()
var/list/head_log = file2list(".git/logs/HEAD", "\n")
for(var/line=head_log.len, line>=1, line--)
if(head_log[line])
- var/list/last_entry = text2list(head_log[line], " ")
+ var/list/last_entry = splittext(head_log[line], " ")
if(last_entry.len < 2) continue
revision = last_entry[2]
// Get date/time
diff --git a/code/datums/repositories/cameras.dm b/code/datums/repositories/cameras.dm
new file mode 100644
index 0000000000..7bac2a4634
--- /dev/null
+++ b/code/datums/repositories/cameras.dm
@@ -0,0 +1,34 @@
+var/global/datum/repository/cameras/camera_repository = new()
+
+/proc/invalidateCameraCache()
+ camera_repository.networks.Cut()
+ camera_repository.invalidated = 1
+ camera_repository.camera_cache_id = (++camera_repository.camera_cache_id % 999999)
+
+/datum/repository/cameras
+ var/list/networks
+ var/invalidated = 1
+ var/camera_cache_id = 1
+
+/datum/repository/cameras/New()
+ networks = list()
+ ..()
+
+/datum/repository/cameras/proc/cameras_in_network(var/network)
+ setup_cache()
+ var/list/network_list = networks[network]
+ return network_list
+
+/datum/repository/cameras/proc/setup_cache()
+ if(!invalidated)
+ return
+ invalidated = 0
+
+ cameranet.process_sort()
+ for(var/obj/machinery/camera/C in cameranet.cameras)
+ var/cam = C.nano_structure()
+ for(var/network in C.network)
+ if(!networks[network])
+ networks[network] = list()
+ var/list/netlist = networks[network]
+ netlist[++netlist.len] = cam
diff --git a/code/datums/crew.dm b/code/datums/repositories/crew.dm
similarity index 95%
rename from code/datums/crew.dm
rename to code/datums/repositories/crew.dm
index d46a83846f..6fbe1863da 100644
--- a/code/datums/crew.dm
+++ b/code/datums/repositories/crew.dm
@@ -1,9 +1,5 @@
var/global/datum/repository/crew/crew_repository = new()
-/datum/cache_entry
- var/timestamp
- var/data
-
/datum/repository/crew
var/list/cache_data
diff --git a/code/datums/repositories/repository.dm b/code/datums/repositories/repository.dm
new file mode 100644
index 0000000000..6267099c93
--- /dev/null
+++ b/code/datums/repositories/repository.dm
@@ -0,0 +1,4 @@
+/datum/cache_entry
+ var/timestamp
+ var/data
+
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index ed0eedfa51..b18d949fe6 100644
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -50,7 +50,6 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/swabs,
/obj/item/weapon/storage/box/swabs,
- /obj/item/weapon/storage/box/slides,
/obj/item/device/uv_light,
/obj/item/weapon/reagent_containers/spray/luminol)
cost = 30
@@ -775,7 +774,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
cost = 125
containertype = /obj/structure/closet/crate/secure/weapon
containername = "Experimental weapons crate"
- access = access_heads
+ access = access_armory
group = "Security"
/datum/supply_packs/randomised/armor
diff --git a/code/datums/wires/robot.dm b/code/datums/wires/robot.dm
index da20f1bd05..6a1e96e18a 100644
--- a/code/datums/wires/robot.dm
+++ b/code/datums/wires/robot.dm
@@ -16,7 +16,7 @@ var/const/BORG_WIRE_CAMERA = 16
. += text("
\n[(R.lawupdate ? "The LawSync light is on." : "The LawSync light is off.")]")
. += text("
\n[(R.connected_ai ? "The AI link light is on." : "The AI link light is off.")]")
. += text("
\n[((!isnull(R.camera) && R.camera.status == 1) ? "The Camera light is on." : "The Camera light is off.")]")
- . += text("
\n[(R.lockcharge ? "The lockdown light is on." : "The lockdown light is off.")]")
+ . += text("
\n[(R.lockdown ? "The lockdown light is on." : "The lockdown light is off.")]")
return .
/datum/wires/robot/UpdateCut(var/index, var/mended)
@@ -64,7 +64,7 @@ var/const/BORG_WIRE_CAMERA = 16
R << "Your camera lense focuses loudly."
if(BORG_WIRE_LOCKED_DOWN)
- R.SetLockdown(!R.lockcharge) // Toggle
+ R.SetLockdown(!R.lockdown) // Toggle
/datum/wires/robot/CanUse(var/mob/living/L)
var/mob/living/silicon/robot/R = holder
diff --git a/code/defines/obj.dm b/code/defines/obj.dm
index 602008ccd7..7babc9c4c1 100644
--- a/code/defines/obj.dm
+++ b/code/defines/obj.dm
@@ -114,7 +114,7 @@ var/global/ManifestJSON
department = 1
if(depthead && sci.len != 1)
sci.Swap(1,sci.len)
-
+
if(real_rank in cargo_positions)
car[++car.len] = list("name" = name, "rank" = rank, "active" = isactive)
department = 1
@@ -146,7 +146,7 @@ var/global/ManifestJSON
"bot" = bot,\
"misc" = misc\
)
- ManifestJSON = list2json(PDA_Manifest)
+ ManifestJSON = json_encode(PDA_Manifest)
return
diff --git a/code/defines/procs/hud.dm b/code/defines/procs/hud.dm
index e5560e5ce0..78fdb6dc7b 100644
--- a/code/defines/procs/hud.dm
+++ b/code/defines/procs/hud.dm
@@ -72,7 +72,7 @@ mob/proc/handle_regular_hud_updates() //Used in the life.dm of mobs that can use
mob/proc/in_view(var/turf/T)
return view(T)
-/mob/eye/in_view(var/turf/T)
+/mob/observer/eye/in_view(var/turf/T)
var/list/viewed = new
for(var/mob/living/carbon/human/H in mob_list)
if(get_dist(H, T) <= 7)
diff --git a/code/game/antagonist/antagonist.dm b/code/game/antagonist/antagonist.dm
index 6d3e7d0b28..e9d5ef71b5 100644
--- a/code/game/antagonist/antagonist.dm
+++ b/code/game/antagonist/antagonist.dm
@@ -63,6 +63,8 @@
var/list/global_objectives = list() // Universal objectives if any.
var/list/candidates = list() // Potential candidates.
var/list/faction_members = list() // Semi-antags (in-round revs, borer thralls)
+
+ var/allow_latejoin = 0 //Determines whether or not the game mode will allow for the template to spawn try_latespawn
// ID card stuff.
var/default_access = list()
@@ -92,7 +94,7 @@
// Prune restricted status. Broke it up for readability.
// Note that this is done before jobs are handed out.
for(var/datum/mind/player in ticker.mode.get_players_for_role(role_type, id))
- if(ghosts_only && !istype(player.current, /mob/dead))
+ if(ghosts_only && !istype(player.current, /mob/observer/dead))
log_debug("[key_name(player)] is not eligible to become a [role_text]: Only ghosts may join as this role!")
else if(player.special_role)
log_debug("[key_name(player)] is not eligible to become a [role_text]: They already have a special role ([player.special_role])!")
@@ -124,7 +126,7 @@
return 0
player.current << "You have been selected this round as an antagonist!"
message_admins("[uppertext(ticker.mode.name)]: Selected [player] as a [role_text].")
- if(istype(player.current, /mob/dead))
+ if(istype(player.current, /mob/observer/dead))
create_default(player.current)
else
add_antagonist(player,0,0,0,1,1)
diff --git a/code/game/antagonist/antagonist_add.dm b/code/game/antagonist/antagonist_add.dm
index 1598aacfe8..9f594f9b63 100644
--- a/code/game/antagonist/antagonist_add.dm
+++ b/code/game/antagonist/antagonist_add.dm
@@ -8,7 +8,7 @@
player.assigned_role = role_text
player.special_role = role_text
- if(istype(player.current, /mob/dead))
+ if(istype(player.current, /mob/observer/dead))
create_default(player.current)
else
create_antagonist(player, move_to_spawn, do_not_announce, preserve_appearance)
diff --git a/code/game/antagonist/antagonist_create.dm b/code/game/antagonist/antagonist_create.dm
index 072dd88bee..65c7a080cd 100644
--- a/code/game/antagonist/antagonist_create.dm
+++ b/code/game/antagonist/antagonist_create.dm
@@ -76,7 +76,7 @@
P.info = "The nuclear authorization code is: [code]"
P.name = "nuclear bomb code"
if(leader && leader.current)
- if(get_turf(P) == get_turf(leader.current) && !(leader.current.l_hand && leader.current.r_hand))
+ if(get_turf(P) == get_turf(leader.current))
leader.current.put_in_hands(P)
if(!code_owner && leader)
diff --git a/code/game/antagonist/antagonist_helpers.dm b/code/game/antagonist/antagonist_helpers.dm
index 056fbd1865..0cc28d5ad2 100644
--- a/code/game/antagonist/antagonist_helpers.dm
+++ b/code/game/antagonist/antagonist_helpers.dm
@@ -33,6 +33,8 @@
return (flags & ANTAG_VOTABLE)
/datum/antagonist/proc/can_late_spawn()
+ if(!(allow_latejoin))
+ return 0
update_current_antag_max()
if(get_antag_count() >= cur_max)
return 0
diff --git a/code/game/antagonist/station/changeling.dm b/code/game/antagonist/station/changeling.dm
index dad7ed81a2..044e968f49 100644
--- a/code/game/antagonist/station/changeling.dm
+++ b/code/game/antagonist/station/changeling.dm
@@ -73,4 +73,14 @@
if(player.current.client.prefs.organ_data["torso"] == "cyborg") // Full synthetic.
return 0
return 1
- return 0
\ No newline at end of file
+ return 0
+
+/datum/antagonist/changeling/print_player_full(var/datum/mind/ply)
+ var/text = print_player_lite(ply)
+
+ if(ply.changeling)
+ var/datum/changeling/ling_datum = ply.changeling
+ text += " (had [ling_datum.max_geneticpoints] genomes)"
+ text += "
Bought [english_list(ling_datum.purchased_powers_history)]."
+
+ return text
diff --git a/code/game/antagonist/station/renegade.dm b/code/game/antagonist/station/renegade.dm
index cd9dd9b83b..b077977fd7 100644
--- a/code/game/antagonist/station/renegade.dm
+++ b/code/game/antagonist/station/renegade.dm
@@ -50,8 +50,7 @@ var/datum/antagonist/renegade/renegades
var/gun_type = pick(spawn_guns)
var/obj/item/gun = new gun_type(get_turf(player))
- if(!(player.l_hand && player.r_hand))
- player.put_in_hands(gun)
+ player.put_in_hands(gun)
/proc/rightandwrong()
diff --git a/code/game/antagonist/station/traitor.dm b/code/game/antagonist/station/traitor.dm
index dcc7fa9df9..acc0bd3d8d 100644
--- a/code/game/antagonist/station/traitor.dm
+++ b/code/game/antagonist/station/traitor.dm
@@ -5,6 +5,10 @@ var/datum/antagonist/traitor/traitors
id = MODE_TRAITOR
protected_jobs = list("Security Officer", "Warden", "Detective", "Internal Affairs Agent", "Head of Security", "Captain")
flags = ANTAG_SUSPICIOUS | ANTAG_RANDSPAWN | ANTAG_VOTABLE
+
+/datum/antagonist/traitor/auto
+ id = MODE_AUTOTRAITOR
+ allow_latejoin = 1
/datum/antagonist/traitor/New()
..()
diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm
index 37f6ede31c..18704058d1 100755
--- a/code/game/area/Space Station 13 areas.dm
+++ b/code/game/area/Space Station 13 areas.dm
@@ -77,7 +77,7 @@ var/list/ghostteleportlocs = list()
/hook/startup/proc/setupGhostTeleportLocs()
for(var/area/AR in world)
if(ghostteleportlocs.Find(AR.name)) continue
- if(istype(AR, /area/turret_protected/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom))
+ if(istype(AR, /area/aisat) || istype(AR, /area/derelict) || istype(AR, /area/tdome) || istype(AR, /area/shuttle/specops/centcom))
ghostteleportlocs += AR.name
ghostteleportlocs[AR.name] = AR
var/turf/picked = pick(get_area_turfs(AR.type))
@@ -122,8 +122,6 @@ area/space/atmosalert()
/area/space/partyalert()
return
-/area/turret_protected/
-
/area/arrival
requires_power = 0
@@ -2422,65 +2420,65 @@ area/space/atmosalert()
name = "Emergency Storage"
icon_state = "storage"
-/area/turret_protected/ai_upload
+/area/ai_upload
name = "\improper AI Upload Chamber"
icon_state = "ai_upload"
ambience = list('sound/ambience/ambimalf.ogg')
-/area/turret_protected/ai_upload_foyer
+/area/ai_upload_foyer
name = "AI Upload Access"
icon_state = "ai_foyer"
ambience = list('sound/ambience/ambimalf.ogg')
sound_env = SMALL_ENCLOSED
-/area/turret_protected/ai_server_room
+/area/ai_server_room
name = "Messaging Server Room"
icon_state = "ai_server"
sound_env = SMALL_ENCLOSED
-/area/turret_protected/ai
+/area/ai
name = "\improper AI Chamber"
icon_state = "ai_chamber"
ambience = list('sound/ambience/ambimalf.ogg')
-/area/turret_protected/ai_cyborg_station
+/area/ai_cyborg_station
name = "\improper Cyborg Station"
icon_state = "ai_cyborg"
sound_env = SMALL_ENCLOSED
-/area/turret_protected/aisat
+/area/aisat
name = "\improper AI Satellite"
icon_state = "ai"
-/area/turret_protected/aisat_interior
+/area/aisat_interior
name = "\improper AI Satellite"
icon_state = "ai"
-/area/turret_protected/AIsatextFP
+/area/AIsatextFP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextFS
+/area/AIsatextFS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextAS
+/area/AIsatextAS
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/AIsatextAP
+/area/AIsatextAP
name = "\improper AI Sat Ext"
icon_state = "storage"
luminosity = 1
lighting_use_dynamic = 0
-/area/turret_protected/NewAIMain
+/area/NewAIMain
name = "\improper AI Main New"
icon_state = "storage"
@@ -2524,22 +2522,22 @@ area/space/atmosalert()
name = "\improper Telecoms Central Compartment"
icon_state = "tcomsatcham"
-/area/turret_protected/tcomsat
+/area/tcomsat
name = "\improper Telecoms Satellite"
icon_state = "tcomsatlob"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomfoyer
+/area/tcomfoyer
name = "\improper Telecoms Foyer"
icon_state = "tcomsatentrance"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomwest
+/area/tcomwest
name = "\improper Telecommunications Satellite West Wing"
icon_state = "tcomsatwest"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
-/area/turret_protected/tcomeast
+/area/tcomeast
name = "\improper Telecommunications Satellite East Wing"
icon_state = "tcomsateast"
ambience = list('sound/ambience/ambisin2.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/signal.ogg', 'sound/ambience/ambigen10.ogg')
@@ -2761,10 +2759,10 @@ var/list/the_station_areas = list (
/area/construction,
/area/ai_monitored/storage/eva,
/area/ai_monitored/storage/secure,
- /area/ai_monitored/storage/emergency,
- /area/turret_protected/ai_upload,
- /area/turret_protected/ai_upload_foyer,
- /area/turret_protected/ai,
+ /area/ai_monitored/storage/emergency,
+ /area/ai_upload,
+ /area/ai_upload_foyer,
+ /area/ai
)
diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm
index 07b3dcacc5..81f0da074d 100644
--- a/code/game/area/areas.dm
+++ b/code/game/area/areas.dm
@@ -292,12 +292,14 @@ var/list/mob/living/forced_ambiance_list = new
mob << "The sudden appearance of gravity makes you fall to the floor!"
/area/proc/prison_break()
- for(var/obj/machinery/power/apc/temp_apc in src)
- temp_apc.overload_lighting(70)
- for(var/obj/machinery/door/airlock/temp_airlock in src)
- temp_airlock.prison_open()
- for(var/obj/machinery/door/window/temp_windoor in src)
- temp_windoor.open()
+ var/obj/machinery/power/apc/theAPC = get_apc()
+ if(theAPC.operating)
+ for(var/obj/machinery/power/apc/temp_apc in src)
+ temp_apc.overload_lighting(70)
+ for(var/obj/machinery/door/airlock/temp_airlock in src)
+ temp_airlock.prison_open()
+ for(var/obj/machinery/door/window/temp_windoor in src)
+ temp_windoor.open()
/area/proc/has_gravity()
return has_gravity
diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm
index 29d519355e..b37342ced5 100644
--- a/code/game/dna/dna_modifier.dm
+++ b/code/game/dna/dna_modifier.dm
@@ -159,7 +159,7 @@
|| locate(/obj/machinery/computer/cloning, get_step(src, WEST)))
if(!M.client && M.mind)
- for(var/mob/dead/observer/ghost in player_list)
+ for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind == M.mind)
ghost << "Your corpse has been placed into a cloning scanner. Return to your body if you want to be resurrected/cloned! (Verbs -> Ghost -> Re-enter corpse)"
break
diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm
index 566cad6ace..84d6bb8536 100644
--- a/code/game/gamemodes/changeling/changeling_powers.dm
+++ b/code/game/gamemodes/changeling/changeling_powers.dm
@@ -14,11 +14,12 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
var/isabsorbing = 0
var/geneticpoints = 5
var/max_geneticpoints = 5
- var/purchasedpowers = list()
+ var/list/purchased_powers = list()
var/mimicing = ""
var/cloaked = 0
var/armor_deployed = 0 //This is only used for changeling_generic_equip_all_slots() at the moment.
var/recursive_enhancement = 0 //Used to power up other abilities from the ling power with the same name.
+ var/list/purchased_powers_history = list() //Used for round-end report, includes respec uses too.
/datum/changeling/New(var/gender=FEMALE)
..()
@@ -60,10 +61,10 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
// Code to auto-purchase free powers.
for(var/datum/power/changeling/P in powerinstances)
if(!P.genomecost) // Is it free?
- if(!(P in mind.changeling.purchasedpowers)) // Do we not have it already?
+ if(!(P in mind.changeling.purchased_powers)) // Do we not have it already?
mind.changeling.purchasePower(mind, P.name, 0)// Purchase it. Don't remake our verbs, we're doing it after this.
- for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
+ for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
if(P.isVerb)
if(lesser_form && !P.allowduringlesserform) continue
if(!(P in src.verbs))
@@ -83,7 +84,7 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
//removes our changeling verbs
/mob/proc/remove_changeling_powers()
if(!mind || !mind.changeling) return
- for(var/datum/power/changeling/P in mind.changeling.purchasedpowers)
+ for(var/datum/power/changeling/P in mind.changeling.purchased_powers)
if(P.isVerb)
verbs -= P.verbpath
diff --git a/code/game/gamemodes/changeling/generic_equip_procs.dm b/code/game/gamemodes/changeling/generic_equip_procs.dm
index 5569db8512..930e50c9c8 100644
--- a/code/game/gamemodes/changeling/generic_equip_procs.dm
+++ b/code/game/gamemodes/changeling/generic_equip_procs.dm
@@ -244,7 +244,7 @@
var/mob/living/carbon/human/M = src
- if(M.l_hand && M.r_hand) //Make sure our hands aren't full.
+ if(M.hands_are_full()) //Make sure our hands aren't full.
src << "Our hands are full. Drop something first."
return 0
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index 7c6f674628..c0330fb080 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -249,7 +249,7 @@ var/list/datum/power/changeling/powerinstances = list()
for(var/datum/power/changeling/P in powerinstances)
var/ownsthis = 0
- if(P in purchasedpowers)
+ if(P in purchased_powers)
ownsthis = 1
@@ -324,7 +324,7 @@ var/list/datum/power/changeling/powerinstances = list()
M.current << "This is awkward. Changeling power purchase failed, please report this bug to a coder!"
return
- if(Thepower in purchasedpowers)
+ if(Thepower in purchased_powers)
M.current << "We have already evolved this ability!"
return
@@ -335,7 +335,10 @@ var/list/datum/power/changeling/powerinstances = list()
geneticpoints -= Thepower.genomecost
- purchasedpowers += Thepower
+ purchased_powers += Thepower
+
+ if(Thepower.genomecost > 0)
+ purchased_powers_history.Add("[Pname] ([Thepower.genomecost] points)")
if(!Thepower.isVerb && Thepower.verbpath)
call(M.current, Thepower.verbpath)()
diff --git a/code/game/gamemodes/changeling/powers/absorb.dm b/code/game/gamemodes/changeling/powers/absorb.dm
index 6adead4b89..d145f95946 100644
--- a/code/game/gamemodes/changeling/powers/absorb.dm
+++ b/code/game/gamemodes/changeling/powers/absorb.dm
@@ -1,10 +1,10 @@
/datum/power/changeling/absorb_dna
name = "Absorb DNA"
- desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger."
+ desc = "Permits us to syphon the DNA from a human. They become one with us, and we become stronger if they were of our kind."
genomecost = 0
verbpath = /mob/proc/changeling_absorb_dna
-//Absorbs the victim's DNA making them uncloneable. Requires a strong grip on the victim.
+//Absorbs the victim's DNA. Requires a strong grip on the victim.
//Doesn't cost anything as it's the most basic ability.
/mob/proc/changeling_absorb_dna()
set category = "Changeling"
@@ -27,9 +27,10 @@
src << "We do not know how to parse this creature's DNA!"
return
- if(HUSK in T.mutations)
- src << "This creature's DNA is ruined beyond useability!"
- return
+ if(HUSK in T.mutations) //Lings can always absorb other lings, unless someone beat them to it first.
+ if(!T.mind.changeling || T.mind.changeling && T.mind.changeling.geneticpoints < 0)
+ src << "This creature's DNA is ruined beyond useability!"
+ return
if(G.state != GRAB_KILL)
src << "We must have a tighter grip to absorb this creature."
diff --git a/code/game/gamemodes/changeling/powers/armblade.dm b/code/game/gamemodes/changeling/powers/armblade.dm
index 865c380b79..7ab1cdda3b 100644
--- a/code/game/gamemodes/changeling/powers/armblade.dm
+++ b/code/game/gamemodes/changeling/powers/armblade.dm
@@ -2,6 +2,7 @@
name = "Arm Blade"
desc = "We reform one of our arms into a deadly blade."
helptext = "We may retract our armblade by dropping it. It can deflect projectiles."
+ enhancedtext = "The blade will have armor peneratration."
genomecost = 2
verbpath = /mob/proc/changeling_arm_blade
@@ -10,9 +11,16 @@
set category = "Changeling"
set name = "Arm Blade (20)"
- if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade))
- return 1
- return 0
+ if(src.mind.changeling.recursive_enhancement)
+ if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade/greater))
+ src << "We prepare an extra sharp blade."
+ src.mind.changeling.recursive_enhancement = 0
+ return 1
+
+ else
+ if(changeling_generic_weapon(/obj/item/weapon/melee/arm_blade))
+ return 1
+ return 0
/obj/item/weapon/melee/arm_blade
name = "arm blade"
@@ -31,6 +39,11 @@
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
var/mob/living/creator //This is just like ninja swords, needed to make sure dumb shit that removes the sword doesn't make it stay around.
+/obj/item/weapon/melee/arm_blade/greater
+ name = "arm greatblade"
+ desc = "A grotesque blade made out of bone and flesh that cleaves through people and armor as a hot knife through butter."
+ armor_penetration = 30
+
/obj/item/weapon/melee/arm_blade/New(location)
..()
processing_objects |= src
@@ -55,7 +68,7 @@
..()
/obj/item/weapon/melee/arm_blade/process() //Stolen from ninja swords.
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
index 694e22e8dd..dd1489248f 100644
--- a/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
+++ b/code/game/gamemodes/changeling/powers/bioelectrogenesis.dm
@@ -4,6 +4,7 @@
On demand, we can attempt to recharge anything in our active hand, or we can touch someone with an electrified hand, shocking them."
helptext = "We can shock someone by grabbing them and using this ability, or using the ability with an empty hand and touching them. \
Shocking someone costs ten chemicals per use."
+ enhancedtext = "Shocking biologicals without grabbing only requires five chemicals, and has more disabling power."
genomecost = 2
verbpath = /mob/proc/changeling_bioelectrogenesis
@@ -21,8 +22,14 @@
return 0
if(held_item == null)
- if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc.
- return 1
+ if(src.mind.changeling.recursive_enhancement)
+ if(changeling_generic_weapon(/obj/item/weapon/electric_hand/efficent))
+ src << "We will shock others more efficently."
+ src.mind.changeling.recursive_enhancement = 0
+ return 1
+ else
+ if(changeling_generic_weapon(/obj/item/weapon/electric_hand,0)) //Chemical cost is handled in the equip proc.
+ return 1
return 0
else
@@ -30,12 +37,11 @@
if(istype(held_item,/obj/item/weapon/grab))
var/obj/item/weapon/grab/G = held_item
if(G.affecting)
- G.affecting.electrocute_act(5,src,1.0,BP_TORSO)
- var/agony = 60 //The same as a stunbaton.
- var/stun = 0
- G.affecting.stun_effect_act(stun, agony, BP_TORSO, src)
+ G.affecting.electrocute_act(10,src,1.0,BP_TORSO)
+ var/agony = 80 //Does more than if hit with an electric hand, since grabbing is slower.
+ G.affecting.stun_effect_act(0, agony, BP_TORSO, src)
- msg_admin_attack("[key_name(src)] stunned [key_name(G.affecting)] with the [src].")
+ msg_admin_attack("[key_name(src)] shocked [key_name(G.affecting)] with the [src].")
visible_message("Arcs of electricity strike [G.affecting]!",
"Our hand channels raw electricity into [G.affecting].",
@@ -72,7 +78,7 @@
new /obj/effect/effect/sparks(T)
held_item.update_icon()
i--
- sleep(10)
+ sleep(1 SECOND)
success = 1
if(success == 0) //If we couldn't do anything with the ability, don't deduct the chemicals.
src << "We are unable to affect \the [held_item]."
@@ -85,6 +91,14 @@
desc = "You could probably shock someone badly if you touched them, or recharge something."
icon = 'icons/obj/weapons.dmi'
icon_state = "electric_hand"
+ var/shock_cost = 10
+ var/agony_amount = 60
+ var/electrocute_amount = 10
+
+/obj/item/weapon/electric_hand/efficent
+ shock_cost = 5
+ agony_amount = 80
+ electrocute_amount = 20
/obj/item/weapon/electric_hand/New()
if(ismob(loc))
@@ -108,22 +122,20 @@
if(istype(target,/mob/living/carbon))
var/mob/living/carbon/C = target
- if(user.mind.changeling.chem_charges < 10)
+ if(user.mind.changeling.chem_charges < shock_cost)
src << "We require more chemicals to electrocute [C]!"
return 0
- C.electrocute_act(5,src,1.0,BP_TORSO)
- var/agony = 60 //The same as a stunbaton.
- var/stun = 0
- C.stun_effect_act(stun, agony, BP_TORSO, src)
+ C.electrocute_act(electrocute_amount,src,1.0,BP_TORSO)
+ C.stun_effect_act(0, agony_amount, BP_TORSO, src)
- msg_admin_attack("[key_name(user)] stunned [key_name(C)] with the [src].")
+ msg_admin_attack("[key_name(user)] shocked [key_name(C)] with the [src].")
visible_message("Arcs of electricity strike [C]!",
"Our hand channels raw electricity into [C]",
"You hear sparks!")
//qdel(src) //Since we're no longer a one hit stun, we need to stick around.
- user.mind.changeling.chem_charges -= 10
+ user.mind.changeling.chem_charges -= shock_cost
return 1
else if(istype(target,/mob/living/silicon))
@@ -163,7 +175,7 @@
new /obj/effect/effect/sparks(Turf)
T.update_icon()
i--
- sleep(10)
+ sleep(1 SECOND)
success = 1
break
if(success == 0)
diff --git a/code/game/gamemodes/changeling/powers/cryo_sting.dm b/code/game/gamemodes/changeling/powers/cryo_sting.dm
index d6a4f6302b..7fae4c1601 100644
--- a/code/game/gamemodes/changeling/powers/cryo_sting.dm
+++ b/code/game/gamemodes/changeling/powers/cryo_sting.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/cryo_sting
name = "Cryogenic Sting"
desc = "We silently sting a biological with a cocktail of chemicals that freeze them."
- helptext = "Does not provide a warning to the victim, though they will likely realize they are suddenly freezing."
+ helptext = "Does not provide a warning to the victim, though they will likely realize they are suddenly freezing. Has \
+ a three minute cooldown between uses."
enhancedtext = "Increases the amount of chemicals injected."
genomecost = 1
verbpath = /mob/proc/changeling_cryo_sting
diff --git a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
index 0b0b95589c..8f7998f67a 100644
--- a/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
+++ b/code/game/gamemodes/changeling/powers/delayed_toxin_sting.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/delayed_toxic_sting
name = "Delayed Toxic Sting"
- desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not implicate ourselves."
- helptext = "The toxin takes effect in about two minutes."
+ desc = "We silently sting a biological, causing a significant amount of toxins after a few minutes, allowing us to not \
+ implicate ourselves."
+ helptext = "The toxin takes effect in about two minutes. The sting has a three minute cooldown between uses."
enhancedtext = "The toxic damage is doubled."
genomecost = 1
verbpath = /mob/proc/changeling_delayed_toxic_sting
@@ -25,7 +26,7 @@
while(i)
T.adjustToxLoss(1)
i--
- sleep(20)
+ sleep(2 SECONDS)
src.verbs -= /mob/proc/changeling_delayed_toxic_sting
spawn(3 MINUTES)
src << "We are ready to use our delayed toxic string once more."
diff --git a/code/game/gamemodes/changeling/powers/electric_lockpick.dm b/code/game/gamemodes/changeling/powers/electric_lockpick.dm
index c8c87e6a9d..40c4b372a0 100644
--- a/code/game/gamemodes/changeling/powers/electric_lockpick.dm
+++ b/code/game/gamemodes/changeling/powers/electric_lockpick.dm
@@ -78,6 +78,7 @@
else //Probably broken or no power.
user << "The door does not respond to the pulse."
door.add_fingerprint(user)
+ log_and_message_admins("finger-lockpicked \an [door].")
ling_datum.chem_charges -= 10
return 1
@@ -86,7 +87,7 @@
user << "We send an electrical pulse up our finger, and into \the [O]."
O.add_fingerprint(user)
O.emag_act(1,user,src)
- log_and_message_admins("emagged \an [O].")
+ log_and_message_admins("finger-lockpicked \an [O].")
ling_datum.chem_charges -= 10
return 1
diff --git a/code/game/gamemodes/changeling/powers/endoarmor.dm b/code/game/gamemodes/changeling/powers/endoarmor.dm
index c548e549f1..4052568a50 100644
--- a/code/game/gamemodes/changeling/powers/endoarmor.dm
+++ b/code/game/gamemodes/changeling/powers/endoarmor.dm
@@ -1,7 +1,7 @@
/datum/power/changeling/endoarmor
name = "Endoarmor"
desc = "We grow hard plating underneath our skin, making us more resilient to harm by increasing our maximum health potential by 50 points."
- helptext = "Our maximum health is increased to 150 health."
+ helptext = "Our maximum health is increased by 50 points."
genomecost = 1
isVerb = 0
verbpath = /mob/proc/changeling_endoarmor
diff --git a/code/game/gamemodes/changeling/powers/enfeebling_string.dm b/code/game/gamemodes/changeling/powers/enfeebling_string.dm
index 35d4ef7570..94699995ff 100644
--- a/code/game/gamemodes/changeling/powers/enfeebling_string.dm
+++ b/code/game/gamemodes/changeling/powers/enfeebling_string.dm
@@ -1,7 +1,8 @@
/datum/power/changeling/enfeebling_string
name = "Enfeebling String"
desc = "We sting a biological with a potent toxin that will greatly weaken them for a short period of time."
- helptext = "Lowers the maximum health of the victim for a few minutes. This sting will also warn them of this."
+ helptext = "Lowers the maximum health of the victim for a few minutes. This sting will also warn them of this. Has a \
+ five minute coodown between uses."
enhancedtext = "Maximum health is lowered further."
genomecost = 1
verbpath = /mob/proc/changeling_enfeebling_string
@@ -17,17 +18,21 @@
if(ishuman(T))
var/mob/living/carbon/human/H = T
- var/effect = 30
+ var/effect = 30 //percent
if(src.mind.changeling.recursive_enhancement)
effect = effect + 20
src << "We make them extremely weak."
src.mind.changeling.recursive_enhancement = 0
+ var/health_to_take_away = H.maxHealth * (effect / 100)
- H.maxHealth -= effect
- H << "You feel a small prick and you feel weak."
- spawn(300) //Five minutes
+ H.maxHealth -= health_to_take_away
+ H << "You feel a small prick and you feel extremly weak!"
+ src.verbs -= /mob/proc/changeling_enfeebling_string
+ spawn(5 MINUTES)
+ src.verbs |= /mob/proc/changeling_enfeebling_string
+ src << "Our enfeebling string is ready to be used once more."
if(H) //Just incase we stop existing in five minutes for whatever reason.
- H.maxHealth += 30
+ H.maxHealth += health_to_take_away
if(!H.stat) //It'd be weird to no longer feel weak when you're dead.
H << "You no longer feel extremly weak."
feedback_add_details("changeling_powers","ES")
diff --git a/code/game/gamemodes/changeling/powers/fleshmend.dm b/code/game/gamemodes/changeling/powers/fleshmend.dm
index 0046e1517c..5a157cdbb7 100644
--- a/code/game/gamemodes/changeling/powers/fleshmend.dm
+++ b/code/game/gamemodes/changeling/powers/fleshmend.dm
@@ -31,10 +31,10 @@
C.adjustBruteLoss(-heal_amount)
C.adjustOxyLoss(-heal_amount)
C.adjustFireLoss(-heal_amount)
- sleep(10)
+ sleep(1 SECOND)
src.verbs -= /mob/proc/changeling_fleshmend
- spawn(500)
+ spawn(50 SECONDS)
src << "Our regeneration has slowed to normal levels."
src.verbs += /mob/proc/changeling_fleshmend
feedback_add_details("changeling_powers","FM")
diff --git a/code/game/gamemodes/changeling/powers/respec.dm b/code/game/gamemodes/changeling/powers/respec.dm
index f2bfe8f19c..661a761d8c 100644
--- a/code/game/gamemodes/changeling/powers/respec.dm
+++ b/code/game/gamemodes/changeling/powers/respec.dm
@@ -9,7 +9,7 @@
src.remove_changeling_powers() //First, remove the verbs.
var/datum/changeling/ling_datum = src.mind.changeling
- ling_datum.purchasedpowers = list() //Then wipe all the powers we bought.
+ ling_datum.purchased_powers = list() //Then wipe all the powers we bought.
ling_datum.geneticpoints = ling_datum.max_geneticpoints //Now refund our points to the maximum.
ling_datum.chem_recharge_rate = 0.5 //If glands were bought, revert that upgrade.
ling_datum.chem_storage = 50
@@ -21,5 +21,7 @@
src << "We have removed our evolutions from this form, and are now ready to readapt."
+ ling_datum.purchased_powers_history.Add("Re-adapt (Reset to [ling_datum.max_geneticpoints])")
+
//Now to lose the verb, so no unlimited resets.
src.verbs -= /mob/proc/changeling_respec
\ No newline at end of file
diff --git a/code/game/gamemodes/changeling/powers/revive.dm b/code/game/gamemodes/changeling/powers/revive.dm
index 7dc2310f78..647f5bd91f 100644
--- a/code/game/gamemodes/changeling/powers/revive.dm
+++ b/code/game/gamemodes/changeling/powers/revive.dm
@@ -33,10 +33,13 @@
if(ishuman(C))
var/mob/living/carbon/human/H = src
H.restore_blood()
+ H.mutations.Remove(HUSK)
+ H.status_flags -= DISFIGURED
+ H.update_body(1)
C << "We have regenerated."
C.status_flags &= ~(FAKEDEATH)
C.update_canmove()
- C.mind.changeling.purchasedpowers -= C
+ C.mind.changeling.purchased_powers -= C
feedback_add_details("changeling_powers","CR")
C.stat = CONSCIOUS
src.verbs -= /mob/proc/changeling_revive
diff --git a/code/game/gamemodes/changeling/powers/transform.dm b/code/game/gamemodes/changeling/powers/transform.dm
index 33d75c03a3..99f1a4d130 100644
--- a/code/game/gamemodes/changeling/powers/transform.dm
+++ b/code/game/gamemodes/changeling/powers/transform.dm
@@ -37,6 +37,8 @@
if(ishuman(src))
var/mob/living/carbon/human/H = src
H.b_type = "AB+" //For some reason we have two blood types on the mob.
+ for(var/flavor in H.flavor_texts) //Nulls out flavor text, so we don't keep our previous mob's flavor.
+ flavor = null
src.real_name = chosen_dna.real_name
src.flavor_text = ""
src.UpdateAppearance()
diff --git a/code/game/gamemodes/cult/cultify/mob.dm b/code/game/gamemodes/cult/cultify/mob.dm
index 154078de3d..14bb380a19 100644
--- a/code/game/gamemodes/cult/cultify/mob.dm
+++ b/code/game/gamemodes/cult/cultify/mob.dm
@@ -6,7 +6,7 @@
/mob/proc/cultify()
return
-/mob/dead/cultify()
+/mob/observer/dead/cultify()
if(icon_state != "ghost-narsie")
icon = 'icons/mob/mob.dmi'
icon_state = "ghost-narsie"
@@ -21,7 +21,7 @@
C << "The Geometer of Blood is overjoyed to be reunited with its followers, and accepts your body in sacrifice. As reward, you have been gifted with the shell of an Harvester.
Your tendrils can use and draw runes without need for a tome, your eyes can see beings through walls, and your mind can open any door. Use these assets to serve Nar-Sie and bring him any remaining living human in the world.
You can teleport yourself back to Nar-Sie along with any being under yourself at any time using your \"Harvest\" spell."
dust()
else if(client)
- var/mob/dead/G = (ghostize())
+ var/mob/observer/dead/G = (ghostize())
G.icon = 'icons/mob/mob.dmi'
G.icon_state = "ghost-narsie"
G.overlays = 0
diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm
index a3248a07e5..f746e70297 100644
--- a/code/game/gamemodes/cult/narsie.dm
+++ b/code/game/gamemodes/cult/narsie.dm
@@ -298,7 +298,7 @@ var/global/list/narsie_list = list()
acquire(pick(cultists))
return
//no living cultists, pick a living human instead.
- for(var/mob/dead/observer/ghost in player_list)
+ for(var/mob/observer/dead/ghost in player_list)
if(!ghost.client)
continue
var/turf/pos = get_turf(ghost)
diff --git a/code/game/gamemodes/cult/ritual.dm b/code/game/gamemodes/cult/ritual.dm
index d8c41eea42..569d034cad 100644
--- a/code/game/gamemodes/cult/ritual.dm
+++ b/code/game/gamemodes/cult/ritual.dm
@@ -343,8 +343,8 @@ var/global/list/rnwords = list("ire","ego","nahlizet","certum","veri","jatkaa","
user.attack_log += text("\[[time_stamp()]\] Used [name] on [M.name] ([M.ckey])")
msg_admin_attack("[user.name] ([user.ckey]) used [name] on [M.name] ([M.ckey]) (JMP)")
- if(istype(M,/mob/dead))
- var/mob/dead/D = M
+ if(istype(M,/mob/observer/dead))
+ var/mob/observer/dead/D = M
D.manifest(user)
return
if(!istype(M))
diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm
index 06eb8fd7c2..88d850283c 100644
--- a/code/game/gamemodes/cult/runes.dm
+++ b/code/game/gamemodes/cult/runes.dm
@@ -342,8 +342,8 @@ var/list/sacrificed = list()
usr << "The sacrifical corpse is not dead. You must free it from this world of illusions before it may be used."
return fizzle()
- var/mob/dead/observer/ghost
- for(var/mob/dead/observer/O in loc)
+ var/mob/observer/dead/ghost
+ for(var/mob/observer/dead/O in loc)
if(!O.client) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
ghost = O
@@ -437,8 +437,8 @@ var/list/sacrificed = list()
src = null
if(usr.loc!=this_rune.loc)
return this_rune.fizzle()
- var/mob/dead/observer/ghost
- for(var/mob/dead/observer/O in this_rune.loc)
+ var/mob/observer/dead/ghost
+ for(var/mob/observer/dead/O in this_rune.loc)
if(!O.client) continue
if(!O.MayRespawn()) continue
if(O.mind && O.mind.current && O.mind.current.stat != DEAD) continue
@@ -468,7 +468,8 @@ var/list/sacrificed = list()
D.r_eyes = 200
D.g_eyes = 200
D.update_eyes()
- D.underwear = 0
+ D.underwear_top = 0
+ D.underwear_bottom = 0
D.key = ghost.key
cult.add_antagonist(D.mind)
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
index 2f12370f58..c25e3c5567 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/blob.dm
@@ -112,7 +112,7 @@
/turf/unsimulated/wall/supermatter/proc/Consume(var/mob/living/user)
- if(istype(user,/mob/dead/observer))
+ if(istype(user,/mob/observer))
return
qdel(user)
diff --git a/code/game/gamemodes/events/power_failure.dm b/code/game/gamemodes/events/power_failure.dm
index 0f7d6149d3..04404573e8 100644
--- a/code/game/gamemodes/events/power_failure.dm
+++ b/code/game/gamemodes/events/power_failure.dm
@@ -3,7 +3,7 @@
if(announce)
command_announcement.Announce("Abnormal activity detected in [station_name()]'s powernet. As a precautionary measure, the station's power will be shut off for an indeterminate duration.", "Critical Power Failure", new_sound = 'sound/AI/poweroff.ogg')
- var/list/skipped_areas = list(/area/turret_protected/ai)
+ var/list/skipped_areas = list(/area/ai)
for(var/obj/machinery/power/smes/S in world)
var/area/current_area = get_area(S)
@@ -24,7 +24,7 @@
C.cell.charge = 0
/proc/power_restore(var/announce = 1)
- var/list/skipped_areas = list(/area/turret_protected/ai)
+ var/list/skipped_areas = list(/area/ai)
if(announce)
command_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 073383ac20..59327bd65e 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -537,7 +537,7 @@ proc/display_roundstart_logout_report()
continue //Dead
continue //Happy connected client
- for(var/mob/dead/observer/D in mob_list)
+ for(var/mob/observer/dead/D in mob_list)
if(D.mind && (D.mind.original == L || D.mind.current == L))
if(L.stat == DEAD)
if(L.suiciding) //Suicider
diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm
index ea15bb327d..54524e3cf8 100644
--- a/code/game/gamemodes/gameticker.dm
+++ b/code/game/gamemodes/gameticker.dm
@@ -387,8 +387,8 @@ var/global/datum/controller/gameticker/ticker
else
Player << "You missed the crew transfer after the events on [station_name()] as [Player.real_name]."
else
- if(istype(Player,/mob/dead/observer))
- var/mob/dead/observer/O = Player
+ if(istype(Player,/mob/observer/dead))
+ var/mob/observer/dead/O = Player
if(!O.started_as_observer)
Player << "You did not survive the events on [station_name()]..."
else
@@ -418,9 +418,9 @@ var/global/datum/controller/gameticker/ticker
if (!robo.connected_ai)
if (robo.stat != 2)
- world << "[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:"
+ world << "[robo.name] (Played by: [robo.key]) survived as an AI-less synthetic! Its laws were:"
else
- world << "[robo.name] (Played by: [robo.key]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:"
+ world << "[robo.name] (Played by: [robo.key]) was unable to survive the rigors of being a synthetic without an AI. Its laws were:"
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
robo.laws.show_laws(world)
diff --git a/code/game/gamemodes/malfunction/malf_hardware.dm b/code/game/gamemodes/malfunction/malf_hardware.dm
index b33a5e49d8..864ba0722d 100644
--- a/code/game/gamemodes/malfunction/malf_hardware.dm
+++ b/code/game/gamemodes/malfunction/malf_hardware.dm
@@ -60,11 +60,6 @@
/datum/malf_hardware/strong_turrets/install()
..()
- for(var/obj/machinery/turret/T in machines)
- T.maxhealth = round(initial(T.maxhealth) * 1.4)
- T.shot_delay = round(initial(T.shot_delay) / 2)
- T.auto_repair = 1
- T.active_power_usage = round(initial(T.active_power_usage) * 5)
for(var/obj/machinery/porta_turret/T in machines)
T.maxhealth = round(initial(T.maxhealth) * 1.4)
T.shot_delay = round(initial(T.shot_delay) / 2)
diff --git a/code/game/gamemodes/mixed/intrigue.dm b/code/game/gamemodes/mixed/intrigue.dm
new file mode 100644
index 0000000000..d08452e6dd
--- /dev/null
+++ b/code/game/gamemodes/mixed/intrigue.dm
@@ -0,0 +1,12 @@
+/datum/game_mode/intrigue
+ name = "Intrigue"
+ round_description = "Crewmembers are contacted by external elements while another infiltrates the colony."
+ extended_round_description = "Traitors and a ninja spawn during this round."
+ config_tag = "intrigue"
+ required_players = 15
+ required_players_secret = 15
+ required_enemies = 4
+ end_on_antag_death = 0
+ antag_tags = list(MODE_NINJA, MODE_AUTOTRAITOR)
+ round_autoantag = 1
+ require_all_templates = 1
\ No newline at end of file
diff --git a/code/game/gamemodes/mixed/lizard.dm b/code/game/gamemodes/mixed/lizard.dm
new file mode 100644
index 0000000000..c61b9e6094
--- /dev/null
+++ b/code/game/gamemodes/mixed/lizard.dm
@@ -0,0 +1,11 @@
+/datum/game_mode/lizard
+ name = "lizard"
+ round_description = "A space wizard and changelings have invaded the station!"
+ extended_round_description = "Changelings and a wizard spawn during this round."
+ config_tag = "lizard"
+ required_players = 15
+ required_players_secret = 15
+ required_enemies = 4
+ end_on_antag_death = 0
+ antag_tags = list(MODE_WIZARD, MODE_CHANGELING)
+ require_all_templates = 1
\ No newline at end of file
diff --git a/code/game/gamemodes/mixed/visitors.dm b/code/game/gamemodes/mixed/visitors.dm
new file mode 100644
index 0000000000..89099c9878
--- /dev/null
+++ b/code/game/gamemodes/mixed/visitors.dm
@@ -0,0 +1,11 @@
+/datum/game_mode/visitors
+ name = "Visitors"
+ round_description = "A space wizard and a ninja have invaded the station!"
+ extended_round_description = "A ninja and wizard spawn during this round."
+ config_tag = "visitors"
+ required_players = 10
+ required_players_secret = 10
+ required_enemies = 2
+ end_on_antag_death = 0
+ antag_tags = list(MODE_WIZARD, MODE_NINJA)
+ require_all_templates = 1
\ No newline at end of file
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index fb2979e427..3393373d7b 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -34,6 +34,7 @@ var/list/nuke_disks = list()
/datum/game_mode/nuclear/declare_completion()
if(config.objectives_disabled)
+ ..()
return
var/disk_rescued = 1
for(var/obj/item/weapon/disk/nuclear/D in world)
diff --git a/code/game/gamemodes/traitor/traitor.dm b/code/game/gamemodes/traitor/traitor.dm
index ee56b9070a..5a389e68f1 100644
--- a/code/game/gamemodes/traitor/traitor.dm
+++ b/code/game/gamemodes/traitor/traitor.dm
@@ -21,6 +21,7 @@
/datum/game_mode/traitor/auto
name = "autotraitor"
config_tag = "autotraitor"
+ antag_tags = list(MODE_AUTOTRAITOR)
round_autoantag = 1
required_players_secret = 3
antag_scaling_coeff = 5
diff --git a/code/game/jobs/whitelist.dm b/code/game/jobs/whitelist.dm
index f1dc546aea..440cf2e22e 100644
--- a/code/game/jobs/whitelist.dm
+++ b/code/game/jobs/whitelist.dm
@@ -28,7 +28,7 @@ var/list/whitelist = list()
if (!text)
log_misc("Failed to load config/alienwhitelist.txt")
else
- alien_whitelist = text2list(text, "\n")
+ alien_whitelist = splittext(text, "\n")
//todo: admin aliens
/proc/is_alien_whitelisted(mob/M, var/species)
diff --git a/code/game/machinery/atmoalter/meter.dm b/code/game/machinery/atmoalter/meter.dm
index e2a0aed826..5f0860606b 100644
--- a/code/game/machinery/atmoalter/meter.dm
+++ b/code/game/machinery/atmoalter/meter.dm
@@ -68,7 +68,7 @@
/obj/machinery/meter/examine(mob/user)
var/t = "A gas flow meter. "
- if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/dead)))
+ if(get_dist(user, src) > 3 && !(istype(user, /mob/living/silicon/ai) || istype(user, /mob/observer/dead)))
t += "You are too far away to read it."
else if(stat & (NOPOWER|BROKEN))
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index dd88be221d..291b985294 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -33,6 +33,8 @@
var/on_open_network = 0
+ var/affected_by_emp_until = 0
+
/obj/machinery/camera/New()
wires = new(src)
assembly = new(src)
@@ -62,22 +64,29 @@
wires = null
return ..()
+/obj/machinery/camera/process()
+ if((stat & EMPED) && world.time >= affected_by_emp_until)
+ stat &= ~EMPED
+ cancelCameraAlarm()
+ update_icon()
+ update_coverage()
+ return internal_process()
+
+/obj/machinery/camera/proc/internal_process()
+ return
+
/obj/machinery/camera/emp_act(severity)
- if(!isEmpProof())
- if(prob(100/severity))
+ if(!isEmpProof() && prob(100/severity))
+ if(!affected_by_emp_until || (world.time < affected_by_emp_until))
+ affected_by_emp_until = max(affected_by_emp_until, world.time + (90 SECONDS / severity))
+ else
stat |= EMPED
set_light(0)
+ triggerCameraAlarm()
kick_viewers()
- triggerCameraAlarm(30 / severity)
update_icon()
update_coverage()
-
- spawn(900)
- stat &= ~EMPED
- cancelCameraAlarm()
- update_icon()
- update_coverage()
- ..()
+ processing_objects |= src
/obj/machinery/camera/bullet_act(var/obj/item/projectile/P)
take_damage(P.get_structure_damage())
@@ -105,7 +114,6 @@
cameranet.updateVisibility(src, 0)
/obj/machinery/camera/attack_hand(mob/living/carbon/human/user as mob)
-
if(!istype(user))
return
@@ -114,11 +122,10 @@
user.do_attack_animation(src)
visible_message("\The [user] slashes at [src]!")
playsound(src.loc, 'sound/weapons/slash.ogg', 100, 1)
- icon_state = "[initial(icon_state)]1"
add_hiddenprint(user)
destroy()
-/obj/machinery/camera/attackby(obj/W as obj, mob/living/user as mob)
+/obj/machinery/camera/attackby(obj/item/W as obj, mob/living/user as mob)
update_coverage()
// DECONSTRUCTION
if(isscrewdriver(W))
@@ -176,7 +183,7 @@
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
- if (S.current == src)
+ if (S.current_camera == src)
O << "[U] holds \a [itemname] up to one of the cameras ..."
O << browse(text("
[][]", itemname, info), text("window=[]", itemname))
@@ -214,8 +221,7 @@
//legacy support, if choice is != 1 then just kick viewers without changing status
kick_viewers()
else
- update_coverage()
- set_status( !src.status )
+ set_status(!src.status)
if (!(src.status))
if(user)
visible_message(" [user] has deactivated [src]!")
@@ -257,7 +263,7 @@
/obj/machinery/camera/proc/set_status(var/newstatus)
if (status != newstatus)
status = newstatus
- invalidateCameraCache()
+ update_coverage()
// now disconnect anyone using the camera
//Apparently, this will disconnect anyone even if the camera was re-activated.
//I guess that doesn't matter since they couldn't use it anyway?
@@ -273,7 +279,7 @@
for(var/mob/O in player_list)
if (istype(O.machine, /obj/machinery/computer/security))
var/obj/machinery/computer/security/S = O.machine
- if (S.current == src)
+ if (S.current_camera == src)
O.unset_machine()
O.reset_view(null)
O << "The screen bursts into static."
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index 087d4a9025..e35b0953fe 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -85,7 +85,7 @@
usr << "No input found please hang up and try your call again."
return
- var/list/tempnetwork = text2list(input, ",")
+ var/list/tempnetwork = splittext(input, ",")
if(tempnetwork.len < 1)
usr << "No network found please hang up and try your call again."
return
diff --git a/code/game/machinery/camera/motion.dm b/code/game/machinery/camera/motion.dm
index 7821b27f26..eac1f89386 100644
--- a/code/game/machinery/camera/motion.dm
+++ b/code/game/machinery/camera/motion.dm
@@ -5,7 +5,7 @@
var/alarm_delay = 100 // Don't forget, there's another 10 seconds in queueAlarm()
flags = PROXMOVE
-/obj/machinery/camera/process()
+/obj/machinery/camera/internal_process()
// motion camera event loop
if (stat & (EMPED|NOPOWER))
return
diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm
index 7d77de761f..a06b22927d 100644
--- a/code/game/machinery/cloning.dm
+++ b/code/game/machinery/cloning.dm
@@ -87,7 +87,7 @@
if(ckey(clonemind.key) != R.ckey)
return 0
else
- for(var/mob/dead/observer/G in player_list)
+ for(var/mob/observer/dead/G in player_list)
if(G.ckey == R.ckey)
if(G.can_reenter_corpse)
break
diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm
index 3090e7ab7a..e7f92e0237 100644
--- a/code/game/machinery/computer/camera.dm
+++ b/code/game/machinery/computer/camera.dm
@@ -1,28 +1,25 @@
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-/var/camera_cache_id = 1
-
-/proc/invalidateCameraCache()
- camera_cache_id = (++camera_cache_id % 999999)
-
/obj/machinery/computer/security
name = "security camera monitor"
desc = "Used to access the various cameras on the station."
icon_keyboard = "security_key"
icon_screen = "cameras"
light_color = "#a91515"
- var/obj/machinery/camera/current = null
+ var/current_network = null
+ var/obj/machinery/camera/current_camera = null
var/last_pic = 1.0
var/list/network
var/mapping = 0//For the overview file, interesting bit of code.
var/cache_id = 0
circuit = /obj/item/weapon/circuitboard/security
- var/camera_cache = null
New()
if(!network)
- network = station_networks
+ network = station_networks.Copy()
..()
+ if(network.len)
+ current_network = network[1]
attack_ai(var/mob/user as mob)
return attack_hand(user)
@@ -30,9 +27,9 @@
check_eye(var/mob/user as mob)
if (user.stat || ((get_dist(user, src) > 1 || !( user.canmove ) || user.blinded) && !istype(user, /mob/living/silicon))) //user can't see - not sure why canmove is here.
return -1
- if(!current)
+ if(!current_camera)
return 0
- var/viewflag = current.check_eye(user)
+ var/viewflag = current_camera.check_eye(user)
if ( viewflag < 0 ) //camera doesn't work
reset_current()
return viewflag
@@ -44,25 +41,11 @@
var/data[0]
- data["current"] = null
-
- if(camera_cache_id != cache_id)
- cache_id = camera_cache_id
- cameranet.process_sort()
-
- var/cameras[0]
- for(var/obj/machinery/camera/C in cameranet.cameras)
- if(!can_access_camera(C))
- continue
-
- var/cam = C.nano_structure()
- cameras[++cameras.len] = cam
-
- camera_cache=list2json(cameras)
-
- if(current)
- data["current"] = current.nano_structure()
- data["cameras"] = list("__json_cache" = camera_cache)
+ data["current_camera"] = current_camera ? current_camera.nano_structure() : null
+ data["current_network"] = current_network
+ data["networks"] = network ? network : list()
+ if(current_network)
+ data["cameras"] = camera_repository.cameras_in_network(current_network)
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
@@ -75,22 +58,32 @@
ui.set_initial_data(data)
ui.open()
- ui.set_auto_update(1)
Topic(href, href_list)
- if(href_list["switchTo"])
+ if(..())
+ return 1
+ if(href_list["switch_camera"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
- var/obj/machinery/camera/C = locate(href_list["switchTo"]) in cameranet.cameras
- if(!C) return
+ var/obj/machinery/camera/C = locate(href_list["switch_camera"]) in cameranet.cameras
+ if(!C)
+ return
+ if(!(current_network in C.network))
+ return
switch_to_camera(usr, C)
return 1
+ else if(href_list["switch_network"])
+ if(src.z>6 || stat&(NOPOWER|BROKEN)) return
+ if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
+ if(href_list["switch_network"] in network)
+ current_network = href_list["switch_network"]
+ return 1
else if(href_list["reset"])
if(src.z>6 || stat&(NOPOWER|BROKEN)) return
if(usr.stat || ((get_dist(usr, src) > 1 || !( usr.canmove ) || usr.blinded) && !istype(usr, /mob/living/silicon))) return
reset_current()
- usr.reset_view(current)
+ usr.reset_view(current_camera)
return 1
else
. = ..()
@@ -105,12 +98,6 @@
user.set_machine(src)
ui_interact(user)
- proc/can_access_camera(var/obj/machinery/camera/C)
- var/list/shared_networks = src.network & C.network
- if(shared_networks.len)
- return 1
- return 0
-
proc/switch_to_camera(var/mob/user, var/obj/machinery/camera/C)
//don't need to check if the camera works for AI because the AI jumps to the camera location and doesn't actually look through cameras.
if(isAI(user))
@@ -126,7 +113,7 @@
if (!C.can_use() || user.stat || (get_dist(user, src) > 1 || user.machine != src || user.blinded || !( user.canmove ) && !istype(user, /mob/living/silicon)))
return 0
set_current(C)
- user.reset_view(current)
+ user.reset_view(current_camera)
check_eye(user)
return 1
@@ -160,26 +147,37 @@
if(can_access_camera(jump_to))
switch_to_camera(user,jump_to)
+/obj/machinery/computer/security/process()
+ if(cache_id != camera_repository.camera_cache_id)
+ cache_id = camera_repository.camera_cache_id
+ nanomanager.update_uis(src)
+
+/obj/machinery/computer/security/proc/can_access_camera(var/obj/machinery/camera/C)
+ var/list/shared_networks = src.network & C.network
+ if(shared_networks.len)
+ return 1
+ return 0
+
/obj/machinery/computer/security/proc/set_current(var/obj/machinery/camera/C)
- if(current == C)
+ if(current_camera == C)
return
- if(current)
+ if(current_camera)
reset_current()
- src.current = C
- if(current)
+ src.current_camera = C
+ if(current_camera)
use_power = 2
- var/mob/living/L = current.loc
+ var/mob/living/L = current_camera.loc
if(istype(L))
L.tracking_initiated()
/obj/machinery/computer/security/proc/reset_current()
- if(current)
- var/mob/living/L = current.loc
+ if(current_camera)
+ var/mob/living/L = current_camera.loc
if(istype(L))
L.tracking_cancelled()
- current = null
+ current_camera = null
use_power = 1
//Camera control: mouse.
@@ -192,7 +190,7 @@
/mob/Move(n,direct)
if(istype(machine,/obj/machinery/computer/security))
var/obj/machinery/computer/security/console = machine
- var/turf/T = get_turf(console.current)
+ var/turf/T = get_turf(console.current_camera)
for(var/i;i<10;i++)
T = get_step(T,direct)
console.jump_on_click(src,T)
@@ -206,7 +204,7 @@
icon_keyboard = null
icon_screen = null
light_range_on = 0
- network = list("thunder")
+ network = list(NETWORK_THUNDER)
density = 0
circuit = null
@@ -218,7 +216,6 @@
light_color = "#FFEEDB"
light_range_on = 2
circuit = null
-
/obj/machinery/computer/security/wooden_tv
name = "security camera monitor"
desc = "An old TV hooked into the stations camera network."
@@ -228,7 +225,6 @@
circuit = null
light_color = "#3848B3"
light_power_on = 0.5
-
/obj/machinery/computer/security/mining
name = "outpost camera monitor"
desc = "Used to access the various cameras on the outpost."
@@ -237,7 +233,6 @@
network = list("MINE")
circuit = /obj/item/weapon/circuitboard/security/mining
light_color = "#F9BBFC"
-
/obj/machinery/computer/security/engineering
name = "engineering camera monitor"
desc = "Used to monitor fires and breaches."
@@ -245,19 +240,16 @@
icon_screen = "engie_cams"
circuit = /obj/item/weapon/circuitboard/security/engineering
light_color = "#FAC54B"
-
/obj/machinery/computer/security/engineering/New()
if(!network)
- network = engineering_networks
+ network = engineering_networks.Copy()
..()
-
/obj/machinery/computer/security/nuclear
name = "head mounted camera monitor"
desc = "Used to access the built-in cameras in helmets."
icon_state = "syndicam"
network = list(NETWORK_MERCENARY)
circuit = null
-
/obj/machinery/computer/security/nuclear/New()
..()
- req_access = list(150)
+ req_access = list(150)
\ No newline at end of file
diff --git a/code/game/machinery/computer/communications.dm b/code/game/machinery/computer/communications.dm
index c8492bcbba..a657d881a8 100644
--- a/code/game/machinery/computer/communications.dm
+++ b/code/game/machinery/computer/communications.dm
@@ -78,34 +78,23 @@
crew_announcement.announcer = ""
if("swipeidseclevel")
- var/mob/M = usr
- var/obj/item/weapon/card/id/I = M.get_active_hand()
- if (istype(I, /obj/item/device/pda))
- var/obj/item/device/pda/pda = I
- I = pda.id
- if (I && istype(I))
- if(access_captain in I.access || access_heads in I.access) //Let heads change the alert level.
- var/old_level = 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
- set_security_level(tmp_alertlevel)
- if(security_level != old_level)
- //Only notify the admins if an actual change happened
- log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
- message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
- switch(security_level)
- if(SEC_LEVEL_GREEN)
- feedback_inc("alert_comms_green",1)
- if(SEC_LEVEL_BLUE)
- feedback_inc("alert_comms_blue",1)
- tmp_alertlevel = 0
- else:
- usr << "You are not authorized to do this."
- tmp_alertlevel = 0
+ if(src.authenticated) //Let heads change the alert level.
+ var/old_level = 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
+ set_security_level(tmp_alertlevel)
+ if(security_level != old_level)
+ //Only notify the admins if an actual change happened
+ log_game("[key_name(usr)] has changed the security level to [get_security_level()].")
+ message_admins("[key_name_admin(usr)] has changed the security level to [get_security_level()].")
+ switch(security_level)
+ if(SEC_LEVEL_GREEN)
+ feedback_inc("alert_comms_green",1)
+ if(SEC_LEVEL_BLUE)
+ feedback_inc("alert_comms_blue",1)
+ tmp_alertlevel = 0
state = STATE_DEFAULT
- else
- usr << "You need to swipe your ID."
if("announce")
if(src.authenticated==2)
@@ -368,7 +357,7 @@
if(STATE_CONFIRM_LEVEL)
dat += "Current alert level: [get_security_level()]
"
dat += "Confirm the change to: [num2seclevel(tmp_alertlevel)]
"
- dat += "Swipe ID to confirm change.
"
+ dat += "OK to confirm change.
"
dat += "
\[ [(src.state != STATE_DEFAULT) ? "Main Menu | " : ""]Close \]"
user << browse(dat, "window=communications;size=400x500")
diff --git a/code/game/machinery/computer/robot.dm b/code/game/machinery/computer/robot.dm
index 149c9c6254..132f662567 100644
--- a/code/game/machinery/computer/robot.dm
+++ b/code/game/machinery/computer/robot.dm
@@ -58,7 +58,7 @@
return
// Antagonistic cyborgs? Left here for downstream
- if(target.mind && target.mind.special_role && target.emagged)
+ if(target.mind && (target.mind.special_role || target.emagged))
target << "Extreme danger. Termination codes detected. Scrambling security codes and automatic AI unlink triggered."
target.ResetSecurityCodes()
else
@@ -101,6 +101,7 @@
else
target.canmove = !target.canmove
target.lockcharge = !target.canmove //when canmove is 1, lockcharge should be 0
+ target.lockdown = !target.canmove
if (target.lockcharge)
target << "You have been locked down!"
else
@@ -115,8 +116,8 @@
if(!target || !istype(target))
return
- // Antag AI checks
- if(!istype(user, /mob/living/silicon/ai) || !(user.mind.special_role && user.mind.original == user))
+ // Antag synthetic checks
+ if(!istype(user, /mob/living/silicon) || !(user.mind.special_role && user.mind.original == user))
user << "Access Denied"
return
@@ -131,7 +132,7 @@
if(!target || !istype(target))
return
- message_admins("[key_name_admin(usr)] emagged [target.name] using robotic console!")
+ message_admins("[key_name_admin(usr)] emagged [target.name] using the robotic console!")
log_game("[key_name(usr)] emagged [target.name] using robotic console!")
target.emagged = 1
target << "Failsafe protocols overriden. New tools available."
@@ -202,8 +203,12 @@
robot["module"] = R.module ? R.module.name : "None"
robot["master_ai"] = R.connected_ai ? R.connected_ai.name : "None"
robot["hackable"] = 0
+ //Antag synths should be able to hack themselves and see their hacked status.
+ if(operator && isrobot(operator) && (operator.mind.special_role && operator.mind.original == operator) && (operator == R))
+ robot["hacked"] = R.emagged ? 1 : 0
+ robot["hackable"] = R.emagged? 0 : 1
// Antag AIs know whether linked cyborgs are hacked or not.
- if(operator && istype(operator, /mob/living/silicon/ai) && (R.connected_ai == operator) && (operator.mind.special_role && operator.mind.original == operator))
+ if(operator && isAI(operator) && (R.connected_ai == operator) && (operator.mind.special_role && operator.mind.original == operator))
robot["hacked"] = R.emagged ? 1 : 0
robot["hackable"] = R.emagged? 0 : 1
robots.Add(list(robot))
diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm
index 8747f7750c..2624c4ff28 100644
--- a/code/game/machinery/computer/security.dm
+++ b/code/game/machinery/computer/security.dm
@@ -286,7 +286,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
- var/list/components = text2list(t1, " ")
+ var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm
index 8e57548d6e..1fa38c4a71 100644
--- a/code/game/machinery/computer/skills.dm
+++ b/code/game/machinery/computer/skills.dm
@@ -219,7 +219,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
- var/list/components = text2list(t1, " ")
+ var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
diff --git a/code/game/machinery/computer/supply.dm b/code/game/machinery/computer/supply.dm
index a8a4591ee2..224e201628 100644
--- a/code/game/machinery/computer/supply.dm
+++ b/code/game/machinery/computer/supply.dm
@@ -109,7 +109,7 @@
reqform.info += "RANK: [idrank]
"
reqform.info += "REASON: [reason]
"
reqform.info += "SUPPLY CRATE TYPE: [P.name]
"
- reqform.info += "ACCESS RESTRICTION: [replacetext(get_access_desc(P.access))]
"
+ reqform.info += "ACCESS RESTRICTION: [get_access_desc(P.access)]
"
reqform.info += "CONTENTS:
"
reqform.info += P.manifest
reqform.info += "
"
@@ -310,7 +310,7 @@
reqform.info += "RANK: [idrank]
"
reqform.info += "REASON: [reason]
"
reqform.info += "SUPPLY CRATE TYPE: [P.name]
"
- reqform.info += "ACCESS RESTRICTION: [replacetext(get_access_desc(P.access))]
"
+ reqform.info += "ACCESS RESTRICTION: [get_access_desc(P.access)]
"
reqform.info += "CONTENTS:
"
reqform.info += P.manifest
reqform.info += "
"
diff --git a/code/game/machinery/computer3/computers/security.dm b/code/game/machinery/computer3/computers/security.dm
index 0c58ea6728..59bb46fd69 100644
--- a/code/game/machinery/computer3/computers/security.dm
+++ b/code/game/machinery/computer3/computers/security.dm
@@ -305,7 +305,7 @@ What a mess.*/
return
Perp = new/list()
t1 = lowertext(t1)
- var/list/components = text2list(t1, " ")
+ var/list/components = splittext(t1, " ")
if(components.len > 5)
return //Lets not let them search too greedily.
for(var/datum/data/record/R in data_core.general)
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
index d03bffcbae..0cffb34dc6 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
@@ -2,21 +2,21 @@
//this is the master controller, that things will try to dock with.
/obj/machinery/embedded_controller/radio/docking_port_multi
name = "docking port controller"
-
+
var/child_tags_txt
var/child_names_txt
var/list/child_names = list()
-
+
var/datum/computer/file/embedded_program/docking/multi/docking_program
/obj/machinery/embedded_controller/radio/docking_port_multi/initialize()
..()
docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
program = docking_program
-
- var/list/names = text2list(child_names_txt, ";")
- var/list/tags = text2list(child_tags_txt, ";")
-
+
+ var/list/names = splittext(child_names_txt, ";")
+ var/list/tags = splittext(child_tags_txt, ";")
+
if (names.len == tags.len)
for (var/i = 1; i <= tags.len; i++)
child_names[tags[i]] = names[i]
@@ -84,10 +84,10 @@
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/Topic(href, href_list)
if(..())
return
-
+
usr.set_machine(src)
src.add_fingerprint(usr)
-
+
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext")
diff --git a/code/game/machinery/embedded_controller/docking_program_multi.dm b/code/game/machinery/embedded_controller/docking_program_multi.dm
index 3901591720..a4ad7d2985 100644
--- a/code/game/machinery/embedded_controller/docking_program_multi.dm
+++ b/code/game/machinery/embedded_controller/docking_program_multi.dm
@@ -17,7 +17,7 @@
if (istype(M,/obj/machinery/embedded_controller/radio/docking_port_multi)) //if our parent controller is the right type, then we can auto-init stuff at construction
var/obj/machinery/embedded_controller/radio/docking_port_multi/controller = M
//parse child_tags_txt and create child tags
- children_tags = text2list(controller.child_tags_txt, ";")
+ children_tags = splittext(controller.child_tags_txt, ";")
children_ready = list()
children_override = list()
diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm
index ded7ebc9b9..74f60a3a72 100644
--- a/code/game/machinery/lightswitch.dm
+++ b/code/game/machinery/lightswitch.dm
@@ -7,10 +7,12 @@
icon = 'icons/obj/power.dmi'
icon_state = "light1"
anchored = 1.0
+ use_power = 1
+ idle_power_usage = 10
+ power_channel = LIGHT
var/on = 1
var/area/area = null
var/otherarea = null
- // luminosity = 1
/obj/machinery/light_switch/New()
..()
@@ -31,8 +33,12 @@
/obj/machinery/light_switch/proc/updateicon()
if(stat & NOPOWER)
icon_state = "light-p"
+ set_light(0)
+ layer = OBJ_LAYER
else
icon_state = "light[on]"
+ set_light(2, 1.5, on ? "#82FF4C" : "#F86060")
+ layer = LIGHTING_LAYER+0.1
/obj/machinery/light_switch/examine(mob/user)
if(..(user, 1))
diff --git a/code/game/machinery/navbeacon.dm b/code/game/machinery/navbeacon.dm
index 443a704934..0c14c66990 100644
--- a/code/game/machinery/navbeacon.dm
+++ b/code/game/machinery/navbeacon.dm
@@ -49,7 +49,7 @@ var/global/list/navbeacons // no I don't like putting this in, but it will do
codes = new()
- var/list/entries = text2list(codes_txt, ";") // entries are separated by semicolons
+ var/list/entries = splittext(codes_txt, ";") // entries are separated by semicolons
for(var/e in entries)
var/index = findtext(e, "=") // format is "key=value"
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 6a61a082b9..b64f5923c8 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -298,7 +298,7 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
continue
// Ghosts hearing all radio chat don't want to hear syndicate intercepts, they're duplicates
- if(data == 3 && istype(R, /mob/dead/observer) && R.client && R.client.prefs && (R.client.prefs.toggles & CHAT_GHOSTRADIO))
+ if(data == 3 && istype(R, /mob/observer/dead) && R.client && R.client.prefs && (R.client.prefs.toggles & CHAT_GHOSTRADIO))
continue
// --- Check for compression ---
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index d5d03749be..b107dcc42d 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -85,7 +85,7 @@
if(..()) return
/* Ghosts can't use this one because it's a direct selection */
- if(istype(user, /mob/dead/observer)) return
+ if(istype(user, /mob/observer/dead)) return
var/list/L = list()
var/list/areaindex = list()
diff --git a/code/game/machinery/turrets.dm b/code/game/machinery/turrets.dm
deleted file mode 100644
index d324f3dd9c..0000000000
--- a/code/game/machinery/turrets.dm
+++ /dev/null
@@ -1,523 +0,0 @@
-/area/turret_protected
- name = "Turret Protected Area"
- var/list/turretTargets = list()
-
-/area/turret_protected/proc/subjectDied(target)
- if( isliving(target) )
- if( !issilicon(target) )
- var/mob/living/L = target
- if( L.stat )
- if( L in turretTargets )
- src.Exited(L)
-
-
-/area/turret_protected/Entered(O)
- ..()
- if( iscarbon(O) )
- turretTargets |= O
- else if( istype(O, /obj/mecha) )
- var/obj/mecha/Mech = O
- if( Mech.occupant )
- turretTargets |= Mech
- else if(istype(O,/mob/living/simple_animal))
- turretTargets |= O
- return 1
-
-/area/turret_protected/Exited(O)
- if( ismob(O) && !issilicon(O) )
- turretTargets -= O
- else if( istype(O, /obj/mecha) )
- turretTargets -= O
- ..()
- return 1
-
-
-/obj/machinery/turret
- name = "turret"
- icon = 'icons/obj/turrets.dmi'
- icon_state = "grey_target_prism"
- var/raised = 0
- var/enabled = 1
- anchored = 1
- layer = 3
- invisibility = INVISIBILITY_LEVEL_TWO
- density = 1
- var/lasers = 0
- var/lasertype = 1
- // 1 = lasers
- // 2 = cannons
- // 3 = pulse
- // 4 = change (HONK)
- // 5 = bluetag
- // 6 = redtag
- var/health = 80
- var/maxhealth = 80
- var/auto_repair = 0
- var/obj/machinery/turretcover/cover = null
- var/popping = 0
- var/wasvalid = 0
- var/lastfired = 0
- var/shot_delay = 30 //3 seconds between shots
- var/datum/effect/effect/system/spark_spread/spark_system
- use_power = 1
- idle_power_usage = 50
- active_power_usage = 300
-// var/list/targets
- var/atom/movable/cur_target
- var/targeting_active = 0
- var/area/turret_protected/protected_area
-
-/obj/machinery/turret/proc/take_damage(damage)
- src.health -= damage
- if(src.health<=0)
- qdel(src)
- return
-
-/obj/machinery/turret/attack_hand(var/mob/living/carbon/human/user)
-
- if(!istype(user))
- return ..()
-
- if(user.species.can_shred(user) && !(stat & BROKEN))
- playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1)
- visible_message("[user] has slashed at [src]!")
- src.take_damage(15)
- return
-
-/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
- return
- take_damage(Proj.damage)
- ..()
- return
-
-/obj/machinery/turret/New()
- maxhealth = health
- spark_system = new /datum/effect/effect/system/spark_spread
- spark_system.set_up(5, 0, src)
- spark_system.attach(src)
-// targets = new
- ..()
- return
-
-/obj/machinery/turret/proc/update_health()
- if(src.health<=0)
- qdel(src)
- return
-
-/obj/machinery/turretcover
- name = "pop-up turret cover"
- icon = 'icons/obj/turrets.dmi'
- icon_state = "turretCover"
- anchored = 1
- layer = 3.5
- density = 0
- var/obj/machinery/turret/host = null
-
-/obj/machinery/turret/proc/isPopping()
- return (popping!=0)
-
-/obj/machinery/turret/power_change()
- ..()
- if(stat & BROKEN)
- icon_state = "grey_target_prism"
- else
- if( !(stat & NOPOWER) )
- if (src.enabled)
- if (src.lasers)
- icon_state = "orange_target_prism"
- else
- icon_state = "target_prism"
- else
- icon_state = "grey_target_prism"
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- src.icon_state = "grey_target_prism"
- stat |= NOPOWER
-
-/obj/machinery/turret/proc/setState(var/enabled, var/lethal)
- src.enabled = enabled
- src.lasers = lethal
- src.power_change()
-
-
-/obj/machinery/turret/proc/get_protected_area()
- var/area/turret_protected/TP = get_area(src)
- if(istype(TP))
- return TP
- return
-
-/obj/machinery/turret/proc/check_target(var/atom/movable/T as mob|obj)
- if( T && T in protected_area.turretTargets )
- var/area/area_T = get_area(T)
- if( !area_T || (area_T.type != protected_area.type) )
- protected_area.Exited(T)
- return 0 //If the guy is somehow not in the turret's area (teleportation), get them out the damn list. --NEO
- if( iscarbon(T) )
- var/mob/living/carbon/MC = T
- if( !MC.stat )
- if( !MC.lying || lasers )
- return 1
- else if( istype(T, /obj/mecha) )
- var/obj/mecha/ME = T
- if( ME.occupant )
- return 1
- else if(istype(T,/mob/living/simple_animal))
- var/mob/living/simple_animal/A = T
- if( !A.stat )
- if(lasers)
- return 1
- return 0
-
-/obj/machinery/turret/proc/get_new_target()
- var/list/new_targets = new
- var/new_target
- for(var/mob/living/carbon/M in protected_area.turretTargets)
- if(!M.stat)
- if(!M.lying || lasers)
- new_targets += M
- for(var/obj/mecha/M in protected_area.turretTargets)
- if(M.occupant)
- new_targets += M
- for(var/mob/living/simple_animal/M in protected_area.turretTargets)
- if(!M.stat)
- new_targets += M
- if(new_targets.len)
- new_target = pick(new_targets)
- return new_target
-
-
-/obj/machinery/turret/process()
- if(stat & (NOPOWER|BROKEN))
- return
- if(src.cover==null)
- src.cover = new /obj/machinery/turretcover(src.loc)
- src.cover.host = src
- protected_area = get_protected_area()
- if(!enabled || !protected_area || protected_area.turretTargets.len<=0)
- if(!isDown() && !isPopping())
- popDown()
- return
- if(!check_target(cur_target)) //if current target fails target check
- cur_target = get_new_target() //get new target
-
- if(cur_target) //if it's found, proceed
-// world << "[cur_target]"
- if(!isPopping())
- if(isDown())
- popUp()
- use_power = 2
- else
- spawn()
- if(!targeting_active)
- targeting_active = 1
- target()
- targeting_active = 0
-
- if(prob(15))
- if(prob(50))
- playsound(src.loc, 'sound/effects/turret/move1.wav', 60, 1)
- else
- playsound(src.loc, 'sound/effects/turret/move2.wav', 60, 1)
- else if(!isPopping())//else, pop down
- if(!isDown())
- popDown()
- use_power = 1
-
- // Auto repair requires massive amount of power, but slowly regenerates the turret's health.
- // Currently only used by malfunction hardware, but may be used as admin-settable option too.
- if(auto_repair)
- if(health < maxhealth)
- use_power(20000)
- health = min(health + 1, maxhealth)
- return
-
-
-/obj/machinery/turret/proc/target()
- while(src && enabled && !stat && check_target(cur_target))
- src.set_dir(get_dir(src, cur_target))
- shootAt(cur_target)
- sleep(shot_delay)
- return
-
-/obj/machinery/turret/proc/shootAt(var/atom/movable/target)
- var/turf/T = get_turf(src)
- var/turf/U = get_turf(target)
- if (!T || !U)
- return
- var/obj/item/projectile/A
- if (src.lasers)
- switch(lasertype)
- if(1)
- A = new /obj/item/projectile/beam( loc )
- if(2)
- A = new /obj/item/projectile/beam/heavylaser( loc )
- if(3)
- A = new /obj/item/projectile/beam/pulse( loc )
- if(4)
- A = new /obj/item/projectile/change( loc )
- if(5)
- A = new /obj/item/projectile/beam/lastertag/blue( loc )
- if(6)
- A = new /obj/item/projectile/beam/lastertag/red( loc )
- A.original = target
- use_power(500)
- else
- A = new /obj/item/projectile/energy/electrode( loc )
- use_power(200)
-
- //Turrets aim for the center of mass by default.
- //If the target is grabbing someone then the turret smartly aims for extremities
- var/obj/item/weapon/grab/G = locate() in target
- if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
- A.def_zone = pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
- else
- A.def_zone = pick(BP_TORSO, BP_GROIN)
-
- A.current = T
- A.starting = T
- A.yo = U.y - T.y
- A.xo = U.x - T.x
- spawn( 0 )
- A.process()
- return
-
-
-/obj/machinery/turret/proc/isDown()
- return (invisibility!=0)
-
-/obj/machinery/turret/proc/popUp()
- if ((!isPopping()) || src.popping==-1)
- invisibility = 0
- popping = 1
- playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
- if (src.cover!=null)
- flick("popup", src.cover)
- src.cover.icon_state = "openTurretCover"
- spawn(10)
- if (popping==1) popping = 0
-
-/obj/machinery/turret/proc/popDown()
- if ((!isPopping()) || src.popping==1)
- popping = -1
- playsound(src.loc, 'sound/effects/turret/open.wav', 60, 1)
- if (src.cover!=null)
- flick("popdown", src.cover)
- src.cover.icon_state = "turretCover"
- spawn(10)
- if (popping==-1)
- invisibility = INVISIBILITY_LEVEL_TWO
- popping = 0
-
-/obj/machinery/turret/bullet_act(var/obj/item/projectile/Proj)
- if(!(Proj.damage_type == BRUTE || Proj.damage_type == BURN))
- return
- src.health -= Proj.damage
- ..()
- if(prob(45) && Proj.damage > 0) src.spark_system.start()
- qdel (Proj)
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/turret/attackby(obj/item/weapon/W, mob/user)//I can't believe no one added this before/N
- ..()
- playsound(src.loc, 'sound/weapons/smash.ogg', 60, 1)
- src.spark_system.start()
- src.health -= W.force * 0.5
- if (src.health <= 0)
- src.die()
- return
-
-/obj/machinery/turret/emp_act(severity)
- switch(severity)
- if(1)
- enabled = 0
- lasers = 0
- power_change()
- ..()
-
-/obj/machinery/turret/ex_act(severity)
- if(severity < 3)
- src.die()
-
-/obj/machinery/turret/proc/die()
- src.health = 0
- src.density = 0
- src.stat |= BROKEN
- src.icon_state = "destroyed_target_prism"
- if (cover!=null)
- qdel(cover)
- sleep(3)
- flick("explosion", src)
- spawn(13)
- qdel(src)
-
-/obj/machinery/turret/attack_generic(var/mob/user, var/damage, var/attack_message)
- if(!damage)
- return 0
- if(stat & BROKEN)
- user << "That object is useless to you."
- return 0
- user.do_attack_animation(src)
- visible_message("[user] [attack_message] the [src]!")
- user.attack_log += text("\[[time_stamp()]\] attacked [src.name]")
- src.health -= damage
- if (src.health <= 0)
- src.die()
- return 1
-
-/obj/structure/turret/gun_turret
- name = "Gun Turret"
- density = 1
- anchored = 1
- var/cooldown = 20
- var/projectiles = 100
- var/projectiles_per_shot = 2
- var/deviation = 0.3
- var/list/exclude = list()
- var/atom/cur_target
- var/scan_range = 7
- var/health = 40
- var/list/scan_for = list("human"=0,"cyborg"=0,"mecha"=0,"alien"=1)
- var/on = 0
- icon = 'icons/obj/turrets.dmi'
- icon_state = "gun_turret"
-
- proc/take_damage(damage)
- src.health -= damage
- if(src.health<=0)
- qdel(src)
- return
-
-
- bullet_act(var/obj/item/projectile/Proj)
- if(Proj.damage_type == HALLOSS)
- return
- take_damage(Proj.damage)
- ..()
- return
-
-
- ex_act()
- qdel(src)
- return
-
- emp_act()
- qdel(src)
- return
-
- attack_hand(mob/user as mob)
- user.set_machine(src)
- var/dat = {"
- [src] Control
-
- Power: [on?"on":"off"]
- Scan Range: - [scan_range] +
- Scan for: "}
- for(var/scan in scan_for)
- dat += ""
-
- dat += {"Ammo: [max(0, projectiles)]
-
- "}
- user << browse(dat, "window=turret")
- onclose(user, "turret")
- return
-
- attack_ai(mob/user as mob)
- return attack_hand(user)
-
- Topic(href, href_list)
- if(href_list["power"])
- src.on = !src.on
- if(src.on)
- spawn(50)
- if(src)
- src.process()
- if(href_list["scan_range"])
- src.scan_range = between(1,src.scan_range+text2num(href_list["scan_range"]),8)
- if(href_list["scan_for"])
- if(href_list["scan_for"] in scan_for)
- scan_for[href_list["scan_for"]] = !scan_for[href_list["scan_for"]]
- src.updateUsrDialog()
- return
-
-
- proc/validate_target(atom/target)
- if(get_dist(target, src)>scan_range)
- return 0
- if(istype(target, /mob))
- var/mob/M = target
- if(!M.stat && !M.lying)//ninjas can't catch you if you're lying
- return 1
- else if(istype(target, /obj/mecha))
- return 1
- return 0
-
-
- process()
- spawn while(on)
- if(projectiles<=0)
- on = 0
- return
- if(cur_target && !validate_target(cur_target))
- cur_target = null
- if(!cur_target)
- cur_target = get_target()
- fire(cur_target)
- sleep(cooldown)
- return
-
- proc/get_target()
- var/list/pos_targets = list()
- var/target = null
- if(scan_for["human"])
- for(var/mob/living/carbon/human/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(scan_for["cyborg"])
- for(var/mob/living/silicon/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(scan_for["mecha"])
- for(var/obj/mecha/M in oview(scan_range, src))
- if(M in exclude)
- continue
- pos_targets += M
- if(scan_for["alien"])
- for(var/mob/living/carbon/alien/M in oview(scan_range,src))
- if(M.stat || M.lying || M in exclude)
- continue
- pos_targets += M
- if(pos_targets.len)
- target = pick(pos_targets)
- return target
-
-
- proc/fire(atom/target)
- if(!target)
- cur_target = null
- return
- src.set_dir(get_dir(src,target))
- var/turf/targloc = get_turf(target)
- var/target_x = targloc.x
- var/target_y = targloc.y
- var/target_z = targloc.z
- targloc = null
- spawn for(var/i=1 to min(projectiles, projectiles_per_shot))
- if(!src) break
- var/turf/curloc = get_turf(src)
- targloc = locate(target_x+GaussRandRound(deviation,1),target_y+GaussRandRound(deviation,1),target_z)
- if (!targloc || !curloc)
- continue
- if (targloc == curloc)
- continue
- playsound(src, 'sound/weapons/Gunshot.ogg', 50, 1)
- var/obj/item/projectile/A = new /obj/item/projectile(curloc)
- src.projectiles--
- A.launch(target)
- return
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 561979e6e4..b1b8d497b3 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -96,7 +96,7 @@
wires = new(src)
spawn(4)
if(src.product_slogans)
- src.slogan_list += text2list(src.product_slogans, ";")
+ src.slogan_list += splittext(src.product_slogans, ";")
// So not all machines speak at the exact same time.
// The first time this machine says something will be at slogantime + this random value,
@@ -104,7 +104,7 @@
src.last_slogan = world.time + rand(0, slogan_delay)
if(src.product_ads)
- src.ads_list += text2list(src.product_ads, ";")
+ src.ads_list += splittext(src.product_ads, ";")
src.build_inventory()
power_change()
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 3c35ece9d2..b742b8a14b 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -39,6 +39,7 @@
var/datum/effect/effect/system/spark_spread/spark_system = new
var/lights = 0
var/lights_power = 6
+ var/force = 0
//inner atmos
var/use_internal_tank = 0
diff --git a/code/game/objects/effects/effect_system.dm b/code/game/objects/effects/effect_system.dm
index cc1508d211..586ba9b721 100644
--- a/code/game/objects/effects/effect_system.dm
+++ b/code/game/objects/effects/effect_system.dm
@@ -513,16 +513,3 @@ steam.start() -- spawns the effect
round(min(light, BOMBCAP_LIGHT_RADIUS)),
round(min(flash, BOMBCAP_FLASH_RADIUS))
)
-
- proc/holder_damage(var/atom/holder)
- if(holder)
- var/dmglevel = 4
-
- if (round(amount/8) > 0)
- dmglevel = 1
- else if (round(amount/4) > 0)
- dmglevel = 2
- else if (round(amount/2) > 0)
- dmglevel = 3
-
- if(dmglevel<4) holder.ex_act(dmglevel)
diff --git a/code/game/objects/effects/step_triggers.dm b/code/game/objects/effects/step_triggers.dm
index 59a71ddaa8..fa521c104a 100644
--- a/code/game/objects/effects/step_triggers.dm
+++ b/code/game/objects/effects/step_triggers.dm
@@ -13,7 +13,7 @@
..()
if(!H)
return
- if(istype(H, /mob/dead/observer) && !affect_ghosts)
+ if(istype(H, /mob/observer) && !affect_ghosts)
return
Trigger(H)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index a07b82cd17..f66b668664 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -16,6 +16,9 @@
pressure_resistance = 5
// causeerrorheresoifixthis
var/obj/item/master = null
+ var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants.
+ var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
+ var/force = 0
var/heat_protection = 0 //flags which determine which body parts are protected from heat. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
var/cold_protection = 0 //flags which determine which body parts are protected from cold. Use the HEAD, UPPER_TORSO, LOWER_TORSO, etc. flags. See setup.dm
@@ -73,13 +76,10 @@
/obj/item/equipped()
..()
- var/mob/M = loc
+ var/mob/living/M = loc
if(!istype(M))
return
- if(M.l_hand)
- M.l_hand.update_held_icon()
- if(M.r_hand)
- M.r_hand.update_held_icon()
+ M.update_held_icons()
/obj/item/Destroy()
if(ismob(loc))
@@ -95,8 +95,8 @@
//Checks if the item is being held by a mob, and if so, updates the held icons
/obj/item/proc/update_held_icon()
- if(ismob(src.loc))
- var/mob/M = src.loc
+ if(isliving(src.loc))
+ var/mob/living/M = src.loc
if(M.l_hand == src)
M.update_inv_l_hand()
else if(M.r_hand == src)
@@ -157,7 +157,7 @@
size = "huge"
return ..(user, distance, "", "It is a [size] item.")
-/obj/item/attack_hand(mob/user as mob)
+/obj/item/attack_hand(mob/living/user as mob)
if (!user) return
if (hasorgans(user))
var/mob/living/carbon/human/H = user
@@ -396,17 +396,15 @@ var/list/global/slot_flags_enumeration = list(
if((!istype(usr, /mob/living/carbon)) || (istype(usr, /mob/living/carbon/brain)))//Is humanoid, and is not a brain
usr << "You can't pick things up!"
return
+ var/mob/living/carbon/C = usr
if( usr.stat || usr.restrained() )//Is not asleep/dead and is not restrained
usr << "You can't pick things up!"
return
if(src.anchored) //Object isn't anchored
usr << "You can't pick that up!"
return
- if(!usr.hand && usr.r_hand) //Right hand is not full
- usr << "Your right hand is full."
- return
- if(usr.hand && usr.l_hand) //Left hand is not full
- usr << "Your left hand is full."
+ if(C.get_active_hand()) //Hand is not full
+ usr << "Your hand is full."
return
if(!istype(src.loc, /turf)) //Object is on a turf
usr << "You can't pick that up!"
diff --git a/code/game/objects/items/devices/communicator/communicator.dm b/code/game/objects/items/devices/communicator/communicator.dm
index 4e552cc513..2906cb756d 100644
--- a/code/game/objects/items/devices/communicator/communicator.dm
+++ b/code/game/objects/items/devices/communicator/communicator.dm
@@ -109,7 +109,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
if(!comm || !comm.exonet || !comm.exonet.address || comm.exonet.address == src.exonet.address) //Don't add addressless devices, and don't add ourselves.
continue
src.known_devices |= comm
- for(var/mob/dead/observer/O in dead_mob_list)
+ for(var/mob/observer/dead/O in dead_mob_list)
if(!O.client || O.client.prefs.communicator_visibility == 0)
continue
src.known_devices |= O
@@ -157,13 +157,13 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
populate_known_devices() //Update the devices so ghosts can see the list on NanoUI.
..()
-/mob/dead/observer
+/mob/observer/dead
var/datum/exonet_protocol/exonet = null
// Proc: New()
// Parameters: None
// Description: Gives ghosts an exonet address based on their key and ghost name.
-/mob/dead/observer/New()
+/mob/observer/dead/New()
. = ..()
spawn(20)
exonet = new(src)
@@ -175,7 +175,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Proc: Destroy()
// Parameters: None
// Description: Removes the ghost's address and nulls the exonet datum, to allow qdel()ing.
-/mob/dead/observer/Destroy()
+/mob/observer/dead/Destroy()
. = ..()
if(exonet)
exonet.remove_address()
@@ -200,7 +200,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
communicators[++communicators.len] = list("name" = sanitize(comm.name), "address" = comm.exonet.address)
//Now for ghosts who we pretend have communicators.
- for(var/mob/dead/observer/O in known_devices)
+ for(var/mob/observer/dead/O in known_devices)
if(O.client && O.client.prefs.communicator_visibility == 1 && O.exonet)
communicators[++communicators.len] = list("name" = sanitize("[O.client.prefs.real_name]'s communicator"), "address" = O.exonet.address)
@@ -210,7 +210,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
invites[++invites.len] = list("name" = sanitize(comm.name), "address" = comm.exonet.address)
//Ghosts we invited.
- for(var/mob/dead/observer/O in voice_invites)
+ for(var/mob/observer/dead/O in voice_invites)
if(O.exonet && O.client)
invites[++invites.len] = list("name" = sanitize("[O.client.prefs.real_name]'s communicator"), "address" = O.exonet.address)
@@ -220,7 +220,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
requests[++requests.len] = list("name" = sanitize(comm.name), "address" = comm.exonet.address)
//Ghosts that want to talk to us.
- for(var/mob/dead/observer/O in voice_requests)
+ for(var/mob/observer/dead/O in voice_requests)
if(O.exonet && O.client)
requests[++requests.len] = list("name" = sanitize("[O.client.prefs.real_name]'s communicator"), "address" = O.exonet.address)
@@ -342,7 +342,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Proc: receive_exonet_message()
// Parameters: 3 (origin atom - the source of the message's holder, origin_address - where the message came from, message - the message received)
// Description: Handles voice requests and invite messages originating from both real communicators and ghosts. Also includes a ping response.
-/mob/dead/observer/receive_exonet_message(origin_atom, origin_address, message)
+/mob/observer/dead/receive_exonet_message(origin_atom, origin_address, message)
if(message == "voice")
if(istype(origin_atom, /obj/item/device/communicator))
var/obj/item/device/communicator/comm = origin_atom
@@ -600,7 +600,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
// Verb: join_as_voice()
// Parameters: None
// Description: Allows ghosts to call communicators, if they meet all the requirements.
-/mob/dead/verb/join_as_voice()
+/mob/observer/dead/verb/join_as_voice()
set category = "Ghost"
set name = "Call Communicator"
set desc = "If there is a communicator available, send a request to speak through it. This will reset your respawn timer, if someone picks up."
@@ -643,7 +643,7 @@ var/global/list/obj/item/device/communicator/all_communicators = list()
var/choice = input(src,"Send a voice request to whom?") as null|anything in choices
if(choice)
var/obj/item/device/communicator/chosen_communicator = choice
- var/mob/dead/observer/O = src
+ var/mob/observer/dead/O = src
if(O.exonet)
O.exonet.send_message(chosen_communicator.exonet.address, "voice")
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index e5e94fc93d..5b769ed803 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -12,7 +12,7 @@
var/code = 2
-/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
+/obj/item/device/radio/electropack/attack_hand(mob/living/user as mob)
if(src == user.back)
user << "You need help taking this off!"
return
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index da19137043..e1332dda1e 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -156,7 +156,7 @@ var/global/list/default_medbay_channels = list(
var/obj/item/weapon/card/id/I = GetIdCard()
return has_access(list(), req_one_accesses, I ? I.GetAccess() : list())
-/mob/dead/observer/has_internal_radio_channel_access(var/list/req_one_accesses)
+/mob/observer/dead/has_internal_radio_channel_access(var/list/req_one_accesses)
return can_admin_interact()
/obj/item/device/radio/proc/text_wires()
diff --git a/code/game/objects/items/devices/violin.dm b/code/game/objects/items/devices/violin.dm
index 2286f78714..6d195bd2bd 100644
--- a/code/game/objects/items/devices/violin.dm
+++ b/code/game/objects/items/devices/violin.dm
@@ -202,10 +202,10 @@
for(var/line in song.lines)
//world << line
- for(var/beat in text2list(lowertext(line), ","))
+ for(var/beat in splittext(lowertext(line), ","))
//world << "beat: [beat]"
- var/list/notes = text2list(beat, "/")
- for(var/note in text2list(notes[1], "-"))
+ var/list/notes = splittext(beat, "/")
+ for(var/note in splittext(notes[1], "-"))
//world << "note: [note]"
if(!playing || !isliving(loc))//If the violin is playing, or isn't held by a person
playing = 0
@@ -367,7 +367,7 @@
//split into lines
spawn()
- var/list/lines = text2list(t, "\n")
+ var/list/lines = splittext(t, "\n")
var/tempo = 5
if(copytext(lines[1],1,6) == "BPM: ")
tempo = 600 / text2num(copytext(lines[1],6))
diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm
index 7cccb0eb10..11c312048d 100644
--- a/code/game/objects/items/robot/robot_parts.dm
+++ b/code/game/objects/items/robot/robot_parts.dm
@@ -185,7 +185,7 @@
if(!M.brainmob.key)
var/ghost_can_reenter = 0
if(M.brainmob.mind)
- for(var/mob/dead/observer/G in player_list)
+ for(var/mob/observer/dead/G in player_list)
if(G.can_reenter_corpse && G.mind == M.brainmob.mind)
ghost_can_reenter = 1
break
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index ccd6ab0adb..a13df854cb 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -67,7 +67,7 @@
return 0
if(!R.key)
- for(var/mob/dead/observer/ghost in player_list)
+ for(var/mob/observer/dead/ghost in player_list)
if(ghost.mind && ghost.mind.current == R)
R.key = ghost.key
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index b8b79a5ca1..451b2c41af 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -209,7 +209,7 @@
amount = 5
max_amount = 5
-/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/user as mob)
+/obj/item/stack/medical/splint/attack(mob/living/carbon/M as mob, mob/living/user as mob)
if(..())
return 1
diff --git a/code/game/objects/items/weapons/autopsy.dm b/code/game/objects/items/weapons/autopsy.dm
index c17d8ba650..d196bc4ea7 100644
--- a/code/game/objects/items/weapons/autopsy.dm
+++ b/code/game/objects/items/weapons/autopsy.dm
@@ -160,20 +160,7 @@
P.icon_state = "paper_words"
if(istype(usr,/mob/living/carbon))
- // place the item in the usr's hand if possible
- if(!usr.r_hand)
- P.loc = usr
- usr.r_hand = P
- P.layer = 20
- else if(!usr.l_hand)
- P.loc = usr
- usr.l_hand = P
- P.layer = 20
-
- if (ismob(src.loc))
- var/mob/M = src.loc
- M.update_inv_l_hand()
- M.update_inv_r_hand()
+ usr.put_in_hands(src)
/obj/item/weapon/autopsy_scanner/attack(mob/living/carbon/human/M as mob, mob/living/carbon/user as mob)
if(!istype(M))
diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm
index b156d569ad..4772063b4c 100644
--- a/code/game/objects/items/weapons/cigs_lighters.dm
+++ b/code/game/objects/items/weapons/cigs_lighters.dm
@@ -445,39 +445,36 @@ CIGARETTE PACKETS ARE IN FANCY.DM
/obj/item/weapon/flame/lighter/attack_self(mob/living/user)
if(!base_state)
base_state = icon_state
- if(user.r_hand == src || user.l_hand == src)
- if(!lit)
- lit = 1
- icon_state = "[base_state]on"
- item_state = "[base_state]on"
- if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
- user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
- else
- if(prob(95))
- user.visible_message("After a few attempts, [user] manages to light the [src].")
- else
- user << "You burn yourself while lighting the lighter."
- if (user.l_hand == src)
- user.apply_damage(2,BURN,"l_hand")
- else
- user.apply_damage(2,BURN,"r_hand")
- user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
-
- set_light(2)
- processing_objects.Add(src)
+ if(!lit)
+ lit = 1
+ icon_state = "[base_state]on"
+ item_state = "[base_state]on"
+ if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
+ user.visible_message("Without even breaking stride, [user] flips open and lights [src] in one smooth movement.")
else
- lit = 0
- icon_state = "[base_state]"
- item_state = "[base_state]"
- if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
- user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
+ if(prob(95))
+ user.visible_message("After a few attempts, [user] manages to light the [src].")
else
- user.visible_message("[user] quietly shuts off the [src].")
+ user << "You burn yourself while lighting the lighter."
+ if (user.get_left_hand() == src)
+ user.apply_damage(2,BURN,"l_hand")
+ else
+ user.apply_damage(2,BURN,"r_hand")
+ user.visible_message("After a few attempts, [user] manages to light the [src], they however burn their finger in the process.")
- set_light(0)
- processing_objects.Remove(src)
+ set_light(2)
+ processing_objects.Add(src)
else
- return ..()
+ lit = 0
+ icon_state = "[base_state]"
+ item_state = "[base_state]"
+ if(istype(src, /obj/item/weapon/flame/lighter/zippo) )
+ user.visible_message("You hear a quiet click, as [user] shuts off [src] without even looking at what they're doing.")
+ else
+ user.visible_message("[user] quietly shuts off the [src].")
+
+ set_light(0)
+ processing_objects.Remove(src)
return
diff --git a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
index ef6b4c4d57..60f8bce268 100644
--- a/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
+++ b/code/game/objects/items/weapons/circuitboards/computer/camera_monitor.dm
@@ -9,7 +9,7 @@
var/list/network
var/locked = 1
var/emagged = 0
-
+
/obj/item/weapon/circuitboard/security/New()
..()
network = station_networks
@@ -18,7 +18,7 @@
name = T_BOARD("engineering camera monitor")
build_path = /obj/machinery/computer/security/engineering
req_access = list()
-
+
/obj/item/weapon/circuitboard/security/engineering/New()
..()
network = engineering_networks
@@ -31,12 +31,12 @@
/obj/item/weapon/circuitboard/security/construct(var/obj/machinery/computer/security/C)
if (..(C))
- C.network = network
+ C.network = network.Copy()
/obj/item/weapon/circuitboard/security/deconstruct(var/obj/machinery/computer/security/C)
if (..(C))
- network = C.network
-
+ network = C.network.Copy()
+
/obj/item/weapon/circuitboard/security/emag_act(var/remaining_charges, var/mob/user)
if(emagged)
user << "Circuit lock is already removed."
@@ -60,12 +60,12 @@
if(locked)
user << "Circuit controls are locked."
return
- var/existing_networks = list2text(network,",")
+ var/existing_networks = jointext(network,",")
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
usr << "No input found please hang up and try your call again."
return
- var/list/tempnetwork = text2list(input, ",")
+ var/list/tempnetwork = splittext(input, ",")
tempnetwork = difflist(tempnetwork,restricted_camera_networks,1)
if(tempnetwork.len < 1)
usr << "No network found please hang up and try your call again."
diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm
index 218d2fb21c..d92ad00bab 100644
--- a/code/game/objects/items/weapons/cosmetics.dm
+++ b/code/game/objects/items/weapons/cosmetics.dm
@@ -77,7 +77,5 @@
icon_state = "purplecomb"
item_state = "purplecomb"
-/obj/item/weapon/haircomb/attack_self(mob/user)
- if(user.r_hand == src || user.l_hand == src)
- user.visible_message(text("[] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"))
- return
+/obj/item/weapon/haircomb/attack_self(mob/living/user)
+ user.visible_message(text("[] uses [] to comb their hair with incredible style and sophistication. What a [].", user, src, user.gender == FEMALE ? "lady" : "guy"))
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index bbdd46cdb3..8cd4c373e9 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -39,8 +39,8 @@
return null
var/turf/location = loc
if(istype(location, /mob/))
- var/mob/M = location
- if(M.l_hand == src || M.r_hand == src)
+ var/mob/living/M = location
+ if(M.item_is_in_hands(src))
location = M.loc
if(isturf(location)) //start a fire if possible
location.hotspot_expose(700, 2)
diff --git a/code/game/objects/items/weapons/gift_wrappaper.dm b/code/game/objects/items/weapons/gift_wrappaper.dm
index 43b58a1726..73c198c8ab 100644
--- a/code/game/objects/items/weapons/gift_wrappaper.dm
+++ b/code/game/objects/items/weapons/gift_wrappaper.dm
@@ -125,12 +125,12 @@
icon_state = "wrap_paper"
var/amount = 20.0
-/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/user as mob)
+/obj/item/weapon/wrapping_paper/attackby(obj/item/weapon/W as obj, mob/living/user as mob)
..()
if (!( locate(/obj/structure/table, src.loc) ))
user << "You MUST put the paper on a table!"
if (W.w_class < 4)
- if ((istype(user.l_hand, /obj/item/weapon/wirecutters) || istype(user.r_hand, /obj/item/weapon/wirecutters)))
+ if (user.get_type_in_hands(/obj/item/weapon/wirecutters))
var/a_used = 2 ** (src.w_class - 1)
if (src.amount < a_used)
user << "You need more paper!"
diff --git a/code/game/objects/items/weapons/grenades/chem_grenade.dm b/code/game/objects/items/weapons/grenades/chem_grenade.dm
index eadb5b0848..f87f0fa830 100644
--- a/code/game/objects/items/weapons/grenades/chem_grenade.dm
+++ b/code/game/objects/items/weapons/grenades/chem_grenade.dm
@@ -17,9 +17,7 @@
var/affected_area = 3
New()
- var/datum/reagents/R = new/datum/reagents(1000)
- reagents = R
- R.my_atom = src
+ create_reagents(1000)
attack_self(mob/user as mob)
if(!stage || stage==1)
diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm
index 476ed726cd..a6feac2998 100644
--- a/code/game/objects/items/weapons/implants/implantpad.dm
+++ b/code/game/objects/items/weapons/implants/implantpad.dm
@@ -24,8 +24,8 @@
return
- attack_hand(mob/user as mob)
- if ((src.case && (user.l_hand == src || user.r_hand == src)))
+ attack_hand(mob/living/user as mob)
+ if ((src.case && user.item_is_in_hands(src)))
user.put_in_active_hand(case)
src.case.add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/material/shards.dm b/code/game/objects/items/weapons/material/shards.dm
index bb4b80c1b8..e708cc0765 100644
--- a/code/game/objects/items/weapons/material/shards.dm
+++ b/code/game/objects/items/weapons/material/shards.dm
@@ -68,7 +68,6 @@
if(M.buckled) //wheelchairs, office chairs, rollerbeds
return
- M << "You step on \the [src]!"
playsound(src.loc, 'sound/effects/glass_step.ogg', 50, 1) // not sure how to handle metal shards with sounds
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -79,6 +78,8 @@
if( H.shoes || ( H.wear_suit && (H.wear_suit.body_parts_covered & FEET) ) )
return
+ M << "You step on \the [src]!"
+
var/list/check = list("l_foot", "r_foot")
while(check.len)
var/picked = pick(check)
diff --git a/code/game/objects/items/weapons/material/twohanded.dm b/code/game/objects/items/weapons/material/twohanded.dm
index 2c11456b70..b404b69f0b 100644
--- a/code/game/objects/items/weapons/material/twohanded.dm
+++ b/code/game/objects/items/weapons/material/twohanded.dm
@@ -29,7 +29,7 @@
/obj/item/weapon/material/twohanded/update_held_icon()
var/mob/living/M = loc
- if(istype(M) && !issmall(M) && ((M.r_hand == src && !M.l_hand) || (M.l_hand == src && !M.r_hand)))
+ if(istype(M) && !issmall(M) && M.item_is_in_hands(src) && !M.hands_are_full())
wielded = 1
force = force_wielded
name = "[base_name] (wielded)"
diff --git a/code/game/objects/items/weapons/melee/energy.dm b/code/game/objects/items/weapons/melee/energy.dm
index 6a236e1b8f..ac8da3d835 100644
--- a/code/game/objects/items/weapons/melee/energy.dm
+++ b/code/game/objects/items/weapons/melee/energy.dm
@@ -214,7 +214,7 @@
spawn(1) if(src) qdel(src)
/obj/item/weapon/melee/energy/blade/process()
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/objects/items/weapons/mop_deploy.dm b/code/game/objects/items/weapons/mop_deploy.dm
index 66ae01797e..e50f82966b 100644
--- a/code/game/objects/items/weapons/mop_deploy.dm
+++ b/code/game/objects/items/weapons/mop_deploy.dm
@@ -59,7 +59,7 @@
spawn(1) if(src) del(src)
/obj/item/weapon/mop_deploy/process()
- if(!creator || loc != creator || (creator.l_hand != src && creator.r_hand != src))
+ if(!creator || loc != creator || !creator.item_is_in_hands(src))
// Tidy up a bit.
if(istype(loc,/mob/living))
var/mob/living/carbon/human/host = loc
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index f977830ef3..6f93f03df2 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -136,7 +136,6 @@
/obj/item/weapon/melee/baton,
/obj/item/weapon/gun/energy/taser,
/obj/item/weapon/flame/lighter,
- /obj/item/clothing/glasses/hud/security,
/obj/item/device/flashlight,
/obj/item/device/pda,
/obj/item/device/radio/headset,
@@ -166,7 +165,6 @@
/obj/item/weapon/forensics/sample_kit/powder,
/obj/item/weapon/forensics/swab,
/obj/item/device/uv_light,
- /obj/item/weapon/forensics/slide,
/obj/item/weapon/forensics/sample_kit,
/obj/item/weapon/photo,
/obj/item/device/camera_film,
diff --git a/code/game/objects/items/weapons/storage/laundry_basket.dm b/code/game/objects/items/weapons/storage/laundry_basket.dm
new file mode 100644
index 0000000000..ffb4867ca6
--- /dev/null
+++ b/code/game/objects/items/weapons/storage/laundry_basket.dm
@@ -0,0 +1,87 @@
+// -----------------------------
+// Laundry Basket
+// -----------------------------
+// An item designed for hauling the belongings of a character.
+// So this cannot be abused for other uses, we make it two-handed and inable to have its storage looked into.
+/obj/item/weapon/storage/laundry_basket
+ name = "laundry basket"
+ icon = 'icons/obj/janitor.dmi'
+ icon_state = "laundry-empty"
+ item_state = "laundry"
+ desc = "The peak of thousands of years of laundry evolution."
+
+ w_class = 5
+ max_w_class = 4
+ max_storage_space = 25 //20 for clothes + a bit of additional space for non-clothing items that were worn on body
+ storage_slots = 14
+ use_to_pickup = 1
+ allow_quick_empty = 1
+ allow_quick_gather = 1
+ collection_mode = 1
+ var/linked
+
+
+/obj/item/weapon/storage/laundry_basket/attack_hand(mob/living/user as mob)
+ if(ishuman(user))
+ var/mob/living/carbon/human/H = user
+ var/obj/item/organ/external/temp = H.get_organ("r_hand")
+ if (user.hand)
+ temp = H.get_organ("l_hand")
+ if(!temp)
+ user << "You need two hands to pick this up!"
+ return
+
+ if(user.get_inactive_hand())
+ user << "You need your other hand to be empty"
+ return
+ return ..()
+
+/obj/item/weapon/storage/laundry_basket/attack_self(mob/user as mob)
+ var/turf/T = get_turf(user)
+ user << "You dump the [src]'s contents onto \the [T]."
+ return ..()
+
+/obj/item/weapon/storage/laundry_basket/pickup(mob/user)
+ var/obj/item/weapon/storage/laundry_basket/offhand/O = new(user)
+ O.name = "[name] - second hand"
+ O.desc = "Your second grip on the [name]."
+ O.linked = src
+ user.put_in_inactive_hand(O)
+ linked = O
+ return
+
+/obj/item/weapon/storage/laundry_basket/update_icon()
+ if(contents.len)
+ icon_state = "laundry-full"
+ else
+ icon_state = "laundry-empty"
+ return
+
+
+/obj/item/weapon/storage/laundry_basket/MouseDrop(obj/over_object as obj)
+ if(over_object == usr)
+ return
+ else
+ return ..()
+
+/obj/item/weapon/storage/laundry_basket/dropped(mob/user as mob)
+ qdel(linked)
+ return ..()
+
+/obj/item/weapon/storage/laundry_basket/show_to(mob/user as mob)
+ return
+
+/obj/item/weapon/storage/laundry_basket/open(mob/user as mob)
+
+
+//Offhand
+/obj/item/weapon/storage/laundry_basket/offhand
+ icon = 'icons/obj/weapons.dmi'
+ icon_state = "offhand"
+ name = "second hand"
+ use_to_pickup = 0
+
+/obj/item/weapon/storage/laundry_basket/offhand/dropped(mob/user as mob)
+ user.drop_from_inventory(linked)
+ return
+
diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm
index 7a128d7cfa..a4d771aa81 100644
--- a/code/game/objects/items/weapons/stunbaton.dm
+++ b/code/game/objects/items/weapons/stunbaton.dm
@@ -122,8 +122,11 @@
if(user.a_intent == I_HURT)
if (!..()) //item/attack() does it's own messaging and logs
return 0 // item/attack() will return 1 if they hit, 0 if they missed.
- agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
stun *= 0.5
+ if(status) //Checks to see if the stunbaton is on.
+ agony *= 0.5 //whacking someone causes a much poorer contact than prodding them.
+ else
+ agony = 0 //Shouldn't really stun if it's off, should it?
//we can't really extract the actual hit zone from ..(), unfortunately. Just act like they attacked the area they intended to.
else
//copied from human_defense.dm - human defence code should really be refactored some time.
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 0a5b1ec686..a79d6575e5 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -173,7 +173,7 @@
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
-/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob)
+/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/living/user as mob)
if(istype(W,/obj/item/weapon/screwdriver))
if(welding)
user << "Stop welding first!"
@@ -222,9 +222,9 @@
//I'm not sure what this does. I assume it has to do with starting fires...
//...but it doesnt check to see if the welder is on or not.
var/turf/location = src.loc
- if(istype(location, /mob/))
- var/mob/M = location
- if(M.l_hand == src || M.r_hand == src)
+ if(istype(location, /mob/living))
+ var/mob/living/M = location
+ if(M.item_is_in_hands(src))
location = get_turf(M)
if (istype(location, /turf))
location.hotspot_expose(700, 5)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index b8bd8d95e1..bc10bc4359 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -2,16 +2,13 @@
//Used to store information about the contents of the object.
var/list/matter
var/w_class // Size of the object.
- var/list/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/unacidable = 0 //universal "unacidabliness" var, here so you can use it in any obj.
animate_movement = 2
var/throwforce = 1
- var/list/attack_verb = list() //Used in attackby() to say how something was attacked "[x] has been [z.attack_verb] by [y] with [z]"
var/sharp = 0 // whether this object cuts
var/edge = 0 // whether this object is more likely to dismember
var/in_use = 0 // If we have a user using us, this will be set on. We will check if the user has stopped using us, and thus stop updating and LAGGING EVERYTHING!
var/damtype = "brute"
- var/force = 0
var/armor_penetration = 0
var/show_messages
@@ -93,11 +90,12 @@
// check for TK users
if (istype(usr, /mob/living/carbon/human))
- if(istype(usr.l_hand, /obj/item/tk_grab) || istype(usr.r_hand, /obj/item/tk_grab/))
- if(!(usr in nearby))
- if(usr.client && usr.machine==src)
+ var/mob/living/carbon/human/H = usr
+ if(H.get_type_in_hands(/obj/item/tk_grab))
+ if(!(H in nearby))
+ if(H.client && H.machine==src)
is_in_use = 1
- src.attack_hand(usr)
+ src.attack_hand(H)
in_use = is_in_use
/obj/proc/updateDialog()
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 546621024e..5029e166d2 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -217,6 +217,15 @@
M.show_message("\The [src] has been cut apart by [user] with \the [WT].", 3, "You hear welding.", 2)
qdel(src)
return
+ if(istype(W, /obj/item/weapon/storage/laundry_basket) && W.contents.len)
+ var/obj/item/weapon/storage/laundry_basket/LB = W
+ var/turf/T = get_turf(src)
+ for(var/obj/item/I in LB.contents)
+ LB.remove_from_storage(I, T)
+ user.visible_message("[user] empties \the [LB] into \the [src].", \
+ "You empty \the [LB] into \the [src].", \
+ "You hear rustling of clothes.")
+ return
if(isrobot(user))
return
if(W.loc != user) // This should stop mounted modules ending up outside the module.
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
index e3ea31375e..1ce97a64a7 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm
@@ -65,6 +65,8 @@
/obj/structure/closet/secure_closet/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.opened)
+ if(istype(W, /obj/item/weapon/storage/laundry_basket))
+ return ..(W,user)
if(istype(W, /obj/item/weapon/grab))
var/obj/item/weapon/grab/G = W
if(src.large)
diff --git a/code/game/objects/structures/crates_lockers/closets/secure/security.dm b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
index 78ddef7438..fcbe9e9060 100644
--- a/code/game/objects/structures/crates_lockers/closets/secure/security.dm
+++ b/code/game/objects/structures/crates_lockers/closets/secure/security.dm
@@ -181,6 +181,7 @@
new /obj/item/clothing/head/beret/sec/corporate/warden(src)
new /obj/item/clothing/suit/storage/hooded/wintercoat/security(src)
new /obj/item/device/flashlight/maglight(src)
+ new /obj/item/device/megaphone(src)
return
diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm
index c8ccd4b32b..961a28fe12 100644
--- a/code/game/objects/structures/extinguisher.dm
+++ b/code/game/objects/structures/extinguisher.dm
@@ -28,7 +28,7 @@
update_icon()
-/obj/structure/extinguisher_cabinet/attack_hand(mob/user)
+/obj/structure/extinguisher_cabinet/attack_hand(mob/living/user)
if(isrobot(user))
return
if (ishuman(user))
diff --git a/code/game/objects/structures/janicart.dm b/code/game/objects/structures/janicart.dm
index 17957cc589..b3ad998895 100644
--- a/code/game/objects/structures/janicart.dm
+++ b/code/game/objects/structures/janicart.dm
@@ -107,7 +107,7 @@
if(!isliving(usr))
return
var/mob/living/user = usr
-
+
if(href_list["take"])
switch(href_list["take"])
if("garbage")
@@ -213,10 +213,10 @@
..()
-/obj/structure/bed/chair/janicart/relaymove(mob/user, direction)
+/obj/structure/bed/chair/janicart/relaymove(mob/living/user, direction)
if(user.stat || user.stunned || user.weakened || user.paralysis)
unbuckle_mob()
- if(istype(user.l_hand, /obj/item/key) || istype(user.r_hand, /obj/item/key))
+ if(user.get_type_in_hands(/obj/item/key))
step(src, direction)
update_mob()
else
diff --git a/code/game/objects/structures/musician.dm b/code/game/objects/structures/musician.dm
index fa53637f88..a39e9658dd 100644
--- a/code/game/objects/structures/musician.dm
+++ b/code/game/objects/structures/musician.dm
@@ -220,10 +220,10 @@
for(var/line in song.lines)
//world << line
- for(var/beat in text2list(lowertext(line), ","))
+ for(var/beat in splittext(lowertext(line), ","))
//world << "beat: [beat]"
- var/list/notes = text2list(beat, "/")
- for(var/note in text2list(notes[1], "-"))
+ var/list/notes = splittext(beat, "/")
+ for(var/note in splittext(notes[1], "-"))
//world << "note: [note]"
if(!playing || !anchored)//If the piano is playing, or is loose
playing = 0
@@ -387,7 +387,7 @@
//split into lines
spawn()
- var/list/lines = text2list(t, "\n")
+ var/list/lines = splittext(t, "\n")
var/tempo = 5
if(copytext(lines[1],1,6) == "BPM: ")
tempo = 600 / text2num(copytext(lines[1],6))
diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm
index 3647d565f7..f46bc2dbf3 100644
--- a/code/game/objects/structures/noticeboard.dm
+++ b/code/game/objects/structures/noticeboard.dm
@@ -64,15 +64,14 @@
return
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
- if(istype(usr.r_hand, /obj/item/weapon/pen)) //and you're holding a pen
- add_fingerprint(usr)
- P.attackby(usr.r_hand, usr) //then do ittttt
- else
- if(istype(usr.l_hand, /obj/item/weapon/pen)) //check other hand for pen
- add_fingerprint(usr)
- P.attackby(usr.l_hand, usr)
+ var/mob/living/M = usr
+ if(istype(M))
+ var/obj/item/weapon/pen/E = M.get_type_in_hands(/obj/item/weapon/pen)
+ if(E)
+ add_fingerprint(M)
+ P.attackby(E, usr)
else
- usr << "You'll need something to write with!"
+ M << "You'll need something to write with!"
if(href_list["read"])
var/obj/item/weapon/paper/P = locate(href_list["read"])
if((P && P.loc == src))
diff --git a/code/game/objects/structures/safe.dm b/code/game/objects/structures/safe.dm
index a3904f65a1..7003f4d3a2 100644
--- a/code/game/objects/structures/safe.dm
+++ b/code/game/objects/structures/safe.dm
@@ -90,7 +90,7 @@ FLOOR SAFES
var/mob/living/carbon/human/user = usr
var/canhear = 0
- if(istype(user.l_hand, /obj/item/clothing/accessory/stethoscope) || istype(user.r_hand, /obj/item/clothing/accessory/stethoscope))
+ if(user.get_type_in_hands(/obj/item/clothing/accessory/stethoscope))
canhear = 1
if(href_list["open"])
diff --git a/code/game/objects/structures/transit_tubes.dm b/code/game/objects/structures/transit_tubes.dm
index 47a2f53fb3..0f9b4a603a 100644
--- a/code/game/objects/structures/transit_tubes.dm
+++ b/code/game/objects/structures/transit_tubes.dm
@@ -367,7 +367,7 @@ obj/structure/ex_act(severity)
// currently on.
/obj/structure/transit_tube_pod/proc/mix_air()
var/datum/gas_mixture/environment = loc.return_air()
-
+
//note that share_ratio assumes both gas mixes have the same volume,
//so if the volume is changed this may need to be changed as well.
air_contents.share_ratio(environment, 1)
@@ -539,7 +539,7 @@ obj/structure/ex_act(severity)
if(text in direction_table)
return direction_table[text]
- var/list/split_text = text2list(text, "-")
+ var/list/split_text = splittext(text, "-")
// If the first token is D, the icon_state represents
// a purely decorative tube, and doesn't actually
diff --git a/code/game/objects/structures/under_wardrobe.dm b/code/game/objects/structures/under_wardrobe.dm
index 655eb5c510..a02c67c968 100644
--- a/code/game/objects/structures/under_wardrobe.dm
+++ b/code/game/objects/structures/under_wardrobe.dm
@@ -16,12 +16,12 @@
var/list/selection
switch(utype)
if("Underwear")
- var/utype2 = alert("Which section do you want to pick from?",,"Male", "Female")
- switch(utype2)
- if("Male")
- selection = underwear_m
- if("Female")
- selection = underwear_f
+ utype = alert("Which section do you want to pick from?",, "Top", "Bottom",)
+ switch(utype)
+ if("Top")
+ selection = underwear_top_t
+ if("Bottom")
+ selection = underwear_bottom_t
if("Undershirts")
selection = undershirt_t
if("Socks")
@@ -34,8 +34,10 @@
H.undershirt = selection[pick]
else if(utype == "Socks")
H.socks = selection[pick]
+ else if(utype == "Top")
+ H.underwear_top = selection[pick]
else
- H.underwear = selection[pick]
+ H.underwear_bottom = selection[pick]
H.update_body(1)
return 1
\ No newline at end of file
diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm
index 8df5be2629..4ac596267d 100644
--- a/code/game/objects/structures/watercloset.dm
+++ b/code/game/objects/structures/watercloset.dm
@@ -358,7 +358,7 @@
if (ishuman(user))
var/mob/living/carbon/human/H = user
var/obj/item/organ/external/temp = H.organs_by_name["r_hand"]
- if (user.hand)
+ if (H.hand)
temp = H.organs_by_name["l_hand"]
if(temp && !temp.is_usable())
user << "You try to move your [temp.name], but cannot!"
diff --git a/code/game/response_team.dm b/code/game/response_team.dm
index 7a536cd6ca..fd7fbe1b9b 100644
--- a/code/game/response_team.dm
+++ b/code/game/response_team.dm
@@ -46,7 +46,7 @@ client/verb/JoinResponseTeam()
usr << "You cannot join the response team at this time."
return
- if(istype(usr,/mob/dead/observer) || istype(usr,/mob/new_player))
+ if(istype(usr,/mob/observer/dead) || istype(usr,/mob/new_player))
if(!send_emergency_team)
usr << "No emergency response team is currently being sent."
return
diff --git a/code/game/verbs/who.dm b/code/game/verbs/who.dm
index 7580b76fff..c8dfc8dedd 100644
--- a/code/game/verbs/who.dm
+++ b/code/game/verbs/who.dm
@@ -18,7 +18,7 @@
entry += " - Unconscious"
if(DEAD)
if(isobserver(C.mob))
- var/mob/dead/observer/O = C.mob
+ var/mob/observer/dead/O = C.mob
if(O.started_as_observer)
entry += " - Observing"
else
@@ -41,6 +41,13 @@
if(is_special_character(C.mob))
entry += " - Antagonist"
+
+ if(C.is_afk())
+ var/seconds = C.last_activity_seconds()
+ entry += " (AFK - "
+ entry += "[round(seconds / 60)] minutes, "
+ entry += "[seconds % 60] seconds)"
+
entry += " (?)"
Lines += entry
else
diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm
index be3b6e0136..a3e6a5032d 100644
--- a/code/modules/admin/admin.dm
+++ b/code/modules/admin/admin.dm
@@ -1251,7 +1251,7 @@ proc/admin_notice(var/message, var/rights)
//Returns 1 to let the dragdrop code know we are trapping this event
//Returns 0 if we don't plan to trap the event
-/datum/admins/proc/cmd_ghost_drag(var/mob/dead/observer/frommob, var/mob/living/tomob)
+/datum/admins/proc/cmd_ghost_drag(var/mob/observer/dead/frommob, var/mob/living/tomob)
if(!istype(frommob))
return //Extra sanity check to make sure only observers are shoved into things
diff --git a/code/modules/admin/admin_ranks.dm b/code/modules/admin/admin_ranks.dm
index 5d1f5db452..3652237454 100644
--- a/code/modules/admin/admin_ranks.dm
+++ b/code/modules/admin/admin_ranks.dm
@@ -14,7 +14,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(!length(line)) continue
if(copytext(line,1,2) == "#") continue
- var/list/List = text2list(line,"+")
+ var/list/List = splittext(line,"+")
if(!List.len) continue
var/rank = ckeyEx(List[1])
@@ -77,7 +77,7 @@ var/list/admin_ranks = list() //list of all ranks with associated rights
if(copytext(line,1,2) == "#") continue
//Split the line at every "-"
- var/list/List = text2list(line, "-")
+ var/list/List = splittext(line, "-")
if(!List.len) continue
//ckey is before the first "-"
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index b678c42e45..a907e73a24 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -400,9 +400,9 @@ var/list/admin_verbs_mentor = list(
set category = "Admin"
set name = "Aghost"
if(!holder) return
- if(istype(mob,/mob/dead/observer))
+ if(istype(mob,/mob/observer/dead))
//re-enter
- var/mob/dead/observer/ghost = mob
+ var/mob/observer/dead/ghost = mob
if(!is_mentor(usr.client))
ghost.can_reenter_corpse = 1
if(ghost.can_reenter_corpse)
@@ -418,7 +418,7 @@ var/list/admin_verbs_mentor = list(
else
//ghostize
var/mob/body = mob
- var/mob/dead/observer/ghost = body.ghostize(1)
+ var/mob/observer/dead/ghost = body.ghostize(1)
ghost.admin_ghosted = 1
if(body)
body.teleop = ghost
diff --git a/code/modules/admin/create_mob.dm b/code/modules/admin/create_mob.dm
index a723fe3795..4a892d893d 100644
--- a/code/modules/admin/create_mob.dm
+++ b/code/modules/admin/create_mob.dm
@@ -2,7 +2,7 @@
/datum/admins/proc/create_mob(var/mob/user)
if (!create_mob_html)
var/mobjs = null
- mobjs = list2text(typesof(/mob), ";")
+ mobjs = jointext(typesof(/mob), ";")
create_mob_html = file2text('html/create_object.html')
create_mob_html = replacetext(create_mob_html, "null /* object types */", "\"[mobjs]\"")
diff --git a/code/modules/admin/create_object.dm b/code/modules/admin/create_object.dm
index 779cb7bc90..3778441b1d 100644
--- a/code/modules/admin/create_object.dm
+++ b/code/modules/admin/create_object.dm
@@ -3,7 +3,7 @@
/datum/admins/proc/create_object(var/mob/user)
if (!create_object_html)
var/objectjs = null
- objectjs = list2text(typesof(/obj), ";")
+ objectjs = jointext(typesof(/obj), ";")
create_object_html = file2text('html/create_object.html')
create_object_html = replacetext(create_object_html, "null /* object types */", "\"[objectjs]\"")
@@ -22,7 +22,7 @@
if (!quick_create_object_html)
var/objectjs = null
- objectjs = list2text(typesof(path), ";")
+ objectjs = jointext(typesof(path), ";")
quick_create_object_html = file2text('html/create_object.html')
quick_create_object_html = replacetext(quick_create_object_html, "null /* object types */", "\"[objectjs]\"")
diff --git a/code/modules/admin/create_turf.dm b/code/modules/admin/create_turf.dm
index 0938b7bd33..fdaa103b5d 100644
--- a/code/modules/admin/create_turf.dm
+++ b/code/modules/admin/create_turf.dm
@@ -2,7 +2,7 @@
/datum/admins/proc/create_turf(var/mob/user)
if (!create_turf_html)
var/turfjs = null
- turfjs = list2text(typesof(/turf), ";")
+ turfjs = jointext(typesof(/turf), ";")
create_turf_html = file2text('html/create_object.html')
create_turf_html = replacetext(create_turf_html, "null /* object types */", "\"[turfjs]\"")
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index 4bc8298193..99b3f7a2f4 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -262,7 +262,7 @@
message_admins("\blue [key_name_admin(usr)] has used rudimentary transformation on [key_name_admin(M)]. Transforming to [href_list["simplemake"]]; deletemob=[delmob]", 1)
switch(href_list["simplemake"])
- if("observer") M.change_mob_type( /mob/dead/observer , null, null, delmob )
+ if("observer") M.change_mob_type( /mob/observer/dead , null, null, delmob )
if("larva") M.change_mob_type( /mob/living/carbon/alien/larva , null, null, delmob )
if("nymph") M.change_mob_type( /mob/living/carbon/alien/diona , null, null, delmob )
if("human") M.change_mob_type( /mob/living/carbon/human , null, null, delmob, href_list["species"])
@@ -769,7 +769,7 @@
message_admins("\blue [key_name_admin(usr)] removed [t]", 1)
jobban_remove(t)
href_list["ban"] = 1 // lets it fall through and refresh
- var/t_split = text2list(t, " - ")
+ var/t_split = splittext(t, " - ")
var/key = t_split[1]
var/job = t_split[2]
DB_ban_unban(ckey(key), BANTYPE_JOB_PERMA, job)
@@ -1574,9 +1574,9 @@
alert("Select fewer object types, (max 5)")
return
else if(length(removed_paths))
- alert("Removed:\n" + list2text(removed_paths, "\n"))
+ alert("Removed:\n" + jointext(removed_paths, "\n"))
- var/list/offset = text2list(href_list["offset"],",")
+ var/list/offset = splittext(href_list["offset"],",")
var/number = dd_range(1, 100, text2num(href_list["object_count"]))
var/X = offset.len > 0 ? text2num(offset[1]) : 0
var/Y = offset.len > 1 ? text2num(offset[2]) : 0
@@ -1917,7 +1917,7 @@ mob/living/silicon/ai/can_centcom_reply()
if(client && eyeobj)
return "|EYE"
-/mob/dead/observer/extra_admin_link(var/source)
+/mob/observer/dead/extra_admin_link(var/source)
if(mind && mind.current)
return "|BDY"
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 5f4595e026..f4ce67aa2c 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -29,7 +29,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
var/original_msg = msg
//explode the input msg into a list
- var/list/msglist = text2list(msg, " ")
+ var/list/msglist = splittext(msg, " ")
//generate keywords lookup
var/list/surnames = list()
@@ -40,7 +40,7 @@ var/list/adminhelp_ignored_words = list("unknown","the","a","an","of","monkey","
if(M.mind) indexing += M.mind.name
for(var/string in indexing)
- var/list/L = text2list(string, " ")
+ var/list/L = splittext(string, " ")
var/surname_found = 0
//surnames
for(var/i=L.len, i>=1, i--)
diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm
index e579ca1544..e57720bb62 100644
--- a/code/modules/admin/verbs/adminjump.dm
+++ b/code/modules/admin/verbs/adminjump.dm
@@ -1,7 +1,7 @@
/mob/proc/on_mob_jump()
return
-/mob/dead/observer/on_mob_jump()
+/mob/observer/dead/on_mob_jump()
following = null
/client/proc/Jump(var/area/A in return_sorted_areas())
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index 61050526d5..f031bc2835 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -21,7 +21,7 @@
if(T.mob)
if(istype(T.mob, /mob/new_player))
targets["(New Player) - [T]"] = T
- else if(istype(T.mob, /mob/dead/observer))
+ else if(istype(T.mob, /mob/observer/dead))
targets["[T.mob.name](Ghost) - [T]"] = T
else
targets["[T.mob.real_name](as [T.mob.name]) - [T]"] = T
diff --git a/code/modules/admin/verbs/check_customitem_activity.dm b/code/modules/admin/verbs/check_customitem_activity.dm
index 1bda56c6e5..80bbfccc12 100644
--- a/code/modules/admin/verbs/check_customitem_activity.dm
+++ b/code/modules/admin/verbs/check_customitem_activity.dm
@@ -37,11 +37,11 @@ var/inactive_keys = "None
"
var/list/ckeys_with_customitems = list()
var/file = file2text("config/custom_items.txt")
- var/lines = text2list(file, "\n")
+ var/lines = splittext(file, "\n")
for(var/line in lines)
// split & clean up
- var/list/Entry = text2list(line, ":")
+ var/list/Entry = splittext(line, ":")
for(var/i = 1 to Entry.len)
Entry[i] = trim(Entry[i])
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index 6522c5e1a4..57deed42a2 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -85,7 +85,7 @@
var/mob/choice = input("Choose a player to play the pAI", "Spawn pAI") in available
if(!choice)
return 0
- if(!istype(choice, /mob/dead/observer))
+ if(!istype(choice, /mob/observer/dead))
var/confirm = input("[choice.key] isn't ghosting right now. Are you sure you want to yank them out of them out of their body and place them in this pAI?", "Spawn pAI Confirmation", "No") in list("Yes", "No")
if(confirm != "Yes")
return 0
@@ -214,7 +214,7 @@
set name = "Del-All"
// to prevent REALLY stupid deletions
- var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/dead, /mob/dead/observer, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
+ var/blocked = list(/obj, /mob, /mob/living, /mob/living/carbon, /mob/living/carbon/human, /mob/observer/dead, /mob/living/silicon, /mob/living/silicon/robot, /mob/living/silicon/ai)
var/hsbitem = input(usr, "Choose an object to delete.", "Delete:") as null|anything in typesof(/obj) + typesof(/mob) - blocked
if(hsbitem)
for(var/atom/O in world)
@@ -282,7 +282,7 @@
if(alert("This mob is being controlled by [M.ckey]. Are you sure you wish to assume control of it? [M.ckey] will be made a ghost.",,"Yes","No") != "Yes")
return
else
- var/mob/dead/observer/ghost = new/mob/dead/observer(M,1)
+ var/mob/observer/dead/ghost = new/mob/observer/dead(M,1)
ghost.ckey = M.ckey
message_admins("\blue [key_name_admin(usr)] assumed direct control of [M].", 1)
log_admin("[key_name(usr)] assumed direct control of [M].")
@@ -932,17 +932,17 @@
switch(input("Which list?") in list("Players","Admins","Mobs","Living Mobs","Dead Mobs", "Clients"))
if("Players")
- usr << list2text(player_list,",")
+ usr << jointext(player_list,",")
if("Admins")
- usr << list2text(admins,",")
+ usr << jointext(admins,",")
if("Mobs")
- usr << list2text(mob_list,",")
+ usr << jointext(mob_list,",")
if("Living Mobs")
- usr << list2text(living_mob_list,",")
+ usr << jointext(living_mob_list,",")
if("Dead Mobs")
- usr << list2text(dead_mob_list,",")
+ usr << jointext(dead_mob_list,",")
if("Clients")
- usr << list2text(clients,",")
+ usr << jointext(clients,",")
// DNA2 - Admin Hax
/client/proc/cmd_admin_toggle_block(var/mob/M,var/block)
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 29d2b95d88..5661097aab 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -140,7 +140,6 @@ var/list/debug_verbs = list (
,/client/proc/ticklag
,/client/proc/cmd_admin_grantfullaccess
,/client/proc/kaboom
- ,/client/proc/splash
,/client/proc/cmd_admin_areatest
,/client/proc/cmd_admin_rejuvenate
,/datum/admins/proc/show_traitor_panel
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index ef5bdb4e6d..5d8db9c072 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -189,7 +189,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
M.client.prefs.muted |= mute_type
log_admin("SPAM AUTOMUTE: [muteunmute] [key_name(M)] from [mute_string]")
message_admins("SPAM AUTOMUTE: [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
- M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
+ M << "You have been [muteunmute] from [mute_string] by the SPAM AUTOMUTE system. Contact an admin."
feedback_add_details("admin_verb","AUTOMUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
return
@@ -202,7 +202,7 @@ proc/cmd_admin_mute(mob/M as mob, mute_type, automute = 0)
log_admin("[key_name(usr)] has [muteunmute] [key_name(M)] from [mute_string]")
message_admins("[key_name_admin(usr)] has [muteunmute] [key_name_admin(M)] from [mute_string].", 1)
- M << "You have been [muteunmute] from [mute_string]."
+ M << "You have been [muteunmute] from [mute_string]."
feedback_add_details("admin_verb","MUTE") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/client/proc/cmd_admin_add_random_ai_law()
@@ -234,9 +234,9 @@ Ccomp's first proc.
var/list/mobs = list()
var/list/ghosts = list()
- var/list/sortmob = sortAtom(mob_list) // get the mob list.
+ var/list/sortmob = sortAtom(mob_list) // get the mob list.
var/any=0
- for(var/mob/dead/observer/M in sortmob)
+ for(var/mob/observer/dead/M in sortmob)
mobs.Add(M) //filter it where it's only ghosts
any = 1 //if no ghosts show up, any will just be 0
if(!any)
@@ -266,7 +266,7 @@ Ccomp's first proc.
src << "Hrm, appears you didn't select a ghost" // Sanity check, if no ghosts in the list we don't want to edit a null variable and cause a runtime error.
return
- var/mob/dead/observer/G = ghosts[target]
+ var/mob/observer/dead/G = ghosts[target]
if(G.has_enabled_antagHUD && config.antag_hud_restricted)
var/response = alert(src, "Are you sure you wish to allow this individual to play?","Ghost has used AntagHUD","Yes","No")
if(response == "No") return
@@ -291,9 +291,9 @@ Ccomp's first proc.
src << "Only administrators may use this command."
var/action=""
if(config.antag_hud_allowed)
- for(var/mob/dead/observer/g in get_ghosts())
+ for(var/mob/observer/dead/g in get_ghosts())
if(!g.client.holder) //Remove the verb from non-admin ghosts
- g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
+ g.verbs -= /mob/observer/dead/verb/toggle_antagHUD
if(g.antagHUD)
g.antagHUD = 0 // Disable it on those that have it enabled
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
@@ -302,9 +302,9 @@ Ccomp's first proc.
src << "\red AntagHUD usage has been disabled"
action = "disabled"
else
- for(var/mob/dead/observer/g in get_ghosts())
+ for(var/mob/observer/dead/g in get_ghosts())
if(!g.client.holder) // Add the verb back for all non-admin ghosts
- g.verbs += /mob/dead/observer/verb/toggle_antagHUD
+ g.verbs += /mob/observer/dead/verb/toggle_antagHUD
g << "\blue The Administrator has enabled AntagHUD " // Notify all observers they can now use AntagHUD
config.antag_hud_allowed = 1
action = "enabled"
@@ -324,13 +324,13 @@ Ccomp's first proc.
src << "Only administrators may use this command."
var/action=""
if(config.antag_hud_restricted)
- for(var/mob/dead/observer/g in get_ghosts())
+ for(var/mob/observer/dead/g in get_ghosts())
g << "\blue The administrator has lifted restrictions on joining the round if you use AntagHUD"
action = "lifted restrictions"
config.antag_hud_restricted = 0
src << "\blue AntagHUD restrictions have been lifted"
else
- for(var/mob/dead/observer/g in get_ghosts())
+ for(var/mob/observer/dead/g in get_ghosts())
g << "\red The administrator has placed restrictions on joining the round if you use AntagHUD"
g << "\red Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions "
g.antagHUD = 0
@@ -358,8 +358,8 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!input)
return
- var/mob/dead/observer/G_found
- for(var/mob/dead/observer/G in player_list)
+ var/mob/observer/dead/G_found
+ for(var/mob/observer/dead/G in player_list)
if(G.ckey == input)
G_found = G
break
@@ -627,7 +627,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
log_admin("[key_name(usr)] has gibbed [key_name(M)]")
message_admins("[key_name_admin(usr)] has gibbed [key_name_admin(M)]", 1)
- if(istype(M, /mob/dead/observer))
+ if(istype(M, /mob/observer/dead))
gibs(M.loc)
return
@@ -640,7 +640,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
var/confirm = alert(src, "You sure?", "Confirm", "Yes", "No")
if(confirm == "Yes")
- if (istype(mob, /mob/dead/observer)) // so they don't spam gibs everywhere
+ if (istype(mob, /mob/observer/dead)) // so they don't spam gibs everywhere
return
else
mob.gib()
diff --git a/code/modules/alarm/alarm.dm b/code/modules/alarm/alarm.dm
index aa88e170bf..d0a6a8be4c 100644
--- a/code/modules/alarm/alarm.dm
+++ b/code/modules/alarm/alarm.dm
@@ -76,9 +76,9 @@
/datum/alarm/proc/cameras()
// reset camera cache
- if(camera_cache_id != cache_id)
+ if(camera_repository.camera_cache_id != cache_id)
cameras = null
- cache_id = camera_cache_id
+ cache_id = camera_repository.camera_cache_id
// If the alarm origin has changed area, for example a borg containing an alarming camera, reset the list of cameras
else if(cameras && (last_camera_area != alarm_area()))
cameras = null
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index c3c395f15a..b731905e5f 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -94,7 +94,7 @@
..()
- on_found(mob/finder as mob)
+ on_found(mob/living/finder as mob)
if(armed)
finder.visible_message("[finder] accidentally sets off [src], breaking their fingers.", \
"You accidentally trigger [src]!")
diff --git a/code/modules/client/client defines.dm b/code/modules/client/client defines.dm
index 1155882b82..0961115d6a 100644
--- a/code/modules/client/client defines.dm
+++ b/code/modules/client/client defines.dm
@@ -30,7 +30,6 @@
////////////
//SECURITY//
////////////
- var/next_allowed_topic_time = 10
// comment out the line below when debugging locally to enable the options & messages menu
//control_freak = 1
diff --git a/code/modules/client/client procs.dm b/code/modules/client/client procs.dm
index aa1cf3b1ad..c7a6dd7ccb 100644
--- a/code/modules/client/client procs.dm
+++ b/code/modules/client/client procs.dm
@@ -1,7 +1,6 @@
////////////
//SECURITY//
////////////
-#define TOPIC_SPAM_DELAY 2 //2 ticks is about 2/10ths of a second; it was 4 ticks, but that caused too many clicks to be lost due to lag
#define UPLOAD_LIMIT 10485760 //Restricts client uploads to the server to 10MB //Boosted this thing. What's the worst that can happen?
#define MIN_CLIENT_VERSION 0 //Just an ambiguously low version for now, I don't want to suddenly stop people playing.
//I would just like the code ready should it ever need to be used.
@@ -24,11 +23,6 @@
if(!usr || usr != mob) //stops us calling Topic for somebody else's client. Also helps prevent usr=null
return
- //Reduces spamming of links by dropping calls that happen during the delay period
- if(next_allowed_topic_time > world.time)
- return
- next_allowed_topic_time = world.time + TOPIC_SPAM_DELAY
-
//search the href for script injection
if( findtext(href,"