mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Adds a new ghost vis blocking area flag (#9636)
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
28bc4e4d8b
commit
d35faa5844
@@ -67,14 +67,12 @@
|
||||
var/mob/observer/dead/ghost
|
||||
if(build_mode)
|
||||
togglebuildmode(body)
|
||||
ghost = body.ghostize(1)
|
||||
ghost.admin_ghosted = 1
|
||||
ghost = body.ghostize(1, TRUE)
|
||||
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
if(build_mode == "Yes")
|
||||
togglebuildmode(ghost)
|
||||
else
|
||||
ghost = body.ghostize(1)
|
||||
ghost.admin_ghosted = 1
|
||||
ghost = body.ghostize(1, TRUE)
|
||||
log_and_message_admins("[key_name(src)] admin-ghosted.") // CHOMPEdit - Add logging.
|
||||
init_verbs()
|
||||
if(body)
|
||||
@@ -361,6 +359,9 @@
|
||||
message_admins("[src] re-admined themself.", 1)
|
||||
to_chat(src, span_filter_system(span_interface("You now have the keys to control the planet, or at least a small space station")))
|
||||
remove_verb(src, /client/proc/readmin_self)
|
||||
if(isobserver(mob))
|
||||
var/mob/observer/dead/our_mob = mob
|
||||
our_mob.visualnet?.addVisibility(our_mob, src)
|
||||
|
||||
/client/proc/deadmin_self()
|
||||
set name = "De-admin self"
|
||||
@@ -373,6 +374,9 @@
|
||||
deadmin()
|
||||
to_chat(src, span_filter_system(span_interface("You are now a normal player.")))
|
||||
add_verb(src, /client/proc/readmin_self)
|
||||
if(isobserver(mob))
|
||||
var/mob/observer/dead/our_mob = mob
|
||||
our_mob.visualnet?.removeVisibility(our_mob, src)
|
||||
feedback_add_details("admin_verb","DAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/toggle_log_hrefs()
|
||||
@@ -552,3 +556,35 @@
|
||||
B.icon_state = "bottle-1"
|
||||
B.reagents.add_reagent(R.id, 60)
|
||||
B.name = "[B.name] of [R.name]"
|
||||
|
||||
/client/proc/add_hidden_area()
|
||||
set name = "Add Ghostsight Block Area"
|
||||
set category = "Admin.Game"
|
||||
|
||||
var/list/blocked_areas = list()
|
||||
for(var/area/A in world)
|
||||
if(!A.flag_check(AREA_BLOCK_GHOST_SIGHT))
|
||||
blocked_areas[A.name] = A
|
||||
blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc))
|
||||
var/selected_area = tgui_input_list(usr, "Pick an area to hide from ghost", "Select Area to hide", blocked_areas)
|
||||
var/area/A = blocked_areas[selected_area]
|
||||
if(!A)
|
||||
return
|
||||
A.flags |= AREA_BLOCK_GHOST_SIGHT
|
||||
ghostnet.addArea(A)
|
||||
|
||||
/client/proc/remove_hidden_area()
|
||||
set name = "Remove Ghostsight Block Area"
|
||||
set category = "Admin.Game"
|
||||
|
||||
var/list/blocked_areas = list()
|
||||
for(var/area/A in world)
|
||||
if(A.flag_check(AREA_BLOCK_GHOST_SIGHT))
|
||||
blocked_areas[A.name] = A
|
||||
blocked_areas = sortTim(blocked_areas, GLOBAL_PROC_REF(cmp_text_asc))
|
||||
var/selected_area = tgui_input_list(usr, "Pick a from ghost hidden area to let them see it again", "Select Hidden Area", blocked_areas)
|
||||
var/area/A = blocked_areas[selected_area]
|
||||
if(!A)
|
||||
return
|
||||
A.flags &= ~(AREA_BLOCK_GHOST_SIGHT)
|
||||
ghostnet.removeArea(A)
|
||||
|
||||
Reference in New Issue
Block a user