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
+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>"