Merge branch 'master' of https://github.com/Baystation12/Baystation12 into dev-freeze

This commit is contained in:
Zuhayr
2015-08-16 05:40:47 -07:00
6 changed files with 18 additions and 19 deletions

View File

@@ -55,7 +55,7 @@
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites - //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()! //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) /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)) return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'")), max_length, encode, trim, extra)
//Filters out undesirable characters from names //Filters out undesirable characters from names
/proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0) /proc/sanitizeName(var/input, var/max_length = MAX_NAME_LEN, var/allow_numbers = 0)

View File

@@ -135,6 +135,10 @@ world/loop_checks = 0
/datum/controller/process/garbage_collector/getStatName() /datum/controller/process/garbage_collector/getStatName()
return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])" return ..()+"([garbage_collector.destroyed.len]/[garbage_collector.dels]/[garbage_collector.hard_dels])"
// Tests if an atom has been deleted.
/proc/deleted(atom/A)
return !A || !isnull(A.gcDestroyed)
// Should be treated as a replacement for the 'del' keyword. // Should be treated as a replacement for the 'del' keyword.
// Datums passed to this will be given a chance to clean up references to allow the GC to collect them. // Datums passed to this will be given a chance to clean up references to allow the GC to collect them.
/proc/qdel(var/datum/A) /proc/qdel(var/datum/A)

View File

@@ -411,7 +411,6 @@ its easier to just keep the beam vertical.
/atom/proc/clean_blood() /atom/proc/clean_blood()
if(!simulated) if(!simulated)
return return
src.color = initial(src.color) //paint
src.germ_level = 0 src.germ_level = 0
if(istype(blood_DNA, /list)) if(istype(blood_DNA, /list))
del(blood_DNA) del(blood_DNA)

View File

@@ -463,7 +463,7 @@ Buildable meters
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()
@@ -482,7 +482,7 @@ Buildable meters
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()
@@ -501,7 +501,7 @@ Buildable meters
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()
@@ -520,7 +520,7 @@ Buildable meters
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()
@@ -539,7 +539,7 @@ Buildable meters
//var/turf/T = P.loc //var/turf/T = P.loc
//P.level = T.intact ? 2 : 1 //P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()
@@ -574,7 +574,7 @@ Buildable meters
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = T.intact ? 2 : 1
M.initialize() M.initialize()
if (!M) if (deleted(M))
usr << pipefailtext usr << pipefailtext
return 1 return 1
M.build_network() M.build_network()
@@ -643,7 +643,7 @@ Buildable meters
var/turf/T = M.loc var/turf/T = M.loc
M.level = T.intact ? 2 : 1 M.level = T.intact ? 2 : 1
M.initialize() M.initialize()
if (!M) if (deleted(M))
usr << pipefailtext usr << pipefailtext
return 1 return 1
M.build_network() M.build_network()
@@ -722,7 +722,7 @@ Buildable meters
//var/turf/T = P.loc //var/turf/T = P.loc
//P.level = T.intact ? 2 : 1 //P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)" usr << pipefailtext //"There's nothing to connect this pipe to! (with how the pipe code works, at least one end needs to be connected to something, otherwise the game deletes the segment)"
return 1 return 1
P.build_network() P.build_network()
@@ -905,7 +905,7 @@ Buildable meters
var/turf/T = P.loc var/turf/T = P.loc
P.level = T.intact ? 2 : 1 P.level = T.intact ? 2 : 1
P.initialize() P.initialize()
if (!P) if (deleted(P))
usr << pipefailtext usr << pipefailtext
return 1 return 1
P.build_network() P.build_network()

View File

@@ -386,7 +386,7 @@
if(!target) if(!target)
return return
var/datum/reagents/R = new /datum/reagents(maximum_volume) var/datum/reagents/R = new /datum/reagents(amount * multiplier)
. = trans_to_holder(R, amount, multiplier, copy) . = trans_to_holder(R, amount, multiplier, copy)
R.touch_turf(target) R.touch_turf(target)
return return
@@ -396,7 +396,7 @@
return return
if(!target.reagents) if(!target.reagents)
var/datum/reagents/R = new /datum/reagents(maximum_volume) var/datum/reagents/R = new /datum/reagents(amount * multiplier)
. = trans_to_holder(R, amount, multiplier, copy) . = trans_to_holder(R, amount, multiplier, copy)
R.touch_obj(target) R.touch_obj(target)
return return

View File

@@ -563,7 +563,6 @@
adj_drowsy = -3 adj_drowsy = -3
adj_sleepy = -2 adj_sleepy = -2
adj_temp = 25 adj_temp = 25
overdose = 45
glass_icon_state = "hot_coffee" glass_icon_state = "hot_coffee"
glass_name = "cup of coffee" glass_name = "cup of coffee"
@@ -575,10 +574,7 @@
return return
if(adj_temp > 0) if(adj_temp > 0)
holder.remove_reagent("frostoil", 10 * removed) holder.remove_reagent("frostoil", 10 * removed)
if(dose > 45)
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
if(alien == IS_DIONA)
return
M.make_jittery(5) M.make_jittery(5)
/datum/reagent/drink/coffee/icecoffee /datum/reagent/drink/coffee/icecoffee