Merge pull request #3507 from chiizujin/prototype_cache

Fix protoype object updates changing cached prototype
This commit is contained in:
Griatch 2024-04-27 19:57:40 +02:00 committed by GitHub
commit 964e2af71e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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