mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
Makes camera consoles (more) accessible via AI (#19407)
* Makes computers accessible via AI * Update vorestation.dme
This commit is contained in:
@@ -317,4 +317,7 @@
|
||||
/datum/tgui_module/camera/bigscreen/tgui_state(mob/user)
|
||||
return GLOB.tgui_physical_state_bigscreen
|
||||
|
||||
/datum/tgui_module/camera/virtual/tgui_state(mob/user)
|
||||
return GLOB.tgui_camera_view
|
||||
|
||||
#undef DEFAULT_MAP_SIZE
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* tgui state: camera_view
|
||||
*
|
||||
* In addition to default checks, allows AI to interact and has a cutoff after it leaves view range.
|
||||
* living adjacent user.
|
||||
**/
|
||||
|
||||
GLOBAL_DATUM_INIT(tgui_camera_view, /datum/tgui_state/camera_view, new)
|
||||
|
||||
/datum/tgui_state/camera_view/can_use_topic(src_object, mob/user)
|
||||
. = user.shared_tgui_interaction(src_object)
|
||||
if(. > STATUS_CLOSE)
|
||||
return min(., user.camera_view_can_use_topic(src_object))
|
||||
|
||||
/mob/proc/camera_view_can_use_topic(src_object)
|
||||
return STATUS_CLOSE
|
||||
|
||||
/mob/living/camera_view_can_use_topic(src_object)
|
||||
return shared_living_tgui_distance(src_object, viewcheck = TRUE)
|
||||
|
||||
/mob/living/silicon/camera_view_can_use_topic(src_object)
|
||||
return shared_living_tgui_distance(src_object, viewcheck = TRUE)
|
||||
|
||||
/mob/living/silicon/ai/camera_view_can_use_topic(src_object)
|
||||
return STATUS_INTERACTIVE
|
||||
Reference in New Issue
Block a user