mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-07 23:42:44 +00:00
* Renames a few variables. Also reorders fallback order again. Renames item_state to inhand_icon_state Renames mob_overlay_icon to worn_icon Renames mob_overlay_state to worn_icon_state worn_icon_state/mob_overlay_state now never gets used for inhands. * Fixes some comments * Fixes map issue * Restart lints * Properly resolves conflicts
33 lines
1.3 KiB
Plaintext
33 lines
1.3 KiB
Plaintext
/obj/item/quantum_keycard
|
|
name = "quantum keycard"
|
|
desc = "A keycard able to link to a quantum pad's particle signature, allowing other quantum pads to travel there instead of their linked pad."
|
|
icon = 'icons/obj/device.dmi'
|
|
icon_state = "quantum_keycard"
|
|
inhand_icon_state = "card-id"
|
|
lefthand_file = 'icons/mob/inhands/equipment/idcards_lefthand.dmi'
|
|
righthand_file = 'icons/mob/inhands/equipment/idcards_righthand.dmi'
|
|
w_class = WEIGHT_CLASS_TINY
|
|
var/obj/machinery/quantumpad/qpad
|
|
|
|
/obj/item/quantum_keycard/examine(mob/user)
|
|
. = ..()
|
|
if(qpad)
|
|
. += "It's currently linked to a quantum pad."
|
|
. += "<span class='notice'>Alt-click to unlink the keycard.</span>"
|
|
else
|
|
. += "<span class='notice'>Insert [src] into an active quantum pad to link it.</span>"
|
|
|
|
/obj/item/quantum_keycard/AltClick(mob/living/user)
|
|
if(!istype(user) || !user.canUseTopic(src, BE_CLOSE, ismonkey(user)))
|
|
return
|
|
to_chat(user, "<span class='notice'>You start pressing [src]'s unlink button...</span>")
|
|
if(do_after(user, 40, target = src))
|
|
to_chat(user, "<span class='notice'>The keycard beeps twice and disconnects the quantum link.</span>")
|
|
qpad = null
|
|
|
|
/obj/item/quantum_keycard/update_icon_state()
|
|
if(qpad)
|
|
icon_state = "quantum_keycard_on"
|
|
else
|
|
icon_state = initial(icon_state)
|