Files
VOREStation/code/modules/clothing/accessories/lockets.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

52 lines
1.3 KiB
Plaintext

/obj/item/clothing/accessory/locket
name = "silver locket"
desc = "A small locket of high-quality metal."
icon_state = "locket"
drop_sound = 'sound/items/drop/ring.ogg'
pickup_sound = 'sound/items/pickup/ring.ogg'
w_class = ITEMSIZE_SMALL
slot_flags = SLOT_MASK | SLOT_TIE
slot = ACCESSORY_SLOT_DECOR
var/base_icon
var/open
var/obj/item/held //Item inside locket.
special_handling = TRUE
/obj/item/clothing/accessory/locket/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
if(!base_icon)
base_icon = icon_state
if(!icon_exists(icon, "[base_icon]_open"))
to_chat(user, "\The [src] doesn't seem to open.")
return
open = !open
to_chat(user, "You flip \the [src] [open?"open":"closed"].")
if(open)
icon_state = "[base_icon]_open"
if(held)
to_chat(user, "\The [held] falls out!")
held.loc = get_turf(user)
held = null
else
icon_state = "[base_icon]"
/obj/item/clothing/accessory/locket/attackby(var/obj/item/O, mob/user)
if(!open)
to_chat(user, "You have to open it first.")
return
if(istype(O,/obj/item/paper) || istype(O, /obj/item/photo))
if(held)
to_chat(user, "\The [src] already has something inside it.")
else
to_chat(user, "You slip [O] into [src].")
user.drop_item()
O.loc = src
held = O
return
..()