diff --git a/code/datums/helper_datums/teleport.dm b/code/datums/helper_datums/teleport.dm
index 9918763ba8..8d87a53e6c 100644
--- a/code/datums/helper_datums/teleport.dm
+++ b/code/datums/helper_datums/teleport.dm
@@ -107,6 +107,10 @@
playSpecials(curturf,effectin,soundin)
+ // Remove any luminosity etc.
+ var/prevlum = teleatom.luminosity
+ teleatom.luminosity = 0
+
if(force_teleport)
teleatom.forceMove(destturf)
playSpecials(destturf,effectout,soundout)
@@ -114,6 +118,10 @@
if(teleatom.Move(destturf))
playSpecials(destturf,effectout,soundout)
+ // Re-Apply lum
+ teleatom.sd_SetLuminosity(prevlum)
+
+
return 1
proc/teleport()
diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm
index 65cbae5624..d4ca611060 100644
--- a/code/game/machinery/telecomms/machine_interactions.dm
+++ b/code/game/machinery/telecomms/machine_interactions.dm
@@ -216,13 +216,14 @@
if(href_list["unlink"])
- var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
- temp = "-% Removed \ref[T] [T.name] from linked entities. %-"
+ if(text2num(href_list["unlink"]) <= length(links))
+ var/obj/machinery/telecomms/T = links[text2num(href_list["unlink"])]
+ temp = "-% Removed \ref[T] [T.name] from linked entities. %-"
- // Remove link entries from both T and src.
- if(src in T.links)
- T.links.Remove(src)
- links.Remove(T)
+ // Remove link entries from both T and src.
+ if(src in T.links)
+ T.links.Remove(src)
+ links.Remove(T)
if(href_list["link"])
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index 6f1e45765a..859cf9f372 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -404,8 +404,10 @@
log.parameters["name"] = signal.data["name"]
log.parameters["realname"] = signal.data["realname"]
- if(!istype(M, /mob/new_player))
+ if(!istype(M, /mob/new_player) && M)
log.parameters["uspeech"] = M.universal_speak
+ else
+ log.parameters["uspeech"] = 0
// If the signal is still compressed, make the log entry gibberish
if(signal.data["compression"] > 0)
diff --git a/code/game/step_triggers.dm b/code/game/step_triggers.dm
index a42f8f2fd0..ceb13a266c 100644
--- a/code/game/step_triggers.dm
+++ b/code/game/step_triggers.dm
@@ -11,6 +11,8 @@
/obj/step_trigger/HasEntered(H as mob|obj)
..()
+ if(!H)
+ return
if(istype(H, /mob/dead/observer) && !affect_ghosts)
return
Trigger(H)
@@ -22,7 +24,7 @@
/obj/step_trigger/thrower
var/direction = SOUTH // the direction of throw
var/tiles = 3 // if 0: forever until atom hits a stopper
- var/immobilize = 0 // if nonzero: prevents mobs from moving while they're being flung
+ var/immobilize = 1 // if nonzero: prevents mobs from moving while they're being flung
var/speed = 1 // delay of movement
var/facedir = 0 // if 1: atom faces the direction of movement
var/nostop = 0 // if 1: will only be stopped by teleporters
@@ -62,10 +64,11 @@
if(T.stopper)
stopthrow = 1
- var/predir = A.dir
- step(A, direction)
- if(!facedir)
- A.dir = predir
+ if(A)
+ var/predir = A.dir
+ step(A, direction)
+ if(!facedir)
+ A.dir = predir
diff --git a/code/modules/scripting/IDE.dm b/code/modules/scripting/IDE.dm
index 9427a85d96..f935bf9257 100644
--- a/code/modules/scripting/IDE.dm
+++ b/code/modules/scripting/IDE.dm
@@ -24,7 +24,7 @@ client/verb/tcssave()
client/verb/tcscompile()
set hidden = 1
if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
+ if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
@@ -75,7 +75,7 @@ client/verb/tcscompile()
client/verb/tcsrun()
set hidden = 1
if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
+ if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
@@ -141,7 +141,7 @@ client/verb/tcsrun()
client/verb/exittcs()
set hidden = 1
if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
+ if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode == mob)
Machine.storedcode = "[winget(mob, "tcscode", "text")]"
@@ -153,7 +153,7 @@ client/verb/exittcs()
client/verb/tcsrevert()
set hidden = 1
if(mob.machine || issilicon(mob))
- if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || issilicon(mob))
+ if((istype(mob.machine, /obj/machinery/computer/telecomms/traffic) && mob.machine in view(1, mob)) || (issilicon(mob) && istype(mob.machine, /obj/machinery/computer/telecomms/traffic) ))
var/obj/machinery/computer/telecomms/traffic/Machine = mob.machine
if(Machine.editingcode != mob)
return
diff --git a/code/modules/scripting/Parser/Expressions.dm b/code/modules/scripting/Parser/Expressions.dm
index 3245a4a28f..f27a30d3ad 100644
--- a/code/modules/scripting/Parser/Expressions.dm
+++ b/code/modules/scripting/Parser/Expressions.dm
@@ -276,7 +276,13 @@
exp.func_name=curToken.value
NextToken() //skip function name
NextToken() //skip open parenthesis, already found
+ var/loops = 0
+
for()
+ loops++
+ if(loops>=1000)
+ CRASH("Something TERRIBLE has gone wrong in ParseFunctionExpression ;__;")
+
if(istype(curToken, /token/symbol) && curToken.value==")")
return exp
exp.parameters+=ParseParamExpression()