Fix protoype object updates changing cached prototype. Resolves #3505

This commit is contained in:
Chiizujin 2024-04-14 01:40:47 +10:00
parent 7f41e5a649
commit 3e2995a152

View file

@ -323,7 +323,7 @@ def prototype_from_object(obj):
prot["prototype_locks"] = "spawn:all();edit:all()"
prot["prototype_tags"] = []
else:
prot = prot[0]
prot = prot[0].copy()
prot["key"] = obj.db_key or hashlib.md5(bytes(str(time.time()), "utf-8")).hexdigest()[:6]
prot["typeclass"] = obj.db_typeclass_path