diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 00b0aaf434a..c720132d1b5 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -1,31 +1,26 @@
+
-
-
-
+
## Description of changes
-
## Why and what will this PR improve
-
## Authorship
-
## Changelog
-
+
:cl:
prefix:
/:cl:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index bf52f761a5e..0e6e97f873c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -15,8 +15,8 @@ on:
env:
BYOND_MAJOR: "514"
- BYOND_MINOR: "1566"
- SPACEMAN_DMM_VERSION: suite-1.7
+ BYOND_MINOR: "1572"
+ SPACEMAN_DMM_VERSION: suite-1.7.1
jobs:
DreamChecker:
diff --git a/code/__defines/directions.dm b/code/__defines/directions.dm
index bb6252cb3e6..b4524560447 100644
--- a/code/__defines/directions.dm
+++ b/code/__defines/directions.dm
@@ -16,6 +16,8 @@
#define CORNER_EASTWEST CORNER_COUNTERCLOCKWISE
#define CORNER_NORTHSOUTH CORNER_CLOCKWISE
+#define FIRST_DIR(X) ((X) & -(X))
+
/*
turn() is weird:
turn(icon, angle) turns icon by angle degrees clockwise
diff --git a/code/__defines/misc.dm b/code/__defines/misc.dm
index 1d7dab5188e..40cdeb0b782 100644
--- a/code/__defines/misc.dm
+++ b/code/__defines/misc.dm
@@ -286,3 +286,6 @@
#define WRITTEN_SKIP 0
#define WRITTEN_PHYSICAL 1
#define WRITTEN_DIGITAL 2
+
+// arbitrary low pressure bound for wind weather effects
+#define MIN_WIND_PRESSURE 10
diff --git a/code/_global_vars/lists/names.dm b/code/_global_vars/lists/names.dm
index 5eb78e06c32..d9f4bec71f7 100644
--- a/code/_global_vars/lists/names.dm
+++ b/code/_global_vars/lists/names.dm
@@ -1,3 +1,5 @@
+// All variables here use double quotes to able load information on every startup.
+
var/global/list/ai_names = file2list("config/names/ai.txt")
var/global/list/wizard_first = file2list("config/names/wizardfirst.txt")
var/global/list/wizard_second = file2list("config/names/wizardsecond.txt")
@@ -11,5 +13,3 @@ var/global/list/clown_names = file2list("config/names/clown.txt")
var/global/list/verbs = file2list("config/names/verbs.txt")
var/global/list/adjectives = file2list("config/names/adjectives.txt")
-//loaded on startup because of "
-//would include in rsc if ' was used
diff --git a/code/_helpers/text.dm b/code/_helpers/text.dm
index dac307ef4ad..bbdeed16f80 100644
--- a/code/_helpers/text.dm
+++ b/code/_helpers/text.dm
@@ -14,9 +14,9 @@
*/
// Run all strings to be used in an SQL query through this proc first to properly escape out injection attempts.
-/proc/sanitizeSQL(var/t as text)
- var/sqltext = dbcon.Quote(t);
- return copytext(sqltext, 2, length(sqltext));//Quote() adds quotes around input, we already do that
+/proc/sanitize_sql(t)
+ var/sqltext = dbcon.Quote("[t]") // http://www.byond.com/forum/post/2218538
+ return copytext(sqltext, 2, -1)
/*
* Text sanitization
@@ -24,7 +24,7 @@
//Used for preprocessing entered text
//Added in an additional check to alert players if input is too long
-/proc/sanitize(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
+/proc/sanitize(input, max_length = MAX_MESSAGE_LEN, encode = TRUE, trim = TRUE, extra = TRUE, ascii_only = FALSE)
if(!input)
return
@@ -33,47 +33,68 @@
if(input_length > max_length)
to_chat(usr, SPAN_WARNING("Your message is too long by [input_length - max_length] character\s."))
return
- input = copytext_char(input, 1, max_length + 1)
+ input = copytext_char(input, 1, max_length)
if(extra)
input = replace_characters(input, list("\n"=" ","\t"=" "))
+ if(ascii_only)
+ // Some procs work differently depending on unicode/ascii string
+ // You should always consider this with any text processing work
+ // More: http://www.byond.com/docs/ref/info.html#/{notes}/Unicode
+ // http://www.byond.com/forum/post/2520672
+ input = strip_non_ascii(input)
+ else
+ // Strip Unicode control/space-like chars here exept for line endings (\n,\r) and normal space (0x20)
+ // codes from https://www.compart.com/en/unicode/category/
+ // https://en.wikipedia.org/wiki/Whitespace_character#Unicode
+ var/static/regex/unicode_control_chars = regex(@"[\u0001-\u0009\u000B\u000C\u000E-\u001F\u007F\u0080-\u009F\u00A0\u1680\u180E\u2000-\u200D\u2028\u2029\u202F\u205F\u2060\u3000\uFEFF]", "g")
+ input = unicode_control_chars.Replace(input, "")
+
if(encode)
- // The below \ escapes have a space inserted to attempt to enable unit testing of span class usage. Please do not remove the space.
- //In addition to processing html, html_encode removes byond formatting codes like "\ red", "\ i" and other.
- //It is important to avoid double-encode text, it can "break" quotes and some other characters.
- //Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.)
+ // In addition to processing html, html_encode removes byond formatting codes like "\red", "\i" and other.
+ // It is important to avoid double-encode text, it can "break" quotes and some other characters.
+ // Also, keep in mind that escaped characters don't work in the interface (window titles, lower left corner of the main window, etc.)
input = html_encode(input)
else
- //If not need encode text, simply remove < and >
- //note: we can also remove here byond formatting codes: 0xFF + next byte
+ // If not need encode text, simply remove < and >
+ // note: we can also remove here byond formatting codes: 0xFF + next byte
input = replace_characters(input, list("<"=" ", ">"=" "))
if(trim)
- //Maybe, we need trim text twice? Here and before copytext?
input = trim(input)
return input
-//Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places, after html_encode().
+//Run sanitize(), but remove <, >, " first to prevent displaying them as > < &34; in some places after html_encode().
//Best used for sanitize object names, window titles.
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
-//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
-/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
- return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
+//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitize_safe()!
+/proc/sanitize_safe(input, max_length = MAX_MESSAGE_LEN, encode = TRUE, trim = TRUE, extra = TRUE, ascii_only = FALSE)
+ return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra, ascii_only)
+
+/proc/paranoid_sanitize(t)
+ var/regex/alphanum_only = regex("\[^a-zA-Z0-9# ,.?!:;()]", "g")
+ return alphanum_only.Replace(t, "#")
//Filters out undesirable characters from names
-/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0, var/force_first_letter_uppercase = TRUE)
- if(!input || length(input) > max_length)
+/proc/sanitize_name(input, max_length = MAX_NAME_LEN, allow_numbers = 0, force_first_letter_uppercase = TRUE)
+ if(!input || length_char(input) > max_length)
return //Rejects the input if it is null or if it is longer then the max length allowed
var/number_of_alphanumeric = 0
var/last_char_group = 0
var/output = ""
- for(var/i=1, i<=length(input), i++)
- var/ascii_char = text2ascii(input,i)
- switch(ascii_char)
+ var/char = ""
+ var/bytes_length = length(input)
+ var/ascii_char
+ for(var/i = 1, i <= bytes_length, i += length(char))
+ char = input[i]
+
+ ascii_char = text2ascii(char)
+
+ switch(ascii_char) //todo: unicode names?
// A .. Z
if(65 to 90) //Uppercase Letters
output += ascii2text(ascii_char)
@@ -121,10 +142,7 @@
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
if(last_char_group == 1)
- output = copytext(output,1,length(output)) //removes the last character (in this case a space)
-
- for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai","plating")) //prevents these common metagamey names
- if(cmptext(output,bad_name)) return //(not case sensitive)
+ output = copytext(output, 1, -1) //removes the last character (in this case a space)
return output
@@ -213,11 +231,16 @@
* Text modification
*/
-/proc/replace_characters(var/t,var/list/repl_chars)
+/proc/replace_characters(t, list/repl_chars)
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
return t
+/proc/random_string(length, list/characters)
+ . = ""
+ for (var/i in 1 to length)
+ . += pick(characters)
+
//Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u)
return pad_left(t, u, "0")
@@ -233,13 +256,13 @@
// Adds the required amount of 'character' in front of 'text' to extend the lengh to 'desired_length', if it is shorter
// No consideration are made for a multi-character 'character' input
/proc/pad_left(text, desired_length, character)
- var/padding = generate_padding(length(text), desired_length, character)
+ var/padding = generate_padding(length_char(text), desired_length, character)
return length(padding) ? "[padding][text]" : text
// Adds the required amount of 'character' after 'text' to extend the lengh to 'desired_length', if it is shorter
// No consideration are made for a multi-character 'character' input
/proc/pad_right(text, desired_length, character)
- var/padding = generate_padding(length(text), desired_length, character)
+ var/padding = generate_padding(length_char(text), desired_length, character)
return length(padding) ? "[text][padding]" : text
/proc/generate_padding(current_length, desired_length, character)
@@ -250,32 +273,59 @@
characters += character
return JOINTEXT(characters)
-
-//Returns a string with reserved characters and spaces before the first letter removed
+// Returns a string with reserved characters and spaces before the first letter removed
+// not work for unicode spaces - you should cleanup them first with sanitize()
/proc/trim_left(text)
for (var/i = 1 to length(text))
if (text2ascii(text, i) > 32)
return copytext(text, i)
return ""
-//Returns a string with reserved characters and spaces after the last letter removed
+// Returns a string with reserved characters and spaces after the last letter removed
+// not work for unicode spaces - you should cleanup them first with sanitize()
/proc/trim_right(text)
for (var/i = length(text), i > 0, i--)
if (text2ascii(text, i) > 32)
return copytext(text, 1, i + 1)
+
return ""
-//Returns a string with reserved characters and spaces before the first word and after the last word removed.
+// Returns a string with reserved characters and spaces before the first word and after the last word removed.
+// not work for unicode spaces - you should cleanup them first with sanitize()
/proc/trim(text)
return trim_left(trim_right(text))
//Returns a string with the first element of the string capitalized.
-/proc/capitalize(var/t as text)
- return uppertext(copytext_char(t, 1, 2)) + copytext_char(t, 2)
+/proc/capitalize(text)
+ if(text)
+ text = uppertext(text[1]) + copytext(text, 1 + length(text[1]))
+ return text
+
+//Returns a string with the first element of the every word of the string capitalized.
+/proc/capitalize_words(text)
+ var/list/S = splittext(text, " ")
+ var/list/M = list()
+ for (var/w in S)
+ M += capitalize(w)
+ return jointext(M, " ")
+
+/proc/strip_non_ascii(text)
+ var/static/regex/non_ascii_regex = regex(@"[^\x00-\x7F]+", "g")
+ return non_ascii_regex.Replace(text, "")
+
+/proc/strip_html_simple(t, limit = MAX_MESSAGE_LEN)
+ var/list/strip_chars = list("<",">")
+ t = copytext(t,1,limit)
+ for(var/char in strip_chars)
+ var/index = findtext(t, char)
+ while(index)
+ t = copytext(t, 1, index) + copytext(t, index+1)
+ index = findtext(t, char)
+ return t
//This proc strips html properly, remove < > and all text between
//for complete text sanitizing should be used sanitize()
-/proc/strip_html_properly(var/input)
+/proc/strip_html_properly(input)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
@@ -301,7 +351,7 @@
//This proc fills in all spaces with the "replace" var (* by default) with whatever
//is in the other string at the same spot (assuming it is not a replace char).
//This is used for fingerprints
-/proc/stringmerge(var/text,var/compare,replace = "*")
+/proc/stringmerge_ascii(text, compare,replace = "*")
var/newtext = text
if(length(text) != length(compare))
return 0
@@ -321,7 +371,7 @@
//This proc returns the number of chars of the string that is the character
//This is used for detective work to determine fingerprint completion.
-/proc/stringpercent(var/text,character = "*")
+/proc/stringpercent_ascii(text,character = "*")
if(!text || !character)
return 0
var/count = 0
@@ -331,10 +381,13 @@
count++
return count
-/proc/reverse_text(var/text = "")
+/proc/reverse_text(text = "")
var/new_text = ""
- for(var/i = length(text); i > 0; i--)
- new_text += copytext(text, i, i+1)
+ var/bytes_length = length(text)
+ var/letter = ""
+ for(var/i = 1, i <= bytes_length, i += length(letter))
+ letter = text[i]
+ new_text = letter + new_text
return new_text
//Used in preferences' SetFlavorText and human's set_flavor verb
diff --git a/code/_helpers/unsorted.dm b/code/_helpers/unsorted.dm
index 1a9c5f8eb8a..8f38ebb0a3e 100644
--- a/code/_helpers/unsorted.dm
+++ b/code/_helpers/unsorted.dm
@@ -303,7 +303,7 @@ Turf and target are seperate in case you want to teleport some distance from a t
newname = input(src,"You are \a [role]. Would you like to change your name to something else?", "Name change",oldname) as text
if((world.time-time_passed) > 5 MINUTES)
return //took too long
- newname = sanitizeName(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
+ newname = sanitize_name(newname, ,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
for(var/mob/living/M in global.player_list)
if(M == src)
continue
diff --git a/code/_onclick/hud/movable_screen_objects.dm b/code/_onclick/hud/movable_screen_objects.dm
index fc9120c4dfd..8d024420c4e 100644
--- a/code/_onclick/hud/movable_screen_objects.dm
+++ b/code/_onclick/hud/movable_screen_objects.dm
@@ -8,4 +8,4 @@
var/list/screen_loc_params = splittext(PM["screen-loc"], ",")
var/list/x_data = splittext(screen_loc_params[1], ":")
var/list/y_data = splittext(screen_loc_params[2], ":")
- screen_loc = "LEFT+[x_data[1]]:[text2num(x_data[2])-16],BOTTOM+[y_data[1]]:[text2num(y_data[2])-16]"
+ screen_loc = "LEFT+[x_data[1]]:[text2num(x_data[2])-(1.5 * world.icon_size)],BOTTOM+[y_data[1]]:[text2num(y_data[2])-(1.5 * world.icon_size)]"
diff --git a/code/_onclick/hud/skybox.dm b/code/_onclick/hud/skybox.dm
index fb5546c5a29..9bd447bf94b 100644
--- a/code/_onclick/hud/skybox.dm
+++ b/code/_onclick/hud/skybox.dm
@@ -1,5 +1,4 @@
-#define SKYBOX_MAX_BOUND 736
-
+var/global/const/SKYBOX_DIMENSION = 736 // Largest measurement for icon sides, used for offsets/scaling
/obj/skybox
name = "skybox"
mouse_opacity = 0
@@ -7,13 +6,14 @@
simulated = FALSE
plane = SKYBOX_PLANE
blend_mode = BLEND_MULTIPLY
- var/base_x_dim = 7
- var/base_y_dim = 7
- var/base_offset_x = -224 // -(world.view x dimension * world.icon_size)
- var/base_offset_y = -224 // -(world.view y dimension * world.icon_size)
+ screen_loc = "CENTER,CENTER"
+ transform_animate_time = 0
+ var/static/max_view_dim
+ var/static/const/parallax_bleed_percent = 0.2 // 20% parallax offset when going from x=1 to x=max
/obj/skybox/Initialize()
- screen_loc = "CENTER:[base_offset_x],CENTER:[base_offset_y]"
+ if(!max_view_dim)
+ max_view_dim = CEILING(SKYBOX_DIMENSION / world.icon_size)
. = ..()
/client
@@ -21,36 +21,46 @@
/client/proc/set_skybox_offsets(var/x_dim, var/y_dim)
if(!skybox)
- update_skybox()
- if(skybox)
- skybox.base_x_dim = x_dim
- skybox.base_y_dim = y_dim
- skybox.base_offset_x = -((world.icon_size * skybox.base_x_dim)/2)
- skybox.base_offset_y = -((world.icon_size * skybox.base_y_dim)/2)
-
- // Check if the skybox needs to be scaled to fit large displays.
- var/new_max_tile_bound = max(skybox.base_x_dim, skybox.base_y_dim)
- var/old_max_tile_bound = SKYBOX_MAX_BOUND/world.icon_size
- if(new_max_tile_bound > old_max_tile_bound)
- var/matrix/M = matrix()
- M.Scale(1 + (new_max_tile_bound/old_max_tile_bound))
- skybox.transform = M
- else
- skybox.transform = null
- update_skybox()
+ update_skybox(TRUE)
+ return
+ var/scale_value = 1
+ if(isnum(view))
+ var/target_icon_size = (view * 2 + 1) * world.icon_size
+ scale_value = skybox.parallax_bleed_percent + max((target_icon_size / SKYBOX_DIMENSION), 1)
+ skybox.screen_loc = "CENTER:-[view * world.icon_size],CENTER:-[view * world.icon_size]"
+ else
+ var/target_icon_size = max(x_dim, y_dim) * world.icon_size
+ scale_value = skybox.parallax_bleed_percent + max((target_icon_size / SKYBOX_DIMENSION), 1)
+ skybox.screen_loc = "CENTER:-[round(SKYBOX_DIMENSION * scale_value / 2)],CENTER:-[round(SKYBOX_DIMENSION * scale_value / 2)]"
+ skybox.set_scale(scale_value)
+ update_skybox()
/client/proc/update_skybox(rebuild)
+
+ var/turf/T = get_turf(eye)
+ if(!T)
+ return
+
if(!skybox)
skybox = new()
screen += skybox
- rebuild = 1
- var/turf/T = get_turf(eye)
- if(T)
- if(rebuild)
- skybox.overlays.Cut()
- skybox.overlays += SSskybox.get_skybox(T.z)
- screen |= skybox
- skybox.screen_loc = "CENTER:[skybox.base_offset_x - T.x],CENTER:[skybox.base_offset_y - T.y]"
+ rebuild = TRUE
+
+ if(rebuild)
+ skybox.overlays.Cut()
+ var/image/I = SSskybox.get_skybox(T.z)
+ I.appearance_flags |= PIXEL_SCALE
+ skybox.overlays += I
+ screen |= skybox
+ set_skybox_offsets(last_view_x_dim, last_view_y_dim)
+ return
+
+ if(skybox.parallax_bleed_percent > 0)
+ var/matrix/M = skybox.update_transform() || matrix()
+ var/x_translate = -((T.x/world.maxx)-0.5) * skybox.parallax_bleed_percent * SKYBOX_DIMENSION
+ var/y_translate = -((T.y/world.maxy)-0.5) * skybox.parallax_bleed_percent * SKYBOX_DIMENSION
+ M.Translate(x_translate, y_translate)
+ skybox.transform = M
/mob/Move()
var/old_z = get_z(src)
@@ -63,5 +73,3 @@
. = ..()
if(. && client)
client.update_skybox(old_z != get_z(src))
-
-#undef SKYBOX_MAX_BOUND
\ No newline at end of file
diff --git a/code/controllers/subsystems/statistics.dm b/code/controllers/subsystems/statistics.dm
index 263e9f8d7ac..c6931d5ba1e 100644
--- a/code/controllers/subsystems/statistics.dm
+++ b/code/controllers/subsystems/statistics.dm
@@ -146,14 +146,14 @@ SUBSYSTEM_DEF(statistics)
var/datum/death/death = new
var/area/placeofdeath = get_area(dead)
death.place_of_death = placeofdeath ? placeofdeath.name : "Unknown area"
- death.place_of_death = sanitizeSQL(death.place_of_death)
- death.name = sanitizeSQL(dead.real_name)
- death.key = sanitizeSQL(dead.key)
- death.special_role = sanitizeSQL(dead.mind.get_special_role_name())
- death.job = sanitizeSQL(dead.mind.assigned_role)
+ death.place_of_death = sanitize_sql(death.place_of_death)
+ death.name = sanitize_sql(dead.real_name)
+ death.key = sanitize_sql(dead.key)
+ death.special_role = sanitize_sql(dead.mind.get_special_role_name())
+ death.job = sanitize_sql(dead.mind.assigned_role)
if(dead.last_attacker_)
- death.last_attacker_name = sanitizeSQL(dead.last_attacker_.name)
- death.last_attacker_key = sanitizeSQL(dead.last_attacker_.client.key)
+ death.last_attacker_name = sanitize_sql(dead.last_attacker_.name)
+ death.last_attacker_key = sanitize_sql(dead.last_attacker_.client.key)
death.gender = dead.gender
death.time_of_death = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
death.coords = "[dead.x], [dead.y], [dead.z]"
diff --git a/code/controllers/subsystems/timer.dm b/code/controllers/subsystems/timer.dm
index c329651a5bc..d62ad0af676 100644
--- a/code/controllers/subsystems/timer.dm
+++ b/code/controllers/subsystems/timer.dm
@@ -259,6 +259,12 @@ SUBSYSTEM_DEF(timer)
// Add all timed events from the secondary queue as well
alltimers += second_queue
+ for (var/datum/timedevent/t as anything in alltimers)
+ t.bucket_joined = FALSE
+ t.bucket_pos = -1
+ t.prev = null
+ t.next = null
+
// If there are no timers being tracked by the subsystem,
// there is no need to do any further rebuilding
if (!length(alltimers))
@@ -302,6 +308,7 @@ SUBSYSTEM_DEF(timer)
new_bucket_count++
var/bucket_pos = BUCKET_POS(timer)
timer.bucket_pos = bucket_pos
+ timer.bucket_joined = TRUE
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
if (!bucket_head)
diff --git a/code/datums/movement/mob.dm b/code/datums/movement/mob.dm
index 3bd328bdcb3..d31a94d6e22 100644
--- a/code/datums/movement/mob.dm
+++ b/code/datums/movement/mob.dm
@@ -13,12 +13,15 @@
control_object.set_dir(direction)
// Death handling
-/datum/movement_handler/mob/death/DoMove()
- if(mob.stat != DEAD)
+/datum/movement_handler/mob/death/DoMove(var/direction, var/mob/mover)
+ if(mob != mover || mob.stat != DEAD)
return
+
. = MOVEMENT_HANDLED
+
if(!mob.client)
return
+
mob.ghostize()
// Incorporeal/Ghost movement
diff --git a/code/datums/supplypacks/operations.dm b/code/datums/supplypacks/operations.dm
index 59e82647bbc..cb594f257ea 100644
--- a/code/datums/supplypacks/operations.dm
+++ b/code/datums/supplypacks/operations.dm
@@ -90,7 +90,7 @@
/obj/item/folder/red,
/obj/item/folder/yellow,
/obj/item/hand_labeler,
- /obj/item/tape_roll,
+ /obj/item/ducttape,
/obj/structure/filingcabinet/chestdrawer,
/obj/item/paper_bin)
name = "Office supplies"
diff --git a/code/datums/uplink/devices and tools.dm b/code/datums/uplink/devices and tools.dm
index eb05d6d9a28..788163c0a5c 100644
--- a/code/datums/uplink/devices and tools.dm
+++ b/code/datums/uplink/devices and tools.dm
@@ -15,7 +15,7 @@
name = "Duct Tape"
desc = "A roll of duct tape. changes \"HELP\" into sexy \"mmm\"."
item_cost = 2
- path = /obj/item/tape_roll
+ path = /obj/item/ducttape
/datum/uplink_item/item/tools/money
name = "Operations Funding"
diff --git a/code/datums/vote/custom.dm b/code/datums/vote/custom.dm
index b783c749dea..ba32ded269e 100644
--- a/code/datums/vote/custom.dm
+++ b/code/datums/vote/custom.dm
@@ -12,7 +12,7 @@
return ..()
/datum/vote/custom/setup_vote(mob/creator, automatic)
- question = sanitizeSafe(input(creator,"What is the vote for?") as text|null)
+ question = sanitize_safe(input(creator,"What is the vote for?") as text|null)
if(!question)
abort = 1
return
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index c9c7f3a672e..8542a650d98 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -580,7 +580,11 @@ its easier to just keep the beam vertical.
var/matrix/M = matrix()
M.Scale(icon_scale_x, icon_scale_y)
M.Turn(icon_rotation)
- animate(src, transform = M, transform_animate_time)
+ if(transform_animate_time)
+ animate(src, transform = M, transform_animate_time)
+ else
+ transform = M
+ return transform
// Walks up the loc tree until it finds a loc of the given loc_type
/atom/get_recursive_loc_of_type(var/loc_type)
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 23f8ce81acb..f6a826505bb 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -85,7 +85,7 @@
var/datum/radio_frequency/radio_connection
- var/list/TLV = list()
+ var/list/TLV = list() // stands for Threshold Limit Value, since it handles exposure amounts
var/list/trace_gas = list() //list of other gases that this air alarm is able to detect
var/danger_level = 0
@@ -596,6 +596,8 @@
var/decl/material/mat = GET_DECL(g)
thresholds[++thresholds.len] = list("name" = (mat?.gas_symbol_html || "Other"), "settings" = list())
selected = TLV[g]
+ if(!selected)
+ continue
for(var/i = 1, i <= 4, i++)
thresholds[thresholds.len]["settings"] += list(list("env" = g, "val" = i, "selected" = selected[i]))
diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm
index 93fe942d7a0..235be870e8a 100644
--- a/code/game/machinery/atmo_control.dm
+++ b/code/game/machinery/atmo_control.dm
@@ -222,32 +222,32 @@
return TOPIC_REFRESH
if(href_list["set_input_tag"])
- var/t = sanitizeSafe(input(usr, "Enter the input ID tag.", src.name, src.input_tag), MAX_NAME_LEN)
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ var/t = sanitize_safe(input(usr, "Enter the input ID tag.", src.name, src.input_tag), MAX_NAME_LEN)
+ t = sanitize_safe(t, MAX_NAME_LEN)
if (t)
src.input_tag = t
set_frequency(frequency)
return TOPIC_REFRESH
if(href_list["set_output_tag"])
- var/t = sanitizeSafe(input(usr, "Enter the output ID tag.", src.name, src.output_tag), MAX_NAME_LEN)
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ var/t = sanitize_safe(input(usr, "Enter the output ID tag.", src.name, src.output_tag), MAX_NAME_LEN)
+ t = sanitize_safe(t, MAX_NAME_LEN)
if (t)
src.output_tag = t
set_frequency(frequency)
return TOPIC_REFRESH
if(href_list["set_sensor_tag"])
- var/t = sanitizeSafe(input(usr, "Enter the sensor ID tag.", src.name, src.sensor_tag))
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ var/t = sanitize_safe(input(usr, "Enter the sensor ID tag.", src.name, src.sensor_tag))
+ t = sanitize_safe(t, MAX_NAME_LEN)
if(t)
src.sensor_tag = t
set_frequency(frequency)
return TOPIC_REFRESH
if(href_list["set_sensor_name"])
- var/t = sanitizeSafe(input(usr, "Enter the sensor name.", src.name, src.sensor_name))
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ var/t = sanitize_safe(input(usr, "Enter the sensor name.", src.name, src.sensor_name))
+ t = sanitize_safe(t, MAX_NAME_LEN)
if(t)
src.sensor_name = t
return TOPIC_REFRESH
diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm
index 30fb38ec304..ab0a95dfe61 100644
--- a/code/game/machinery/newscaster.dm
+++ b/code/game/machinery/newscaster.dm
@@ -457,7 +457,7 @@ var/global/list/allCasters = list() //Global list that will contain reference to
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && isturf(src.loc))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["set_channel_name"])
- src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""), MAX_LNAME_LEN)
+ src.channel_name = sanitize_safe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""), MAX_LNAME_LEN)
src.updateUsrDialog()
//src.update_icon()
@@ -560,7 +560,7 @@ var/global/list/allCasters = list() //Global list that will contain reference to
src.updateUsrDialog()
else if(href_list["set_wanted_name"])
- src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""), MAX_LNAME_LEN)
+ src.channel_name = sanitize_safe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""), MAX_LNAME_LEN)
src.updateUsrDialog()
else if(href_list["set_wanted_desc"])
diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm
index 45655481ebb..0bdec2de426 100644
--- a/code/game/machinery/portable_turret.dm
+++ b/code/game/machinery/portable_turret.dm
@@ -798,7 +798,7 @@ var/global/list/turret_icons
return
if(istype(I, /obj/item/pen)) //you can rename turrets like bots!
- var/t = sanitizeSafe(input(user, "Enter new turret name", name, finish_name) as text, MAX_NAME_LEN)
+ var/t = sanitize_safe(input(user, "Enter new turret name", name, finish_name) as text, MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
diff --git a/code/game/machinery/vending/engineering.dm b/code/game/machinery/vending/engineering.dm
index 18d7cd188a9..d09812099b9 100644
--- a/code/game/machinery/vending/engineering.dm
+++ b/code/game/machinery/vending/engineering.dm
@@ -18,7 +18,7 @@
/obj/item/screwdriver = 5,
/obj/item/flashlight/flare/glowstick = 3,
/obj/item/flashlight/flare/glowstick/red = 3,
- /obj/item/tape_roll = 8,
+ /obj/item/ducttape = 8,
/obj/item/clothing/gloves/insulated/cheap = 2
)
contraband = list(
diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm
index b01b245ded0..cb99a477dd2 100644
--- a/code/game/objects/items/bodybag.dm
+++ b/code/game/objects/items/bodybag.dm
@@ -49,7 +49,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ t = sanitize_safe(t, MAX_NAME_LEN)
if (t)
src.SetName("body bag - ")
src.name += t
diff --git a/code/game/objects/items/books/_book.dm b/code/game/objects/items/books/_book.dm
index dd0c5921c13..4652e19a142 100644
--- a/code/game/objects/items/books/_book.dm
+++ b/code/game/objects/items/books/_book.dm
@@ -75,7 +75,7 @@
var/choice = input("What would you like to change?") in list("Title", "Contents", "Author", "Cancel")
switch(choice)
if("Title")
- var/newtitle = reject_bad_text(sanitizeSafe(input("Write a new title:")))
+ var/newtitle = reject_bad_text(sanitize_safe(input("Write a new title:")))
if(!newtitle)
to_chat(usr, "The title is invalid.")
return
diff --git a/code/game/objects/items/books/skill_book.dm b/code/game/objects/items/books/skill_book.dm
index c49dc07331b..c9b67b52726 100644
--- a/code/game/objects/items/books/skill_book.dm
+++ b/code/game/objects/items/books/skill_book.dm
@@ -734,7 +734,7 @@ MEDICAL
return FALSE
/obj/item/book/skill/custom/proc/edit_title(var/obj/item/pen, var/mob/user)
- var/newtitle = reject_bad_text(sanitizeSafe(input(user, "Write a new title:")))
+ var/newtitle = reject_bad_text(sanitize_safe(input(user, "Write a new title:")))
if(!can_write(pen,user))
return
if(!newtitle)
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index 18d0b84c917..0487e0c630e 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -454,7 +454,7 @@
if(loc == user)
var/new_name = input(user, "What would you like to label the tape?", "Tape labeling") as null|text
if(isnull(new_name)) return
- new_name = sanitizeSafe(new_name)
+ new_name = sanitize_safe(new_name)
if(new_name)
SetName("tape - '[new_name]'")
to_chat(user, "You label the tape '[new_name]'.")
diff --git a/code/game/objects/items/robot/robot_frame.dm b/code/game/objects/items/robot/robot_frame.dm
index 0ca8db0428c..34cd2723f1c 100644
--- a/code/game/objects/items/robot/robot_frame.dm
+++ b/code/game/objects/items/robot/robot_frame.dm
@@ -138,7 +138,7 @@
qdel(src)
else if(istype(W, /obj/item/pen))
- var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
+ var/t = sanitize_safe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(t && (in_range(src, user) || loc == user))
created_name = t
else
diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm
index c264c004195..6220bb4f6e5 100644
--- a/code/game/objects/items/robot/robot_upgrades.dm
+++ b/code/game/objects/items/robot/robot_upgrades.dm
@@ -71,7 +71,7 @@
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user)
- heldname = sanitizeSafe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
+ heldname = sanitize_safe(input(user, "Enter new robot name", "Robot Reclassification", heldname), MAX_NAME_LEN)
/obj/item/borg/upgrade/rename/action(var/mob/living/silicon/robot/R)
if(..()) return 0
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index 4108969fc3c..e4a7e7d4612 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -70,7 +70,7 @@
use(2)
return
- if (istype(W, /obj/item/tape_roll))
+ if (istype(W, /obj/item/ducttape))
var/obj/item/stack/medical/splint/ghetto/new_splint = new(user.loc)
new_splint.dropInto(loc)
new_splint.add_fingerprint(user)
diff --git a/code/game/objects/items/weapons/cards_ids.dm b/code/game/objects/items/weapons/cards_ids.dm
index 1a18081f94f..1617f2e0543 100644
--- a/code/game/objects/items/weapons/cards_ids.dm
+++ b/code/game/objects/items/weapons/cards_ids.dm
@@ -39,7 +39,7 @@
if(signed_by)
to_chat(user, SPAN_WARNING("\The [src] has already been signed."))
else
- var/signature = sanitizeSafe(input("What do you want to sign the card as?", "Union Card") as text, MAX_NAME_LEN)
+ var/signature = sanitize_safe(input("What do you want to sign the card as?", "Union Card") as text, MAX_NAME_LEN)
if(signature && !signed_by && !user.incapacitated() && Adjacent(user))
signed_by = signature
user.visible_message(SPAN_NOTICE("\The [user] signs \the [src] with a flourish."))
diff --git a/code/game/objects/items/weapons/cards_ids_syndicate.dm b/code/game/objects/items/weapons/cards_ids_syndicate.dm
index 351db1c3965..3b1bd79d618 100644
--- a/code/game/objects/items/weapons/cards_ids_syndicate.dm
+++ b/code/game/objects/items/weapons/cards_ids_syndicate.dm
@@ -110,13 +110,13 @@
to_chat(user, "Age has been set to '[age]'.")
. = 1
if("Prefix")
- var/new_prefix = sanitizeSafe(input(user,"What title prefix would you like to put on this card?","Agent Card Prefix", age) as text, MAX_NAME_LEN)
+ var/new_prefix = sanitize_safe(input(user,"What title prefix would you like to put on this card?","Agent Card Prefix", age) as text, MAX_NAME_LEN)
if(!isnull(new_prefix) && CanUseTopic(user, state))
formal_name_prefix = new_prefix
to_chat(user, "Title prefix has been set to '[formal_name_prefix]'.")
. = 1
if("Suffix")
- var/new_suffix = sanitizeSafe(input(user,"What title suffix would you like to put on this card?","Agent Card Suffix", age) as text, MAX_NAME_LEN)
+ var/new_suffix = sanitize_safe(input(user,"What title suffix would you like to put on this card?","Agent Card Suffix", age) as text, MAX_NAME_LEN)
if(!isnull(new_suffix) && CanUseTopic(user, state))
formal_name_suffix = new_suffix
to_chat(user, "Title suffix has been set to '[formal_name_suffix]'.")
@@ -172,7 +172,7 @@
to_chat(user, "Fingerprint hash changed to '[new_fingerprint_hash]'.")
. = 1
if("Name")
- var/new_name = sanitizeName(input(user,"What name would you like to put on this card?","Agent Card Name", registered_name) as null|text, allow_numbers=TRUE)
+ var/new_name = sanitize_name(input(user,"What name would you like to put on this card?","Agent Card Name", registered_name) as null|text, allow_numbers=TRUE)
if(!isnull(new_name) && CanUseTopic(user, state))
src.registered_name = new_name
to_chat(user, "Name changed to '[new_name]'.")
diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm
index bda5fb96f1d..964674d2738 100644
--- a/code/game/objects/items/weapons/implants/implantcase.dm
+++ b/code/game/objects/items/weapons/implants/implantcase.dm
@@ -46,7 +46,7 @@
return
if((!in_range(src, usr) && loc != user))
return
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ t = sanitize_safe(t, MAX_NAME_LEN)
if(t)
SetName("glass case - '[t]'")
desc = "A case containing \a [t] implant."
diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm
index cca5951971e..eeab7c82918 100644
--- a/code/game/objects/items/weapons/storage/belt.dm
+++ b/code/game/objects/items/weapons/storage/belt.dm
@@ -266,9 +266,9 @@
/obj/item/radio/headset,
/obj/item/megaphone,
/obj/item/taperoll,
+ /obj/item/magnetic_tape,
/obj/item/holowarrant,
/obj/item/radio,
- /obj/item/tape,
/obj/item/pen,
/obj/item/stamp,
/obj/item/stack/package_wrap,
@@ -311,6 +311,8 @@
/obj/item/flash,
/obj/item/telebaton,
/obj/item/taperecorder,
+ /obj/item/magnetic_tape,
+ /obj/item/taperoll,
/obj/item/folder,
/obj/item/paper,
/obj/item/clipboard,
@@ -320,10 +322,8 @@
/obj/item/modular_computer/pda,
/obj/item/radio/headset,
/obj/item/megaphone,
- /obj/item/taperoll,
/obj/item/holowarrant,
/obj/item/radio,
- /obj/item/tape,
/obj/item/pen,
/obj/item/stamp,
/obj/item/stack/package_wrap,
@@ -352,16 +352,14 @@
/obj/item/forensics/sample/print,
/obj/item/forensics/sample/fibers,
/obj/item/taperecorder,
- /obj/item/tape,
+ /obj/item/magnetic_tape,
/obj/item/clothing/gloves/latex,
/obj/item/clothing/gloves/forensic,
/obj/item/folder,
/obj/item/paper,
/obj/item/forensics/sample_kit,
- /obj/item/camera,
- /obj/item/taperecorder,
- /obj/item/tape
- )
+ /obj/item/camera
+ )
/obj/item/storage/belt/holster/machete
name = "machete belt"
@@ -387,9 +385,9 @@
/obj/item/radio/beacon,
/obj/item/pinpointer/radio,
/obj/item/taperecorder,
- /obj/item/tape,
+ /obj/item/magnetic_tape,
/obj/item/scanner/gas
- )
+ )
can_holster = list(/obj/item/hatchet/machete)
sound_in = 'sound/effects/holster/sheathin.ogg'
sound_out = 'sound/effects/holster/sheathout.ogg'
diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm
index 741361d5696..4a0dda00b01 100644
--- a/code/game/objects/items/weapons/storage/bible.dm
+++ b/code/game/objects/items/weapons/storage/bible.dm
@@ -108,7 +108,7 @@
set desc = "Click to rename your bible."
if(!renamed)
- var/input = sanitizeSafe(input("What do you want to rename your bible to? You can only do this once.", ,""), MAX_NAME_LEN)
+ var/input = sanitize_safe(input("What do you want to rename your bible to? You can only do this once.", ,""), MAX_NAME_LEN)
var/mob/M = usr
if(src && input && !M.stat && in_range(M,src))
diff --git a/code/game/objects/items/weapons/tape.dm b/code/game/objects/items/weapons/tape.dm
index dfd5709968c..dfc32c4a9b5 100644
--- a/code/game/objects/items/weapons/tape.dm
+++ b/code/game/objects/items/weapons/tape.dm
@@ -1,18 +1,18 @@
-/obj/item/tape_roll
+/obj/item/ducttape
name = "duct tape"
desc = "A roll of sticky tape. Possibly for taping ducks... or was that ducts?"
icon = 'icons/obj/bureaucracy.dmi'
icon_state = "taperoll"
w_class = ITEM_SIZE_SMALL
-/obj/item/tape_roll/Initialize()
+/obj/item/ducttape/Initialize()
. = ..()
set_extension(src, /datum/extension/tool, list(
TOOL_BONE_GEL = TOOL_QUALITY_MEDIOCRE,
TOOL_SUTURES = TOOL_QUALITY_BAD
))
-/obj/item/tape_roll/attack(var/mob/living/carbon/human/H, var/mob/user)
+/obj/item/ducttape/attack(var/mob/living/carbon/human/H, var/mob/user)
if(istype(H))
if(user.zone_sel.selecting == BP_EYES)
@@ -83,7 +83,7 @@
return ..()
return 1
-/obj/item/tape_roll/proc/stick(var/obj/item/W, mob/user)
+/obj/item/ducttape/proc/stick(var/obj/item/W, mob/user)
if(!istype(W, /obj/item/paper) || istype(W, /obj/item/paper/sticky) || !user.unEquip(W))
return
var/obj/item/ducttape/tape = new(get_turf(src))
diff --git a/code/game/objects/random/random.dm b/code/game/objects/random/random.dm
index d219d4506d4..4e483267f42 100644
--- a/code/game/objects/random/random.dm
+++ b/code/game/objects/random/random.dm
@@ -131,7 +131,7 @@
/obj/item/storage/belt/utility = 2,
/obj/item/storage/belt/utility/atmostech = 1,
/obj/random/tool = 5,
- /obj/item/tape_roll = 2)
+ /obj/item/ducttape = 2)
/obj/random/medical
name = "Random Medical equipment"
diff --git a/code/game/objects/structures/bookcase.dm b/code/game/objects/structures/bookcase.dm
index 6a465b62d40..311ec958699 100644
--- a/code/game/objects/structures/bookcase.dm
+++ b/code/game/objects/structures/bookcase.dm
@@ -34,7 +34,7 @@ var/global/list/station_bookcases = list()
if(istype(O, /obj/item/book) && user.unEquip(O, src))
update_icon()
else if(istype(O, /obj/item/pen))
- var/newname = sanitizeSafe(input("What would you like to title this bookshelf?"), MAX_NAME_LEN)
+ var/newname = sanitize_safe(input("What would you like to title this bookshelf?"), MAX_NAME_LEN)
if(!newname)
return
else
diff --git a/code/game/objects/structures/crematorium.dm b/code/game/objects/structures/crematorium.dm
index 3b41a43dcc7..1ea52f85486 100644
--- a/code/game/objects/structures/crematorium.dm
+++ b/code/game/objects/structures/crematorium.dm
@@ -92,7 +92,7 @@
/obj/structure/crematorium/attackby(P, mob/user)
if(istype(P, /obj/item/pen))
- var/new_label = sanitizeSafe(input(user, "What would you like the label to be?", capitalize(name), null) as text|null, MAX_NAME_LEN)
+ var/new_label = sanitize_safe(input(user, "What would you like the label to be?", capitalize(name), null) as text|null, MAX_NAME_LEN)
if((!Adjacent(user) || loc == user))
return
diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm
index 583b8ed67ca..8c9d6830f27 100644
--- a/code/game/objects/structures/door_assembly.dm
+++ b/code/game/objects/structures/door_assembly.dm
@@ -103,7 +103,7 @@
/obj/structure/door_assembly/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/pen))
- var/t = sanitizeSafe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
+ var/t = sanitize_safe(input(user, "Enter the name for the door.", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
diff --git a/code/game/objects/structures/doors/_door.dm b/code/game/objects/structures/doors/_door.dm
index 219260cb900..ffdaa951296 100644
--- a/code/game/objects/structures/doors/_door.dm
+++ b/code/game/objects/structures/doors/_door.dm
@@ -1,19 +1,20 @@
-#define MATERIAL_DOOR_SOUND_VOLUME 25
/obj/structure/door
name = "door"
icon = 'icons/obj/doors/material_doors.dmi'
icon_state = "metal"
hitsound = 'sound/weapons/genhit.ogg'
- material_alteration = MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_COLOR | MAT_FLAG_ALTERATION_COLOR
+ material_alteration = MAT_FLAG_ALTERATION_NAME | MAT_FLAG_ALTERATION_DESC | MAT_FLAG_ALTERATION_COLOR
maxhealth = 50
density = TRUE
anchored = TRUE
opacity = TRUE
+ var/datum/lock/lock
+
var/has_window = FALSE
var/changing_state = FALSE
var/icon_base
- var/datum/lock/lock
+ var/door_sound_volume = 25
/obj/structure/door/Initialize()
. = ..()
@@ -23,15 +24,11 @@
lock = new /datum/lock(src, lock)
if(!icon_base)
icon_base = material.door_icon_base
- changing_state = FALSE
- update_nearby_tiles(need_rebuild=TRUE)
-
- if(material.luminescence)
+ update_icon()
+ update_nearby_tiles(need_rebuild = TRUE)
+ if(material?.luminescence)
set_light(material.luminescence, 0.5, material.color)
- if(material.opacity < 0.5)
- alpha = 180
-
/obj/structure/door/Destroy()
update_nearby_tiles()
QDEL_NULL(lock)
@@ -42,25 +39,22 @@
/obj/structure/door/on_update_icon()
..()
- if(density)
- icon_state = "[icon_base]"
- else
- icon_state = "[icon_base]open"
+ icon_state = "[icon_base][!density ? "open" : ""]"
/obj/structure/door/proc/post_change_state()
update_nearby_tiles()
update_icon()
changing_state = FALSE
-/obj/structure/door/attack_hand(var/mob/user)
+/obj/structure/door/attack_hand(mob/user)
return density ? open() : close()
/obj/structure/door/proc/close()
set waitfor = 0
if(!can_close())
return FALSE
- flick("[icon_base]closing", src)
- playsound(src.loc, material.dooropen_noise, MATERIAL_DOOR_SOUND_VOLUME, 1)
+ flick("[icon_base]_closing", src)
+ playsound(src, material.dooropen_noise, door_sound_volume, 1)
changing_state = TRUE
sleep(1 SECOND)
@@ -73,8 +67,8 @@
set waitfor = 0
if(!can_open())
return FALSE
- flick("[icon_base]opening", src)
- playsound(src.loc, material.dooropen_noise, MATERIAL_DOOR_SOUND_VOLUME, 1)
+ flick("[icon_base]_opening", src)
+ playsound(src, material.dooropen_noise, door_sound_volume, 1)
changing_state = TRUE
sleep(1 SECOND)
@@ -112,7 +106,6 @@
return FALSE
/obj/structure/door/attackby(obj/item/I, mob/user)
-
add_fingerprint(user, 0, I)
if((user.a_intent == I_HURT && I.force) || istype(I, /obj/item/stack/material))
@@ -149,7 +142,7 @@
return !opacity
return !density
-/obj/structure/door/CanFluidPass(var/coming_from)
+/obj/structure/door/CanFluidPass(coming_from)
return !density
/obj/structure/door/Bumped(atom/AM)
@@ -212,4 +205,3 @@
/obj/structure/door/shuttle
material = /decl/material/solid/metal/steel
-#undef MATERIAL_DOOR_SOUND_VOLUME
\ No newline at end of file
diff --git a/code/game/objects/structures/inflatable.dm b/code/game/objects/structures/inflatable.dm
index 53786b0fa9b..7612d769a05 100644
--- a/code/game/objects/structures/inflatable.dm
+++ b/code/game/objects/structures/inflatable.dm
@@ -120,7 +120,7 @@
add_fingerprint(user)
/obj/structure/inflatable/can_repair_with(obj/item/tool)
- . = istype(tool, /obj/item/tape_roll) && (health < maxhealth)
+ . = istype(tool, /obj/item/ducttape) && (health < maxhealth)
/obj/structure/inflatable/handle_repair(mob/user, obj/item/tool)
if(taped)
diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm
index e025bcef129..32954e5304d 100644
--- a/code/game/objects/structures/morgue.dm
+++ b/code/game/objects/structures/morgue.dm
@@ -82,7 +82,7 @@
/obj/structure/morgue/attackby(P, mob/user)
if(istype(P, /obj/item/pen))
- var/new_label = sanitizeSafe(input(user, "What would you like the label to be?", capitalize(name), null) as text|null, MAX_NAME_LEN)
+ var/new_label = sanitize_safe(input(user, "What would you like the label to be?", capitalize(name), null) as text|null, MAX_NAME_LEN)
if((!Adjacent(user) || loc == user))
return
diff --git a/code/game/objects/structures/racks.dm b/code/game/objects/structures/racks.dm
index 138f4111329..750f3a95a2d 100644
--- a/code/game/objects/structures/racks.dm
+++ b/code/game/objects/structures/racks.dm
@@ -12,6 +12,7 @@
parts_amount = 2
parts_type = /obj/item/stack/material/strut
density = TRUE
+ anchored = TRUE
/obj/structure/rack/Initialize()
..()
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index b581bd99b64..972ddb3732b 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -255,7 +255,7 @@
var/response = input(user, "New Window ID:", name, id) as null | text
if (isnull(response) || user.incapacitated() || !user.Adjacent(src) || user.get_active_hand() != W)
return
- id = sanitizeSafe(response, MAX_NAME_LEN)
+ id = sanitize_safe(response, MAX_NAME_LEN)
to_chat(user, SPAN_NOTICE("The new ID of \the [src] is [id]."))
return
else if(istype(W, /obj/item/gun/energy/plasmacutter) && anchored)
@@ -568,10 +568,10 @@
/obj/machinery/button/windowtint/attackby(obj/item/W, mob/user)
if(isMultitool(W))
- var/t = sanitizeSafe(input(user, "Enter the ID for the button.", name, id_tag), MAX_NAME_LEN)
+ var/t = sanitize_safe(input(user, "Enter the ID for the button.", name, id_tag), MAX_NAME_LEN)
if(!CanPhysicallyInteract(user))
return TRUE
- t = sanitizeSafe(t, MAX_NAME_LEN)
+ t = sanitize_safe(t, MAX_NAME_LEN)
if (t)
id_tag = t
to_chat(user, SPAN_NOTICE("The new ID of the button is '[id_tag]'."))
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index a2cf8496a1e..e5b8825fc0d 100644
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -130,7 +130,7 @@
/turf/proc/get_movement_delay(var/travel_dir)
. = get_base_movement_delay()
if(weather)
- . += weather.get_movement_delay(travel_dir)
+ . += weather.get_movement_delay(return_air(), travel_dir)
/turf/attack_hand(mob/user)
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 5b92362faf2..d9ae9117131 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -94,6 +94,7 @@ var/global/list/admin_verbs_admin = list(
/datum/admins/proc/show_aspects
)
var/global/list/admin_verbs_ban = list(
+ /client/proc/DB_ban_panel,
/client/proc/unban_panel,
/client/proc/jobbans
)
@@ -661,7 +662,7 @@ var/global/list/admin_verbs_mod = list(
var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in global.silicon_mob_list
if(!S) return
- var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
+ var/new_name = sanitize_safe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
if(new_name && new_name != S.real_name)
log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
S.fully_replace_character_name(new_name)
diff --git a/code/modules/admin/DB ban/functions.dm b/code/modules/admin/dbban/functions.dm
similarity index 99%
rename from code/modules/admin/DB ban/functions.dm
rename to code/modules/admin/dbban/functions.dm
index 5cde2396817..ee761246959 100644
--- a/code/modules/admin/DB ban/functions.dm
+++ b/code/modules/admin/dbban/functions.dm
@@ -294,7 +294,7 @@
/client/proc/DB_ban_panel()
set category = "Admin"
set name = "Banning Panel"
- set desc = "Edit admin permissions"
+ set desc = "Allow edit existing bans or create new ones."
if(!holder)
return
diff --git a/code/modules/admin/ticket.dm b/code/modules/admin/ticket.dm
index 7bf115e2a6c..fa3df76106d 100644
--- a/code/modules/admin/ticket.dm
+++ b/code/modules/admin/ticket.dm
@@ -19,7 +19,7 @@ var/global/list/ticket_panels = list()
id = tickets.len
opened_time = world.time
if(establish_db_connection())
- var/sql_ckey = sanitizeSQL(owner.ckey)
+ var/sql_ckey = sanitize_sql(owner.ckey)
var/DBQuery/ticket_query = dbcon.NewQuery("INSERT INTO `erro_admin_tickets`(`ckey`, `round`, `inround_id`, `status`, `open_date`) VALUES ('[sql_ckey]', '[game_id]', [src.id], 'OPEN', NOW());")
ticket_query.Execute()
addtimer(CALLBACK(src, .proc/timeoutcheck), 5 MINUTES)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index bbbbbbcd74b..1d517ffd923 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -1293,7 +1293,7 @@
src.access_news_network()
else if(href_list["ac_set_channel_name"])
- src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
+ src.admincaster_feed_channel.channel_name = sanitize_safe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.access_news_network()
else if(href_list["ac_set_channel_lock"])
@@ -1321,7 +1321,7 @@
var/list/available_channels = list()
for(var/datum/feed_channel/F in news_network.network_channels)
available_channels += F.channel_name
- src.admincaster_feed_channel.channel_name = sanitizeSafe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
+ src.admincaster_feed_channel.channel_name = sanitize_safe(input(usr, "Choose receiving Feed Channel", "Network Channel Handler") in available_channels )
src.access_news_network()
else if(href_list["ac_set_new_message"])
diff --git a/code/modules/admin/verbs/adminhelp.dm b/code/modules/admin/verbs/adminhelp.dm
index 311001f84fc..981cae52c3c 100644
--- a/code/modules/admin/verbs/adminhelp.dm
+++ b/code/modules/admin/verbs/adminhelp.dm
@@ -111,7 +111,7 @@ var/global/list/adminhelp_ignored_words = list("unknown","the","a","an","of","mo
update_ticket_panels()
if(establish_db_connection())
- var/sql_text = "HELP [src.ckey]: [sanitizeSQL(original_msg)]\n"
+ var/sql_text = "HELP [src.ckey]: [sanitize_sql(original_msg)]\n"
var/DBQuery/ticket_text = dbcon.NewQuery("UPDATE `erro_admin_tickets` SET `text` = '[sql_text]' WHERE `round` = '[game_id]' AND `inround_id` = '[ticket.id]';")
ticket_text.Execute()
diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm
index cc865fd9490..da9195800ca 100644
--- a/code/modules/admin/verbs/adminpm.dm
+++ b/code/modules/admin/verbs/adminpm.dm
@@ -153,7 +153,7 @@
update_ticket_panels()
if(establish_db_connection())
- var/sql_text = "[src.ckey] -> [C.ckey]: [sanitizeSQL(msg)]\n"
+ var/sql_text = "[src.ckey] -> [C.ckey]: [sanitize_sql(msg)]\n"
var/DBQuery/ticket_text = dbcon.NewQuery("UPDATE `erro_admin_tickets` SET `text` = CONCAT(COALESCE(text,''), '[sql_text]') WHERE `round` = '[game_id]' AND `inround_id` = '[ticket.id]';")
ticket_text.Execute()
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index cc89531a4e8..93de1928dce 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -92,7 +92,7 @@
return 0
var/obj/item/paicard/card = new(T)
var/mob/living/silicon/pai/pai = new(card)
- pai.SetName(sanitizeSafe(input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text))
+ pai.SetName(sanitize_safe(input(choice, "Enter your pAI name:", "pAI Name", "Personal AI") as text))
pai.real_name = pai.name
pai.key = choice.key
card.setPersonality(pai)
diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm
index 992d4840c11..0bb545ff9c6 100644
--- a/code/modules/admin/verbs/randomverbs.dm
+++ b/code/modules/admin/verbs/randomverbs.dm
@@ -561,7 +561,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
to_chat(src, "Only administrators may use this command.")
return
var/input = sanitize(input(usr, "Please enter anything you want. Anything. Serious.", "What?", "") as message|null, extra = 0)
- var/customname = sanitizeSafe(input(usr, "Pick a title for the report.", "Title") as text|null)
+ var/customname = sanitize_safe(input(usr, "Pick a title for the report.", "Title") as text|null)
if(!input)
return
if(!customname)
diff --git a/code/modules/client/preference_setup/background/02_culture.dm b/code/modules/client/preference_setup/background/02_culture.dm
index c40f9dff1be..852a634db24 100644
--- a/code/modules/client/preference_setup/background/02_culture.dm
+++ b/code/modules/client/preference_setup/background/02_culture.dm
@@ -62,7 +62,7 @@
if(pref.cultural_info[TAG_CULTURE])
var/decl/cultural_info/check = GET_DECL(pref.cultural_info[TAG_CULTURE])
if(check)
- pref.real_name = check.sanitize_name(pref.real_name, pref.species)
+ pref.real_name = check.sanitize_cultural_name(pref.real_name, pref.species)
if(!pref.real_name)
pref.real_name = check.get_random_name(preference_mob(), pref.gender)
diff --git a/code/modules/client/preference_setup/general/01_basic.dm b/code/modules/client/preference_setup/general/01_basic.dm
index 5aeea735ff5..eb256a0d4bf 100644
--- a/code/modules/client/preference_setup/general/01_basic.dm
+++ b/code/modules/client/preference_setup/general/01_basic.dm
@@ -95,7 +95,7 @@
if (!isnull(raw_name) && CanUseTopic(user))
var/decl/cultural_info/check = GET_DECL(pref.cultural_info[TAG_CULTURE])
- var/new_name = check.sanitize_name(raw_name, pref.species)
+ var/new_name = check.sanitize_cultural_name(raw_name, pref.species)
if(filter_block_message(user, new_name))
return TOPIC_NOACTION
diff --git a/code/modules/client/preference_setup/global/03_pai.dm b/code/modules/client/preference_setup/global/03_pai.dm
index 9c2541558a4..86bccf57f94 100644
--- a/code/modules/client/preference_setup/global/03_pai.dm
+++ b/code/modules/client/preference_setup/global/03_pai.dm
@@ -52,7 +52,7 @@
. = TOPIC_REFRESH
switch(href_list["option"])
if("name")
- t = sanitizeName(input(user, "Enter a name for your pAI", "Global Preference", candidate.name) as text|null, MAX_NAME_LEN, 1)
+ t = sanitize_name(input(user, "Enter a name for your pAI", "Global Preference", candidate.name) as text|null, MAX_NAME_LEN, 1)
if(t && CanUseTopic(user))
candidate.name = t
if("desc")
diff --git a/code/modules/clothing/spacesuits/breaches.dm b/code/modules/clothing/spacesuits/breaches.dm
index 292bc8ffe73..9dfa71691f7 100644
--- a/code/modules/clothing/spacesuits/breaches.dm
+++ b/code/modules/clothing/spacesuits/breaches.dm
@@ -228,7 +228,7 @@
repair_breaches(BRUTE, 3, user)
return
- else if(istype(W, /obj/item/tape_roll))
+ else if(istype(W, /obj/item/ducttape))
var/datum/breach/target_breach //Target the largest unpatched breach.
for(var/datum/breach/B in breaches)
if(B.patched)
diff --git a/code/modules/clothing/spacesuits/rig/suits/light.dm b/code/modules/clothing/spacesuits/rig/suits/light.dm
index 7cb2acf9d08..d328b7af5d6 100644
--- a/code/modules/clothing/spacesuits/rig/suits/light.dm
+++ b/code/modules/clothing/spacesuits/rig/suits/light.dm
@@ -130,7 +130,7 @@
var/mob/M = usr
if(!M.mind) return 0
if(M.incapacitated()) return 0
- var/input = sanitizeSafe(input("What do you want to name your suit?", "Rename suit"), MAX_NAME_LEN)
+ var/input = sanitize_safe(input("What do you want to name your suit?", "Rename suit"), MAX_NAME_LEN)
if(src && input && !M.incapacitated() && in_range(M,src))
if(!findtext(input, "the", 1, 4))
input = "\improper [input]"
@@ -147,7 +147,7 @@
var/mob/M = usr
if(!M.mind) return 0
if(M.incapacitated()) return 0
- var/input = sanitizeSafe(input("Please describe your voidsuit in 128 letters or less.", "write description"), MAX_DESC_LEN)
+ var/input = sanitize_safe(input("Please describe your voidsuit in 128 letters or less.", "write description"), MAX_DESC_LEN)
if(src && input && !M.incapacitated() && in_range(M,src))
desc = input
to_chat(M, "Suit description succesful!")
diff --git a/code/modules/crafting/_crafting_holder.dm b/code/modules/crafting/_crafting_holder.dm
index 4e86dc9980d..5af8fd51747 100644
--- a/code/modules/crafting/_crafting_holder.dm
+++ b/code/modules/crafting/_crafting_holder.dm
@@ -45,7 +45,7 @@
/obj/item/crafting_holder/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/pen))
- var/new_label = sanitizeSafe(input(user, "What do you wish to label this assembly?", "Assembly Labelling", label_name), MAX_NAME_LEN)
+ var/new_label = sanitize_safe(input(user, "What do you wish to label this assembly?", "Assembly Labelling", label_name), MAX_NAME_LEN)
if(new_label && !user.incapacitated() && W.loc == user && user.Adjacent(src) && !QDELETED(src))
to_chat(user, SPAN_NOTICE("You label \the [src] with '[new_label]'."))
label_name = new_label
diff --git a/code/modules/crafting/_crafting_stage.dm b/code/modules/crafting/_crafting_stage.dm
index 6469b0f6a77..e2283ad694a 100644
--- a/code/modules/crafting/_crafting_stage.dm
+++ b/code/modules/crafting/_crafting_stage.dm
@@ -92,7 +92,7 @@
/decl/crafting_stage/tape
consume_completion_trigger = FALSE
- completion_trigger_type = /obj/item/tape_roll
+ completion_trigger_type = /obj/item/ducttape
/decl/crafting_stage/pipe
completion_trigger_type = /obj/item/pipe
diff --git a/code/modules/culture_descriptor/_culture.dm b/code/modules/culture_descriptor/_culture.dm
index 7690b7ac453..d3d46b64bf2 100644
--- a/code/modules/culture_descriptor/_culture.dm
+++ b/code/modules/culture_descriptor/_culture.dm
@@ -51,8 +51,8 @@
return _language.get_random_name(gender)
return capitalize(pick(gender==FEMALE ? global.first_names_female : global.first_names_male)) + " " + capitalize(pick(global.last_names))
-/decl/cultural_info/proc/sanitize_name(var/new_name)
- return sanitizeName(new_name)
+/decl/cultural_info/proc/sanitize_cultural_name(new_name)
+ return sanitize_name(new_name)
/decl/cultural_info/proc/get_description(var/verbose = TRUE)
LAZYSET(., "details", jointext(get_text_details(), "
"))
diff --git a/code/modules/culture_descriptor/culture/cultures_human.dm b/code/modules/culture_descriptor/culture/cultures_human.dm
index 14176a7ed69..9c70a00a896 100644
--- a/code/modules/culture_descriptor/culture/cultures_human.dm
+++ b/code/modules/culture_descriptor/culture/cultures_human.dm
@@ -23,5 +23,5 @@
/decl/language/sign
)
-/decl/cultural_info/culture/synthetic/sanitize_name(new_name)
- return sanitizeName(new_name, allow_numbers = TRUE)
+/decl/cultural_info/culture/synthetic/sanitize_cultural_name(new_name)
+ return sanitize_name(new_name, allow_numbers = TRUE)
diff --git a/code/modules/fabrication/designs/general/designs_general.dm b/code/modules/fabrication/designs/general/designs_general.dm
index 7f9234ca2ad..a0c6cbbf25d 100644
--- a/code/modules/fabrication/designs/general/designs_general.dm
+++ b/code/modules/fabrication/designs/general/designs_general.dm
@@ -34,8 +34,8 @@
/datum/fabricator_recipe/taperecorder
path = /obj/item/taperecorder/empty
-/datum/fabricator_recipe/tape
- path = /obj/item/tape
+/datum/fabricator_recipe/taperecorder_tape
+ path = /obj/item/magnetic_tape
/datum/fabricator_recipe/tube/large
path = /obj/item/light/tube/large
diff --git a/code/modules/ghosttrap/trap.dm b/code/modules/ghosttrap/trap.dm
index ef0b95ebc14..2728becaa1c 100644
--- a/code/modules/ghosttrap/trap.dm
+++ b/code/modules/ghosttrap/trap.dm
@@ -89,7 +89,7 @@
if(!can_set_own_name)
return
- var/newname = sanitizeSafe(input(target,"Enter a name, or leave blank for the default name.", "Name change",target.real_name) as text, MAX_NAME_LEN)
+ var/newname = sanitize_safe(input(target,"Enter a name, or leave blank for the default name.", "Name change",target.real_name) as text, MAX_NAME_LEN)
if (newname && newname != "")
target.real_name = newname
target.SetName(target.real_name)
diff --git a/code/modules/integrated_electronics/core/assemblies.dm b/code/modules/integrated_electronics/core/assemblies.dm
index e32bf103579..fdf0eab8016 100644
--- a/code/modules/integrated_electronics/core/assemblies.dm
+++ b/code/modules/integrated_electronics/core/assemblies.dm
@@ -273,7 +273,7 @@
if(!check_interactivity(M))
return
var/input = input("What do you want to name this?", "Rename", src.name) as null|text
- input = sanitizeName(input,allow_numbers = 1)
+ input = sanitize_name(input,allow_numbers = 1)
if(!check_interactivity(M))
return
if(!QDELETED(src) && input)
diff --git a/code/modules/integrated_electronics/core/integrated_circuit.dm b/code/modules/integrated_electronics/core/integrated_circuit.dm
index 1a9ae6f0f0a..f40b4a26518 100644
--- a/code/modules/integrated_electronics/core/integrated_circuit.dm
+++ b/code/modules/integrated_electronics/core/integrated_circuit.dm
@@ -112,7 +112,7 @@ a creative player the means to solve many problems. Circuits are held inside an
if(!check_interactivity(M))
return
- var/input = sanitizeName(input(M, "What do you want to name this?", "Rename", name) as null|text, allow_numbers = TRUE)
+ var/input = sanitize_name(input(M, "What do you want to name this?", "Rename", name) as null|text, allow_numbers = TRUE)
if(check_interactivity(M))
if(!input)
input = name
diff --git a/code/modules/integrated_electronics/core/saved_circuits.dm b/code/modules/integrated_electronics/core/saved_circuits.dm
index 33cd4d38c3f..8954b3217e5 100644
--- a/code/modules/integrated_electronics/core/saved_circuits.dm
+++ b/code/modules/integrated_electronics/core/saved_circuits.dm
@@ -52,7 +52,7 @@
var/init_name = initial(name)
// Validate name
if(component_params["name"])
- sanitizeName(component_params["name"],allow_numbers=TRUE)
+ sanitize_name(component_params["name"],allow_numbers=TRUE)
// Validate input values
if(component_params["inputs"])
var/list/loaded_inputs = component_params["inputs"]
@@ -138,7 +138,7 @@
/obj/item/electronic_assembly/proc/verify_save(list/assembly_params)
// Validate name and color
if(assembly_params["name"])
- if(sanitizeName(assembly_params["name"], allow_numbers = TRUE) != assembly_params["name"])
+ if(sanitize_name(assembly_params["name"], allow_numbers = TRUE) != assembly_params["name"])
return "Bad assembly name."
if(assembly_params["desc"])
if(sanitize(assembly_params["desc"]) != assembly_params["desc"])
diff --git a/code/modules/keybindings/bindings_atom.dm b/code/modules/keybindings/bindings_atom.dm
index 3e83eeb0be4..527e5a11598 100644
--- a/code/modules/keybindings/bindings_atom.dm
+++ b/code/modules/keybindings/bindings_atom.dm
@@ -18,10 +18,8 @@
if(!config.allow_diagonal_movement)
if(movement_dir & user.last_move_dir_pressed)
movement_dir = user.last_move_dir_pressed
- else if (movement_dir == NORTHEAST || movement_dir == NORTHWEST)
- movement_dir = NORTH
- else if (movement_dir == SOUTHEAST || movement_dir == SOUTHWEST)
- movement_dir = SOUTH
+ else
+ movement_dir = FIRST_DIR(movement_dir)
if(movement_dir) //If we're not moving, don't compensate, as byond will auto-fill dir otherwise
movement_dir = turn(movement_dir, -dir2angle(user.dir)) //By doing this we ensure that our input direction is offset by the client (camera) direction
diff --git a/code/modules/keybindings/mob.dm b/code/modules/keybindings/mob.dm
index cb66eeb935d..5e19e0f97ad 100644
--- a/code/modules/keybindings/mob.dm
+++ b/code/modules/keybindings/mob.dm
@@ -137,6 +137,6 @@
full_name = "Move Down"
description = "Makes you go down"
-/datum/keybinding/mob/move_up/down(client/user)
+/datum/keybinding/mob/move_down/down(client/user)
var/mob/M = user.mob
- M.SelfMove(DOWN)
+ M.move_down()
diff --git a/code/modules/materials/_materials.dm b/code/modules/materials/_materials.dm
index f528a278e5e..a1275b3565d 100644
--- a/code/modules/materials/_materials.dm
+++ b/code/modules/materials/_materials.dm
@@ -48,7 +48,7 @@ INITIALIZE_IMMEDIATE(/obj/effect/gas_overlay)
DOORS
stone
metal
- resin
+ plastic
wood
*/
diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm
index e51ac679a09..b4e70e70177 100644
--- a/code/modules/mob/living/carbon/human/update_icons.dm
+++ b/code/modules/mob/living/carbon/human/update_icons.dm
@@ -244,7 +244,11 @@ Please contact me on #coderbus IRC. ~Carn x
else
M.Scale(desired_scale_x, desired_scale_y)
M.Translate(0, 16*(desired_scale_y-1))
- animate(src, transform = M, time = transform_animate_time)
+ if(transform_animate_time)
+ animate(src, transform = M, time = transform_animate_time)
+ else
+ transform = M
+ return transform
var/global/list/damage_icon_parts = list()
diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm
index ad11c22e560..da9259ba3f4 100644
--- a/code/modules/mob/living/silicon/pai/recruit.dm
+++ b/code/modules/mob/living/silicon/pai/recruit.dm
@@ -65,7 +65,7 @@ var/global/datum/paiController/paiController // Global handler for pAI candida
switch(option)
if("name")
- t = sanitizeSafe(input("Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN)
+ t = sanitize_safe(input("Enter a name for your pAI", "pAI Name", candidate.name) as text, MAX_NAME_LEN)
if(t)
candidate.name = t
if("desc")
@@ -94,7 +94,7 @@ var/global/datum/paiController/paiController // Global handler for pAI candida
candidate.savefile_load(usr)
//In case people have saved unsanitized stuff.
if(candidate.name)
- candidate.name = sanitizeSafe(candidate.name, MAX_NAME_LEN)
+ candidate.name = sanitize_safe(candidate.name, MAX_NAME_LEN)
if(candidate.description)
candidate.description = sanitize(candidate.description)
if(candidate.role)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index 716e49ae3cb..6a5c8735375 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -326,7 +326,7 @@
spawn(0)
var/newname
- newname = sanitizeName(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN, allow_numbers = 1)
+ newname = sanitize_name(input(src,"You are a robot. Enter a name, or leave blank for the default name.", "Name change","") as text, MAX_NAME_LEN, allow_numbers = 1)
if (newname)
custom_name = newname
diff --git a/code/modules/mob/living/silicon/robot/robot_items.dm b/code/modules/mob/living/silicon/robot/robot_items.dm
index 2ee77af149c..31261bd5f2d 100644
--- a/code/modules/mob/living/silicon/robot/robot_items.dm
+++ b/code/modules/mob/living/silicon/robot/robot_items.dm
@@ -206,7 +206,7 @@
/obj/item/pen/robopen/proc/RenamePaper(mob/user, obj/item/paper/paper)
if ( !user || !paper )
return
- var/n_name = sanitizeSafe(input(user, "What would you like to label the paper?", "Paper Labelling", null) as text, 32)
+ var/n_name = sanitize_safe(input(user, "What would you like to label the paper?", "Paper Labelling", null) as text, 32)
if ( !user || !paper )
return
diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm
index 12563ab518e..6a03420ecf4 100644
--- a/code/modules/mob/living/simple_animal/hostile/carp.dm
+++ b/code/modules/mob/living/simple_animal/hostile/carp.dm
@@ -45,9 +45,10 @@
/mob/living/simple_animal/hostile/carp/on_update_icon()
. = ..()
color = carp_color
- var/image/I = image(icon, "[icon_state]-eyes")
- I.appearance_flags |= RESET_COLOR
- add_overlay(I)
+ if(check_state_in_icon("[icon_state]-eyes", icon))
+ var/image/I = image(icon, "[icon_state]-eyes")
+ I.appearance_flags |= RESET_COLOR
+ add_overlay(I)
/mob/living/simple_animal/hostile/carp/Process_Spacemove()
return 1 //No drifting in space for space carp! //original comments do not steal
diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/exoplanet.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/exoplanet.dm
index cdedbc02ef3..24614b53cdf 100644
--- a/code/modules/mob/living/simple_animal/hostile/retaliate/exoplanet.dm
+++ b/code/modules/mob/living/simple_animal/hostile/retaliate/exoplanet.dm
@@ -54,7 +54,7 @@
for(var/obj/effect/overmap/visitable/sector/exoplanet/E)
if(src in E.animals)
var/newname = input("What do you want to name this species?", "Species naming", E.get_random_species_name()) as text|null
- newname = sanitizeName(newname, allow_numbers = TRUE, force_first_letter_uppercase = FALSE)
+ newname = sanitize_name(newname, allow_numbers = TRUE, force_first_letter_uppercase = FALSE)
if(newname && CanInteract(usr, global.conscious_topic_state))
if(E.rename_species(type, newname))
to_chat(usr,"This species will be known from now on as '[newname]'.")
diff --git a/code/modules/mob/login.dm b/code/modules/mob/login.dm
index 7909b011cfa..73e9a16cdb4 100644
--- a/code/modules/mob/login.dm
+++ b/code/modules/mob/login.dm
@@ -85,10 +85,12 @@
if(eyeobj)
eyeobj.possess(src)
- client.update_skybox(1)
events_repository.raise_event(/decl/observ/logged_in, src)
hud_reset(TRUE)
+
+ client.update_skybox(1)
+
if(machine)
machine.on_user_login(src)
diff --git a/code/modules/mob/observer/eye/blueprints_eye.dm b/code/modules/mob/observer/eye/blueprints_eye.dm
index ffbb8715edc..9bbd541ac19 100644
--- a/code/modules/mob/observer/eye/blueprints_eye.dm
+++ b/code/modules/mob/observer/eye/blueprints_eye.dm
@@ -52,7 +52,7 @@
. = ..()
/mob/observer/eye/blueprints/proc/create_area()
- var/area_name = sanitizeSafe(input("New area name:","Area Creation", ""), MAX_NAME_LEN)
+ var/area_name = sanitize_safe(input("New area name:","Area Creation", ""), MAX_NAME_LEN)
if(!area_name || !length(area_name))
return
if(length(area_name) > 50)
@@ -89,7 +89,7 @@
if(!check_modification_validity())
return
var/prevname = A.name
- var/new_area_name = sanitizeSafe(input("Edit area name:","Area Editing", prevname), MAX_NAME_LEN)
+ var/new_area_name = sanitize_safe(input("Edit area name:","Area Editing", prevname), MAX_NAME_LEN)
if(!new_area_name || !LAZYLEN(new_area_name) || new_area_name==prevname)
return
if(length(new_area_name) > 50)
diff --git a/code/modules/modular_computers/file_system/programs/command/card.dm b/code/modules/modular_computers/file_system/programs/command/card.dm
index d47d9727888..ee2d1ae7109 100644
--- a/code/modules/modular_computers/file_system/programs/command/card.dm
+++ b/code/modules/modular_computers/file_system/programs/command/card.dm
@@ -206,7 +206,7 @@
if(computer && can_run(user, 1))
var/static/regex/hash_check = regex(@"^[0-9a-fA-F]{32}$")
if(href_list["name"])
- var/temp_name = sanitizeName(input("Enter name.", "Name", id_card.registered_name),allow_numbers=TRUE)
+ var/temp_name = sanitize_name(input("Enter name.", "Name", id_card.registered_name),allow_numbers=TRUE)
if(temp_name && CanUseTopic(user))
id_card.registered_name = temp_name
id_card.formal_name_suffix = initial(id_card.formal_name_suffix)
diff --git a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
index b046ffd5b01..995e5504edf 100644
--- a/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
+++ b/code/modules/modular_computers/file_system/programs/generic/ntnrc_client.dm
@@ -70,7 +70,7 @@
if(href_list["PRG_newchannel"])
. = 1
var/mob/living/user = usr
- var/channel_title = sanitizeSafe(input(user,"Enter channel name or leave blank to cancel:"), 64)
+ var/channel_title = sanitize_safe(input(user,"Enter channel name or leave blank to cancel:"), 64)
if(!channel_title)
return
var/datum/chat_conversation/C = new/datum/chat_conversation(network)
diff --git a/code/modules/multiz/movement.dm b/code/modules/multiz/movement.dm
index f63402c8eab..e003543788e 100644
--- a/code/modules/multiz/movement.dm
+++ b/code/modules/multiz/movement.dm
@@ -8,11 +8,14 @@
set name = "Move Down"
set category = "IC"
- SelfMove(DOWN)
+ move_down()
/mob/proc/move_up()
SelfMove(UP)
+/mob/proc/move_down()
+ SelfMove(DOWN)
+
/mob/living/carbon/human/move_up()
var/turf/old_loc = loc
..()
diff --git a/code/modules/organs/ailments/_ailment.dm b/code/modules/organs/ailments/_ailment.dm
index 0439d84f672..0d5c501b7ec 100644
--- a/code/modules/organs/ailments/_ailment.dm
+++ b/code/modules/organs/ailments/_ailment.dm
@@ -3,7 +3,7 @@
var/timer_id // Current timer waiting to proc next symptom message.
var/min_time = 2 MINUTES // Minimum time between symptom messages.
var/max_time = 5 MINUTES // Maximum time between symptom messages.
- var/category = /datum/ailment // Used similar to heirarchies, if category == type then the
+ var/category = /datum/ailment // Used similar to hierarchies, if category == type then the
// ailment is a category and won't be applied to organs.
var/obj/item/organ/organ // Organ associated with the ailment (ailment is in organ.ailments list).
@@ -13,16 +13,18 @@
var/specific_organ_subtype = /obj/item/organ/external // What organ subtype, if any, does the ailment apply to?
// Treatment types
- var/treated_by_item_type // What item type can be used in physical interaction to cure the ailment?
- var/treated_by_item_cost = 1 // If treated_by_item_type is a stack, how many should be used?
- var/treated_by_reagent_type // What reagent type cures this ailment when metabolized?
- var/treated_by_reagent_dosage = 1 // What is the minimum dosage for a reagent to cure this ailment?
+ var/treated_by_item_type // What item type can be used in physical interaction to cure the ailment?
+ var/treated_by_item_cost = 1 // If treated_by_item_type is a stack, how many should be used?
+ var/treated_by_reagent_type // What reagent type cures this ailment when metabolized?
+ var/treated_by_reagent_dosage = 1 // What is the minimum dosage for a reagent to cure this ailment?
+ var/treated_by_chem_effect // What chemical effect cures this ailment?
+ var/treated_by_chem_effect_strength = 1 // How strong must the chemical effect be to cure this ailment?
// Fluff strings
var/initial_ailment_message = "Your $ORGAN$ doesn't feel quite right..." // Shown in New()
- var/third_person_treatement_message = "$USER$ treats $TARGET$'s ailment with $ITEM$." // Shown when treating other with an item.
- var/self_treatement_message = "$USER$ treats $USER_HIS$ ailment with $ITEM$." // Shown when treating self with an item.
- var/medication_treatment_message = "Your ailment abates." // Shown when treated by a metabolized reagent.
+ var/third_person_treatment_message = "$USER$ treats $TARGET$'s ailment with $ITEM$." // Shown when treating other with an item.
+ var/self_treatment_message = "$USER$ treats $USER_HIS$ ailment with $ITEM$." // Shown when treating self with an item.
+ var/medication_treatment_message = "Your ailment abates." // Shown when treated by a metabolized reagent or CE_X effect.
var/manual_diagnosis_string /* ex: "$USER_HIS$ $ORGAN$ has something wrong with it" */ // Shown when grab-diagnosed by a doctor. Leave null to be undiagnosable.
var/scanner_diagnosis_string /* ex: "Significant swelling" */ // Shown on the handheld and body scanners. Leave null to be undiagnosable.
@@ -31,7 +33,7 @@
if(_organ)
organ = _organ
if(organ.owner)
- to_chat(organ.owner, SPAN_WARNING(capitalize(replacetext(initial_ailment_message, "$ORGAN$", organ.name))))
+ to_chat(organ.owner, SPAN_WARNING(replace_tokens(initial_ailment_message)))
begin_ailment_event()
/datum/ailment/proc/can_apply_to(var/obj/item/organ/_organ)
@@ -83,13 +85,13 @@
/datum/ailment/proc/was_treated_by_item(var/obj/item/treatment, var/mob/user, var/mob/target)
var/show_message
- if(user == target && self_treatement_message)
- show_message = self_treatement_message
+ if(user == target && self_treatment_message)
+ show_message = self_treatment_message
else
- show_message = third_person_treatement_message
+ show_message = third_person_treatment_message
if(!show_message)
return
-
+
user.visible_message(SPAN_NOTICE(replace_tokens(show_message, treatment, user, target)))
if(istype(treatment, /obj/item/stack))
@@ -100,7 +102,11 @@
/datum/ailment/proc/treated_by_medication(var/decl/material/reagent, var/dosage)
return treated_by_reagent_type && istype(reagent, treated_by_reagent_type) && dosage >= treated_by_reagent_dosage
-/datum/ailment/proc/was_treated_by_medication(var/datum/reagents/dose)
- dose.remove_reagent(treated_by_reagent_type, treated_by_reagent_dosage)
- to_chat(organ.owner, SPAN_NOTICE(capitalize(replacetext(medication_treatment_message, "$ORGAN$", organ.name))))
+/datum/ailment/proc/was_treated_by_medication(var/datum/reagents/source, var/reagent_type)
+ source.remove_reagent(reagent_type, treated_by_reagent_dosage)
+ to_chat(organ.owner, SPAN_NOTICE(replace_tokens(medication_treatment_message)))
+ qdel(src)
+
+/datum/ailment/proc/was_treated_by_chem_effect()
+ to_chat(organ.owner, SPAN_NOTICE(replace_tokens(medication_treatment_message)))
qdel(src)
diff --git a/code/modules/organs/ailments/ailments_medical.dm b/code/modules/organs/ailments/ailments_medical.dm
index f4c3d091ec9..dfad9fe167e 100644
--- a/code/modules/organs/ailments/ailments_medical.dm
+++ b/code/modules/organs/ailments/ailments_medical.dm
@@ -4,8 +4,8 @@
/datum/ailment/head/headache
name = "headache"
- treated_by_reagent_type = /decl/material/liquid/painkillers
- treated_by_reagent_dosage = 1
+ treated_by_chem_effect = CE_PAINKILLER
+ treated_by_chem_effect_strength = 25
medication_treatment_message = "Your headache grudgingly fades away."
/datum/ailment/head/headache/on_ailment_event()
@@ -55,8 +55,8 @@
name = "sprained limb"
applies_to_organ = list(BP_L_ARM, BP_R_ARM, BP_L_HAND, BP_R_HAND, BP_L_LEG, BP_R_LEG, BP_L_FOOT, BP_R_FOOT)
treated_by_item_type = /obj/item/stack/medical/bruise_pack
- third_person_treatement_message = "$USER$ wraps $TARGET$'s sprained $ORGAN$ in $ITEM$."
- self_treatement_message = "$USER$ wraps $USER_HIS$ sprained $ORGAN$ in $ITEM$."
+ third_person_treatment_message = "$USER$ wraps $TARGET$'s sprained $ORGAN$ in $ITEM$."
+ self_treatment_message = "$USER$ wraps $USER_HIS$ sprained $ORGAN$ in $ITEM$."
manual_diagnosis_string = "$USER_HIS$ $ORGAN$ is visibly swollen."
/datum/ailment/sprain/on_ailment_event()
@@ -69,14 +69,14 @@
/datum/ailment/rash
name = "rash"
treated_by_item_type = /obj/item/stack/medical/ointment
- third_person_treatement_message = "$USER$ salves $TARGET$'s rash-stricken $ORGAN$ with $ITEM$."
- self_treatement_message = "$USER$ salves $USER_HIS$ rash-stricken $ORGAN$ with $ITEM$."
+ third_person_treatment_message = "$USER$ salves $TARGET$'s rash-stricken $ORGAN$ with $ITEM$."
+ self_treatment_message = "$USER$ salves $USER_HIS$ rash-stricken $ORGAN$ with $ITEM$."
manual_diagnosis_string = "$USER_HIS$ $ORGAN$ is covered in a bumpy red rash."
/datum/ailment/rash/on_ailment_event()
to_chat(organ.owner, SPAN_DANGER("A bright red rash on your [organ.name] itches distractingly."))
organ.owner.setClickCooldown(3)
-
+
/datum/ailment/coughing
name = "coughing"
specific_organ_subtype = /obj/item/organ/internal/lungs
@@ -97,7 +97,8 @@
/datum/ailment/sore_joint
name = "sore joint"
- treated_by_reagent_type = /decl/material/liquid/painkillers
+ treated_by_chem_effect = CE_PAINKILLER
+ treated_by_chem_effect_strength = 25
medication_treatment_message = "The dull pulse of pain in your $ORGAN$ fades away."
manual_diagnosis_string = "$USER_HIS$ $ORGAN$ is visibly swollen."
@@ -115,7 +116,8 @@
/datum/ailment/sore_back
name = "sore back"
applies_to_organ = list(BP_CHEST)
- treated_by_reagent_type = /decl/material/liquid/painkillers
+ treated_by_chem_effect = CE_PAINKILLER
+ treated_by_chem_effect_strength = 25
medication_treatment_message = "You straighten, finding that your back is no longer hurting."
/datum/ailment/sore_back/on_ailment_event()
@@ -135,7 +137,7 @@
/datum/ailment/cramps
name = "cramps"
- treated_by_reagent_type = /decl/material/liquid/painkillers
+ treated_by_reagent_type = /decl/material/liquid/sedatives // in lieu of muscle relaxants
medication_treatment_message = "The painful cramping in your $ORGAN$ relaxes."
/datum/ailment/cramps/on_ailment_event()
diff --git a/code/modules/organs/ailments/faults/_fault.dm b/code/modules/organs/ailments/faults/_fault.dm
index 563948419c3..589d3759664 100644
--- a/code/modules/organs/ailments/faults/_fault.dm
+++ b/code/modules/organs/ailments/faults/_fault.dm
@@ -3,6 +3,6 @@
category = /datum/ailment/fault
treated_by_item_type = /obj/item/stack/nanopaste
treated_by_item_cost = 3
- third_person_treatement_message = "$USER$ patches $TARGET$'s faulty $ORGAN$ with $ITEM$."
- self_treatement_message = "$USER$ patches $USER_HIS$'s faulty $ORGAN$ with $ITEM$."
+ third_person_treatment_message = "$USER$ patches $TARGET$'s faulty $ORGAN$ with $ITEM$."
+ self_treatment_message = "$USER$ patches $USER_HIS$'s faulty $ORGAN$ with $ITEM$."
initial_ailment_message = "Damage to your $ORGAN$ has caused a fault..."
diff --git a/code/modules/organs/external/head.dm b/code/modules/organs/external/head.dm
index df089d2b120..68d285a4d98 100644
--- a/code/modules/organs/external/head.dm
+++ b/code/modules/organs/external/head.dm
@@ -52,7 +52,7 @@
to_chat(penman, "There is no room left to write on [head_name]!")
return
- var/graffiti = sanitizeSafe(input(penman, "Enter a message to write on [head_name]:") as text|null, MAX_NAME_LEN)
+ var/graffiti = sanitize_safe(input(penman, "Enter a message to write on [head_name]:") as text|null, MAX_NAME_LEN)
if(graffiti)
if(!target.Adjacent(penman))
to_chat(penman, "[head_name] is too far away.")
diff --git a/code/modules/organs/internal/brain.dm b/code/modules/organs/internal/brain.dm
index 643a2ee62fa..be8614a0c3d 100644
--- a/code/modules/organs/internal/brain.dm
+++ b/code/modules/organs/internal/brain.dm
@@ -211,7 +211,7 @@
/obj/item/organ/internal/brain/proc/brain_damage_callback(var/damage) //Confuse them as a somewhat uncommon aftershock. Side note: Only here so a spawn isn't used. Also, for the sake of a unique timer.
if(!QDELETED(owner))
- to_chat(owner, SPAN_NOTICE("I can't remember which way is forward..."))
+ to_chat(owner, SPAN_NOTICE(FONT_HUGE("I can't remember which way is forward...")))
ADJ_STATUS(owner, STAT_CONFUSE, damage)
/obj/item/organ/internal/brain/proc/handle_disabilities()
diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm
index 0886e9a8a8a..da44e42a4ad 100644
--- a/code/modules/organs/organ.dm
+++ b/code/modules/organs/organ.dm
@@ -146,30 +146,22 @@
if(owner && length(ailments))
for(var/datum/ailment/ailment in ailments)
- if(!ailment.treated_by_reagent_type)
- continue
- var/treated
- var/datum/reagents/bloodstr_reagents = owner.get_injected_reagents()
- var/datum/reagents/ingested_reagents = owner.get_ingested_reagents()
- if(bloodstr_reagents)
- if(REAGENT_VOLUME(bloodstr_reagents, ailment.treated_by_reagent_type) >= ailment.treated_by_reagent_dosage)
- treated = bloodstr_reagents
- else if(REAGENT_VOLUME(owner.reagents, ailment.treated_by_reagent_type) >= ailment.treated_by_reagent_dosage)
- treated = owner.reagents
- else if(REAGENT_VOLUME(ingested_reagents, ailment.treated_by_reagent_type) >= ailment.treated_by_reagent_dosage)
- treated = ingested_reagents
- else
- var/datum/reagents/inhaled_reagents = owner.get_inhaled_reagents()
- if(inhaled_reagents && REAGENT_VOLUME(inhaled_reagents, ailment.treated_by_reagent_type) >= ailment.treated_by_reagent_dosage)
- treated = inhaled_reagents
-
- if(treated)
- ailment.was_treated_by_medication(treated)
+ handle_ailment(ailment)
//check if we've hit max_damage
if(damage >= max_damage)
die()
+/obj/item/organ/proc/handle_ailment(var/datum/ailment/ailment)
+ if(ailment.treated_by_reagent_type)
+ for(var/datum/reagents/source in list(owner.get_inhaled_reagents(), owner.get_injected_reagents(), owner.reagents, owner.get_ingested_reagents()))
+ for(var/reagent_type in source.reagent_volumes)
+ if(ailment.treated_by_medication(source.reagent_volumes[reagent_type]))
+ ailment.was_treated_by_medication(source, reagent_type)
+ return
+ if(ailment.treated_by_chem_effect && owner.has_chemical_effect(ailment.treated_by_chem_effect, ailment.treated_by_chem_effect_strength))
+ ailment.was_treated_by_chem_effect()
+
/obj/item/organ/proc/is_preserved()
if(istype(loc,/obj/item/organ))
var/obj/item/organ/O = loc
diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm
index d353b49915a..aa0c0e51a54 100644
--- a/code/modules/paperwork/folders.dm
+++ b/code/modules/paperwork/folders.dm
@@ -36,7 +36,7 @@
to_chat(user, "You put the [W] into \the [src].")
update_icon()
else if(istype(W, /obj/item/pen))
- var/n_name = sanitizeSafe(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text, MAX_NAME_LEN)
+ var/n_name = sanitize_safe(input(usr, "What would you like to label the folder?", "Folder Labelling", null) as text, MAX_NAME_LEN)
if((loc == usr && usr.stat == 0))
SetName("folder[(n_name ? text("- '[n_name]'") : null)]")
return
diff --git a/code/modules/paperwork/handlabeler.dm b/code/modules/paperwork/handlabeler.dm
index c91a77a0645..6210655fa26 100644
--- a/code/modules/paperwork/handlabeler.dm
+++ b/code/modules/paperwork/handlabeler.dm
@@ -56,7 +56,7 @@
if(mode)
to_chat(user, "You turn on \the [src].")
//Now let them chose the text.
- var/str = sanitizeSafe(input(user,"Label text?","Set label",""), MAX_LNAME_LEN)
+ var/str = sanitize_safe(input(user,"Label text?","Set label",""), MAX_LNAME_LEN)
if(!str || !length(str))
to_chat(user, "Invalid text.")
return
diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm
index 0e6e2e69309..62c8c556bf3 100644
--- a/code/modules/paperwork/paper.dm
+++ b/code/modules/paperwork/paper.dm
@@ -105,7 +105,7 @@
if((MUTATION_CLUMSY in usr.mutations) && prob(50))
to_chat(usr, "You cut yourself on the paper.")
return
- var/n_name = sanitizeSafe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN)
+ var/n_name = sanitize_safe(input(usr, "What would you like to label the paper?", "Paper Labelling", null) as text, MAX_NAME_LEN)
// We check loc one level up, so we can rename in clipboards and such. See also: /obj/item/photo/rename()
if(!n_name || !CanInteract(usr, global.deep_inventory_topic_state))
@@ -165,9 +165,9 @@
while(locid < MAX_FIELDS)
var/istart = 0
if(links)
- istart = findtext(info_links, "", laststart)
+ istart = findtext_char(info_links, "", laststart)
else
- istart = findtext(info, "", laststart)
+ istart = findtext_char(info, "", laststart)
if(istart==0)
return // No field found with matching id
@@ -177,20 +177,20 @@
if(locid == id)
var/iend = 1
if(links)
- iend = findtext(info_links, "", istart)
+ iend = findtext_char(info_links, "", istart)
else
- iend = findtext(info, "", istart)
+ iend = findtext_char(info, "", istart)
textindex = iend
break
if(links)
- var/before = copytext(info_links, 1, textindex)
- var/after = copytext(info_links, textindex)
+ var/before = copytext_char(info_links, 1, textindex)
+ var/after = copytext_char(info_links, textindex)
info_links = before + text + after
else
- var/before = copytext(info, 1, textindex)
- var/after = copytext(info, textindex)
+ var/before = copytext_char(info, 1, textindex)
+ var/after = copytext_char(info, textindex)
info = before + text + after
updateinfolinks()
@@ -360,8 +360,8 @@
if(user.mind && (user.mind.assigned_role == "Clown"))
clown = 1
- if(istype(P, /obj/item/tape_roll))
- var/obj/item/tape_roll/tape = P
+ if(istype(P, /obj/item/ducttape))
+ var/obj/item/ducttape/tape = P
tape.stick(src, user)
return
diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm
index 1d15d3728e4..e27719a8d35 100644
--- a/code/modules/paperwork/paper_bundle.dm
+++ b/code/modules/paperwork/paper_bundle.dm
@@ -46,7 +46,7 @@
to_chat(user, "You add \the [W.name] to [(src.name == "paper bundle") ? "the paper bundle" : src.name].")
qdel(W)
else
- if(istype(W, /obj/item/tape_roll))
+ if(istype(W, /obj/item/ducttape))
return 0
if(istype(W, /obj/item/pen))
show_browser(user, "", "window=[name]") //Closes the dialog
@@ -185,7 +185,7 @@
set category = "Object"
set src in usr
- var/n_name = sanitizeSafe(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text, MAX_NAME_LEN)
+ var/n_name = sanitize_safe(input(usr, "What would you like to label the bundle?", "Bundle Labelling", null) as text, MAX_NAME_LEN)
if((loc == usr || loc.loc && loc.loc == usr) && usr.stat == 0)
SetName("[(n_name ? text("[n_name]") : "paper")]")
add_fingerprint(usr)
diff --git a/code/modules/paperwork/paper_sticky.dm b/code/modules/paperwork/paper_sticky.dm
index 2756fc1412b..ea745dc6064 100644
--- a/code/modules/paperwork/paper_sticky.dm
+++ b/code/modules/paperwork/paper_sticky.dm
@@ -42,7 +42,7 @@
if(writing_space <= 0)
to_chat(user, SPAN_WARNING("There is no room left on \the [src]."))
return
- var/text = sanitizeSafe(input("What would you like to write?") as text, writing_space)
+ var/text = sanitize_safe(input("What would you like to write?") as text, writing_space)
if(!text || thing.loc != user || (!Adjacent(user) && loc != user) || user.incapacitated())
return
user.visible_message(SPAN_NOTICE("\The [user] jots a note down on \the [src]."))
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index c6da65ce65a..1631ff94409 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -92,7 +92,7 @@ var/global/photo_count = 0
set category = "Object"
set src in usr
- var/n_name = sanitizeSafe(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text, MAX_NAME_LEN)
+ var/n_name = sanitize_safe(input(usr, "What would you like to label the photo?", "Photo Labelling", null) as text, MAX_NAME_LEN)
//loc.loc check is for making possible renaming photos in clipboards
if(!n_name || !CanInteract(usr, global.deep_inventory_topic_state))
return
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index 881ef6dfd22..98a72f48766 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -99,7 +99,7 @@ var/global/list/all_apcs = list()
initial_access = list(access_engine_equip)
clicksound = "switch"
layer = ABOVE_WINDOW_LAYER
- var/needs_powerdown_sound
+ var/powered_down = FALSE
var/area/area
var/areastring = null
var/shorted = 0
@@ -226,8 +226,9 @@ var/global/list/all_apcs = list()
/obj/machinery/power/apc/proc/energy_fail(var/duration)
if(emp_hardened)
return
+ if(!failure_timer && duration)
+ playsound(src, 'sound/machines/apc_nopower.ogg', 75, 0)
failure_timer = max(failure_timer, round(duration))
- playsound(src, 'sound/machines/apc_nopower.ogg', 75, 0)
/obj/machinery/power/apc/proc/init_round_start()
var/obj/item/stock_parts/power/terminal/term = get_component_of_type(/obj/item/stock_parts/power/terminal)
@@ -611,12 +612,13 @@ var/global/list/all_apcs = list()
area.power_change()
var/obj/item/cell/cell = get_cell()
- if(!cell || cell.charge <= 0)
- if(needs_powerdown_sound == TRUE)
+ if(!powered_down)
+ if(!cell || cell.charge <= 0)
playsound(src, 'sound/machines/apc_nopower.ogg', 75, 0)
- needs_powerdown_sound = FALSE
- else
- needs_powerdown_sound = TRUE
+ powered_down = TRUE
+
+ else if(cell?.charge > 0)
+ powered_down = FALSE
/obj/machinery/power/apc/proc/isWireCut(var/wireIndex)
return wires.IsIndexCut(wireIndex)
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index c1d944b6199..b51ba41107c 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -87,7 +87,7 @@
return
var/tmp_label = ""
- var/label_text = sanitizeSafe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN)
+ var/label_text = sanitize_safe(input(user, "Inscribe some text into \the [initial(BB.name)]","Inscription",tmp_label), MAX_NAME_LEN)
if(length(label_text) > 20)
to_chat(user, "The inscription can be at most 20 characters long.")
else if(!label_text)
diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm
index 357c5182e4d..be35db04849 100644
--- a/code/modules/reagents/Chemistry-Machinery.dm
+++ b/code/modules/reagents/Chemistry-Machinery.dm
@@ -167,7 +167,7 @@
var/amount_per_pill = reagents.total_volume/count
if (amount_per_pill > 30) amount_per_pill = 30
- var/name = sanitizeSafe(input(usr,"Name:","Name your pill!","[reagents.get_primary_reagent_name()] ([amount_per_pill]u)"), MAX_NAME_LEN)
+ var/name = sanitize_safe(input(usr,"Name:","Name your pill!","[reagents.get_primary_reagent_name()] ([amount_per_pill]u)"), MAX_NAME_LEN)
if(!CanInteract(user, state))
return
@@ -226,7 +226,7 @@
. = JOINTEXT(.)
/obj/machinery/chem_master/proc/create_bottle(mob/user)
- var/name = sanitizeSafe(input(usr,"Name:","Name your bottle!",reagents.get_primary_reagent_name()), MAX_NAME_LEN)
+ var/name = sanitize_safe(input(usr,"Name:","Name your bottle!",reagents.get_primary_reagent_name()), MAX_NAME_LEN)
var/obj/item/chems/glass/bottle/P = new/obj/item/chems/glass/bottle(loc)
if(!name)
name = reagents.get_primary_reagent_name()
diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm
index 7db9020a940..c52b7a48641 100644
--- a/code/modules/reagents/reagent_containers.dm
+++ b/code/modules/reagents/reagent_containers.dm
@@ -60,7 +60,7 @@
/obj/item/chems/attackby(obj/item/W, mob/user)
if(istype(W, /obj/item/pen) || istype(W, /obj/item/flashlight/pen))
- var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
+ var/tmp_label = sanitize_safe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
if(length(tmp_label) > 10)
to_chat(user, "The label can be at most 10 characters long.")
else
diff --git a/code/modules/reagents/reagent_containers/condiment.dm b/code/modules/reagents/reagent_containers/condiment.dm
index 30256ef845d..ed346a004c8 100644
--- a/code/modules/reagents/reagent_containers/condiment.dm
+++ b/code/modules/reagents/reagent_containers/condiment.dm
@@ -33,7 +33,7 @@
/obj/item/chems/condiment/attackby(var/obj/item/W, var/mob/user)
if(istype(W, /obj/item/pen) || istype(W, /obj/item/flashlight/pen))
- var/tmp_label = sanitizeSafe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
+ var/tmp_label = sanitize_safe(input(user, "Enter a label for [name]", "Label", label_text), MAX_NAME_LEN)
if(tmp_label == label_text)
return
if(length(tmp_label) > 10)
diff --git a/code/modules/reagents/reagent_containers/drinks/bottle.dm b/code/modules/reagents/reagent_containers/drinks/bottle.dm
index 6fecaaec658..b9fc59a144f 100644
--- a/code/modules/reagents/reagent_containers/drinks/bottle.dm
+++ b/code/modules/reagents/reagent_containers/drinks/bottle.dm
@@ -30,6 +30,9 @@
rag = null
return ..()
+/obj/item/chems/drinks/bottle/on_reagent_change()
+ return
+
//when thrown on impact, bottles smash and spill their contents
/obj/item/chems/drinks/bottle/throw_impact(atom/hit_atom, var/datum/thrownthing/TT)
..()
diff --git a/code/modules/reagents/reagent_containers/drinks/cans.dm b/code/modules/reagents/reagent_containers/drinks/cans.dm
index 8e8cd9acaf5..170ed67a755 100644
--- a/code/modules/reagents/reagent_containers/drinks/cans.dm
+++ b/code/modules/reagents/reagent_containers/drinks/cans.dm
@@ -4,6 +4,9 @@
atom_flags = 0 //starts closed
material = /decl/material/solid/metal/aluminium
+/obj/item/chems/drinks/cans/on_reagent_change()
+ return
+
//DRINKS
/obj/item/chems/drinks/cans/cola
diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm
index 41d463f4278..1f01aadd845 100644
--- a/code/modules/recycling/sortingmachinery.dm
+++ b/code/modules/recycling/sortingmachinery.dm
@@ -44,7 +44,7 @@
else if(istype(W, /obj/item/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
- var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
+ var/str = sanitize_safe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(usr, " Invalid text.")
return
@@ -169,7 +169,7 @@
else if(istype(W, /obj/item/pen))
switch(alert("What would you like to alter?",,"Title","Description", "Cancel"))
if("Title")
- var/str = sanitizeSafe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
+ var/str = sanitize_safe(input(usr,"Label text?","Set label",""), MAX_NAME_LEN)
if(!str || !length(str))
to_chat(usr, " Invalid text.")
return
diff --git a/code/modules/supermatter/supermatter.dm b/code/modules/supermatter/supermatter.dm
index 7813d66b1d6..e49d5db6643 100644
--- a/code/modules/supermatter/supermatter.dm
+++ b/code/modules/supermatter/supermatter.dm
@@ -621,7 +621,7 @@ var/global/list/supermatter_delam_accent_sounds = list(
/obj/machinery/power/supermatter/attackby(obj/item/W, mob/user)
- if(istype(W, /obj/item/tape_roll))
+ if(istype(W, /obj/item/ducttape))
to_chat(user, "You repair some of the damage to \the [src] with \the [W].")
damage = max(damage -10, 0)
diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm
index 6fccc384d4e..dc39514ae32 100644
--- a/code/modules/surgery/organs_internal.dm
+++ b/code/modules/surgery/organs_internal.dm
@@ -19,7 +19,7 @@
allowed_tools = list(
/obj/item/stack/medical/advanced/bruise_pack = 100,
/obj/item/stack/medical/bruise_pack = 40,
- /obj/item/tape_roll = 20
+ /obj/item/ducttape = 20
)
min_duration = 70
max_duration = 90
diff --git a/code/modules/ventcrawl/ventcrawl_atmospherics.dm b/code/modules/ventcrawl/ventcrawl_atmospherics.dm
index 6097e15ca43..a12184e78e3 100644
--- a/code/modules/ventcrawl/ventcrawl_atmospherics.dm
+++ b/code/modules/ventcrawl/ventcrawl_atmospherics.dm
@@ -15,7 +15,10 @@
/obj/machinery/atmospherics/relaymove(mob/living/user, direction)
if(user.loc != src || !(direction & initialize_directions)) //can't go in a way we aren't connecting to
return
- ventcrawl_to(user,findConnecting(direction),direction)
+
+ // Only cardinals allowed.
+ direction = FIRST_DIR(direction)
+ ventcrawl_to(user,findConnecting(direction), direction)
/obj/machinery/atmospherics/proc/ventcrawl_to(var/mob/living/user, var/obj/machinery/atmospherics/target_move, var/direction)
if(target_move)
diff --git a/code/modules/weather/weather_effects.dm b/code/modules/weather/weather_effects.dm
index d12aad152d7..8499824ddce 100644
--- a/code/modules/weather/weather_effects.dm
+++ b/code/modules/weather/weather_effects.dm
@@ -1,7 +1,7 @@
-/obj/abstract/weather_system/proc/get_movement_delay(var/travel_dir)
+/obj/abstract/weather_system/proc/get_movement_delay(var/datum/gas_mixture/env, var/travel_dir)
// It's quiet. Too quiet.
- if(!wind_direction || !base_wind_delay || !travel_dir)
+ if(!wind_direction || !base_wind_delay || !travel_dir || !env || env.return_pressure() < MIN_WIND_PRESSURE)
return 0
// May the wind be always at your back!
diff --git a/code/modules/weather/weather_wind.dm b/code/modules/weather/weather_wind.dm
index 12add656a2f..2453fe06fdf 100644
--- a/code/modules/weather/weather_wind.dm
+++ b/code/modules/weather/weather_wind.dm
@@ -26,9 +26,13 @@
if(mob_shown_wind[mob_ref])
return FALSE
mob_shown_wind[weakref(M)] = TRUE
- var/absolute_strength = abs(wind_strength)
- if(absolute_strength <= 0.5 || !wind_direction)
- to_chat(M, SPAN_NOTICE("The wind is calm."))
- else
- to_chat(M, SPAN_NOTICE("The wind is blowing[absolute_strength > 2 ? " strongly" : ""] towards the [dir2text(wind_direction)]."))
- return TRUE
+ . = TRUE
+ var/turf/T = get_turf(M)
+ if(istype(T))
+ var/datum/gas_mixture/environment = T.return_air()
+ if(environment && environment.return_pressure() >= MIN_WIND_PRESSURE) // Arbitrary low pressure bound.
+ var/absolute_strength = abs(wind_strength)
+ if(absolute_strength <= 0.5 || !wind_direction)
+ to_chat(M, SPAN_NOTICE("The wind is calm."))
+ else
+ to_chat(M, SPAN_NOTICE("The wind is blowing[absolute_strength > 2 ? " strongly" : ""] towards the [dir2text(wind_direction)]."))
diff --git a/code/procs/announce.dm b/code/procs/announce.dm
index 94d174eb61d..1ce2db213a6 100644
--- a/code/procs/announce.dm
+++ b/code/procs/announce.dm
@@ -47,7 +47,7 @@ var/global/datum/announcement/minor/minor_announcement = new(new_sound = 'sound/
if(!msg_sanitized)
message = sanitize(message, extra = 0)
- message_title = sanitizeSafe(message_title)
+ message_title = sanitize_safe(message_title)
var/msg = FormMessage(message, message_title)
for(var/mob/M in global.player_list)
diff --git a/html/changelog.html b/html/changelog.html
index 8f396269e96..09fe9e12597 100644
--- a/html/changelog.html
+++ b/html/changelog.html
@@ -52,6 +52,18 @@
-->