Cleanups and tweaks observer code (#30250)

* observer cleanup

* this

* bit more

* Update tgui.bundle.js
This commit is contained in:
kyunkyunkyun
2025-09-05 10:54:22 +05:00
committed by GitHub
parent 8f98876b47
commit 10f2e67e65
66 changed files with 362 additions and 447 deletions
+4 -4
View File
@@ -404,7 +404,7 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
//re-enter
var/mob/dead/observer/ghost = mob
var/old_turf = get_turf(ghost)
ghost.can_reenter_corpse = 1 //just in-case.
ghost.ghost_flags |= GHOST_CAN_REENTER // just in-case.
ghost.reenter_corpse()
log_admin("[key_name(usr)] re-entered their body")
SSblackbox.record_feedback("tally", "admin_verb", 1, "Aghost") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -419,7 +419,7 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
else
//ghostize
var/mob/body = mob
body.ghostize(1)
body.ghostize()
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
log_admin("[key_name(usr)] has admin-ghosted")
@@ -1134,7 +1134,7 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
var/turf/T = interesting_tile[MILLA_INDEX_TURF]
var/mob/dead/observer/O = mob
admin_forcemove(O, T)
O.ManualFollow(T)
O.manual_follow(T)
/client/proc/visualize_interesting_turfs()
set name = "Visualize Interesting Turfs"
@@ -1253,4 +1253,4 @@ GLOBAL_LIST_INIT(view_logs_verbs, list(
target = mind.current
var/mob/dead/observer/A = client.mob
A.ManualFollow(target)
A.manual_follow(target)
+2 -2
View File
@@ -90,7 +90,7 @@ GLOBAL_PROTECT(href_token)
owner.holder = src
owner.add_admin_verbs()
if(istype(owner.mob, /mob/dead/observer))
if(isobserver(owner.mob))
var/mob/dead/observer/ghost = owner.mob
ghost.update_admin_actions()
remove_verb(owner, /client/proc/readmin)
@@ -136,7 +136,7 @@ GLOBAL_PROTECT(href_token)
owner.hide_verbs()
owner.holder = null
owner.init_verbs()
if(istype(owner.mob, /mob/dead/observer))
if(isobserver(owner.mob))
var/mob/dead/observer/ghost = owner.mob
ghost.update_admin_actions()
owner.update_active_keybindings()
+1 -1
View File
@@ -204,7 +204,7 @@ RESTRICT_TYPE(/datum/ui_module/admin/antagonist_menu)
return
target = mind.current
var/mob/dead/observer/A = C.mob
A.ManualFollow(target)
A.manual_follow(target)
return
if(istype(target, /datum/team))
ui.user.client.holder.team_switch_tab_index = clamp(GLOB.antagonist_teams.Find(target), 1, length(GLOB.antagonist_teams))
+1 -1
View File
@@ -959,7 +959,7 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
return TRUE
if(tomob.client) //no need to ghostize if there is no client
tomob.ghostize(0)
tomob.ghostize(GHOST_FLAGS_OBSERVE_ONLY)
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has put [frommob.ckey] in control of [tomob.name].</span>")
log_admin("[key_name(usr)] stuffed [frommob.ckey] into [tomob.name].")
+1 -1
View File
@@ -1821,7 +1821,7 @@
return
var/mob/dead/observer/ghost = C.mob
ghost.ManualFollow(target)
ghost.manual_follow(target)
else if(href_list["check_antagonist"])
check_antagonists()
+1 -1
View File
@@ -113,7 +113,7 @@
admin_forcemove(usr, T)
if(isobserver(usr))
var/mob/dead/observer/O = usr
O.ManualFollow(T)
O.manual_follow(T)
SSblackbox.record_feedback("tally", "admin_verb", 1, "Jump To Coordinate") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
if(!isobserver(usr))
message_admins("[key_name_admin(usr)] jumped to coordinates [tx], [ty], [tz]")