@@ -40,6 +40,7 @@
|
||||
/obj/item/wallframe/picture/examine(mob/user)
|
||||
if(user.is_holding(src) && displayed)
|
||||
displayed.show(user)
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artok", /datum/mood_event/artok)
|
||||
return list()
|
||||
return ..()
|
||||
|
||||
@@ -109,6 +110,7 @@
|
||||
/obj/structure/sign/picture_frame/examine(mob/user)
|
||||
if(in_range(src, user) && framed)
|
||||
framed.show(user)
|
||||
SEND_SIGNAL(user, COMSIG_ADD_MOOD_EVENT, "artok", /datum/mood_event/artok)
|
||||
return list()
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* tgui state: physical_state
|
||||
*
|
||||
* Short-circuits the default state to only check physical distance.
|
||||
**/
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(physical_state, /datum/ui_state/physical, new)
|
||||
|
||||
@@ -22,3 +22,28 @@ GLOBAL_DATUM_INIT(physical_state, /datum/ui_state/physical, new)
|
||||
|
||||
/mob/living/silicon/ai/physical_can_use_topic(src_object)
|
||||
return UI_UPDATE // AIs are not physical.
|
||||
|
||||
/**
|
||||
* tgui state: physical_obscured_state
|
||||
*
|
||||
* Short-circuits the default state to only check physical distance, being in view doesn't matter
|
||||
*/
|
||||
|
||||
GLOBAL_DATUM_INIT(physical_obscured_state, /datum/ui_state/physical_obscured_state, new)
|
||||
|
||||
/datum/ui_state/physical_obscured_state/can_use_topic(src_object, mob/user)
|
||||
. = user.shared_ui_interaction(src_object)
|
||||
if(. > UI_CLOSE)
|
||||
return min(., user.physical_obscured_can_use_topic(src_object))
|
||||
|
||||
/mob/proc/physical_obscured_can_use_topic(src_object)
|
||||
return UI_CLOSE
|
||||
|
||||
/mob/living/physical_obscured_can_use_topic(src_object)
|
||||
return shared_living_ui_distance(src_object)
|
||||
|
||||
/mob/living/silicon/physical_obscured_can_use_topic(src_object)
|
||||
return max(UI_UPDATE, shared_living_ui_distance(src_object)) // Silicons can always see.
|
||||
|
||||
/mob/living/silicon/ai/physical_obscured_can_use_topic(src_object)
|
||||
return UI_UPDATE // AIs are not physical.
|
||||
Reference in New Issue
Block a user