mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
[MIRROR] Add hotkey and screentip to tracking beacons [MDB IGNORE] (#25528)
* Add hotkey and screentip to tracking beacons (#80142) ## About The Pull Request Adds RMB to toggle a tracking beacon on/off. Also adds this as a screentip UI indicator. ## Why It's Good For The Game Adds a simple interaction so people don't have to pick up things. ## Changelog 🆑 qol: Add RMB hotkey and screentip UI to tracking beacons to toggle them on/off. /🆑 * Add hotkey and screentip to tracking beacons --------- Co-authored-by: Tim <timothymtorres@gmail.com>
This commit is contained in:
@@ -15,11 +15,19 @@
|
||||
GLOB.teleportbeacons += src
|
||||
else
|
||||
icon_state = "beacon-off"
|
||||
register_context()
|
||||
|
||||
/obj/item/beacon/Destroy()
|
||||
GLOB.teleportbeacons -= src
|
||||
return ..()
|
||||
|
||||
/obj/item/beacon/add_context(atom/source, list/context, obj/item/held_item, mob/living/user)
|
||||
if(isnull(held_item))
|
||||
context[SCREENTIP_CONTEXT_RMB] = "Toggle beacon"
|
||||
return CONTEXTUAL_SCREENTIP_SET
|
||||
|
||||
return NONE
|
||||
|
||||
/obj/item/beacon/proc/turn_off()
|
||||
icon_state = "beacon-off"
|
||||
GLOB.teleportbeacons -= src
|
||||
@@ -35,6 +43,10 @@
|
||||
to_chat(user, span_notice("You [enabled ? "enable" : "disable"] the beacon."))
|
||||
return
|
||||
|
||||
/obj/item/beacon/attack_hand_secondary(mob/user, list/modifiers)
|
||||
attack_self(user)
|
||||
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
|
||||
|
||||
/obj/item/beacon/attackby(obj/item/W, mob/user)
|
||||
if(istype(W, /obj/item/pen)) // needed for things that use custom names like the locator
|
||||
var/new_name = tgui_input_text(user, "What would you like the name to be?", "Beacon", max_length = MAX_NAME_LEN)
|
||||
|
||||
Reference in New Issue
Block a user