mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Makes Clothing Accessories, Clothing with Accessories, Blood, and Spiderlings GC (#7272)
* Makes Clothing Accessories and Clothing with Accessories GC * and spiderlings, apparently * BLOOOD FINALLY GARBAGE COLLECTS!!!!
This commit is contained in:
@@ -587,6 +587,10 @@ BLIND // can't see anything
|
||||
var/rolled_down = 0
|
||||
var/basecolor
|
||||
|
||||
/obj/item/clothing/under/Destroy()
|
||||
QDEL_LIST(accessories)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/under/proc/can_attach_accessory(obj/item/clothing/accessory/A)
|
||||
if(istype(A))
|
||||
.=1
|
||||
|
||||
@@ -15,6 +15,12 @@
|
||||
..()
|
||||
inv_overlay = image("icon" = 'icons/obj/clothing/ties_overlay.dmi', "icon_state" = "[item_color? "[item_color]" : "[icon_state]"]")
|
||||
|
||||
/obj/item/clothing/accessory/Destroy()
|
||||
if(has_suit)
|
||||
has_suit.accessories -= src
|
||||
on_removed(null)
|
||||
return ..()
|
||||
|
||||
//when user attached an accessory to S
|
||||
/obj/item/clothing/accessory/proc/on_attached(obj/item/clothing/under/S, mob/user as mob)
|
||||
if(!istype(S))
|
||||
@@ -37,7 +43,7 @@
|
||||
to_chat(user, "<span class='notice'>You attach [src] to [has_suit].</span>")
|
||||
src.add_fingerprint(user)
|
||||
|
||||
/obj/item/clothing/accessory/proc/on_removed(mob/user as mob)
|
||||
/obj/item/clothing/accessory/proc/on_removed(mob/user)
|
||||
if(!has_suit)
|
||||
return
|
||||
has_suit.overlays -= inv_overlay
|
||||
@@ -53,8 +59,9 @@
|
||||
has_suit.armor[armor_type] -= armor[armor_type]
|
||||
|
||||
has_suit = null
|
||||
usr.put_in_hands(src)
|
||||
src.add_fingerprint(user)
|
||||
if(user)
|
||||
user.put_in_hands(src)
|
||||
add_fingerprint(user)
|
||||
|
||||
/obj/item/clothing/accessory/attack(mob/living/carbon/human/H, mob/living/user)
|
||||
// This code lets you put accessories on other people by attacking their sprite with the accessory
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
actions_types = list(/datum/action/item_action/accessory/holster)
|
||||
w_class = 3 // so it doesn't fit in pockets
|
||||
|
||||
/obj/item/clothing/accessory/holster/Destroy()
|
||||
QDEL_NULL(holstered)
|
||||
return ..()
|
||||
|
||||
//subtypes can override this to specify what can be holstered
|
||||
/obj/item/clothing/accessory/holster/proc/can_holster(obj/item/weapon/gun/W)
|
||||
if(!W.isHandgun())
|
||||
|
||||
@@ -14,6 +14,10 @@
|
||||
hold = new/obj/item/weapon/storage/internal(src)
|
||||
hold.storage_slots = slots
|
||||
|
||||
/obj/item/clothing/accessory/storage/Destroy()
|
||||
QDEL_NULL(hold)
|
||||
return ..()
|
||||
|
||||
/obj/item/clothing/accessory/storage/attack_hand(mob/user as mob)
|
||||
if(has_suit) //if we are part of a suit
|
||||
hold.open(user)
|
||||
|
||||
Reference in New Issue
Block a user