mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 12:37:50 +01:00
* usr to user part two * this can be null * A few edits - Gets rid of src. in a few places that were edited - Gets rid of a few //VORESTATION comments - Removes an unneeded sanity check in sizegun_vr - Gets rid of a mind boggling !usr check in mob.dm - Changes usr to user in sizegun_vr.dm --------- Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: C.L. <killer65311@gmail.com>
48 lines
1.2 KiB
Plaintext
48 lines
1.2 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.
|
|
|
|
/obj/item/clothing/accessory/locket/attack_self(mob/user)
|
|
if(!base_icon)
|
|
base_icon = icon_state
|
|
|
|
if(!("[base_icon]_open" in cached_icon_states(icon)))
|
|
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
|
|
..()
|