mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-17 18:13:34 +01:00
Add serialization support to Modsuit modules (#22702)
* Save my supersuit * Glazed over it when trying to make cores work * Used contra's code, with a fix to stop runtiming
This commit is contained in:
@@ -16,6 +16,17 @@
|
||||
var/max_items = 7
|
||||
var/obj/item/storage/backpack/modstorage/bag
|
||||
|
||||
/obj/item/mod/module/storage/serialize()
|
||||
var/list/data = ..()
|
||||
data["bag"] = bag.serialize()
|
||||
return data
|
||||
|
||||
/obj/item/mod/module/storage/deserialize(list/data)
|
||||
. = ..()
|
||||
qdel(bag)
|
||||
bag = list_to_object(data["bag"], src)
|
||||
bag.source = src
|
||||
|
||||
/obj/item/mod/module/storage/Initialize(mapload)
|
||||
. = ..()
|
||||
var/obj/item/storage/backpack/modstorage/S = new(src)
|
||||
|
||||
Reference in New Issue
Block a user