mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Adds preference to output description_info with examine text (#6969)
* Adds preference to output description_info with examine text * includes the defines file
This commit is contained in:
6
code/__defines/preferences.dm
Normal file
6
code/__defines/preferences.dm
Normal file
@@ -0,0 +1,6 @@
|
||||
#define EXAMINE_MODE_DEFAULT 0
|
||||
#define EXAMINE_MODE_INCLUDE_USAGE 1
|
||||
#define EXAMINE_MODE_SWITCH_TO_PANEL 2
|
||||
|
||||
// Should be one higher than the above
|
||||
#define EXAMINE_MODE_MAX 3
|
||||
@@ -185,6 +185,12 @@
|
||||
to_chat(user, "[bicon(src)] That's [f_name] [suffix]")
|
||||
to_chat(user,desc)
|
||||
|
||||
if(user.client?.examine_text_mode == EXAMINE_MODE_INCLUDE_USAGE)
|
||||
to_chat(user, description_info)
|
||||
|
||||
if(user.client?.examine_text_mode == EXAMINE_MODE_SWITCH_TO_PANEL)
|
||||
user.client.statpanel = "Examine" // Switch to stat panel
|
||||
|
||||
return distance == -1 || (get_dist(src, user) <= distance)
|
||||
|
||||
// called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set.
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
var/chatOutputLoadedAt
|
||||
|
||||
var/adminhelped = 0
|
||||
var/examine_text_mode = 0 // Just examine text, include usage (description_info), switch to examine panel.
|
||||
|
||||
|
||||
///////////////
|
||||
//SOUND STUFF//
|
||||
|
||||
@@ -308,6 +308,26 @@
|
||||
|
||||
feedback_add_details("admin_verb","THInstm") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
// Not attached to a pref datum because those are strict binary toggles
|
||||
/client/verb/toggle_examine_mode()
|
||||
set name = "Toggle Examine Mode"
|
||||
set category = "Preferences"
|
||||
set desc = "Control the additional behaviour of examining things"
|
||||
|
||||
examine_text_mode++
|
||||
examine_text_mode %= EXAMINE_MODE_MAX // This cycles through them because if you're already specifically being routed to the examine panel, you probably don't need to have the extra text printed to chat
|
||||
switch(examine_text_mode) // ... And I only wanted to add one verb
|
||||
if(EXAMINE_MODE_DEFAULT)
|
||||
to_chat(src, "Examining things will only output the base examine text, and you will not be redirected to the examine panel automatically.")
|
||||
|
||||
if(EXAMINE_MODE_INCLUDE_USAGE)
|
||||
to_chat(src, "Examining things will also print any extra usage information normally included in the examine panel to the chat.")
|
||||
|
||||
if(EXAMINE_MODE_SWITCH_TO_PANEL)
|
||||
to_chat(src, "Examining things will direct you to the examine panel, where you can view extended information about the thing.")
|
||||
|
||||
|
||||
//Toggles for Staff
|
||||
//Developers
|
||||
|
||||
|
||||
4
html/changelogs/atermonera_examine_pref.yml
Normal file
4
html/changelogs/atermonera_examine_pref.yml
Normal file
@@ -0,0 +1,4 @@
|
||||
author: Atermonera
|
||||
delete-after: True
|
||||
changes:
|
||||
- rscadd: "Added a preference to switch between a few extra modes of examining things. Verb in the preferences tab."
|
||||
@@ -64,6 +64,7 @@
|
||||
#include "code\__defines\objects.dm"
|
||||
#include "code\__defines\overmap.dm"
|
||||
#include "code\__defines\planets.dm"
|
||||
#include "code\__defines\preferences.dm"
|
||||
#include "code\__defines\process_scheduler.dm"
|
||||
#include "code\__defines\qdel.dm"
|
||||
#include "code\__defines\research.dm"
|
||||
|
||||
Reference in New Issue
Block a user