diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 644f580afe9..c609757c1a9 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -421,4 +421,5 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/canUseTopic() if(check_rights(R_ADMIN, 0)) - return + return 1 + return \ No newline at end of file diff --git a/code/modules/nano/nanoui.dm b/code/modules/nano/nanoui.dm index 0710232e2b2..818027cc755 100644 --- a/code/modules/nano/nanoui.dm +++ b/code/modules/nano/nanoui.dm @@ -475,9 +475,11 @@ * If the src_object's Topic() returns 1, update all UIs attacked to it. **/ /datum/nanoui/Topic(href, href_list) - update_status(0) // update the status - if (status != NANO_INTERACTIVE || user != usr) // If UI is not interactive or usr calling Topic is not the UI user - return + update_status(push_update = 0) // Update the window state. + if (status != NANO_INTERACTIVE || user != usr) + return // If UI is not interactive or usr calling Topic is not the UI user. + + var/update = src_object.Topic(href, href_list, 0, state) // Call Topic() on the src_object. // Code to toggle/update the Map UI. var/map_update = 0 @@ -488,9 +490,8 @@ set_map_z_level(text2num(href_list["mapZLevel"])) map_update = 1 - // If we have a src_object and its Topic() returns 1, update. - if ((src_object && src_object.Topic(href, href_list, 0, state)) || map_update) - SSnano.update_uis(src_object) + if ((src_object && update) || map_update) + SSnano.update_uis(src_object) // If we have a src_object and its Topic() told us to update. /** * private diff --git a/code/modules/nano/states/admin.dm b/code/modules/nano/states/admin.dm index 6ee2859f7ec..71e2cbda333 100644 --- a/code/modules/nano/states/admin.dm +++ b/code/modules/nano/states/admin.dm @@ -7,6 +7,6 @@ /var/global/datum/topic_state/admin_state/admin_state = new() /datum/topic_state/admin_state/can_use_topic(atom/movable/src_object, mob/user) - if (check_rights(R_ADMIN, 0, user)) + if (check_rights_for(user.client, R_ADMIN)) return NANO_INTERACTIVE return NANO_CLOSE diff --git a/code/modules/nano/states/base.dm b/code/modules/nano/states/states.dm similarity index 97% rename from code/modules/nano/states/base.dm rename to code/modules/nano/states/states.dm index 8462b8d0881..0034342e9db 100644 --- a/code/modules/nano/states/base.dm +++ b/code/modules/nano/states/states.dm @@ -1,5 +1,5 @@ /** - * NanoUI State + * NanoUI States * * Base state and helpers for states. Just does some sanity checks, implement a state for in-depth checks. **/ @@ -68,7 +68,7 @@ return ..() /mob/dead/observer/shared_nano_interaction(atom/movable/src_object) - if (check_rights(R_ADMIN, 0, src)) + if (check_rights_for(client, R_ADMIN)) return NANO_INTERACTIVE // Admins can interact anyway. if(!client || get_dist(src_object, src) > client.view) return NANO_CLOSE // Keep ghosts from opening too many NanoUIs. diff --git a/tgstation.dme b/tgstation.dme index 3f933184600..7086095021c 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1354,7 +1354,6 @@ #include "code\modules\nano\nanoui.dm" #include "code\modules\nano\subsystem.dm" #include "code\modules\nano\states\admin.dm" -#include "code\modules\nano\states\base.dm" #include "code\modules\nano\states\conscious.dm" #include "code\modules\nano\states\contained.dm" #include "code\modules\nano\states\deep_inventory.dm" @@ -1364,6 +1363,7 @@ #include "code\modules\nano\states\notcontained.dm" #include "code\modules\nano\states\physical.dm" #include "code\modules\nano\states\self.dm" +#include "code\modules\nano\states\states.dm" #include "code\modules\nano\states\zlevel.dm" #include "code\modules\ninja\__ninjaDefines.dm" #include "code\modules\ninja\admin_ninja_verbs.dm"