Skip to content

Commit

Permalink
Merge pull request #22 from skeyuui/minor-adminverb-tweaks
Browse files Browse the repository at this point in the history
Minor verbs/adminverbs tweaks
  • Loading branch information
russ-money authored Aug 19, 2024
2 parents b092d9e + 435d936 commit bc1643d
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 29 deletions.
2 changes: 2 additions & 0 deletions code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ GLOBAL_LIST_INIT(our_forest_sex, typecacheof(list(


//Misc mobs
#define isrogueghost(A) (istype(A,/mob/dead/observer/rogue))

#define isobserver(A) (istype(A, /mob/dead/observer))

#define isdead(A) (istype(A, /mob/dead))
Expand Down
5 changes: 4 additions & 1 deletion code/__DEFINES/preferences.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@
#define TOGGLE_FULLSCREEN (1<<20)
#define SCHIZO_VOICE (1<<21)

#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS|TOGGLE_FULLSCREEN)
#define AGHOST_HIDE_CHAR (1<<22)


#define TOGGLES_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|MEMBER_PUBLIC|INTENT_STYLE|MIDROUND_ANTAG|SOUND_INSTRUMENTS|SOUND_SHIP_AMBIENCE|SOUND_PRAYERS|SOUND_ANNOUNCEMENTS|TOGGLE_FULLSCREEN|AGHOST_HIDE_CHAR)

//Chat toggles
#define CHAT_OOC (1<<0)
Expand Down
4 changes: 2 additions & 2 deletions code/_onclick/hud/ghost.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@

/atom/movable/screen/ghost/moveup
name = "move up"
icon_state = "pai"
icon_state = "moveup"

/atom/movable/screen/ghost/moveup/Click()
var/mob/dead/observer/G = usr
G.ghost_up()

/atom/movable/screen/ghost/movedown
name = "move down"
icon_state = "pai"
icon_state = "movedown"

/atom/movable/screen/ghost/bigassuselessbutton
name = "AFTER LIFE"
Expand Down
3 changes: 0 additions & 3 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,6 @@
var/ckey = lowertext(M.ckey)
var/admin = lowertext(usr.key)

if(ckey == admin)
to_chat(src, span_boldwarning("That's you!"))
return
if(!fexists("data/player_saves/[copytext(ckey,1,2)]/[ckey]/preferences.sav"))
to_chat(src, span_boldwarning("User does not exist."))
return
Expand Down
11 changes: 8 additions & 3 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ GLOBAL_PROTECT(admin_verbs_admin)
/client/proc/toggleadminhelpsound,
/client/proc/respawn_character,
/client/proc/discord_id_manipulation,
/datum/admins/proc/open_borgopanel
/datum/admins/proc/open_borgopanel,
/client/proc/aghosthidechar
)
GLOBAL_LIST_INIT(admin_verbs_ban, list(/client/proc/unban_panel, /client/proc/ban_panel, /client/proc/stickybanpanel, /client/proc/check_pq, /client/proc/adjust_pq, /client/proc/getcurrentlogs, /client/proc/getserverlogs))
GLOBAL_PROTECT(admin_verbs_ban)
Expand Down Expand Up @@ -375,6 +376,9 @@ GLOBAL_PROTECT(admin_verbs_hideable)
return
. = TRUE
if(isobserver(mob))
if(isrogueghost(mob)) // mob/dead/observer/rogue are a lot more limited than 'normal' ghosts
mob.ghostize(FALSE, admin = TRUE)
return
//re-enter
var/mob/dead/observer/ghost = mob
if(!ghost.mind || !ghost.mind.current) //won't do anything if there is no body
Expand Down Expand Up @@ -408,8 +412,9 @@ GLOBAL_PROTECT(admin_verbs_hideable)
log_admin("[key_name(usr)] admin ghosted.")
message_admins("[key_name_admin(usr)] admin ghosted.")
var/mob/body = mob
body.invisibility = INVISIBILITY_MAXIMUM
body.density = 0
if(prefs.toggles & AGHOST_HIDE_CHAR)
body.invisibility = INVISIBILITY_MAXIMUM
body.density = 0
body.ghostize(TRUE, admin = TRUE)
if(body && !body.key)
body.key = "@[key]" //Haaaaaaaack. But the people have spoken. If it breaks; blame adminbus
Expand Down
3 changes: 0 additions & 3 deletions code/modules/admin/playerquality.dm
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@
if(!selection)
return
theykey = selection
if(theykey == ckey)
to_chat(src, span_boldwarning("That's you!"))
return
if(!fexists("data/player_saves/[copytext(theykey,1,2)]/[theykey]/preferences.sav"))
to_chat(src, span_boldwarning("User does not exist."))
return
Expand Down
27 changes: 27 additions & 0 deletions code/modules/client/preferences_toggles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -502,3 +502,30 @@ GLOBAL_LIST_INIT(ghost_orbits, list(GHOST_ORBIT_CIRCLE,GHOST_ORBIT_TRIANGLE,GHOS
return
prefs.asaycolor = initial(prefs.asaycolor)
prefs.save_preferences()

/client/proc/hearallasghost()
set category = "Prefs - Admin"
set name = "Toggle Admin Hear All"
if(!holder)
return
if(!prefs)
return
prefs.chat_toggles ^= CHAT_GHOSTEARS
// prefs.chat_toggles ^= CHAT_GHOSTSIGHT
prefs.chat_toggles ^= CHAT_GHOSTWHISPER
prefs.save_preferences()
if(prefs.chat_toggles & CHAT_GHOSTEARS)
to_chat(src, span_notice("I will hear all now."))
else
to_chat(src, span_info("I will hear like a mortal."))

/client/proc/aghosthidechar()
set category = "Prefs - Admin"
set name = "Show/Hide Character on Aghost"
if(!holder)
return
if(!prefs)
return
prefs.toggles ^= AGHOST_HIDE_CHAR
prefs.save_preferences()
to_chat(src, span_notice("Aghosting will [(prefs.toggles & AGHOST_HIDE_CHAR) ? "now" : "no longer"] hide your character."))
11 changes: 11 additions & 0 deletions code/modules/client/verbs/ooc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -601,3 +601,14 @@ GLOBAL_VAR_INIT(normal_ooc_colour, "#002eb8")
policytext += "No related rules found."

usr << browse(policytext.Join(""),"window=policy")

/mob/dead/new_player/verb/latejoin()
set name = "Late join"
set desc = ""
set category = "OOC"

if(!SSticker?.IsRoundInProgress())
to_chat(usr, span_boldwarning("The game is starting. You cannot join yet."))
return

LateChoices()
16 changes: 0 additions & 16 deletions code/modules/mob/mob_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -697,22 +697,6 @@
eyet.update_icon(src)
playsound_local(src, 'sound/misc/click.ogg', 100)

/client/proc/hearallasghost()
set category = "Admin"
set name = "HearAllAsAdmin"
if(!holder)
return
if(!prefs)
return
prefs.chat_toggles ^= CHAT_GHOSTEARS
// prefs.chat_toggles ^= CHAT_GHOSTSIGHT
prefs.chat_toggles ^= CHAT_GHOSTWHISPER
prefs.save_preferences()
if(prefs.chat_toggles & CHAT_GHOSTEARS)
to_chat(src, span_notice("I will hear all now."))
else
to_chat(src, span_info("I will hear like a mortal."))

///Moves a mob upwards in z level
/mob/proc/ghost_up()
if(zMove(UP, TRUE))
Expand Down
Binary file modified icons/mob/screen_ghost.dmi
Binary file not shown.
2 changes: 1 addition & 1 deletion interface/interface.dm
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
/client/verb/mentorhelp()
set name = "Mentorhelp"
set desc = ""
set category = "Admin"
set category = "OOC"
if(mob)
var/msg = input("Say your meditation:", "Voices in your head") as text|null
if(msg)
Expand Down

0 comments on commit bc1643d

Please sign in to comment.