Fixes some runtimes with soapstone messages

I'm not sure why they're not loading on main anymore, possibly some bad
JSON data? This stopped the warning locally, anyway.
This commit is contained in:
Jack Edge
2017-03-22 20:06:09 +00:00
parent ec721fe672
commit 4e8badad73
2 changed files with 22 additions and 3 deletions
+8 -2
View File
@@ -192,10 +192,14 @@
var/turf/T = get_turf(src)
data["x"] = T.x
data["y"] = T.y
data["z"] = T.z
data["like_keys"] = like_keys
data["dislike_keys"] = dislike_keys
/obj/structure/chisel_message/proc/unpack(list/data)
if(!islist(data))
return
hidden_message = data["hidden_message"]
creator_name = data["creator_name"]
creator_key = data["creator_key"]
@@ -209,8 +213,10 @@
var/x = data["x"]
var/y = data["y"]
var/turf/newloc = locate(x, y, ZLEVEL_STATION)
forceMove(newloc)
var/z = data["z"]
var/turf/newloc = locate(x, y, z)
if(isturf(newloc))
forceMove(newloc)
update_icon()
/obj/structure/chisel_message/examine(mob/user)