diff --git a/code/modules/persistence/effects/filth.dm b/code/modules/persistence/effects/filth.dm index 33129c2b8c..4abd684ec7 100644 --- a/code/modules/persistence/effects/filth.dm +++ b/code/modules/persistence/effects/filth.dm @@ -49,16 +49,19 @@ // new _path(creating, token["age"]+1) var/atom/inst if(ispath(_path, /obj/effect/decal/cleanable/crayon)) + if(!istext(token["art_color"]) || !istext(token["art_shade"]) || !istext(token["art_type"])) + return inst = new _path(creating, token["art_color"], token["art_shade"], token["art_type"], token["age"]+1) else if (saves_dirt) new _path(creating, token["age"]+1, token["dirt"]) else new _path(creating, token["age"]+1) - if(token["pixel_x"]) - inst.pixel_x = token["pixel_x"] - if(token["pixel_y"]) - inst.pixel_y = token["pixel_y"] + if(inst) + if(token["pixel_x"]) + inst.pixel_x = token["pixel_x"] + if(token["pixel_y"]) + inst.pixel_y = token["pixel_y"] // CHOMPEdit End /datum/persistent/filth/GetEntryAge(var/atom/entry)