Merge branch 'Baystation12/dev' into ofChemistryAndStuff

Conflicts:
	code/modules/mob/living/carbon/monkey/life.dm
	code/modules/mob/living/carbon/monkey/monkey.dm
	code/modules/reagents/Chemistry-Reagents.dm
	code/modules/reagents/reagent_containers/glass.dm
This commit is contained in:
Kelenius
2015-03-28 19:14:59 +03:00
260 changed files with 2116 additions and 2965 deletions
+8 -9
View File
@@ -246,7 +246,6 @@
#include "code\game\dna\dna_modifier.dm"
#include "code\game\dna\genes\disabilities.dm"
#include "code\game\dna\genes\gene.dm"
#include "code\game\dna\genes\monkey.dm"
#include "code\game\dna\genes\powers.dm"
#include "code\game\gamemodes\events.dm"
#include "code\game\gamemodes\game_mode.dm"
@@ -645,6 +644,7 @@
#include "code\game\objects\items\weapons\circuitboards\computer\telecomms.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\biogenerator.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\cloning.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\mining_drill.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\pacman.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\power.dm"
#include "code\game\objects\items\weapons\circuitboards\machinery\recharge_station.dm"
@@ -1055,8 +1055,13 @@
#include "code\modules\mob\dead\observer\logout.dm"
#include "code\modules\mob\dead\observer\observer.dm"
#include "code\modules\mob\dead\observer\say.dm"
#include "code\modules\mob\freelook\chunk.dm"
#include "code\modules\mob\freelook\eye.dm"
#include "code\modules\mob\freelook\update_triggers.dm"
#include "code\modules\mob\freelook\visualnet.dm"
#include "code\modules\mob\language\generic.dm"
#include "code\modules\mob\language\language.dm"
#include "code\modules\mob\language\monkey.dm"
#include "code\modules\mob\language\outsider.dm"
#include "code\modules\mob\language\station.dm"
#include "code\modules\mob\language\synthetic.dm"
@@ -1122,6 +1127,7 @@
#include "code\modules\mob\living\carbon\human\login.dm"
#include "code\modules\mob\living\carbon\human\logout.dm"
#include "code\modules\mob\living\carbon\human\MedicalSideEffects.dm"
#include "code\modules\mob\living\carbon\human\npcs.dm"
#include "code\modules\mob\living\carbon\human\say.dm"
#include "code\modules\mob\living\carbon\human\unarmed_attack.dm"
#include "code\modules\mob\living\carbon\human\update_icons.dm"
@@ -1132,6 +1138,7 @@
#include "code\modules\mob\living\carbon\human\species\outsider\shadow.dm"
#include "code\modules\mob\living\carbon\human\species\outsider\vox.dm"
#include "code\modules\mob\living\carbon\human\species\station\golem.dm"
#include "code\modules\mob\living\carbon\human\species\station\monkey.dm"
#include "code\modules\mob\living\carbon\human\species\station\slime.dm"
#include "code\modules\mob\living\carbon\human\species\station\station.dm"
#include "code\modules\mob\living\carbon\human\species\xenomorphs\alien_embryo.dm"
@@ -1151,14 +1158,6 @@
#include "code\modules\mob\living\carbon\metroid\say.dm"
#include "code\modules\mob\living\carbon\metroid\subtypes.dm"
#include "code\modules\mob\living\carbon\metroid\update_icons.dm"
#include "code\modules\mob\living\carbon\monkey\death.dm"
#include "code\modules\mob\living\carbon\monkey\emote.dm"
#include "code\modules\mob\living\carbon\monkey\examine.dm"
#include "code\modules\mob\living\carbon\monkey\inventory.dm"
#include "code\modules\mob\living\carbon\monkey\life.dm"
#include "code\modules\mob\living\carbon\monkey\login.dm"
#include "code\modules\mob\living\carbon\monkey\monkey.dm"
#include "code\modules\mob\living\carbon\monkey\update_icons.dm"
#include "code\modules\mob\living\silicon\death.dm"
#include "code\modules\mob\living\silicon\laws.dm"
#include "code\modules\mob\living\silicon\login.dm"
+1 -1
View File
@@ -1,6 +1,6 @@
// BEGIN_INTERNALS
/*
MAP_ICON_TYPE: 0
AUTO_FILE_DIR: OFF
MAP_ICON_TYPE: 0
*/
// END_INTERNALS
+1
View File
@@ -17,6 +17,7 @@
#define CONNECT_TYPE_REGULAR 1
#define CONNECT_TYPE_SUPPLY 2
#define CONNECT_TYPE_SCRUBBER 4
#define CONNECT_TYPE_HE 8
var/global/list/pipe_colors = list("grey" = PIPE_COLOR_GREY, "red" = PIPE_COLOR_RED, "blue" = PIPE_COLOR_BLUE, "cyan" = PIPE_COLOR_CYAN, "green" = PIPE_COLOR_GREEN, "yellow" = PIPE_COLOR_YELLOW, "purple" = PIPE_COLOR_PURPLE)
@@ -423,18 +423,3 @@
initial_loc.air_vent_names -= id_tag
..()
return
/*
Alt-click to vent crawl - Monkeys, aliens, slimes and mice.
This is a little buggy but somehow that just seems to plague ventcrawl.
I am sorry, I don't know why.
*/
// Commenting this out for now, it's not critical, stated to be buggy, and seems like
// a really clumsy way of doing this. ~Z
/*/obj/machinery/atmospherics/unary/vent_pump/AltClick(var/mob/living/ML)
if(istype(ML))
var/list/ventcrawl_verbs = list(/mob/living/carbon/monkey/verb/ventcrawl, /mob/living/carbon/alien/verb/ventcrawl, /mob/living/carbon/slime/verb/ventcrawl,/mob/living/simple_animal/mouse/verb/ventcrawl)
if(length(ML.verbs & ventcrawl_verbs)) // alien queens have this removed, an istype would be complicated
ML.handle_ventcrawl(src)
return
..()*/
+3
View File
@@ -5,6 +5,8 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging
pipe_icon = "hepipe"
color = "#404040"
level = 2
connect_types = CONNECT_TYPE_HE
layer = 2.41
var/initialize_directions_he
var/surface = 2 //surface area in m^2
var/icon_temperature = T20C //stop small changes in temperature causing an icon refresh
@@ -106,6 +108,7 @@ obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction
icon_state = "intact"
pipe_icon = "hejunction"
level = 2
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
minimum_temperature_difference = 300
thermal_conductivity = WALL_HEAT_TRANSFER_COEFFICIENT
+1 -1
View File
@@ -239,7 +239,7 @@
//Removes a volume of gas from the mixture and returns a gas_mixture containing the removed air with the given volume
/datum/gas_mixture/proc/remove_volume(removed_volume)
var/datum/gas_mixture/removed = remove_ratio(removed_volume/volume, 1)
var/datum/gas_mixture/removed = remove_ratio(removed_volume/(volume*group_multiplier), 1)
removed.volume = removed_volume
return removed
+2 -2
View File
@@ -592,13 +592,13 @@ datum/proc/dd_SortValue()
return "[src]"
/obj/machinery/dd_SortValue()
return "[sanitize(name)]"
return "[sanitize_old(name)]"
/obj/machinery/camera/dd_SortValue()
return "[c_tag]"
/datum/alarm/dd_SortValue()
return "[sanitize(last_name)]"
return "[sanitize_old(last_name)]"
//creates every subtype of prototype (excluding prototype) and adds it to list L.
//if no list/L is provided, one is created.
+104 -183
View File
@@ -22,46 +22,103 @@
* Text sanitization
*/
//Simply removes < and > and limits the length of the message
/proc/strip_html_simple(var/t,var/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
//Used for preprocessing entered text
/proc/sanitize(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
if(!input)
return
//Removes a few problematic characters
/proc/sanitize_simple(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
for(var/char in repl_chars)
t = replacetext(t, char, repl_chars[char])
return t
if(max_length)
input = copytext(input,1,max_length)
/proc/readd_quotes(var/t)
var/list/repl_chars = list("&#34;" = "\"")
for(var/char in repl_chars)
var/index = findtext(t, char)
while(index)
t = copytext(t, 1, index) + repl_chars[char] + copytext(t, index+5)
index = findtext(t, char)
return t
if(extra)
input = replace_characters(input, list("\n"=" ","\t"=" "))
//Runs byond's sanitization proc along-side sanitize_simple
/proc/sanitize(var/t,var/list/repl_chars = null)
return html_encode(sanitize_simple(t,repl_chars))
if(encode)
//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
input = replace_characters(input, list("<"=" ", ">"=" "))
//Runs sanitize and strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' after sanitize() calls byond's html_encode()
/proc/strip_html(var/t,var/limit=MAX_MESSAGE_LEN)
return copytext((sanitize(strip_html_simple(t))),1,limit)
if(trim)
//Maybe, we need trim text twice? Here and before copytext?
input = trim(input)
//Runs byond's sanitization proc along-side strip_html_simple
//I believe strip_html_simple() is required to run first to prevent '<' from displaying as '&lt;' that html_encode() would cause
/proc/adminscrub(var/t,var/limit=MAX_MESSAGE_LEN)
return copytext((html_encode(strip_html_simple(t))),1,limit)
return input
//Run sanitize(), but remove <, >, " first to prevent displaying them as &gt; &lt; &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 &amp;), 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))
//Filters out undesirable characters from names
/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0)
if(!input || length(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)
// A .. Z
if(65 to 90) //Uppercase Letters
output += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 4
// a .. z
if(97 to 122) //Lowercase Letters
if(last_char_group<2) output += ascii2text(ascii_char-32) //Force uppercase first character
else output += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 4
// 0 .. 9
if(48 to 57) //Numbers
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue
output += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 3
// ' - .
if(39,45,46) //Common name punctuation
if(!last_char_group) continue
output += ascii2text(ascii_char)
last_char_group = 2
// ~ | @ : # $ % & * +
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue
output += ascii2text(ascii_char)
last_char_group = 2
//Space
if(32)
if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
output += ascii2text(ascii_char)
last_char_group = 1
else
return
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")) //prevents these common metagamey names
if(cmptext(output,bad_name)) return //(not case sensitive)
return output
//Returns null if there is any bad text in the string
/proc/reject_bad_text(var/text, var/max_length=512)
@@ -76,97 +133,11 @@
else non_whitespace = 1
if(non_whitespace) return text //only accepts the text if it has some non-spaces
// Used to get a properly sanitized input, of max_length
/proc/stripped_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
var/name = input(user, message, title, default)
return strip_html_properly(name, max_length)
// Used to get a trimmed, properly sanitized input, of max_length
/proc/trim_strip_input(var/mob/user, var/message = "", var/title = "", var/default = "", var/max_length=MAX_MESSAGE_LEN)
return trim(stripped_input(user, message, title, default, max_length))
//Old variant. Haven't dared to replace in some places.
/proc/sanitize_old(var/t,var/list/repl_chars = list("\n"="#","\t"="#"))
return html_encode(replace_characters(t,repl_chars))
//Filters out undesirable characters from names
/proc/reject_bad_name(var/t_in, var/allow_numbers=0, var/max_length=MAX_NAME_LEN)
if(!t_in || length(t_in) > 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/t_out = ""
for(var/i=1, i<=length(t_in), i++)
var/ascii_char = text2ascii(t_in,i)
switch(ascii_char)
// A .. Z
if(65 to 90) //Uppercase Letters
t_out += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 4
// a .. z
if(97 to 122) //Lowercase Letters
if(last_char_group<2) t_out += ascii2text(ascii_char-32) //Force uppercase first character
else t_out += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 4
// 0 .. 9
if(48 to 57) //Numbers
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue
t_out += ascii2text(ascii_char)
number_of_alphanumeric++
last_char_group = 3
// ' - .
if(39,45,46) //Common name punctuation
if(!last_char_group) continue
t_out += ascii2text(ascii_char)
last_char_group = 2
// ~ | @ : # $ % & * +
if(126,124,64,58,35,36,37,38,42,43) //Other symbols that we'll allow (mainly for AI)
if(!last_char_group) continue //suppress at start of string
if(!allow_numbers) continue
t_out += ascii2text(ascii_char)
last_char_group = 2
//Space
if(32)
if(last_char_group <= 1) continue //suppress double-spaces and spaces at start of string
t_out += ascii2text(ascii_char)
last_char_group = 1
else
return
if(number_of_alphanumeric < 2) return //protects against tiny names like "A" and also names like "' ' ' ' ' ' ' '"
if(last_char_group == 1)
t_out = copytext(t_out,1,length(t_out)) //removes the last character (in this case a space)
for(var/bad_name in list("space","floor","wall","r-wall","monkey","unknown","inactive ai")) //prevents these common metagamey names
if(cmptext(t_out,bad_name)) return //(not case sensitive)
return t_out
//checks text for html tags
//if tag is not in whitelist (var/list/paper_tag_whitelist in global.dm)
//relpaces < with &lt;
proc/checkhtml(var/t)
t = sanitize_simple(t, list("&#"="."))
var/p = findtext(t,"<",1)
while (p) //going through all the tags
var/start = p++
var/tag = copytext(t,p, p+1)
if (tag != "/")
while (reject_bad_text(copytext(t, p, p+1), 1))
tag = copytext(t,start, p)
p++
tag = copytext(t,start+1, p)
if (!(tag in paper_tag_whitelist)) //if it's unkown tag, disarming it
t = copytext(t,1,start-1) + "&lt;" + copytext(t,start+1)
p = findtext(t,"<",p)
return t
/*
* Text searches
*/
@@ -203,12 +174,18 @@ proc/checkhtml(var/t)
/*
* Text modification
*/
/proc/replacetext(text, find, replacement)
return list2text(text2list(text, find), replacement)
/proc/replacetextEx(text, find, replacement)
return list2text(text2listEx(text, find), replacement)
/proc/replace_characters(var/t,var/list/repl_chars)
for(var/char in repl_chars)
replacetext(t, char, repl_chars[char])
return t
//Adds 'u' number of zeros ahead of the text 't'
/proc/add_zero(t, u)
while (length(t) < u)
@@ -239,7 +216,6 @@ proc/checkhtml(var/t)
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.
@@ -250,43 +226,18 @@ proc/checkhtml(var/t)
/proc/capitalize(var/t as text)
return uppertext(copytext(t, 1, 2)) + copytext(t, 2)
//Centers text by adding spaces to either side of the string.
/proc/dd_centertext(message, length)
var/new_message = message
var/size = length(message)
var/delta = length - size
if(size == length)
return new_message
if(size > length)
return copytext(new_message, 1, length + 1)
if(delta == 1)
return new_message + " "
if(delta % 2)
new_message = " " + new_message
delta--
var/spaces = add_lspace("",delta/2-1)
return spaces + new_message + spaces
//Limits the length of the text. Note: MAX_MESSAGE_LEN and MAX_NAME_LEN are widely used for this purpose
/proc/dd_limittext(message, length)
var/size = length(message)
if(size <= length)
return message
return copytext(message, 1, length + 1)
/proc/stringmerge(var/text,var/compare,replace = "*")
//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 = "*")
var/newtext = text
if(lentext(text) != lentext(compare))
return 0
for(var/i = 1, i < lentext(text), i++)
var/a = copytext(text,i,i+1)
var/b = copytext(compare,i,i+1)
//if it isn't both the same letter, or if they are both the replacement character
//(no way to know what it was supposed to be)
//if it isn't both the same letter, or if they are both the replacement character
//(no way to know what it was supposed to be)
if(a != b)
if(a == replace) //if A is the replacement char
newtext = copytext(newtext,1,i) + b + copytext(newtext, i+1)
@@ -296,9 +247,9 @@ proc/checkhtml(var/t)
return 0
return newtext
/proc/stringpercent(var/text,character = "*")
//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 = "*")
if(!text || !character)
return 0
var/count = 0
@@ -325,36 +276,6 @@ proc/TextPreview(var/string,var/len=40)
else
return "[copytext(string, 1, 37)]..."
//This proc strips html properly, but it's not lazy like the other procs.
//This means that it doesn't just remove < and > and call it a day.
//Also limit the size of the input, if specified.
/proc/strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
if(!input)
return
var/opentag = 1 //These store the position of < and > respectively.
var/closetag = 1
while(1)
opentag = findtext(input, "<")
closetag = findtext(input, ">")
if(closetag && opentag)
if(closetag < opentag)
input = copytext(input, (closetag + 1))
else
input = copytext(input, 1, opentag) + copytext(input, (closetag + 1))
else if(closetag || opentag)
if(opentag)
input = copytext(input, 1, opentag)
else
input = copytext(input, (closetag + 1))
else
break
if(max_length)
input = copytext(input,1,max_length)
return sanitize(input)
/proc/trim_strip_html_properly(var/input, var/max_length = MAX_MESSAGE_LEN)
return trim(strip_html_properly(input, max_length))
//For generating neat chat tag-images
//The icon var could be local in the proc, but it's a waste of resources
// to always create it and then throw it out.
+3 -5
View File
@@ -308,10 +308,10 @@ Turf and target are seperate in case you want to teleport some distance from a t
var/newname
for(var/i=1,i<=3,i++) //we get 3 attempts to pick a suitable name.
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)>300)
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)>3000)
return //took too long
newname = reject_bad_name(newname,allow_numbers) //returns null if the name doesn't meet some basic requirements. Tidies up a few other things like bad-characters.
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.
for(var/mob/living/M in player_list)
if(M == src)
@@ -460,8 +460,6 @@ Turf and target are seperate in case you want to teleport some distance from a t
moblist.Add(M)
for(var/mob/new_player/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/monkey/M in sortmob)
moblist.Add(M)
for(var/mob/living/carbon/slime/M in sortmob)
moblist.Add(M)
for(var/mob/living/simple_animal/M in sortmob)
+4 -4
View File
@@ -235,7 +235,7 @@ datum/hud/New(mob/owner)
if(ishuman(mymob))
human_hud(ui_style, ui_color, ui_alpha, mymob) // Pass the player the UI style chosen in preferences
else if(ismonkey(mymob))
else if(issmall(mymob))
monkey_hud(ui_style)
else if(isbrain(mymob))
brain_hud(ui_style)
@@ -259,11 +259,11 @@ datum/hud/New(mob/owner)
if(!hud_used)
usr << "\red This mob type does not use a HUD."
return
if(!ishuman(src))
usr << "\red Inventory hiding is currently only supported for human mobs, sorry."
return
if(!client) return
if(client.view != world.view)
return
@@ -325,7 +325,7 @@ datum/hud/New(mob/owner)
return
if(client.view != world.view)
return
if(hud_used.hud_shown)
hud_used.hud_shown = 0
if(src.hud_used.adding)
-39
View File
@@ -52,45 +52,6 @@
/mob/living/RestrainedClickOn(var/atom/A)
return
/*
Monkeys
*/
/mob/living/carbon/monkey/UnarmedAttack(var/atom/A, var/proximity)
if(!..())
return
A.attack_hand(src)
/*
Monkey RestrainedClickOn() was apparently the
one and only use of all of the restrained click code
(except to stop you from doing things while handcuffed);
moving it here instead of various hand_p's has simplified
things considerably
*/
/mob/living/carbon/monkey/RestrainedClickOn(var/atom/A)
if(a_intent != "harm" || !ismob(A)) return
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
var/mob/living/carbon/ML = A
var/dam_zone = ran_zone(pick("chest", "l_hand", "r_hand", "l_leg", "r_leg"))
var/armor = ML.run_armor_check(dam_zone, "melee")
if(prob(75))
ML.apply_damage(rand(1,3), BRUTE, dam_zone, armor)
for(var/mob/O in viewers(ML, null))
O.show_message("\red <B>[name] has bit [ML]!</B>", 1)
if(armor >= 2) return
if(ismonkey(ML))
for(var/datum/disease/D in viruses)
if(istype(D, /datum/disease/jungle_fever))
ML.contract_disease(D,1,0)
else
for(var/mob/O in viewers(ML, null))
O.show_message("\red <B>[src] has attempted to bite [ML]!</B>", 1)
/*
Aliens
*/
+2 -2
View File
@@ -241,10 +241,10 @@ datum/controller/vote
choices.Add(antag.role_text)
choices.Add("None")
if("custom")
question = html_encode(input(usr,"What is the vote for?") as text|null)
question = sanitizeSafe(input(usr,"What is the vote for?") as text|null)
if(!question) return 0
for(var/i=1,i<=10,i++)
var/option = capitalize(html_encode(input(usr,"Please enter an option or hit cancel to finish") as text|null))
var/option = capitalize(sanitize(input(usr,"Please enter an option or hit cancel to finish") as text|null))
if(!option || mode || !usr.client) break
choices.Add(option)
else
+2 -2
View File
@@ -427,7 +427,7 @@ client
usr << "This can only be used on instances of type /mob"
return
var/new_name = sanitize(copytext(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null,1,MAX_NAME_LEN))
var/new_name = sanitize(input(usr,"What would you like to name this mob?","Input a name",M.real_name) as text|null, MAX_NAME_LEN)
if( !new_name || !M ) return
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
@@ -875,7 +875,7 @@ client
return
if(organ_slot != "default")
organ_slot = sanitize(copytext(organ_slot,1,MAX_MESSAGE_LEN))
organ_slot = sanitize(organ_slot)
else
if(I.removed_type)
var/obj/item/organ/O = new I.removed_type()
+1 -1
View File
@@ -394,7 +394,7 @@ var/list/advance_cures = list(
if(D.symptoms.len > 0)
var/new_name = input(user, "Name your new disease.", "New Name")
var/new_name = sanitizeSafe(input(user, "Name your new disease.", "New Name"), MAX_NAME_LEN)
D.AssignName(new_name)
D.Refresh()
+4 -14
View File
@@ -166,7 +166,7 @@ datum/mind
assigned_role = new_role
else if (href_list["memory_edit"])
var/new_memo = sanitize(copytext(input("Write new memory", "Memory", memory) as null|message,1,MAX_MESSAGE_LEN))
var/new_memo = sanitize(input("Write new memory", "Memory", memory) as null|message)
if (isnull(new_memo)) return
memory = new_memo
@@ -277,7 +277,7 @@ datum/mind
new_objective.target_amount = target_number
if ("custom")
var/expl = sanitize(copytext(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null,1,MAX_MESSAGE_LEN))
var/expl = sanitize(input("Custom objective:", "Objective", objective ? objective.explanation_text : "") as text|null)
if (!expl) return
new_objective = new /datum/objective
new_objective.owner = src
@@ -320,6 +320,7 @@ datum/mind
H.implant_loyalty(H, override = TRUE)
log_admin("[key_name_admin(usr)] has loyalty implanted [current].")
else
/*
else if (href_list["monkey"])
var/mob/living/L = current
if (L.monkeyizing)
@@ -369,7 +370,7 @@ datum/mind
src = mobfinder.loc:mind
del(mobfinder)
current.radiation -= 50
*/
else if (href_list["silicon"])
BITSET(current.hud_updateflag, SPECIALROLE_HUD)
switch(href_list["silicon"])
@@ -540,10 +541,6 @@ datum/mind
..()
if(!mind.assigned_role) mind.assigned_role = "Assistant" //defualt
//MONKEY
/mob/living/carbon/monkey/mind_initialize()
..()
//slime
/mob/living/carbon/slime/mind_initialize()
..()
@@ -596,10 +593,3 @@ datum/mind
..()
mind.assigned_role = "Juggernaut"
mind.special_role = "Cultist"
/mob/living/simple_animal/vox/armalis/mind_initialize()
..()
mind.assigned_role = "Armalis"
mind.special_role = "Vox Raider"
+2 -2
View File
@@ -36,8 +36,8 @@
var/tmp/message_title = new_title ? new_title : title
var/tmp/message_sound = new_sound ? sound(new_sound) : sound
message = trim_strip_html_properly(message)
message_title = html_encode(message_title)
message = sanitize(message, extra = 0)
message_title = sanitizeSafe(message_title)
Message(message, message_title)
if(do_newscast)
+1 -1
View File
@@ -52,7 +52,7 @@
// Choose a name, if any.
if(flags & ANTAG_CHOOSE_NAME)
spawn(5)
var/newname = sanitize(copytext(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text,1,MAX_NAME_LEN))
var/newname = sanitize(input(player.current, "You are a [role_text]. Would you like to change your name to something else?", "Name change") as null|text, MAX_NAME_LEN)
if (newname)
player.current.real_name = newname
player.current.name = player.current.real_name
+4
View File
@@ -19,6 +19,10 @@ var/datum/antagonist/rogue_ai/malf
var/station_captured
var/can_nuke = 0
/datum/antagonist/rogue_ai/New()
..()
malf = src
/datum/antagonist/rogue_ai/proc/hack_apc(var/obj/machinery/power/apc/apc)
hacked_apcs |= apc
+2 -2
View File
@@ -102,7 +102,7 @@
if (usr.stat != 0)
return
if (!ishuman(usr) && !ismonkey(usr)) //Make sure they're a mob that has dna
if (!ishuman(usr) && !issmall(usr)) //Make sure they're a mob that has dna
usr << "\blue Try as you might, you can not climb up into the scanner."
return
if (src.occupant)
@@ -736,7 +736,7 @@
if (bufferOption == "changeLabel")
var/datum/dna2/record/buf = src.buffers[bufferId]
var/text = sanitize(copytext(input(usr, "New Label:", "Edit Label", buf.name) as text|null, 1, MAX_NAME_LEN))
var/text = sanitize(input(usr, "New Label:", "Edit Label", buf.name) as text|null, MAX_NAME_LEN)
buf.name = text
src.buffers[bufferId] = buf
return 1
@@ -326,64 +326,24 @@ var/global/list/possible_changeling_IDs = list("Alpha","Beta","Gamma","Delta","E
src << "<span class='warning'>We cannot perform this ability at the present time!</span>"
return
var/mob/living/carbon/C = src
var/mob/living/carbon/human/H = src
if(!istype(H) || !H.species.primitive_form)
src << "<span class='warning'>We cannot perform this ability in this form!</span>"
return
changeling.chem_charges--
C.remove_changeling_powers()
C.visible_message("<span class='warning'>[C] transforms!</span>")
H.remove_changeling_powers()
H.visible_message("<span class='warning'>[H] transforms!</span>")
changeling.geneticdamage = 30
C << "<span class='warning'>Our genes cry out!</span>"
//TODO replace with monkeyize proc
H << "<span class='warning'>Our genes cry out!</span>"
var/list/implants = list() //Try to preserve implants.
for(var/obj/item/weapon/implant/W in C)
for(var/obj/item/weapon/implant/W in H)
implants += W
C.monkeyizing = 1
C.canmove = 0
C.icon = null
C.overlays.Cut()
C.invisibility = 101
var/atom/movable/overlay/animation = new /atom/movable/overlay( C.loc )
animation.icon_state = "blank"
animation.icon = 'icons/mob/mob.dmi'
animation.master = src
flick("h2monkey", animation)
sleep(48)
del(animation)
var/mob/living/carbon/monkey/O = new /mob/living/carbon/monkey(src)
O.dna = C.dna.Clone()
C.dna = null
for(var/obj/item/W in C)
C.drop_from_inventory(W)
for(var/obj/T in C)
del(T)
O.loc = C.loc
O.name = "monkey ([copytext(md5(C.real_name), 2, 6)])"
O.setToxLoss(C.getToxLoss())
O.adjustBruteLoss(C.getBruteLoss())
O.setOxyLoss(C.getOxyLoss())
O.adjustFireLoss(C.getFireLoss())
O.stat = C.stat
O.a_intent = "hurt"
for(var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O
C.mind.transfer_to(O)
O.make_changeling(1)
O.verbs += /mob/proc/changeling_lesser_transform
O.changeling_update_languages(changeling.absorbed_languages)
H.monkeyize()
feedback_add_details("changeling_powers","LF")
del(C)
return 1
//Transform into a human
/mob/proc/changeling_lesser_transform()
set category = "Changeling"
@@ -697,7 +657,7 @@ var/list/datum/dna/hivemind_bank = list()
src << "<span class='notice'>We return our vocal glands to their original location.</span>"
return
var/mimic_voice = stripped_input(usr, "Enter a name to mimic.", "Mimic Voice", null, MAX_NAME_LEN)
var/mimic_voice = sanitize(input(usr, "Enter a name to mimic.", "Mimic Voice", null), MAX_NAME_LEN)
if(!mimic_voice)
return
@@ -842,7 +802,7 @@ var/list/datum/dna/hivemind_bank = list()
var/mob/living/carbon/T = changeling_sting(40,/mob/proc/changeling_transformation_sting)
if(!T) return 0
if((HUSK in T.mutations) || (!ishuman(T) && !ismonkey(T)))
if((HUSK in T.mutations) || (!ishuman(T) && !issmall(T)))
src << "<span class='warning'>Our sting appears ineffective against its DNA.</span>"
return 0
T.visible_message("<span class='warning'>[T] transforms!</span>")
+1 -22
View File
@@ -564,7 +564,7 @@ var/list/sacrificed = list()
// returns 0 if the rune is not used. returns 1 if the rune is used.
communicate()
. = 1 // Default output is 1. If the rune is deleted it will return 1
var/input = stripped_input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", "")
var/input = sanitize(input(usr, "Please choose a message to tell to the other acolytes.", "Voice of Blood", ""))
if(!input)
if (istype(src))
fizzle()
@@ -705,27 +705,6 @@ var/list/sacrificed = list()
H.dust()//To prevent the MMI from remaining
else
H.gib()
for(var/mob/living/carbon/monkey/M in src.loc)
if (cult)
if(M.mind == cult.sacrifice_target)
if(cultsinrange.len >= 3)
sacrificed += M.mind
usr << "\red The Geometer of Blood accepts this sacrifice, your objective is now complete."
else
usr << "\red Your target's earthly bonds are too strong. You need more cultists to succeed in this ritual."
continue
else
if(prob(20))
usr << "\red The Geometer of Blood accepts your meager sacrifice."
cult.grant_runeword(usr)
else
usr << "\red The Geometer of blood accepts this sacrifice."
usr << "\red However, a mere monkey is not enough to satisfy Him."
else
usr << "\red The Geometer of Blood accepts your meager sacrifice."
if(prob(20))
cult.grant_runeword(usr)
M.gib()
/////////////////////////////////////////SIXTEENTH RUNE
-7
View File
@@ -233,13 +233,6 @@
else
randmutg(H)
domutcheck(H,null,MUTCHK_FORCED)
for(var/mob/living/carbon/monkey/M in living_mob_list)
var/turf/T = get_turf(M)
if(!T)
continue
if(isNotStationLevel(T.z))
continue
M.apply_effect((rand(15,75)),IRRADIATE,0)
sleep(100)
command_announcement.Announce("High levels of radiation detected near the station. Please report to the Med-bay if you feel strange.", "Anomaly Alert", new_sound = 'sound/AI/radiation.ogg')
+2 -2
View File
@@ -69,7 +69,7 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/ammo_magazine/a357, 2, ".357", "RA"),
new/datum/uplink_item(/obj/item/ammo_magazine/mc9mm, 2, "9mm", "R9"),
new/datum/uplink_item(/obj/item/ammo_magazine/chemdart, 2, "Darts", "AD"),
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 4, "14.5mm", "SA")
new/datum/uplink_item(/obj/item/weapon/storage/box/sniperammo, 2, "14.5mm", "SA")
),
"Highly Visible and Dangerous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/storage/box/emps, 3, "5 EMP Grenades", "EM"),
@@ -80,7 +80,7 @@ var/global/list/additional_antag_types = list()
new/datum/uplink_item(/obj/item/mecha_parts/mecha_equipment/weapon/energy/riggedlaser, 6, "Exosuit Rigged Laser", "RL"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/revolver, 6, "Revolver", "RE"),
new/datum/uplink_item(/obj/item/weapon/storage/box/syndicate, 10, "Mercenary Bundle", "BU"),
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "PTRS Rifle", "BU")
new/datum/uplink_item(/obj/item/weapon/gun/projectile/heavysniper, 12, "Anti-materiel Rifle", "AMR")
),
"Stealthy and Inconspicuous Weapons" = list(
new/datum/uplink_item(/obj/item/weapon/soap/syndie, 1, "Subversive Soap", "SP"),
+1 -4
View File
@@ -536,7 +536,7 @@ datum/objective/steal
var/tmp_obj = new custom_target
var/custom_name = tmp_obj:name
del(tmp_obj)
custom_name = sanitize(copytext(input("Enter target name:", "Objective target", custom_name) as text|null,1,MAX_MESSAGE_LEN))
custom_name = sanitize(input("Enter target name:", "Objective target", custom_name) as text|null)
if (!custom_name) return
target_name = custom_name
steal_target = custom_target
@@ -649,9 +649,6 @@ datum/objective/capture
continue
captured_amount += worth
for(var/mob/living/carbon/monkey/M in A)//Monkeys are almost worthless, you failure.
captured_amount+=0.1
for(var/mob/living/carbon/alien/larva/M in A)//Larva are important for research.
if(M.stat==2)
captured_amount+=0.5
-5
View File
@@ -101,11 +101,6 @@
//if they are holding or wearing a card that has access, that works
if(src.check_access(H.get_active_hand()) || src.check_access(H.wear_id))
return 1
else if(istype(M, /mob/living/carbon/monkey))
var/mob/living/carbon/george = M
//they can only hold things :(
if(src.check_access(george.get_active_hand()))
return 1
return 0
/obj/item/proc/GetAccess()
+2 -2
View File
@@ -28,7 +28,7 @@
H.equip_to_slot_or_del(new /obj/item/weapon/storage/box/survival(H.back), slot_in_backpack)
spawn(0)
var/religion_name = "Christianity"
var/new_religion = sanitize(copytext(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name),1,MAX_NAME_LEN))
var/new_religion = sanitize(input(H, "You are the crew services officer. Would you like to change your religion? Default is Christianity, in SPACE.", "Name change", religion_name), MAX_NAME_LEN)
if (!new_religion)
new_religion = religion_name
@@ -63,7 +63,7 @@
spawn(1)
var/deity_name = "Space Jesus"
var/new_deity = sanitize(copytext(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name),1,MAX_NAME_LEN))
var/new_deity = sanitize(input(H, "Would you like to change your deity? Default is Space Jesus.", "Name change", deity_name), MAX_NAME_LEN)
if ((length(new_deity) == 0) || (new_deity == "Space Jesus") )
new_deity = deity_name
+1 -1
View File
@@ -408,7 +408,7 @@
set category = "Object"
set src in oview(1)
if(usr.stat != 0 || !(ishuman(usr) || ismonkey(usr)))
if(usr.stat != 0 || !(ishuman(usr) || issmall(usr)))
return
if(src.occupant)
+7 -1
View File
@@ -332,6 +332,12 @@
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_arifle
name = "ammunition (7.62mm)"
path = /obj/item/ammo_magazine/c762
hidden = 1
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_smg
name = "ammunition (9mm top mounted)"
path = /obj/item/ammo_magazine/mc9mmt
@@ -339,7 +345,7 @@
category = "Arms and Ammunition"
/datum/autolathe/recipe/magazine_carbine
name = "ammunition (5.56)"
name = "ammunition (5.56mm)"
path = /obj/item/ammo_magazine/a556
hidden = 1
category = "Arms and Ammunition"
+1 -1
View File
@@ -214,7 +214,7 @@
if("cashbag")
new/obj/item/weapon/storage/bag/cash(loc)
if("monkey")
new/mob/living/carbon/monkey(loc)
new/mob/living/carbon/human/monkey(loc)
processing = 0
menustat = "complete"
update_icon()
+1 -1
View File
@@ -355,7 +355,7 @@ text("<A href='?src=\ref[src];operation=oddbutton'>[src.oddbutton ? "Yes" : "No"
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
+1 -1
View File
@@ -58,7 +58,7 @@
..()
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(!t) return
if(!in_range(src, usr) && src.loc != usr) return
created_name = t
+1 -1
View File
@@ -578,7 +578,7 @@
else if(istype(W, /obj/item/weapon/pen))
var/t = input(user, "Enter new robot name", src.name, src.created_name) as text
t = sanitize(copytext(t, 1, MAX_NAME_LEN))
t = sanitize(t, MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
+2 -2
View File
@@ -420,7 +420,7 @@
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
@@ -439,7 +439,7 @@
user.drop_from_inventory(src)
del(src)
else if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
+1 -1
View File
@@ -563,7 +563,7 @@
/obj/item/weapon/firstaid_arm_assembly/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
+1 -1
View File
@@ -307,7 +307,7 @@
if("setid")
refresh=0
var/new_id = sanitize(copytext(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null,1,MAX_NAME_LEN))
var/new_id = sanitize(input("Enter new bot ID", "Mulebot [suffix ? "([suffix])" : ""]", suffix) as text|null, MAX_NAME_LEN)
refresh=1
if(new_id)
suffix = new_id
+1 -1
View File
@@ -838,7 +838,7 @@ Auto Patrol: []"},
del(src)
else if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter new robot name", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if(!t)
return
if(!in_range(src, usr) && src.loc != usr)
@@ -78,7 +78,7 @@
if(isscrewdriver(W))
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
var/input = strip_html(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
var/input = sanitize(input(usr, "Which networks would you like to connect this camera to? Separate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Set Network", "SS13"))
if(!input)
usr << "No input found please hang up and try your call again."
return
@@ -90,7 +90,7 @@
var/area/camera_area = get_area(src)
var/temptag = "[sanitize(camera_area.name)] ([rand(1, 999)])"
input = strip_html(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
input = sanitizeSafe(input(usr, "How would you like to name the camera?", "Set Camera Name", temptag))
state = 4
var/obj/machinery/camera/C = new(src.loc)
+2 -2
View File
@@ -47,7 +47,7 @@
set name = "Store Camera Location"
set desc = "Stores your current camera location by the given name"
loc = sanitize(copytext(loc, 1, MAX_MESSAGE_LEN))
loc = sanitize(loc)
if(!loc)
src << "\red Must supply a location name"
return
@@ -213,7 +213,7 @@
mob/living/proc/near_camera()
if (!isturf(loc))
return 0
else if(!cameranet.checkCameraVis(src))
else if(!cameranet.checkVis(src))
return 0
return 1
+2 -2
View File
@@ -191,7 +191,7 @@
if (is_authenticated() && modify)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,45))
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"), 45)
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
modify.assignment = temp_t
@@ -222,7 +222,7 @@
if (is_authenticated())
var/t2 = modify
if ((modify == t2 && (in_range(src, usr) || (istype(usr, /mob/living/silicon))) && istype(loc, /turf)))
var/temp_name = reject_bad_name(href_list["reg"])
var/temp_name = sanitizeName(href_list["reg"])
if(temp_name)
modify.registered_name = temp_name
else
@@ -175,10 +175,10 @@
post_status(href_list["statdisp"])
if("setmsg1")
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40))), 40)
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
src.updateDialog()
if("setmsg2")
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40))), 40)
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
src.updateDialog()
// OMG CENTCOMM LETTERHEAD
@@ -187,7 +187,7 @@
if(centcomm_message_cooldown)
usr << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input || !(usr in view(1,src)))
return
Centcomm_announce(input, usr)
@@ -204,7 +204,7 @@
if(centcomm_message_cooldown)
usr << "\red Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response. There is a 30 second delay before you may send another message, be clear, full and concise.", "To abort, send an empty message.", ""))
if(!input || !(usr in view(1,src)))
return
Syndicate_announce(input, usr)
+2 -2
View File
@@ -114,11 +114,11 @@
if (href_list["choice"])
switch(href_list["choice"])
if ("giv_name")
var/nam = strip_html_simple(input("Person pass is issued to", "Name", giv_name) as text|null)
var/nam = sanitize(input("Person pass is issued to", "Name", giv_name) as text|null)
if (nam)
giv_name = nam
if ("reason")
var/reas = strip_html_simple(input("Reason why pass is issued", "Reason", reason) as text|null)
var/reas = sanitize(input("Reason why pass is issued", "Reason", reason) as text|null)
if(reas)
reason = reas
if ("duration")
+14 -14
View File
@@ -250,7 +250,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -268,55 +268,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -331,21 +331,21 @@
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -450,7 +450,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
+3 -3
View File
@@ -409,7 +409,7 @@
//Select Your Name
if("Sender")
customsender = input(usr, "Please enter the sender's name.") as text|null
customsender = sanitize(input(usr, "Please enter the sender's name.") as text|null)
//Select Receiver
if("Recepient")
@@ -425,12 +425,12 @@
//Enter custom job
if("RecJob")
customjob = input(usr, "Please enter the sender's job.") as text|null
customjob = sanitize(input(usr, "Please enter the sender's job.") as text|null)
//Enter message
if("Message")
custommessage = input(usr, "Please enter your message.") as text|null
custommessage = sanitize(copytext(custommessage, 1, MAX_MESSAGE_LEN))
custommessage = sanitize(custommessage)
//Send message
if("Send")
+1 -1
View File
@@ -90,7 +90,7 @@
usr << "Unauthorized Access."
else if(href_list["warn"])
var/warning = sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN))
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if((I)&&(I.imp_in))
+10 -10
View File
@@ -384,7 +384,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
var/t1 = trim(sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -426,19 +426,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if (!t1 || active1 != a1)
return
active1.fields["fingerprint"] = t1
@@ -456,31 +456,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
if (!t1 || active2 != a2)
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
if (!t1 || active2 != a2)
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
if (!t1 || active2 != a2)
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
if (!t1 || active2 != a2)
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
if (!t1 || active2 != a2)
return
active2.fields["notes"] = t1
@@ -507,7 +507,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if (!t1 || active1 != a1)
return
active1.fields["species"] = t1
+4 -4
View File
@@ -309,19 +309,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -350,7 +350,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!in_range(src, usr) && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
+2 -2
View File
@@ -85,7 +85,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
if(world.time > timeout) return
if(!reason) return
@@ -289,7 +289,7 @@
if(!istype(P)) return
var/timeout = world.time + 600
var/reason = sanitize(copytext(input(usr,"Reason:","Why do you require this item?","") as null|text,1,MAX_MESSAGE_LEN))
var/reason = sanitize(input(usr,"Reason:","Why do you require this item?","") as null|text)
if(world.time > timeout) return
if(!reason) return
@@ -304,7 +304,7 @@
if(auth)
var/t1 = href_list["assign"]
if(t1 == "Custom")
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
var/temp_t = sanitize(input("Enter a custom job assignment.","Assignment"))
if(temp_t)
t1 = temp_t
set_default_access(t1)
@@ -178,10 +178,10 @@
post_status(href_list["statdisp"])
if("setmsg1" in href_list)
stat_msg1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 1, 40)), 40))
stat_msg1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", stat_msg1) as text|null, 40), 40)
computer.updateDialog()
if("setmsg2" in href_list)
stat_msg2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 1, 40)), 40))
stat_msg2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", stat_msg2) as text|null, 40), 40)
computer.updateDialog()
// OMG CENTCOMM LETTERHEAD
@@ -192,7 +192,7 @@
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = sanitize(input("Please choose a message to transmit to Centcomm via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
if(!input || !interactable())
return
Centcomm_announce(input, usr)
@@ -209,7 +209,7 @@
if(centcomm_message_cooldown)
usr << "Arrays recycling. Please stand by."
return
var/input = stripped_input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", "")
var/input = sanitize(input(usr, "Please choose a message to transmit to \[ABNORMAL ROUTING CORDINATES\] via quantum entanglement. Please be aware that this process is very expensive, and abuse will lead to... termination. Transmission does not guarantee a response.", "To abort, send an empty message.", ""))
if(!input || !interactable())
return
Syndicate_announce(input, usr)
@@ -92,7 +92,7 @@
var/icon/side = active1.fields["photo_side"]
usr << browse_rsc(front, "front.png")
usr << browse_rsc(side, "side.png")
dat += "<table><tr><td>Name: [active1.fields["name"]] \
ID: [active1.fields["id"]]<BR>\n \
Sex: <A href='?src=\ref[src];field=sex'>[active1.fields["sex"]]</A><BR>\n \
@@ -264,7 +264,7 @@
switch(href_list["field"])
if("fingerprint")
if (istype(src.active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Med. records", src.active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
src.active1.fields["fingerprint"] = t1
@@ -282,55 +282,55 @@
src.active1.fields["age"] = t1
if("mi_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Med. records", src.active2.fields["mi_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis"] = t1
if("mi_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Med. records", src.active2.fields["mi_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["mi_dis_d"] = t1
if("ma_dis")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Med. records", src.active2.fields["ma_dis"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis"] = t1
if("ma_dis_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Med. records", src.active2.fields["ma_dis_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["ma_dis_d"] = t1
if("alg")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state allergies:", "Med. records", src.active2.fields["alg"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg"] = t1
if("alg_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize allergies:", "Med. records", src.active2.fields["alg_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["alg_d"] = t1
if("cdi")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please state diseases:", "Med. records", src.active2.fields["cdi"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi"] = t1
if("cdi_d")
if (istype(src.active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize diseases:", "Med. records", src.active2.fields["cdi_d"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["cdi_d"] = t1
if("notes")
if (istype(src.active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Med. records", html_decode(src.active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["notes"] = t1
@@ -345,21 +345,21 @@
src.temp = text("<B>Blood Type:</B><BR>\n\t<A href='?src=\ref[];temp=1;b_type=an'>A-</A> <A href='?src=\ref[];temp=1;b_type=ap'>A+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=bn'>B-</A> <A href='?src=\ref[];temp=1;b_type=bp'>B+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=abn'>AB-</A> <A href='?src=\ref[];temp=1;b_type=abp'>AB+</A><BR>\n\t<A href='?src=\ref[];temp=1;b_type=on'>O-</A> <A href='?src=\ref[];temp=1;b_type=op'>O+</A><BR>", src, src, src, src, src, src, src, src)
if("b_dna")
if (istype(src.active2, /datum/data/record))
var/t1 = sanitize(copytext(trim(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text),1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Please input DNA hash:", "Med. records", src.active2.fields["b_dna"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
src.active2.fields["b_dna"] = t1
if("vir_name")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input pathogen name:", "VirusDB", v.fields["name"], null) as text)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["name"] = t1
if("vir_desc")
var/datum/data/record/v = locate(href_list["edit_vir"])
if (v)
var/t1 = trim(sanitize(copytext(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input information about pathogen:", "VirusDB", v.fields["description"], null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active1 != a1))
return
v.fields["description"] = t1
@@ -464,7 +464,7 @@
if (!( istype(src.active2, /datum/data/record) ))
return
var/a2 = src.active2
var/t1 = sanitize(copytext(input("Add Comment:", "Med. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Med. records", null, null) as message)
if ((!( t1 ) || !( src.authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || src.active2 != a2))
return
var/counter = 1
@@ -90,7 +90,7 @@
screen = !screen
else if(href_list["warn"])
var/warning = trim(sanitize(copytext(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)))
var/warning = sanitize(input(usr,"Message:","Enter your message here!",""))
if(!warning) return
var/obj/item/weapon/implant/I = locate(href_list["warn"])
if( istype(I) && I.imp_in)
@@ -404,7 +404,7 @@ What a mess.*/
if (!( istype(active2, /datum/data/record) ))
return
var/a2 = active2
var/t1 = sanitize(copytext(input("Add Comment:", "Secure. records", null, null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Add Comment:", "Secure. records", null, null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
var/counter = 1
@@ -444,19 +444,19 @@ What a mess.*/
switch(href_list["field"])
if("name")
if (istype(active1, /datum/data/record))
var/t1 = reject_bad_name(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
var/t1 = sanitizeName(input("Please input name:", "Secure. records", active1.fields["name"], null) as text)
if ((!( t1 ) || !length(trim(t1)) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon)))) || active1 != a1)
return
active1.fields["name"] = t1
if("id")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input id:", "Secure. records", active1.fields["id"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input id:", "Secure. records", active1.fields["id"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["id"] = t1
if("fingerprint")
if (istype(active1, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input fingerprint hash:", "Secure. records", active1.fields["fingerprint"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["fingerprint"] = t1
@@ -474,31 +474,31 @@ What a mess.*/
active1.fields["age"] = t1
if("mi_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input minor disabilities list:", "Secure. records", active2.fields["mi_crim"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim"] = t1
if("mi_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize minor dis.:", "Secure. records", active2.fields["mi_crim_d"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["mi_crim_d"] = t1
if("ma_crim")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please input major diabilities list:", "Secure. records", active2.fields["ma_crim"], null) as text)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim"] = t1
if("ma_crim_d")
if (istype(active2, /datum/data/record))
var/t1 = trim(sanitize(copytext(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize major dis.:", "Secure. records", active2.fields["ma_crim_d"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["ma_crim_d"] = t1
if("notes")
if (istype(active2, /datum/data/record))
var/t1 = html_encode(trim(copytext(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message,1,MAX_MESSAGE_LEN)))
var/t1 = sanitize(input("Please summarize notes:", "Secure. records", html_decode(active2.fields["notes"]), null) as message, extra = 0)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active2 != a2))
return
active2.fields["notes"] = t1
@@ -525,7 +525,7 @@ What a mess.*/
alert(usr, "You do not have the required rank to do this!")
if("species")
if (istype(active1, /datum/data/record))
var/t1 = sanitize(copytext(input("Please enter race:", "General records", active1.fields["species"], null) as message,1,MAX_MESSAGE_LEN))
var/t1 = sanitize(input("Please enter race:", "General records", active1.fields["species"], null) as message)
if ((!( t1 ) || !( authenticated ) || usr.stat || usr.restrained() || (!interactable() && (!istype(usr, /mob/living/silicon))) || active1 != a1))
return
active1.fields["species"] = t1
+1 -1
View File
@@ -175,7 +175,7 @@
var/on_store_message = "has entered long-term storage."
var/on_store_name = "Cryogenic Oversight"
var/on_enter_occupant_message = "You feel cool air surround you. You go numb as your senses turn inward."
var/allow_occupant_types = list(/mob/living/carbon/human, /mob/living/carbon/monkey)
var/allow_occupant_types = list(/mob/living/carbon/human)
var/disallow_occupant_types = list()
var/mob/occupant = null // Person waiting to be despawned.
+4 -3
View File
@@ -844,19 +844,20 @@ About the new airlock wires panel:
return 0
return ..()
/obj/machinery/door/airlock/can_close(var/forced)
/obj/machinery/door/airlock/can_close(var/forced=0)
if(locked || welded)
return 0
if(!forced)
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked, above
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
return 0
return ..()
/obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced))
return
return 0
if(safe)
for(var/turf/turf in locs)
+4 -4
View File
@@ -88,10 +88,10 @@
return 0
return 1
/obj/machinery/door/proc/can_close(var/forced = 0)
if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER))))
return 1
return 0
/obj/machinery/door/proc/can_close()
if(density || operating || !ticker)
return 0
return 1
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return
+2 -3
View File
@@ -194,10 +194,9 @@
if(critter.meat_type)
slab_type = critter.meat_type
else if(istype(src.occupant,/mob/living/carbon/human))
var/mob/living/carbon/human/H = occupant
slab_name = src.occupant.real_name
slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/human
else if(istype(src.occupant, /mob/living/carbon/monkey))
slab_type = /obj/item/weapon/reagent_containers/food/snacks/meat/monkey
slab_type = H.species.meat_type
// Small mobs don't give as much nutrition.
if(src.occupant.small)
+5 -6
View File
@@ -196,7 +196,7 @@ Class Procs:
user.set_machine(src)
/obj/machinery/CouldNotUseTopic(var/mob/user)
usr.unset_machine()
user.unset_machine()
////////////////////////////////////////////////////////////////////////////////////////////
@@ -215,8 +215,7 @@ Class Procs:
if(user.lying || user.stat)
return 1
if ( ! (istype(usr, /mob/living/carbon/human) || \
istype(usr, /mob/living/silicon) || \
istype(usr, /mob/living/carbon/monkey)) )
istype(usr, /mob/living/silicon)))
usr << "\red You don't have the dexterity to do this!"
return 1
/*
@@ -270,9 +269,9 @@ Class Procs:
if(temp_apc && temp_apc.terminal && temp_apc.terminal.powernet)
temp_apc.terminal.powernet.trigger_warning()
return 1
else
return 0
if(user.stunned)
return 1
return 0
/obj/machinery/proc/default_deconstruction_crowbar(var/mob/user, var/obj/item/weapon/crowbar/C)
if(!istype(C))
+1 -1
View File
@@ -323,7 +323,7 @@
if(speed <= 0)
speed = 1
if("setpath")
var/newpath = sanitize(copytext(input(usr, "Please define a new path!",,path) as text|null,1,MAX_MESSAGE_LEN))
var/newpath = sanitize(input(usr, "Please define a new path!",,path) as text|null)
if(newpath && newpath != "")
moving = 0 // stop moving
path = newpath
+1 -1
View File
@@ -194,7 +194,7 @@ Transponder Codes:<UL>"}
updateDialog()
else if(href_list["locedit"])
var/newloc = sanitize(copytext(input("Enter New Location", "Navigation Beacon", location) as text|null,1,MAX_MESSAGE_LEN))
var/newloc = sanitize(input("Enter New Location", "Navigation Beacon", location) as text|null)
if(newloc)
location = newloc
updateDialog()
+6 -14
View File
@@ -496,9 +496,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
if ((usr.contents.Find(src) || ((get_dist(src, usr) <= 1) && istype(src.loc, /turf))) || (istype(usr, /mob/living/silicon)))
usr.set_machine(src)
if(href_list["set_channel_name"])
src.channel_name = strip_html(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
while (findtext(src.channel_name," ") == 1)
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
src.channel_name = sanitizeSafe(input(usr, "Provide a Feed Channel Name", "Network Channel Handler", ""))
src.updateUsrDialog()
//src.update_icon()
@@ -541,9 +539,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_new_message"])
src.msg = strip_html(input(usr, "Write your Feed story", "Network Channel Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.msg = sanitize(input(usr, "Write your Feed story", "Network Channel Handler", ""))
src.updateUsrDialog()
else if(href_list["set_attachment"])
@@ -600,15 +596,11 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co
src.updateUsrDialog()
else if(href_list["set_wanted_name"])
src.channel_name = strip_html(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
while (findtext(src.channel_name," ") == 1)
src.channel_name = copytext(src.channel_name,2,lentext(src.channel_name)+1)
src.channel_name = sanitizeSafe(input(usr, "Provide the name of the Wanted person", "Network Security Handler", ""))
src.updateUsrDialog()
else if(href_list["set_wanted_desc"])
src.msg = strip_html(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
while (findtext(src.msg," ") == 1)
src.msg = copytext(src.msg,2,lentext(src.msg)+1)
src.msg = sanitize(input(usr, "Provide the a description of the Wanted person and any other details you deem important", "Network Security Handler", ""))
src.updateUsrDialog()
else if(href_list["submit_wanted"])
@@ -944,8 +936,8 @@ obj/item/weapon/newspaper/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(src.scribble_page == src.curr_page)
user << "<FONT COLOR='blue'>There's already a scribble in this page... You wouldn't want to make things too cluttered, would you?</FONT>"
else
var/s = strip_html( input(user, "Write something", "Newspaper", "") )
s = sanitize(copytext(s, 1, MAX_MESSAGE_LEN))
var/s = sanitize(input(user, "Write something", "Newspaper", ""))
s = sanitize(s)
if (!s)
return
if (!in_range(src, usr) && src.loc != usr)
+6
View File
@@ -78,8 +78,10 @@ Buildable meters
is_bent = 1
if (istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging/junction))
src.pipe_type = PIPE_JUNCTION
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/heat_exchanging))
src.pipe_type = PIPE_HE_STRAIGHT + is_bent
connect_types = CONNECT_TYPE_HE
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/insulated))
src.pipe_type = PIPE_INSULATED_STRAIGHT + is_bent
else if(istype(make_from, /obj/machinery/atmospherics/pipe/simple/visible/supply) || istype(make_from, /obj/machinery/atmospherics/pipe/simple/hidden/supply))
@@ -190,6 +192,10 @@ Buildable meters
else if (pipe_type == 31 || pipe_type == 32 || pipe_type == 34 || pipe_type == 36 || pipe_type == 38 || pipe_type == 40 || pipe_type == 42)
connect_types = CONNECT_TYPE_SCRUBBER
src.color = PIPE_COLOR_RED
else if (pipe_type == 2 || pipe_type == 3)
connect_types = CONNECT_TYPE_HE
else if (pipe_type == 6)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_HE
else if (pipe_type == 28)
connect_types = CONNECT_TYPE_REGULAR|CONNECT_TYPE_SUPPLY|CONNECT_TYPE_SCRUBBER
//src.pipe_dir = get_pipe_dir()
+2 -2
View File
@@ -488,7 +488,7 @@
if(iscuffed(L)) // If the target is handcuffed, leave it alone
return TURRET_NOT_TARGET
if(isanimal(L) || ismonkey(L)) // Animals are not so dangerous
if(isanimal(L) || issmall(L)) // Animals are not so dangerous
return check_anomalies ? TURRET_SECONDARY_TARGET : TURRET_NOT_TARGET
if(isxenomorph(L) || isalien(L)) // Xenos are dangerous
return check_anomalies ? TURRET_PRIORITY_TARGET : TURRET_NOT_TARGET
@@ -818,7 +818,7 @@
if(istype(I, /obj/item/weapon/pen)) //you can rename turrets like bots!
var/t = input(user, "Enter new turret name", name, finish_name) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = sanitize(t)
if(!t)
return
if(!in_range(src, usr) && loc != usr)
+2 -2
View File
@@ -223,7 +223,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
if(reject_bad_text(href_list["write"]))
dpt = ckey(href_list["write"]) //write contains the string of the receiving department's name
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
screen = 9
@@ -238,7 +238,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
priority = -1
if(href_list["writeAnnouncement"])
var/new_message = copytext(reject_bad_text(input(usr, "Write your message:", "Awaiting Input", "")),1,MAX_MESSAGE_LEN)
var/new_message = sanitize(input("Write your message:", "Awaiting Input", ""))
if(new_message)
message = new_message
switch(href_list["priority"])
+1 -1
View File
@@ -77,7 +77,7 @@
race = "[H.species.name]"
else if(ismonkey(M))
else if(issmall(M))
race = "Monkey"
language = race
+3 -3
View File
@@ -284,7 +284,7 @@
src.log_message("Interfaced with [src_object].")
return STATUS_INTERACTIVE
if(src_object in view(2, src))
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
return STATUS_UPDATE //if they're close enough, allow the occupant to see the screen through the viewport or whatever.
/obj/mecha/proc/melee_action(atom/target)
return
@@ -1569,8 +1569,8 @@
return
if (href_list["change_name"])
if(usr != src.occupant) return
var/newname = strip_html_simple(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
if(newname && trim(newname))
var/newname = sanitizeSafe(input(occupant,"Choose new exosuit name","Rename exosuit",initial(name)) as text, MAX_NAME_LEN)
if(newname)
name = newname
else
alert(occupant, "nope.avi")
+2 -2
View File
@@ -43,9 +43,9 @@
var/datum/topic_input/filter = new /datum/topic_input(href,href_list)
if(href_list["send_message"])
var/obj/item/mecha_parts/mecha_tracking/MT = filter.getObj("send_message")
var/message = strip_html_simple(input(usr,"Input message","Transmit message") as text)
var/message = sanitize(input(usr,"Input message","Transmit message") as text)
var/obj/mecha/M = MT.in_mecha()
if(trim(message) && M)
if(message && M)
M.occupant_message(message)
return
if(href_list["shock"])
+1 -1
View File
@@ -19,7 +19,7 @@
if(triggered) return
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey))
if(istype(M, /mob/living/carbon/human))
for(var/mob/O in viewers(world.view, src.loc))
O << "<font color='red'>[M] triggered the \icon[src] [src]</font>"
triggered = 1
-37
View File
@@ -417,35 +417,6 @@
return 0 //Unsupported slot
//END HUMAN
else if(ismonkey(M))
//START MONKEY
var/mob/living/carbon/monkey/MO = M
switch(slot)
if(slot_l_hand)
if(MO.l_hand)
return 0
return 1
if(slot_r_hand)
if(MO.r_hand)
return 0
return 1
if(slot_wear_mask)
if(MO.wear_mask)
return 0
if( !(slot_flags & SLOT_MASK) )
return 0
return 1
if(slot_back)
if(MO.back)
return 0
if( !(slot_flags & SLOT_BACK) )
return 0
return 1
return 0 //Unsupported slot
//END MONKEY
/obj/item/verb/verb_pickup()
set src in oview(1)
set category = "Object"
@@ -507,14 +478,6 @@
user << "\red You're going to need to remove the eye covering first."
return
var/mob/living/carbon/monkey/Mo = M
if(istype(Mo) && ( \
(Mo.wear_mask && Mo.wear_mask.flags & MASKCOVERSEYES) \
))
// you can't stab someone in the eyes wearing a mask!
user << "\red You're going to need to remove the eye covering first."
return
if(!M.has_eyes())
user << "\red You cannot locate any eyes on [M]!"
return
+2 -2
View File
@@ -114,7 +114,7 @@ move an amendment</a> to the drawing.</p>
usr << "\red Error! Please notify administration!"
return
var/list/turf/turfs = res
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", "", MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", ""), MAX_NAME_LEN)
if(!str || !length(str)) //cancel
return
if(length(str) > 50)
@@ -154,7 +154,7 @@ move an amendment</a> to the drawing.</p>
var/area/A = get_area()
//world << "DEBUG: edit_area"
var/prevname = "[A.name]"
var/str = trim(stripped_input(usr,"New area name:","Blueprint Editing", prevname, MAX_NAME_LEN))
var/str = sanitizeSafe(input("New area name:","Blueprint Editing", prevname), MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
return
if(length(str) > 50)
+1 -1
View File
@@ -49,7 +49,7 @@
return
if (!in_range(src, user) && src.loc != user)
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = "body bag - "
src.name += t
+6 -8
View File
@@ -689,7 +689,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
if ("Edit")
var/n = input(U, "Please enter message", name, notehtml) as message
if (in_range(src, U) && loc == U)
n = copytext(adminscrub(n), 1, MAX_MESSAGE_LEN)
n = sanitizeSafe(n, extra = 0)
if (mode == 1)
note = html_decode(n)
notehtml = note
@@ -726,7 +726,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
U << "The PDA softly beeps."
ui.close()
else
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
ttone = t
else
ui.close()
@@ -735,7 +735,7 @@ var/global/list/obj/item/device/pda/PDAs = list()
var/t = input(U, "Please enter new news tone", name, newstone) as text
if (in_range(src, U) && loc == U)
if (t)
t = sanitize(copytext(t, 1, 20))
t = sanitize(t, 20)
newstone = t
else
ui.close()
@@ -971,8 +971,9 @@ var/global/list/obj/item/device/pda/PDAs = list()
U.visible_message("<span class='notice'>[U] taps on \his PDA's screen.</span>")
U.last_target_click = world.time
var/t = input(U, "Please enter message", P.name, null) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
t = readd_quotes(t)
t = sanitize(t)
//t = readd_quotes(t)
t = replace_characters(t, list("&#34;" = "\""))
if (!t || !istype(P))
return
if (!in_range(src, U) && loc != U)
@@ -1218,9 +1219,6 @@ var/global/list/obj/item/device/pda/PDAs = list()
if(2)
if (!istype(C:dna, /datum/dna))
user << "\blue No fingerprints found on [C]"
else if(!istype(C, /mob/living/carbon/monkey))
if(!isnull(C:gloves))
user << "\blue No fingerprints found on [C]"
else
user << text("\blue [C]'s Fingerprints: [md5(C:dna.uni_identity)]")
if ( !(C:blood_DNA) )
+2 -2
View File
@@ -562,10 +562,10 @@
if("alert")
post_status("alert", href_list["alert"])
if("setmsg1")
message1 = reject_bad_text(trim(sanitize(copytext(input("Line 1", "Enter Message Text", message1) as text|null, 1, 40))), 40)
message1 = reject_bad_text(sanitize(input("Line 1", "Enter Message Text", message1) as text|null, 40), 40)
updateSelfDialog()
if("setmsg2")
message2 = reject_bad_text(trim(sanitize(copytext(input("Line 2", "Enter Message Text", message2) as text|null, 1, 40))), 40)
message2 = reject_bad_text(sanitize(input("Line 2", "Enter Message Text", message2) as text|null, 40), 40)
updateSelfDialog()
else
post_status(href_list["statdisp"])
@@ -75,7 +75,7 @@
user.visible_message("<span class='notice'>[user] directs [src] to [M]'s eyes.</span>", \
"<span class='notice'>You direct [src] to [M]'s eyes.</span>")
if(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)) //robots and aliens are unaffected
if(istype(M, /mob/living/carbon/human)) //robots and aliens are unaffected
if(M.stat == DEAD || M.sdisabilities & BLIND) //mob is dead or fully blind
user << "<span class='notice'>[M] pupils does not react to the light!</span>"
else if(XRAY in M.mutations) //mob has X-RAY vision
+1 -1
View File
@@ -25,7 +25,7 @@
user << "\red \The [src] needs to recharge!"
return
var/message = sanitize(copytext(input(user, "Shout a message?", "Megaphone", null) as text,1,MAX_MESSAGE_LEN))
var/message = sanitize(input(user, "Shout a message?", "Megaphone", null) as text)
if(!message)
return
message = capitalize(message)
+1 -1
View File
@@ -260,7 +260,7 @@
if(2)
radio.ToggleReception()
if(href_list["setlaws"])
var/newlaws = sanitize(copytext(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message,1,MAX_MESSAGE_LEN))
var/newlaws = sanitize(input("Enter any additional directives you would like your pAI personality to follow. Note that these directives will not override the personality's allegiance to its imprinted master. Conflicting directives will be ignored.", "pAI Directive Configuration", pai.pai_laws) as message)
if(newlaws)
pai.pai_laws = newlaws
pai << "Your supplemental directives have been updated. Your new directives are:"
+1 -1
View File
@@ -233,7 +233,7 @@
user << "\blue The MMI must go in after everything else!"
if (istype(W, /obj/item/weapon/pen))
var/t = stripped_input(user, "Enter new robot name", src.name, src.created_name, MAX_NAME_LEN)
var/t = sanitizeSafe(input(user, "Enter new robot name", src.name, src.created_name), MAX_NAME_LEN)
if (!t)
return
if (!in_range(src, usr) && src.loc != usr)
@@ -53,7 +53,7 @@
var/heldname = "default name"
/obj/item/borg/upgrade/rename/attack_self(mob/user as mob)
heldname = stripped_input(user, "Enter new robot name", "Robot Reclassification", heldname, MAX_NAME_LEN)
heldname = sanitizeSafe(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
+1 -2
View File
@@ -16,8 +16,7 @@
return 1
if ( ! (istype(user, /mob/living/carbon/human) || \
istype(user, /mob/living/silicon) || \
istype(user, /mob/living/carbon/monkey)) )
istype(user, /mob/living/silicon)) )
user << "\red You don't have the dexterity to do this!"
return 1
+4
View File
@@ -68,5 +68,9 @@
name = "\improper \"LiquidFood\" ration"
icon_state = "liquidfood"
/obj/item/trash/tastybread
name = "bread tube"
icon_state = "tastybread"
/obj/item/trash/attack(mob/M as mob, mob/living/user as mob)
return
@@ -98,7 +98,7 @@ AI MODULES
/obj/item/weapon/aiModule/safeguard/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person to safeguard.", "Safeguard who?", user.name)
var/targName = sanitize(input("Please enter the name of the person to safeguard.", "Safeguard who?", user.name))
targetName = targName
desc = text("A 'safeguard' AI module: 'Safeguard []. Individuals that threaten [] are not human and are a threat to humans.'", targetName, targetName)
@@ -127,7 +127,7 @@ AI MODULES
/obj/item/weapon/aiModule/oneHuman/attack_self(var/mob/user as mob)
..()
var/targName = stripped_input(usr, "Please enter the name of the person who is the only human.", "Who?", user.real_name)
var/targName = sanitize(input("Please enter the name of the person who is the only human.", "Who?", user.real_name))
targetName = targName
desc = text("A 'one human' AI module: 'Only [] is human.'", targetName)
@@ -265,7 +265,7 @@ AI MODULES
if(new_lawpos < MIN_SUPPLIED_LAW_NUMBER) return
lawpos = min(new_lawpos, MAX_SUPPLIED_LAW_NUMBER)
var/newlaw = ""
var/targName = sanitize(copytext(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw),1,MAX_MESSAGE_LEN))
var/targName = sanitize(input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' AI module: ([lawpos]) '[newFreeFormLaw]'"
@@ -378,7 +378,7 @@ AI MODULES
/obj/item/weapon/aiModule/freeformcore/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new core law for the AI.", "Freeform Law Entry", newlaw)
var/targName = sanitize(input("Please enter a new core law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A 'freeform' Core AI module: '[newFreeFormLaw]'"
@@ -403,7 +403,7 @@ AI MODULES
/obj/item/weapon/aiModule/syndicate/attack_self(var/mob/user as mob)
..()
var/newlaw = ""
var/targName = stripped_input(usr, "Please enter a new law for the AI.", "Freeform Law Entry", newlaw,MAX_MESSAGE_LEN)
var/targName = sanitize(input("Please enter a new law for the AI.", "Freeform Law Entry", newlaw))
newFreeFormLaw = targName
desc = "A hacked AI law module: '[newFreeFormLaw]'"
+4 -4
View File
@@ -224,13 +224,13 @@
/obj/item/weapon/card/id/syndicate/attack_self(mob/user as mob)
if(!src.registered_name)
//Stop giving the players unsanitized unputs! You are giving ways for players to intentionally crash clients! -Nodrak
var t = reject_bad_name(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
var t = sanitizeName(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name))
if(!t) //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Agent"))
if(!u)
alert("Invalid assignment.")
src.registered_name = ""
@@ -245,13 +245,13 @@
switch(alert("Would you like to display the ID, or retitle it?","Choose.","Rename","Show"))
if("Rename")
var t = sanitize(copytext(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name),1,26))
var t = sanitize(input(user, "What name would you like to put on this card?", "Agent card name", ishuman(user) ? user.real_name : user.name), 26)
if(!t || t == "Unknown" || t == "floor" || t == "wall" || t == "r-wall") //Same as mob/new_player/prefrences.dm
alert("Invalid name.")
return
src.registered_name = t
var u = sanitize(copytext(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"),1,MAX_MESSAGE_LEN))
var u = sanitize(input(user, "What occupation would you like to put on this card?\nNote: This will not grant any access levels other than Maintenance.", "Agent card job assignment", "Assistant"))
if(!u)
alert("Invalid assignment.")
return
@@ -52,7 +52,7 @@
user << "\red Circuit controls are locked."
return
var/existing_networks = list2text(network,",")
var/input = strip_html(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
var/input = sanitize(input(usr, "Which networks would you like to connect this camera console circuit to? Seperate networks with a comma. No Spaces!\nFor example: SS13,Security,Secret ", "Multitool-Circuitboard interface", existing_networks))
if(!input)
usr << "No input found please hang up and try your call again."
return
@@ -0,0 +1,15 @@
#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/miningdrill
name = T_BOARD("mining drill head")
build_path = "/obj/machinery/mining/drill"
board_type = "machine"
origin_tech = "programming=1;engineering=1"
frame_desc = "Requires 1 capacitor, 1 cell, 1 matter bin, and 1 micro laser."
req_components = list(
"/obj/item/weapon/stock_parts/capacitor" = 1,
"/obj/item/weapon/cell" = 1,
"/obj/item/weapon/stock_parts/matter_bin" = 1,
"/obj/item/weapon/stock_parts/micro_laser" = 1)
@@ -151,7 +151,7 @@
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has been injected with [] by [].", M, src, user), 1)
//Foreach goto(192)
if (!(istype(M, /mob/living/carbon/human) || istype(M, /mob/living/carbon/monkey)))
if (!(istype(M, /mob/living/carbon/human)))
user << "\red Apparently it didn't work."
return
@@ -67,20 +67,6 @@
O.process()
return
if (ismonkey(target))
var/mob/living/carbon/monkey/M = target
var/obj/effect/equip_e/monkey/O = new /obj/effect/equip_e/monkey( )
O.source = user
O.target = M
O.item = user.get_active_hand()
O.s_loc = user.loc
O.t_loc = M.loc
O.place = "handcuff"
M.requests += O
spawn( 0 )
O.process()
return
var/last_chew = 0
/mob/living/carbon/human/RestrainedClickOn(var/atom/A)
if (A != src) return ..()
@@ -152,7 +152,7 @@ Implant Specifics:<BR>"}
hear(var/msg)
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
msg = sanitize_simple(msg, replacechars)
msg = replace_characters(msg, replacechars)
if(findtext(msg,phrase))
activate()
del(src)
@@ -206,7 +206,7 @@ Implant Specifics:<BR>"}
elevel = alert("What sort of explosion would you prefer?", "Implant Intent", "Localized Limb", "Destroy Body", "Full Explosion")
phrase = input("Choose activation phrase:") as text
var/list/replacechars = list("'" = "","\"" = "",">" = "","<" = "","(" = "",")" = "")
phrase = sanitize_simple(phrase, replacechars)
phrase = replace_characters(phrase, replacechars)
usr.mind.store_memory("Explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate.", 0, 0)
usr << "The implanted explosive implant in [source] can be activated by saying something containing the phrase ''[src.phrase]'', <B>say [src.phrase]</B> to attempt to activate."
return 1
@@ -26,7 +26,7 @@
return
if((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if(t)
src.name = text("Glass Case - '[]'", t)
else
@@ -26,7 +26,7 @@
//returns 1 if the master item's parent's MouseDrop() should be called, 0 otherwise. It's strange, but no other way of
//doing it without the ability to call another proc's parent, really.
/obj/item/weapon/storage/internal/proc/handle_mousedrop(mob/user as mob, obj/over_object as obj)
if (ishuman(user) || ismonkey(user)) //so monkeys can take off their backpacks -- Urist
if (ishuman(user) || issmall(user)) //so monkeys can take off their backpacks -- Urist
if (istype(user.loc,/obj/mecha)) // stops inventory actions in a mech
return 0
@@ -37,12 +37,12 @@
if (!( istype(over_object, /obj/screen) ))
return 1
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
//there's got to be a better way of doing this...
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
if (!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
return 0
if (!( user.restrained() ) && !( user.stat ))
switch(over_object.name)
if("r_hand")
@@ -70,12 +70,12 @@
H.put_in_hands(master_item)
H.r_store = null
return 0
src.add_fingerprint(user)
if (master_item.loc == user)
src.open(user)
return 0
for(var/mob/M in range(1, master_item.loc))
if (M.s_active == src)
src.close(M)
@@ -28,7 +28,7 @@
if(!canremove)
return
if (ishuman(usr) || ismonkey(usr)) //so monkeys can take off their backpacks -- Urist
if (ishuman(usr) || issmall(usr)) //so monkeys can take off their backpacks -- Urist
if (istype(usr.loc,/obj/mecha)) // stops inventory actions in a mech
return
+8 -3
View File
@@ -63,12 +63,17 @@
unwield()
/obj/item/weapon/twohanded/attack_self(mob/user as mob)
if( istype(user,/mob/living/carbon/monkey) )
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
..()
if(istype(user, /mob/living/carbon/human))
var/mob/living/carbon/human/H = user
if(H.species.is_small)
user << "<span class='warning'>It's too heavy for you to wield fully.</span>"
return
else
return
if(wielded) //Trying to unwield it
unwield()
user << "<span class='notice'>You are now carrying the [name] with one hand.</span>"
@@ -30,7 +30,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
return 2
if(usr.stunned)
return 2
playsound(src.loc, 'sound/machines/click.ogg', 15, 1, -3)
for(var/obj/O in src)
@@ -135,7 +135,7 @@
/obj/structure/door_assembly/attackby(obj/item/W as obj, mob/user as mob)
if(istype(W, /obj/item/weapon/pen))
var/t = copytext(stripped_input(user, "Enter the name for the door.", src.name, src.created_name),1,MAX_NAME_LEN)
var/t = sanitizeSafe(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
+7 -6
View File
@@ -68,12 +68,12 @@
//Flimsy grilles aren't so great at stopping projectiles. However they can absorb some of the impact
var/damage = Proj.damage
var/passthrough = 0
//20% chance that the grille provides a bit more cover than usual. Support structure for example might take up 20% of the grille's area.
//If they click on the grille itself then we assume they are aiming at the grille itself and the extra cover behaviour is always used.
switch(Proj.damage_type)
if(BRUTE)
//bullets
//bullets
if(Proj.original == src || prob(20))
Proj.damage *= between(0, Proj.damage/60, 0.5)
if(prob(max((damage-10)/25, 0))*100)
@@ -86,11 +86,11 @@
if(!(Proj.original == src || prob(20)))
Proj.damage *= 0.5
passthrough = 1
if(passthrough)
. = -1
damage = between(0, (damage - Proj.damage)*(Proj.damage_type == BRUTE? 0.4 : 1), 10) //if the bullet passes through then the grille avoids most of the damage
src.health -= damage*0.2
spawn(0) healthcheck() //spawn to make sure we return properly if the grille is deleted
@@ -139,7 +139,7 @@
if(WINDOW.dir == dir_to_set)//checking this for a 2nd time to check if a window was made while we were waiting.
user << "<span class='notice'>There is already a window facing this way there.</span>"
return
var/wtype = ST.created_window
if (ST.use(1))
var/obj/structure/window/WD = new wtype(loc, dir_to_set, 1)
@@ -197,7 +197,8 @@
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(3, 1, src)
s.start()
return 1
if(user.stunned)
return 1
else
return 0
return 0
+47 -65
View File
@@ -4,75 +4,57 @@
name = "a meat spike"
icon = 'icons/obj/kitchen.dmi'
icon_state = "spike"
desc = "A spike for collecting meat from animals"
desc = "A spike for collecting meat from animals."
density = 1
anchored = 1
var/meat = 0
var/occupied = 0
var/meattype = 0 // 0 - Nothing, 1 - Monkey, 2 - Xeno
var/occupied
var/meat_type
var/victim_name = "corpse"
/obj/structure/kitchenspike
attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(!istype(G, /obj/item/weapon/grab))
return
if(istype(G.affecting, /mob/living/carbon/monkey))
if(src.occupied == 0)
src.icon_state = "spikebloody"
src.occupied = 1
src.meat = 5
src.meattype = 1
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
else if(istype(G.affecting, /mob/living/carbon/alien))
if(src.occupied == 0)
src.icon_state = "spikebloodygreen"
src.occupied = 1
src.meat = 5
src.meattype = 2
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [user] has forced [G.affecting] onto the spike, killing them instantly!"))
del(G.affecting)
del(G)
else
user << "\red The spike already has something on it, finish collecting its meat first!"
/obj/structure/kitchenspike/attackby(obj/item/weapon/grab/G as obj, mob/user as mob)
if(!istype(G, /obj/item/weapon/grab) || !G.affecting)
return
if(occupied)
user << "<span class = 'danger'>The spike already has something on it, finish collecting its meat first!</span>"
else
if(spike(G.affecting))
visible_message("<span class = 'danger'>[user] has forced [G.affecting] onto the spike, killing them instantly!</span>")
del(G.affecting)
del(G)
else
user << "\red They are too big for the spike, try something smaller!"
return
user << "<span class='danger'>They are too big for the spike, try something smaller!</span>"
// MouseDrop_T(var/atom/movable/C, mob/user)
// if(istype(C, /obj/mob/carbon/monkey)
// else if(istype(C, /obj/mob/carbon/alien) && !istype(C, /mob/living/carbon/alien/larva/slime))
// else if(istype(C, /obj/livestock/spesscarp
/obj/structure/kitchenspike/proc/spike(var/mob/living/victim)
attack_hand(mob/user as mob)
if(..())
return
if(src.occupied)
if(src.meattype == 1)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey( src.loc )
usr << "You remove some meat from the monkey."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/meat/monkey(src.loc)
usr << "You remove the last piece of meat from the monkey!"
src.icon_state = "spike"
src.occupied = 0
else if(src.meattype == 2)
if(src.meat > 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat( src.loc )
usr << "You remove some meat from the alien."
else if(src.meat == 1)
src.meat--
new /obj/item/weapon/reagent_containers/food/snacks/xenomeat(src.loc)
usr << "You remove the last piece of meat from the alien!"
src.icon_state = "spike"
src.occupied = 0
if(!istype(victim))
return
if(istype(victim, /mob/living/carbon/human))
var/mob/living/carbon/human/H = victim
if(!H.species.is_small)
return 0
meat_type = H.species.meat_type
icon_state = "spikebloody"
else if(istype(victim, /mob/living/carbon/alien))
meat_type = /obj/item/weapon/reagent_containers/food/snacks/xenomeat
icon_state = "spikebloodygreen"
else
return 0
victim_name = victim.name
occupied = 1
meat = 5
return 1
/obj/structure/kitchenspike/attack_hand(mob/user as mob)
if(..() || !occupied)
return
meat--
new meat_type(get_turf(src))
if(src.meat > 1)
user << "You remove some meat from \the [victim_name]."
else if(src.meat == 1)
user << "You remove the last piece of meat from \the [victim_name]!"
icon_state = "spike"
occupied = 0
+2 -2
View File
@@ -92,7 +92,7 @@
return
if ((!in_range(src, usr) && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Morgue- '[]'", t)
else
@@ -258,7 +258,7 @@
return
if ((!in_range(src, usr) > 1 && src.loc != user))
return
t = sanitize(copytext(t,1,MAX_MESSAGE_LEN))
t = sanitize(t)
if (t)
src.name = text("Crematorium- '[]'", t)
else
+1 -1
View File
@@ -53,7 +53,7 @@ client/verb/JoinResponseTeam()
for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando")
L.name = null//Reserving the place.
var/new_name = input(usr, "Pick a name","Name") as null|text
var/new_name = sanitizeSafe(input(usr, "Pick a name","Name") as null|text, MAX_NAME_LEN)
if(!new_name)//Somebody changed his mind, place is available again.
L.name = "Commando"
return
+18 -4
View File
@@ -49,6 +49,11 @@ var/list/mechtoys = list(
anchored = 1
layer = 4
explosion_resistance = 5
var/list/mobs_can_pass = list(
/mob/living/carbon/slime,
/mob/living/simple_animal/mouse,
/mob/living/silicon/robot/drone
)
/obj/structure/plasticflaps/CanPass(atom/A, turf/T)
if(istype(A) && A.checkpass(PASSGLASS))
@@ -61,10 +66,19 @@ var/list/mechtoys = list(
if(istype(A, /obj/vehicle)) //no vehicles
return 0
if(istype(A, /mob/living)) // You Shall Not Pass!
var/mob/living/M = A
if(!M.lying && !istype(M, /mob/living/carbon/monkey) && !istype(M, /mob/living/carbon/slime) && !istype(M, /mob/living/simple_animal/mouse) && !istype(M, /mob/living/silicon/robot/drone)) //If your not laying down, or a small creature, no pass.
return 0
var/mob/living/M = A
if(istype(M))
if(M.lying)
return ..()
for(var/mob_type in mobs_can_pass)
if(istype(A, mob_type))
return ..()
if(istype(A, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
if(H.species.is_small)
return ..()
return 0
return ..()
/obj/structure/plasticflaps/ex_act(severity)
+1 -3
View File
@@ -118,9 +118,7 @@
// Only adds blood on the floor -- Skie
/turf/simulated/proc/add_blood_floor(mob/living/carbon/M as mob)
if(istype(M, /mob/living/carbon/monkey))
blood_splatter(src,M,1)
else if( istype(M, /mob/living/carbon/alien ))
if( istype(M, /mob/living/carbon/alien ))
var/obj/effect/decal/cleanable/blood/xeno/this = new /obj/effect/decal/cleanable/blood/xeno(src)
this.blood_DNA["UNKNOWN BLOOD"] = "X*"
else if( istype(M, /mob/living/silicon/robot ))
+2 -2
View File
@@ -12,7 +12,7 @@
src << "Guests may not use OOC."
return
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
msg = sanitize(msg)
if(!msg) return
if(!(prefs.toggles & CHAT_OOC))
@@ -77,7 +77,7 @@
src << "Guests may not use OOC."
return
msg = trim(sanitize(copytext(msg, 1, MAX_MESSAGE_LEN)))
msg = sanitize(msg)
if(!msg) return
if(!(prefs.toggles & CHAT_LOOC))
-27
View File
@@ -110,33 +110,6 @@
death(0)
suiciding = 0
/mob/living/carbon/monkey/verb/suicide()
set hidden = 1
if (stat == 2)
src << "You're already dead!"
return
if (!ticker)
src << "You can't commit suicide before the game starts!"
return
if (suiciding)
src << "You're already committing suicide! Be patient!"
return
var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No")
if(confirm == "Yes")
if(!canmove || restrained())
src << "You can't commit suicide whilst restrained! ((You can type Ghost instead however.))"
return
suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
adjustOxyLoss(max(175- getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0))
updatehealth()
/mob/living/silicon/ai/verb/suicide()
set hidden = 1

Some files were not shown because too many files have changed in this diff Show More