mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-12 07:33:34 +01:00
Add viewer_state for TGUI, an observational state (#22860)
* I like to watch * Wires are secondary
This commit is contained in:
@@ -334,7 +334,10 @@ GLOBAL_VAR(bomb_set)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_ghost(mob/user as mob)
|
||||
attack_hand(user)
|
||||
if(!panel_open)
|
||||
return ui_interact(user, state = GLOB.viewer_state)
|
||||
if(removal_stage != NUKE_CORE_FULLY_EXPOSED || !core)
|
||||
return wires.Interact(user)
|
||||
|
||||
/obj/machinery/nuclearbomb/attack_hand(mob/user as mob)
|
||||
if(!panel_open)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
/**
|
||||
* tgui state: viewer_state
|
||||
*
|
||||
* State for only viewing, regardless of distance. Different from observer_state, which grants interactivity exclusively if an observer/admin.
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(viewer_state, /datum/ui_state/viewer_state, new)
|
||||
|
||||
/datum/ui_state/viewer_state/can_use_topic(src_object, mob/user)
|
||||
return STATUS_UPDATE
|
||||
@@ -2734,6 +2734,7 @@
|
||||
#include "code\modules\tgui\states\observer_state.dm"
|
||||
#include "code\modules\tgui\states\physical.dm"
|
||||
#include "code\modules\tgui\states\self.dm"
|
||||
#include "code\modules\tgui\states\viewer_state.dm"
|
||||
#include "code\modules\tgui\states\zlevel_state.dm"
|
||||
#include "code\modules\tooltip\tooltip.dm"
|
||||
#include "code\modules\unit_tests\_unit_tests.dm"
|
||||
|
||||
Reference in New Issue
Block a user