fix json spawned mobs immediately dying (#31560)

This commit is contained in:
Toastical
2026-02-01 03:59:06 +00:00
committed by GitHub
parent 506e5b7f5d
commit ff1617f010
+9 -1
View File
@@ -78,6 +78,14 @@ in their list
if(!path)
throw EXCEPTION("Path not found: [path]")
var/atom/movable/thing = new path(loc)
// Since Initialize() eats the first argument
// we need to pass loc twice for organs, otherwise
// they'll never attach to the mob. But if it's passed
// for everything, it'll break shit cause it gets passed random args.
var/atom/movable/thing
if(ispath(path, /obj/item/organ))
thing = new path(loc, loc)
else
thing = new path(loc)
thing.deserialize(data)
return thing