game folder
This commit is contained in:
@@ -1,46 +1,30 @@
|
||||
/obj/item/storage/internal/implant
|
||||
name = "bluespace pocket"
|
||||
max_w_class = WEIGHT_CLASS_NORMAL
|
||||
max_combined_w_class = 6
|
||||
cant_hold = list(/obj/item/disk/nuclear)
|
||||
silent = TRUE
|
||||
|
||||
|
||||
/obj/item/implant/storage
|
||||
name = "storage implant"
|
||||
desc = "Stores up to two big items in a bluespace pocket."
|
||||
icon_state = "storage"
|
||||
item_color = "r"
|
||||
var/obj/item/storage/internal/implant/storage
|
||||
|
||||
/obj/item/implant/storage/New()
|
||||
..()
|
||||
storage = new /obj/item/storage/internal/implant(src)
|
||||
var/max_slot_stacking = 4
|
||||
|
||||
/obj/item/implant/storage/activate()
|
||||
storage.MouseDrop(imp_in)
|
||||
SendSignal(COMSIG_TRY_STORAGE_SHOW, imp_in, TRUE)
|
||||
|
||||
/obj/item/implant/storage/removed(source, silent = FALSE, special = 0)
|
||||
if(..())
|
||||
. = ..()
|
||||
if(.)
|
||||
if(!special)
|
||||
storage.close_all()
|
||||
for(var/obj/item/I in storage)
|
||||
storage.remove_from_storage(I, get_turf(source))
|
||||
return 1
|
||||
qdel(GetComponent(/datum/component/storage/concrete/implant))
|
||||
|
||||
/obj/item/implant/storage/implant(mob/living/target, mob/user, silent = FALSE)
|
||||
for(var/X in target.implants)
|
||||
if(istype(X, type))
|
||||
var/obj/item/implant/storage/imp_e = X
|
||||
imp_e.storage.storage_slots += storage.storage_slots
|
||||
imp_e.storage.max_combined_w_class += storage.max_combined_w_class
|
||||
imp_e.storage.contents += storage.contents
|
||||
|
||||
storage.close_all()
|
||||
storage.show_to(target)
|
||||
|
||||
qdel(src)
|
||||
return 1
|
||||
GET_COMPONENT_FROM(STR, /datum/component/storage, imp_e)
|
||||
if(!STR || (STR && STR.max_items < max_slot_stacking))
|
||||
imp_e.AddComponent(/datum/component/storage/concrete/implant)
|
||||
qdel(src)
|
||||
return TRUE
|
||||
return FALSE
|
||||
AddComponent(/datum/component/storage/concrete/implant)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user