mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge branch 'master' of https://github.com/Baystation12/Baystation12 into dev-freeze
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
//If you have a problem with sanitize() in chat, when quotes and >, < are displayed as html entites -
|
||||
//this is a problem of double-encode(when & becomes &), use sanitize() with encode=0, but not the sanitizeSafe()!
|
||||
/proc/sanitizeSafe(var/input, var/max_length = MAX_MESSAGE_LEN, var/encode = 1, var/trim = 1, var/extra = 1)
|
||||
return sanitize(replace_characters(input, list(">"=" ","<"=" ", "\""="'"), max_length, encode, trim, extra))
|
||||
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)
|
||||
|
||||
@@ -135,6 +135,10 @@ world/loop_checks = 0
|
||||
/datum/controller/process/garbage_collector/getStatName()
|
||||
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.
|
||||
// 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)
|
||||
|
||||
@@ -411,7 +411,6 @@ its easier to just keep the beam vertical.
|
||||
/atom/proc/clean_blood()
|
||||
if(!simulated)
|
||||
return
|
||||
src.color = initial(src.color) //paint
|
||||
src.germ_level = 0
|
||||
if(istype(blood_DNA, /list))
|
||||
del(blood_DNA)
|
||||
|
||||
@@ -463,7 +463,7 @@ Buildable meters
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -482,7 +482,7 @@ Buildable meters
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -501,7 +501,7 @@ Buildable meters
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -520,7 +520,7 @@ Buildable meters
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -539,7 +539,7 @@ Buildable meters
|
||||
//var/turf/T = P.loc
|
||||
//P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -574,7 +574,7 @@ Buildable meters
|
||||
var/turf/T = M.loc
|
||||
M.level = T.intact ? 2 : 1
|
||||
M.initialize()
|
||||
if (!M)
|
||||
if (deleted(M))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
M.build_network()
|
||||
@@ -643,7 +643,7 @@ Buildable meters
|
||||
var/turf/T = M.loc
|
||||
M.level = T.intact ? 2 : 1
|
||||
M.initialize()
|
||||
if (!M)
|
||||
if (deleted(M))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
M.build_network()
|
||||
@@ -722,7 +722,7 @@ Buildable meters
|
||||
//var/turf/T = P.loc
|
||||
//P.level = T.intact ? 2 : 1
|
||||
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)"
|
||||
return 1
|
||||
P.build_network()
|
||||
@@ -905,7 +905,7 @@ Buildable meters
|
||||
var/turf/T = P.loc
|
||||
P.level = T.intact ? 2 : 1
|
||||
P.initialize()
|
||||
if (!P)
|
||||
if (deleted(P))
|
||||
usr << pipefailtext
|
||||
return 1
|
||||
P.build_network()
|
||||
|
||||
@@ -386,7 +386,7 @@
|
||||
if(!target)
|
||||
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)
|
||||
R.touch_turf(target)
|
||||
return
|
||||
@@ -396,7 +396,7 @@
|
||||
return
|
||||
|
||||
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)
|
||||
R.touch_obj(target)
|
||||
return
|
||||
|
||||
@@ -563,7 +563,6 @@
|
||||
adj_drowsy = -3
|
||||
adj_sleepy = -2
|
||||
adj_temp = 25
|
||||
overdose = 45
|
||||
|
||||
glass_icon_state = "hot_coffee"
|
||||
glass_name = "cup of coffee"
|
||||
@@ -575,11 +574,8 @@
|
||||
return
|
||||
if(adj_temp > 0)
|
||||
holder.remove_reagent("frostoil", 10 * removed)
|
||||
|
||||
/datum/reagent/drink/coffee/overdose(var/mob/living/carbon/M, var/alien)
|
||||
if(alien == IS_DIONA)
|
||||
return
|
||||
M.make_jittery(5)
|
||||
if(dose > 45)
|
||||
M.make_jittery(5)
|
||||
|
||||
/datum/reagent/drink/coffee/icecoffee
|
||||
name = "Iced Coffee"
|
||||
|
||||
Reference in New Issue
Block a user