mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Overhauls player facing verb UI (#24060)
* Preference verb overhaul * this too * Update code/__DEFINES/preferences_defines.dm * Update code/modules/client/preference/preferences.dm Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> * fixes + better html * removes unused define --------- Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com>
This commit is contained in:
@@ -152,7 +152,6 @@
|
||||
real_name = name
|
||||
if(!loc)
|
||||
stack_trace("Simple animal being instantiated in nullspace")
|
||||
remove_verb(src, /mob/verb/observe)
|
||||
if(can_hide)
|
||||
var/datum/action/innate/hide/hide = new()
|
||||
hide.Grant(src)
|
||||
|
||||
+2
-106
@@ -769,112 +769,8 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
|
||||
else
|
||||
return "<span class='notice'>[copytext_preserve_html(msg, 1, 37)]... <a href='byond://?src=[UID()];flavor_more=1'>More...</a></span>"
|
||||
|
||||
// Nobody in their right mind will have this enabled on the production server, uncomment if you want this for some reason
|
||||
/*
|
||||
/mob/verb/abandon_mob()
|
||||
set name = "Respawn"
|
||||
set category = "OOC"
|
||||
|
||||
if(!GLOB.configuration.general.respawn_enabled)
|
||||
to_chat(usr, "<span class='warning'>Respawning is disabled.</span>")
|
||||
return
|
||||
|
||||
if(stat != DEAD || !SSticker)
|
||||
to_chat(usr, "<span class='boldnotice'>You must be dead to use this!</span>")
|
||||
return
|
||||
|
||||
log_game("[key_name(usr)] has respawned.")
|
||||
|
||||
to_chat(usr, "<span class='boldnotice'>Make sure to play a different character, and please roleplay correctly!</span>")
|
||||
|
||||
if(!client)
|
||||
log_game("[key_name(usr)] respawn failed due to disconnect.")
|
||||
return
|
||||
client.screen.Cut()
|
||||
client.screen += client.void
|
||||
|
||||
if(!client)
|
||||
log_game("[key_name(usr)] respawn failed due to disconnect.")
|
||||
return
|
||||
|
||||
var/mob/new_player/M = new /mob/new_player()
|
||||
if(!client)
|
||||
log_game("[key_name(usr)] respawn failed due to disconnect.")
|
||||
qdel(M)
|
||||
return
|
||||
|
||||
M.key = key
|
||||
return
|
||||
|
||||
*/
|
||||
/mob/verb/observe()
|
||||
set name = "Observe"
|
||||
set category = "OOC"
|
||||
var/is_admin = 0
|
||||
|
||||
if(client.holder && (client.holder.rights & R_ADMIN))
|
||||
is_admin = 1
|
||||
else if(stat != DEAD || isnewplayer(src))
|
||||
to_chat(usr, "<span class='notice'>You must be observing to use this!</span>")
|
||||
return
|
||||
|
||||
if(is_admin && stat == DEAD)
|
||||
is_admin = 0
|
||||
|
||||
var/list/names = list()
|
||||
var/list/namecounts = list()
|
||||
var/list/creatures = list()
|
||||
|
||||
for(var/obj/O in GLOB.poi_list)
|
||||
if(!O.loc)
|
||||
continue
|
||||
if(istype(O, /obj/item/disk/nuclear))
|
||||
var/name = "Nuclear Disk"
|
||||
if(names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
creatures[name] = O
|
||||
|
||||
if(istype(O, /obj/singularity))
|
||||
var/name = "Singularity"
|
||||
if(names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
creatures[name] = O
|
||||
|
||||
|
||||
for(var/mob/M in sortAtom(GLOB.mob_list))
|
||||
var/name = M.name
|
||||
if(names.Find(name))
|
||||
namecounts[name]++
|
||||
name = "[name] ([namecounts[name]])"
|
||||
else
|
||||
names.Add(name)
|
||||
namecounts[name] = 1
|
||||
|
||||
creatures[name] = M
|
||||
|
||||
|
||||
client.perspective = EYE_PERSPECTIVE
|
||||
|
||||
var/eye_name = null
|
||||
|
||||
var/ok = "[is_admin ? "Admin Observe" : "Observe"]"
|
||||
eye_name = tgui_input_list(usr, "Please, select a player!", ok, creatures)
|
||||
|
||||
if(!eye_name)
|
||||
return
|
||||
|
||||
var/mob/mob_eye = creatures[eye_name]
|
||||
|
||||
if(client && mob_eye)
|
||||
client.eye = mob_eye
|
||||
/mob/proc/is_dead()
|
||||
return stat == DEAD
|
||||
|
||||
/mob/verb/cancel_camera()
|
||||
set name = "Cancel Camera View"
|
||||
|
||||
@@ -92,19 +92,3 @@ GLOBAL_LIST_EMPTY(thinking_indicator)
|
||||
set_typing_indicator(FALSE)
|
||||
if(message)
|
||||
me_verb(message)
|
||||
|
||||
/client/verb/typing_indicator()
|
||||
set name = "Typing Indicator"
|
||||
set category = "Preferences.Show/Hide"
|
||||
set desc = "Toggles showing a typing/thought indicator when you have TGUIsay open."
|
||||
prefs.toggles ^= PREFTOGGLE_SHOW_TYPING
|
||||
prefs.save_preferences(src)
|
||||
to_chat(src, "You will [(prefs.toggles & PREFTOGGLE_SHOW_TYPING) ? "no longer" : "now"] display a typing/thought indicator when you have TGUIsay open.")
|
||||
|
||||
// Clear out any existing typing indicator.
|
||||
if(prefs.toggles & PREFTOGGLE_SHOW_TYPING)
|
||||
if(istype(mob))
|
||||
mob.set_typing_indicator(FALSE)
|
||||
mob.set_thinking_indicator(FALSE)
|
||||
|
||||
SSblackbox.record_feedback("tally", "toggle_verbs", 1, "Toggle Typing Indicator (Speech)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
Reference in New Issue
Block a user