From 27321a452896ac1b21b1437cd5bb75297aa43ea9 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 14:24:58 -0600
Subject: [PATCH 01/19] - Port of TG examine refactors: examine tags,
descriptors, and generally lots of changes for everything examine/examine
block related - Flavor text is closer to the bottom of human examine again -
Tooltips in chat stand out more - Yellow OOC. Good luck - Also defines for
OOC alerts
---
code/__DEFINES/announce.dm | 12 ++
code/__DEFINES/chat.dm | 8 +-
code/__DEFINES/dcs/signals/signals.dm | 5 +-
code/__DEFINES/items.dm | 4 +
code/__DEFINES/span.dm | 2 +
code/__HELPERS/announce.dm | 7 +-
code/__HELPERS/ooc_announcement.dm | 2 +-
code/__HELPERS/unsorted.dm | 20 +-
code/controllers/subsystem/ticker.dm | 2 +-
code/datums/gamemodes/campaign.dm | 2 +-
.../gamemodes/campaign/campaign_mission.dm | 4 +-
code/datums/gamemodes/combat_patrol.dm | 2 +-
code/datums/gamemodes/infestation.dm | 2 +-
code/datums/jobs/job/job.dm | 17 +-
code/game/atoms/_atom.dm | 106 -----------
code/game/atoms/atom_examine.dm | 174 ++++++++++++++++++
code/game/objects/items.dm | 17 +-
code/game/objects/items/stacks/stack.dm | 3 -
code/game/objects/items/storage/pouch.dm | 4 +-
code/game/objects/objs.dm | 23 +++
code/modules/admin/admin_verbs.dm | 2 +-
code/modules/admin/fun_verbs.dm | 2 +-
code/modules/clothing/clothing.dm | 12 ++
code/modules/clothing/glasses/glasses.dm | 8 +
code/modules/clothing/glasses/hud.dm | 2 +
.../mob/living/carbon/human/examine.dm | 30 ++-
code/modules/mob/living/silicon/ai/examine.dm | 3 +-
tgmc.dme | 3 +
.../tgui-panel/styles/tgchat/chat-dark.scss | 99 +++++++---
.../tgui-panel/styles/tgchat/chat-light.scss | 71 ++++++-
tgui/packages/tgui-say/styles/colors.scss | 8 +-
31 files changed, 458 insertions(+), 198 deletions(-)
create mode 100644 code/__DEFINES/announce.dm
create mode 100644 code/__DEFINES/items.dm
create mode 100644 code/game/atoms/atom_examine.dm
diff --git a/code/__DEFINES/announce.dm b/code/__DEFINES/announce.dm
new file mode 100644
index 0000000000000..c65b0051290ad
--- /dev/null
+++ b/code/__DEFINES/announce.dm
@@ -0,0 +1,12 @@
+// the types of priority announcements
+/// Regular gameplay, not too important
+#define ANNOUNCEMENT_REGULAR 1
+/// Probably round outcome changing, like OBs and Alamo fun
+#define ANNOUNCEMENT_PRIORITY 2
+/// Command alerts
+#define ANNOUNCEMENT_COMMAND 3
+
+/// Admin or OOC sources. Yellow
+#define OOC_ALERT_ADMIN "ooc"
+/// Game alerts, like roundend. Red
+#define OOC_ALERT_GAME "game"
diff --git a/code/__DEFINES/chat.dm b/code/__DEFINES/chat.dm
index 9faaf8410ec29..d9de702d796ce 100644
--- a/code/__DEFINES/chat.dm
+++ b/code/__DEFINES/chat.dm
@@ -42,5 +42,11 @@
#define debug_world_log(msg) if (GLOB.Debug2) log_world("DEBUG: [msg]")
/// Adds a generic box around whatever message you're sending in chat. Really makes things stand out.
#define examine_block(str) ("
" + str + "
")
-
+/// Makes a fieldset with a name in the middle top part. Can apply additional classes
+#define fieldset_block(title, content, classes) ("")
+/// Makes a horizontal line with text in the middle
+#define separator_hr(str) ("
" + str + "
")
+/// Header for use in examine blocks
+#define examine_header(str) ("" + str + "")
+/// A horizontal line for use in examine blocks
#define EXAMINE_SECTION_BREAK ""
diff --git a/code/__DEFINES/dcs/signals/signals.dm b/code/__DEFINES/dcs/signals/signals.dm
index b13f9720def45..a8b1decc85325 100644
--- a/code/__DEFINES/dcs/signals/signals.dm
+++ b/code/__DEFINES/dcs/signals/signals.dm
@@ -233,7 +233,10 @@
#define COMSIG_ATOM_ATTACK_POWERLOADER "atom_attack_powerloader"//from base of atom/attack_powerloader: (mob/living/user, obj/item/powerloader_clamp/attached_clamp)
///from base of atom/emp_act(): (severity)
#define COMSIG_ATOM_EMP_ACT "atom_emp_act"
-#define COMSIG_ATOM_EXAMINE "atom_examine" //from base of atom/examine(): (/mob)
+///from base of atom/examine(): (/mob, list/examine_text)
+#define COMSIG_ATOM_EXAMINE "atom_examine"
+///from base of atom/examine_tags(): (/mob, list/examine_tags)
+#define COMSIG_ATOM_EXAMINE_TAGS "atom_examine_tags"
///from base of atom/get_examine_name(): (/mob, list/overrides)
#define COMSIG_ATOM_GET_EXAMINE_NAME "atom_examine_name"
//Positions for overrides list
diff --git a/code/__DEFINES/items.dm b/code/__DEFINES/items.dm
new file mode 100644
index 0000000000000..9807db65b67a9
--- /dev/null
+++ b/code/__DEFINES/items.dm
@@ -0,0 +1,4 @@
+///The text for weight class data lists (item examine)
+#define WEIGHT_CLASS_TEXT "text"
+///The tooltip desc for weight class data lists (item examine)
+#define WEIGHT_CLASS_TOOLTIP "TOOLTIP"
diff --git a/code/__DEFINES/span.dm b/code/__DEFINES/span.dm
index 32c4b5f3c3641..94f00db98a82b 100644
--- a/code/__DEFINES/span.dm
+++ b/code/__DEFINES/span.dm
@@ -3,6 +3,7 @@
#define span_adminhelp(str) ("" + str + "")
#define span_adminnotice(str) ("" + str + "")
#define span_adminooc(str) ("" + str + "")
+#define span_adminsay(str) ("" + str + "")
#define span_alert(str) ("" + str + "")
#define span_alertalien(str) ("" + str + "")
#define span_alien(str) ("" + str + "")
@@ -43,6 +44,7 @@
#define span_looc(str) ("" + str + "")
#define span_memo(str) ("" + str + "")
#define span_memoedit(str) ("" + str + "")
+#define span_mentorsay(str) ("" + str + "")
#define span_message(str) ("" + str + "")
#define span_moderate(str) ("" + str + "")
#define span_motd(str) ("" + str + "")
diff --git a/code/__HELPERS/announce.dm b/code/__HELPERS/announce.dm
index 8599bb297cdd4..095aaef07dfac 100644
--- a/code/__HELPERS/announce.dm
+++ b/code/__HELPERS/announce.dm
@@ -1,8 +1,3 @@
-// the types of priority announcements
-#define ANNOUNCEMENT_REGULAR 1
-#define ANNOUNCEMENT_PRIORITY 2
-#define ANNOUNCEMENT_COMMAND 3
-
// Do not use these macros outside of here (unless you absolutely have to or something), this is mainly to make sure they appear consistent
// The best way to use these for to_chats or something would be assemble_alert()
@@ -124,7 +119,7 @@
if(playing_sound)
SEND_SOUND(M, s)
-
+///Spawns a paper at each communications printer
/proc/print_command_report(papermessage, papertitle = "paper", announcemessage = "A report has been downloaded and printed out at all communications consoles.", announcetitle = "Incoming Classified Message", announce = TRUE)
if(announce)
priority_announce(announcemessage, announcetitle, sound = 'sound/AI/commandreport.ogg')
diff --git a/code/__HELPERS/ooc_announcement.dm b/code/__HELPERS/ooc_announcement.dm
index f6301ff2791cc..8d770db007a3e 100644
--- a/code/__HELPERS/ooc_announcement.dm
+++ b/code/__HELPERS/ooc_announcement.dm
@@ -31,7 +31,7 @@
play_sound = TRUE,
sound_override = 'sound/misc/adm_announce.ogg',
sender_override = "Server Admin Announcement",
- style = "ooc",
+ style = OOC_ALERT_ADMIN,
encode_title = TRUE,
encode_text = FALSE,
)
diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm
index 86348e043bd51..f21878f9a560b 100644
--- a/code/__HELPERS/unsorted.dm
+++ b/code/__HELPERS/unsorted.dm
@@ -794,7 +794,7 @@ GLOBAL_LIST_INIT(wallitems, typecacheof(list(
/proc/format_text(text)
return replacetext(replacetext(text,"\proper ",""),"\improper ","")
-///Returns a string based on the weight class define used as argument
+///Returns a string based on the weight class define used as argument.
/proc/weight_class_to_text(w_class)
switch(w_class)
if(WEIGHT_CLASS_TINY)
@@ -810,7 +810,23 @@ GLOBAL_LIST_INIT(wallitems, typecacheof(list(
if(WEIGHT_CLASS_GIGANTIC)
. = "gigantic"
else
- . = ""
+ . = "?????"
+
+///Returns an assoc list of WEIGHT CLASS TEXT = DESCRIPTION based on the arg you provide.
+/proc/weight_class_data(w_class)
+ . = list()
+ .[WEIGHT_CLASS_TEXT] = weight_class_to_text(w_class)
+ switch(w_class)
+ if(WEIGHT_CLASS_TINY, WEIGHT_CLASS_SMALL)
+ .[WEIGHT_CLASS_TOOLTIP] = "Fits in pockets and almost all containers, except some specialized containers. Takes up almost no space in containers."
+ if(WEIGHT_CLASS_NORMAL)
+ .[WEIGHT_CLASS_TOOLTIP] = "Fits in most containers. Takes up some space."
+ if(WEIGHT_CLASS_BULKY)
+ .[WEIGHT_CLASS_TOOLTIP] = "Only fits in rare specialized containers, such as holsters. Takes up a lot of space in containers."
+ if(WEIGHT_CLASS_HUGE, WEIGHT_CLASS_GIGANTIC)
+ .[WEIGHT_CLASS_TOOLTIP] = "Only fits in extremely rare specialized containers."
+ else
+ .[WEIGHT_CLASS_TOOLTIP] = "Yell at coders, this isn't supposed to happen."
/// Converts a semver string into a list of numbers
/proc/semver_to_list(semver_string)
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index dee7d91841668..7c5f8ad46b17f 100644
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -346,7 +346,7 @@ SUBSYSTEM_DEF(ticker)
tip = pick(SSstrings.get_list_from_file("tips/meme"))
if(tip)
- to_chat(world, examine_block("[span_tip("Tip of the round:")][EXAMINE_SECTION_BREAK][html_encode(tip)]"))
+ to_chat(world, fieldset_block("[span_tip("Tip of the round")]", html_encode(tip), "examine_block"))
/datum/controller/subsystem/ticker/proc/check_queue()
diff --git a/code/datums/gamemodes/campaign.dm b/code/datums/gamemodes/campaign.dm
index fc83dedf6721c..e42a760fbd4a2 100644
--- a/code/datums/gamemodes/campaign.dm
+++ b/code/datums/gamemodes/campaign.dm
@@ -130,7 +130,7 @@
title = round_finished,
text = announcement_body,
play_sound = FALSE,
- style = "game"
+ style = OOC_ALERT_GAME
)
var/sound/som_track
diff --git a/code/datums/gamemodes/campaign/campaign_mission.dm b/code/datums/gamemodes/campaign/campaign_mission.dm
index 43c2a3d733277..b00ab8eaf2691 100644
--- a/code/datums/gamemodes/campaign/campaign_mission.dm
+++ b/code/datums/gamemodes/campaign/campaign_mission.dm
@@ -359,7 +359,7 @@
title = name,
text = "Next mission is [name], selected by [starting_faction] on the battlefield of [map_name].",
sound_override = 'sound/ambience/votestart.ogg',
- style = "game"
+ style = OOC_ALERT_GAME
)
///Intro when the mission is started
@@ -376,7 +376,7 @@
title = "[starting_faction] [outcome]",
text = "The engagement between [starting_faction] and [hostile_faction] on [map_name] has ended in a [starting_faction] [outcome]!",
play_sound = FALSE,
- style = "game"
+ style = OOC_ALERT_GAME
)
map_text_broadcast(starting_faction, outro_message[outcome][MISSION_STARTING_FACTION], op_name_starting)
diff --git a/code/datums/gamemodes/combat_patrol.dm b/code/datums/gamemodes/combat_patrol.dm
index e3f166081464c..3cdec4528787f 100644
--- a/code/datums/gamemodes/combat_patrol.dm
+++ b/code/datums/gamemodes/combat_patrol.dm
@@ -123,7 +123,7 @@
title = round_finished,
text = "Thus ends the story of the brave men and women of the TerraGov Marine Corps and Sons of Mars, and their struggle on [SSmapping.configs[GROUND_MAP].map_name].",
play_sound = FALSE,
- style = "game"
+ style = OOC_ALERT_GAME
)
/datum/game_mode/hvh/combat_patrol/get_deploy_point_message(mob/living/user)
diff --git a/code/datums/gamemodes/infestation.dm b/code/datums/gamemodes/infestation.dm
index 0f02884404150..157e963d36ebd 100644
--- a/code/datums/gamemodes/infestation.dm
+++ b/code/datums/gamemodes/infestation.dm
@@ -236,7 +236,7 @@
title = round_finished,
text = "Thus ends the story of the brave men and women of the TerraGov Marine Corps, and their struggle on [SSmapping.configs[GROUND_MAP].map_name]...",
play_sound = FALSE,
- style = "game"
+ style = OOC_ALERT_GAME
)
var/sound/xeno_track
diff --git a/code/datums/jobs/job/job.dm b/code/datums/jobs/job/job.dm
index 0feb2d2e917c7..5e839236a40ea 100644
--- a/code/datums/jobs/job/job.dm
+++ b/code/datums/jobs/job/job.dm
@@ -162,16 +162,17 @@ GLOBAL_PROTECT(exp_specialmap)
/datum/job/proc/map_check()
return TRUE
-
-/datum/job/proc/radio_help_message(mob/M)
- to_chat(M, {"
-[span_role_header("You are the [title].")]
-[span_role_body("As the [title] you answer to [supervisors]. Special circumstances may change this.")]
-"})
+/// The message you get when spawning in as this job, called by [/datum/job/proc/after_spawn]
+/datum/job/proc/radio_help_message(mob/new_player)
+ var/list/message = list()
+ message += span_role_body("As the [title] you answer to [supervisors]. Special circumstances may change this.")
if(!(job_flags & JOB_FLAG_NOHEADSET))
- to_chat(M, "Prefix your message with ; to speak on the default radio channel. To see other prefixes, look closely at your headset.")
+ message += separator_hr("[span_role_body("Radio")]")
+ message += span_role_body("Prefix your message with ; to speak on the default radio channel, in most cases this is your squad radio. For additional prefixes, examine your headset.")
if(req_admin_notify)
- to_chat(M, "You are playing a job that is important for game progression. If you have to disconnect, please head to hypersleep, if you can't make it there, notify the admins via adminhelp.")
+ message += separator_hr("[span_role_header("This is an important job.")]")
+ message += span_role_body("If you have to disconnect, please take a hypersleep pod. If you can't make it there, adminhelp using F1 or the Adminhelp verb.")
+ to_chat(new_player, fieldset_block("[span_role_header("You are the [title].")]", jointext(message, ""), "examine_block"))
/datum/outfit/job
var/jobtype
diff --git a/code/game/atoms/_atom.dm b/code/game/atoms/_atom.dm
index 4966ac6e455a1..c3a67a4765a99 100644
--- a/code/game/atoms/_atom.dm
+++ b/code/game/atoms/_atom.dm
@@ -16,15 +16,11 @@
var/resistance_flags = PROJECTILE_IMMUNE
- ///If non-null, overrides a/an/some in all cases
- var/article
-
///a very temporary list of overlays to remove
var/list/remove_overlays
///a very temporary list of overlays to add
var/list/add_overlays
-
///Related to do_after/do_mob overlays, I can't get my hopes high.
var/list/display_icons
@@ -286,108 +282,6 @@ directive is properly returned.
found += A.search_contents_for(path,filter_path)
return found
-
-//mob verbs are faster than object verbs. See https://secure.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
-/mob/verb/examinate(atom/examinify as mob|obj|turf in view())
- set name = "Examine"
- set category = "IC"
-
- if(is_blind(src))
- to_chat(src, span_notice("Something is there but you can't see it."))
- return
-
- face_atom(examinify)
- var/list/result = examinify.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
-
- if(length(result))
- for(var/i in 1 to (length(result) - 1))
- if(result[i] != EXAMINE_SECTION_BREAK)
- result[i] += "\n"
- else
- // remove repeated and ones on the ends.
- if((i == 1) || (i == length(result)) || (result[i - 1] == EXAMINE_SECTION_BREAK))
- result.Cut(i, i + 1)
- i--
-
- to_chat(src, examine_block(span_infoplain(result.Join())))
- SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, examinify)
-
-/**
- * Get the name of this object for examine
- *
- * You can override what is returned from this proc by registering to listen for the
- * [COMSIG_ATOM_GET_EXAMINE_NAME] signal
- */
-/atom/proc/get_examine_name(mob/user)
- . = "\a [src]"
- var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
- if(article)
- . = "[article] [src]"
- override[EXAMINE_POSITION_ARTICLE] = article
- if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
- . = override.Join("")
-
-///Generate the full examine string of this atom (including icon for goonchat)
-/atom/proc/get_examine_string(mob/user, thats = FALSE)
- return "[icon2html(src, user)] [thats? "That's ":""][get_examine_name(user)]"
-
-/atom/proc/examine(mob/user)
- SHOULD_CALL_PARENT(TRUE)
- var/examine_string = get_examine_string(user, thats = TRUE)
- if(examine_string)
- . = list("[examine_string].", EXAMINE_SECTION_BREAK)
- else
- . = list()
-
- if(desc)
- . += desc
- if(user.can_use_codex() && SScodex.get_codex_entry(get_codex_value()))
- . += EXAMINE_SECTION_BREAK
- . += span_notice("The codex has relevant information available.")
-
- if((get_dist(user,src) <= 2) && reagents)
- . += EXAMINE_SECTION_BREAK
- if(reagents.reagent_flags & TRANSPARENT)
- . += "It contains:"
- if(length(reagents.reagent_list)) // TODO: Implement scan_reagent and can_see_reagents() to show each individual reagent
- var/total_volume = 0
- for(var/datum/reagent/R in reagents.reagent_list)
- total_volume += R.volume
- . += span_notice("[total_volume] units of various reagents.")
- else
- . += "Nothing."
- else if(CHECK_BITFIELD(reagents.reagent_flags, AMOUNT_VISIBLE))
- if(reagents.total_volume)
- . += span_notice("It has [reagents.total_volume] unit\s left.")
- else
- . += span_warning("It's empty.")
- else if(CHECK_BITFIELD(reagents.reagent_flags, AMOUNT_SKILLCHECK))
- if(isxeno(user))
- return
- if(user.skills.getRating(SKILL_MEDICAL) >= SKILL_MEDICAL_NOVICE)
- . += "It contains these reagents:"
- if(length(reagents.reagent_list))
- for(var/datum/reagent/R in reagents.reagent_list)
- . += "[R.volume] units of [R.name]"
- else
- . += "Nothing."
- else
- . += "You don't know what's in it."
- else if(reagents.reagent_flags & AMOUNT_ESTIMEE)
- var/obj/item/reagent_containers/C = src
- if(!reagents.total_volume)
- . += span_notice("\The [src] is empty!")
- else if (reagents.total_volume<= C.volume*0.3)
- . += span_notice("\The [src] is almost empty!")
- else if (reagents.total_volume<= C.volume*0.6)
- . += span_notice("\The [src] is half full!")
- else if (reagents.total_volume<= C.volume*0.9)
- . += span_notice("\The [src] is almost full!")
- else
- . += span_notice("\The [src] is full!")
-
- SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE, user, .)
-
/// Checks if the colors given are different and if so causes a greyscale icon update
/// The colors argument can be either a list or the full color string
/atom/proc/set_greyscale_colors(list/colors, update=TRUE)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
new file mode 100644
index 0000000000000..a539f18c287ac
--- /dev/null
+++ b/code/game/atoms/atom_examine.dm
@@ -0,0 +1,174 @@
+//! Many procs related to examining atoms.
+
+/atom
+ /// If non-null, overrides a/an/some in all cases
+ var/article
+
+/**
+ * This is a mob verb for speed reasons (nice one BYOND).
+ * See [this BYOND forum post](https://secure.byond.com/forum/?post=1326139&page=2#comment8198716)
+ * for why this isnt something like `/atom/verb/examine`.
+ *
+ * SIGNAL FUN:
+ * Produces a signal [COMSIG_MOB_EXAMINATE], for doing things to people who examine things,
+ * like applying debilitating effects to someone who examines a specific type of atom.
+ */
+/mob/verb/examinate(atom/examinify as mob|obj|turf in view())
+ set name = "Examine"
+ set category = "IC"
+
+ if(is_blind(src))
+ to_chat(src, span_warning("Something is there, but you can't see it!"))
+ return
+
+ face_atom(examinify)
+ var/list/result = examinify.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
+ var/atom_title = examinify.examine_title(src, thats = TRUE)
+
+ if(length(result))
+ for(var/i in 1 to (length(result) - 1))
+ if(result[i] != EXAMINE_SECTION_BREAK)
+ result[i] += "\n"
+ else
+ // remove repeated and ones on the ends.
+ if((i == 1) || (i == length(result)) || (result[i - 1] == EXAMINE_SECTION_BREAK))
+ result.Cut(i, i + 1)
+ i--
+
+ var/result_combined = (atom_title ? fieldset_block("[examine_header(atom_title)]", jointext(result, ""), "examine_block") : examine_block(jointext(result, "")))
+
+ to_chat(src, span_infoplain(result_combined))
+ SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, examinify)
+
+/**
+ * Get the name of this object for examine
+ *
+ * You can override what is returned from this proc by registering to listen for the
+ * [COMSIG_ATOM_GET_EXAMINE_NAME] signal
+ */
+/atom/proc/get_examine_name(mob/user)
+ . = "\a [src]"
+ var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
+ if(article)
+ . = "[article] [src]"
+ override[EXAMINE_POSITION_ARTICLE] = article
+ if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
+ . = override.Join("")
+
+///Generate the full examine string of this atom (including icon for chat)
+/atom/proc/examine_title(mob/user, thats = FALSE)
+ return "[icon2html(src, user)] [thats ? "That's ":""][get_examine_name(user)]"
+
+/**
+ * This is called when we want to get a sort-of "descriptor" for this item, where applicable.
+ *
+ * Must return a string. Can be something like "item" "weapon" etc.
+ *
+ * Used for [/obj/item/examine_tags], will appear in the weight class tooltip, like:
+ * It is a normal-sized (whatever this returns).
+ */
+/atom/proc/examine_descriptor(mob/user)
+ return "object"
+
+/**
+ * A list of "tags" displayed after atom's description in examine.
+ * This should return an assoc list of tags -> tooltips for them.
+ * Should probably be calling parent so signals can modify it.
+ *
+ * ### Things to keep in mind:
+ *
+ * * TGUI tooltips in chat cannot use HTML stuff at all, so including
+ * something like `ffff` will not work for tooltips.
+ *
+ *
+ * **Example usage:**
+ * ```byond
+ * .["small"] = "It is a small item."
+ * .["fireproof"] = "It is made of fire-retardant materials."
+ * .["and conductive"] = "Blah blah blah."
+ * ```
+ * This will result in
+ *
+ * It is *small*, *fireproof* *and conductive*.
+ *
+ * where "item" is pulled from [/atom/proc/examine_descriptor]
+ *
+ * SIGNAL FUN:
+ * Produces a signal [COMSIG_ATOM_EXAMINE_TAGS] - can use this to directly modify/add stuff to the examine tags list
+ */
+/atom/proc/examine_tags(mob/user)
+ SHOULD_CALL_PARENT(TRUE)
+ . = list()
+ SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE_TAGS, user, .)
+
+/**
+ * Called when a mob examines (shift click or verb) this atom
+ *
+ * This is the actual proc that generates the text for examining something
+ *
+ * Default behaviour is to get the name and icon of the object and its reagents where
+ * the [TRANSPARENT] flag is set on the reagents holder
+ *
+ * SIGNAL FUN:
+ * Produces a signal [COMSIG_ATOM_EXAMINE] - can use this to directly modify/add stuff to the examine list
+ */
+/atom/proc/examine(mob/user)
+ SHOULD_CALL_PARENT(TRUE)
+ . = list()
+ if(desc)
+ . += "[desc]"
+
+ var/list/tags_list = examine_tags(user)
+ if(length(tags_list))
+ var/tag_string = list()
+ for(var/atom_tag in tags_list)
+ tag_string += (isnull(tags_list[atom_tag]) ? atom_tag : span_tooltip(tags_list[atom_tag], atom_tag))
+ // some regex to ensure that we don't add another "and" if the final element's main text (not tooltip) has one
+ tag_string = english_list(tag_string, and_text = (findtext(tag_string[length(tag_string)], regex(@">.*?and .*?<"))) ? " " : " and ")
+ . += "[p_they(TRUE)] [p_are()] [tag_string]."
+ if(user.can_use_codex() && SScodex.get_codex_entry(get_codex_value()))
+ . += EXAMINE_SECTION_BREAK
+ . += span_notice("The codex has relevant information available.")
+
+ if((get_dist(user,src) <= 2) && reagents)
+ . += EXAMINE_SECTION_BREAK
+ if(reagents.reagent_flags & TRANSPARENT)
+ . += "It contains:"
+ if(length(reagents.reagent_list)) // TODO: Implement scan_reagent and can_see_reagents() to show each individual reagent
+ var/total_volume = 0
+ for(var/datum/reagent/R in reagents.reagent_list)
+ total_volume += R.volume
+ . += span_notice("[total_volume] units of various reagents.")
+ else
+ . += "Nothing."
+ else if(CHECK_BITFIELD(reagents.reagent_flags, AMOUNT_VISIBLE))
+ if(reagents.total_volume)
+ . += span_notice("It has [reagents.total_volume] unit\s left.")
+ else
+ . += span_warning("It's empty.")
+ else if(CHECK_BITFIELD(reagents.reagent_flags, AMOUNT_SKILLCHECK))
+ if(isxeno(user))
+ return
+ if(user.skills.getRating(SKILL_MEDICAL) >= SKILL_MEDICAL_NOVICE)
+ . += "It contains these reagents:"
+ if(length(reagents.reagent_list))
+ for(var/datum/reagent/R in reagents.reagent_list)
+ . += "[R.volume] units of [R.name]"
+ else
+ . += "Nothing."
+ else
+ . += "You don't know what's in it."
+ else if(reagents.reagent_flags & AMOUNT_ESTIMEE)
+ var/obj/item/reagent_containers/C = src
+ if(!reagents.total_volume)
+ . += span_notice("\The [src] is empty!")
+ else if (reagents.total_volume<= C.volume*0.3)
+ . += span_notice("\The [src] is almost empty!")
+ else if (reagents.total_volume<= C.volume*0.6)
+ . += span_notice("\The [src] is half full!")
+ else if (reagents.total_volume<= C.volume*0.9)
+ . += span_notice("\The [src] is almost full!")
+ else
+ . += span_notice("\The [src] is full!")
+
+ SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE, user, .)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index 672b8915ab99c..ce49c16fac8f9 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -266,10 +266,18 @@ GLOBAL_DATUM_INIT(welding_sparks_prepdoor, /mutable_appearance, mutable_appearan
if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
. = override.Join("")
-/obj/item/examine(mob/user)
- . = ..()
- . += EXAMINE_SECTION_BREAK
- . += "[gender == PLURAL ? "They are" : "It is"] a [weight_class_to_text(w_class)] item."
+/obj/item/examine_tags(mob/user)
+ var/list/parent_tags = ..()
+ var/list/weight_class_data = weight_class_data(w_class)
+ parent_tags.Insert(1, weight_class_data[WEIGHT_CLASS_TEXT]) // to make size display first, otherwise it looks goofy
+ . = parent_tags
+ .[weight_class_data[WEIGHT_CLASS_TEXT]] = "[gender == PLURAL ? "They're" : "It's"] a [weight_class_data[WEIGHT_CLASS_TEXT]] [examine_descriptor(user)]. [weight_class_data[WEIGHT_CLASS_TOOLTIP]]"
+ if(atom_flags & CONDUCT)
+ .["conductive"] = "It's conductive. If this is an oversuit item, like armor, it will prevent defibrillation while worn. \
+ Some conductive tools also have special interactions and dangers when being used."
+
+/obj/item/examine_descriptor(mob/user)
+ return "item"
/obj/item/attack_ghost(mob/dead/observer/user)
. = ..()
@@ -277,7 +285,6 @@ GLOBAL_DATUM_INIT(welding_sparks_prepdoor, /mutable_appearance, mutable_appearan
return
return interact(user)
-
/obj/item/attack_hand(mob/living/user)
. = ..()
if(.)
diff --git a/code/game/objects/items/stacks/stack.dm b/code/game/objects/items/stacks/stack.dm
index 38666101b0bfc..efc26296e29ba 100644
--- a/code/game/objects/items/stacks/stack.dm
+++ b/code/game/objects/items/stacks/stack.dm
@@ -25,7 +25,6 @@
var/merge_type // This path and its children should merge with this stack, defaults to src.type
var/number_of_extra_variants = 0 //Determines whether the item should update it's sprites based on amount.
-
/obj/item/stack/Initialize(mapload, new_amount)
. = ..()
if(new_amount)
@@ -87,13 +86,11 @@
number.maptext = MAPTEXT(amount)
. += number
-
/obj/item/stack/Destroy()
if(usr && usr.interactee == src)
usr << browse(null, "window=stack")
return ..()
-
/obj/item/stack/examine(mob/user)
. = ..()
if(amount > 1)
diff --git a/code/game/objects/items/storage/pouch.dm b/code/game/objects/items/storage/pouch.dm
index 4d01da6da78fc..e3f7c1400b637 100644
--- a/code/game/objects/items/storage/pouch.dm
+++ b/code/game/objects/items/storage/pouch.dm
@@ -19,9 +19,9 @@
. = ..()
update_icon()
-/obj/item/storage/pouch/examine(mob/user)
+/obj/item/storage/pouch/examine_tags(mob/user)
. = ..()
- . += "Can be worn by attaching it to a pocket."
+ .["pocket attachable"] = "Can be worn by attaching it to a pocket."
/obj/item/storage/pouch/equipped(mob/user, slot)
if(slot == SLOT_L_STORE || slot == SLOT_R_STORE)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 8d67b122425f3..88666abf87bb7 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -80,6 +80,29 @@
soft_armor = null
return ..()
+/obj/examine_tags(mob/user)
+ . = ..()
+ if(resistance_flags & INDESTRUCTIBLE)
+ .["indestructible"] = "It's completely invulnerable to taking damage or being destroyed, such as by lava, explosions, plasma cutters and xenos."
+ return // we do not want to say it's indestructible and then list 500 fucktillion things that are implied by the word "indestructible"
+ if(resistance_flags & UNACIDABLE)
+ .["[isxeno(user) ? span_xenonotice("acid-proof") : "acid-proof"]"] = "Acid does not stick to or affect this object."
+ if(resistance_flags & PLASMACUTTER_IMMUNE)
+ .["plasma cutter-proof"] = "Plasma cutters cannot destroy this object."
+ if(!isitem(src) && (resistance_flags & PROJECTILE_IMMUNE))
+ .["projectile immune"] = "Projectiles cannot damage this object."
+ if(!isxeno(user) && !isobserver(user))
+ return // humans can check the codex for these- xenos should be able to know them "in the moment"
+ if(resistance_flags & CRUSHER_IMMUNE)
+ .[span_xenonotice("crusher-proof")] = "Charging Crushers can't damage this object."
+ if(resistance_flags & BANISH_IMMUNE)
+ .[span_xenonotice("banish immune")] = "Wraiths can't banish this object."
+ if(resistance_flags & PORTAL_IMMUNE)
+ .[span_xenonotice("portal immune")] = "Wraith portals can't teleport this object."
+ if(resistance_flags & XENO_DAMAGEABLE)
+ .[span_xenonotice("xeno destructible")] = "Xenomorphs can slash this object."
+ else if(!isitem(src))
+ .[span_xenonotice("xeno indestructible")] = "Xenomorphs can't slash this object."
/obj/proc/setAnchored(anchorvalue)
SEND_SIGNAL(src, COMSIG_OBJ_SETANCHORED, anchorvalue)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 9ca6f86458135..e96551ceeff5e 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -610,7 +610,7 @@
return
mob.log_talk(msg, LOG_DSAY)
- msg = "DEAD:[holder.fakekey ? "" : "([holder.rank.name]) "][holder.fakekey ? "Administrator" : key] says, \"[msg]\""
+ msg = "DEAD:[holder.fakekey ? "" : "[span_tooltip(holder.rank.name, "(STAFF)")] "][holder.fakekey ? "Administrator" : key] says, \"[msg]\""
for(var/i in GLOB.clients)
var/client/C = i
diff --git a/code/modules/admin/fun_verbs.dm b/code/modules/admin/fun_verbs.dm
index 97c9b0306ab0b..acdd425b42029 100644
--- a/code/modules/admin/fun_verbs.dm
+++ b/code/modules/admin/fun_verbs.dm
@@ -489,7 +489,7 @@
log_admin("Announce: [key_name(usr)] : [message]")
message_admins("[ADMIN_TPMONTY(usr)] Announces:")
- send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]")
+ send_ooc_announcement(message, "From [usr.client.holder.fakekey ? "Administrator" : usr.key]", style = OOC_ALERT_ADMIN)
/datum/admins/proc/force_distress()
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index c5a8bc782887e..0b8ecd3fe5c4c 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -66,6 +66,9 @@
/obj/item/clothing/proc/update_clothing_icon()
return
+/obj/item/clothing/examine_descriptor(mob/user)
+ return "clothing item"
+
/obj/item/clothing/update_greyscale()
. = ..()
if(!greyscale_config)
@@ -262,6 +265,15 @@
var/mob/M = src.loc
M.update_inv_wear_mask()
+/obj/item/clothing/mask/examine_descriptor(mob/user)
+ return "mask"
+
+/obj/item/clothing/mask/examine_tags(mob/user)
+ . = ..()
+ if(anti_hug)
+ .["larval hugger proof"] = "It will protect the wearer from [anti_hug] larval hugger attack\s."
+ else if(initial(anti_hug) > 0 && !anti_hug)
+ .[span_warning("not larval hugger protective")] = "It won't protect the wearer from larval hugger attacks anymore. Replace it as soon as possible."
////////////////////////////////////////////////////////////////////////
//Shoes
diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm
index e22c988001d6d..a14825585035a 100644
--- a/code/modules/clothing/glasses/glasses.dm
+++ b/code/modules/clothing/glasses/glasses.dm
@@ -27,6 +27,14 @@
///Color to use for the HUD tint; leave null if no tint
var/tint
+/obj/item/clothing/glasses/examine_descriptor(mob/user)
+ return "eyewear"
+
+/obj/item/clothing/glasses/examine_tags(mob/user)
+ . = ..()
+ if(prescription)
+ .["prescription"] = "It will help reduce symptoms of nearsightedness when worn."
+
/obj/item/clothing/glasses/Initialize(mapload)
. = ..()
if(active) //For glasses that spawn active
diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm
index cfba62b7bb375..136c16c6d63a5 100644
--- a/code/modules/clothing/glasses/hud.dm
+++ b/code/modules/clothing/glasses/hud.dm
@@ -7,6 +7,8 @@
///The user wearing the glasses
var/mob/living/carbon/human/affected_user
+/obj/item/clothing/glasses/hud/examine_descriptor(mob/user)
+ return "HUD"
/obj/item/clothing/glasses/hud/Destroy()
if(affected_user)
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index b748a3b2733ae..ac81a7d507381 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -32,18 +32,10 @@
var/t_has = p_have()
var/t_is = p_are()
- var/msg = "This is "
+ var/msg = ""
- if(icon)
- msg += "[icon2html(icon, user)] " //fucking BYOND: this should stop dreamseeker crashing if we -somehow- examine somebody before their icon is generated
-
- msg += "[src.name]!\n"
- if(flavor_text)
- msg += EXAMINE_SECTION_BREAK
- msg += "[flavor_text]\n"
-
- msg += EXAMINE_SECTION_BREAK
msg += ""
+ msg += separator_hr("Outfit")
//uniform
if(w_uniform && !skipjumpsuit)
@@ -177,7 +169,7 @@
if(wear_id)
msg += "[t_He] [t_is] wearing [icon2html(wear_id, user)] \a [wear_id].\n"
- msg += EXAMINE_SECTION_BREAK
+ msg += separator_hr("Status")
//jitters
if(stat != DEAD)
@@ -282,7 +274,7 @@
if(isrobot(src))
msg += "[span_tinydeadsay("[t_He] has minor structural damage, with some solder visibly frayed...")]\n"
else
- msg += "[t_He] [t_is] slightly disfigured, with light signs of cellular damage...\n"
+ msg += "[span_tinydeadsay("[t_He] [t_is] slightly disfigured, with light signs of cellular damage...")]\n"
else if (total_clone < 50)
if(isrobot(src))
msg += "[span_deadsay("[t_He] look[p_s()] very shaky, with significant damage to [t_his] overall structure...")]\n"
@@ -510,8 +502,12 @@
continue
msg += "[span_boldwarning("[t_He] [t_has] \a [embedded] sticking out of [t_his] flesh!")]\n"
+ if(flavor_text)
+ msg += separator_hr("Flavor Text")
+ msg += "[flavor_text]"
+
if(hasHUD(user,"security"))
- msg += EXAMINE_SECTION_BREAK
+ msg += separator_hr("Security HUD")
var/perpname = "wot"
var/criminal = "None"
@@ -532,7 +528,7 @@
msg += "[span_deptradio("Security records:")] \[View\]\[Add comment\]\n"
if(hasHUD(user,"medical"))
- msg += EXAMINE_SECTION_BREAK
+ msg += separator_hr("Medical HUD")
var/cardcolor = holo_card_color
if(!cardcolor)
cardcolor = "none"
@@ -551,7 +547,7 @@
msg += "[span_deptradio("Body scan from [N.fields["last_scan_time"]]")]\n"
if(hasHUD(user,"squadleader"))
- msg += EXAMINE_SECTION_BREAK
+ msg += separator_hr("SL Utilities")
var/mob/living/carbon/human/H = user
if(assigned_squad) //examined mob is a marine in a squad
if(assigned_squad == H.assigned_squad) //same squad
@@ -564,6 +560,7 @@
msg += "[span_deadsay("[t_He] [t_is] hollowed out!")]\n"
if(isxeno(user))
+ msg += separator_hr("Xeno Info")
if(species.species_flags & IS_SYNTHETIC)
msg += "[span_xenowarning("You sense [t_he] [t_is] not organic.")]\n"
if(status_flags & XENO_HOST)
@@ -580,7 +577,8 @@
msg += "Sanguinal: Causes brute damage and bleeding from the brute damage. Does additional damage types in the presence of other xeno-based toxins. Toxin damage for Neuro, Stamina damage for Hemodile, and Burn damage for Transvitox.\n"
if(has_status_effect(STATUS_EFFECT_ADMINSLEEP))
- msg += span_highdanger("This player has been slept by staff. Best to leave them be.\n")
+ msg += separator_hr("[span_boldwarning("Admin Slept")]")
+ msg += span_highdanger("This player has been slept by staff. Best to leave them be.\n")
msg += ""
return list(msg)
diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm
index d8c4fef279469..8ba3f14b4dedd 100644
--- a/code/modules/mob/living/silicon/ai/examine.dm
+++ b/code/modules/mob/living/silicon/ai/examine.dm
@@ -1,7 +1,6 @@
/mob/living/silicon/ai/examine(mob/user)
SHOULD_CALL_PARENT(FALSE) // TODO ai and human examine dont send examine signal
var/msg = " "
- msg += "This is [icon2html(src, user)] [src]! "
if(stat == DEAD)
msg += "[span_deadsay("It appears to be powered-down.")] "
@@ -30,6 +29,6 @@
return list(msg)
-/mob/living/silicon/ai/get_examine_string(mob/user, thats)
+/mob/living/silicon/ai/examine_title(mob/user, thats)
return null
diff --git a/tgmc.dme b/tgmc.dme
index ba52254287374..44fa860098e30 100644
--- a/tgmc.dme
+++ b/tgmc.dme
@@ -30,6 +30,7 @@
#include "code\__DEFINES\admin.dm"
#include "code\__DEFINES\ai.dm"
#include "code\__DEFINES\alerts.dm"
+#include "code\__DEFINES\announce.dm"
#include "code\__DEFINES\apc_defines.dm"
#include "code\__DEFINES\area.dm"
#include "code\__DEFINES\assert.dm"
@@ -78,6 +79,7 @@
#include "code\__DEFINES\instruments.dm"
#include "code\__DEFINES\interaction.dm"
#include "code\__DEFINES\is_helpers.dm"
+#include "code\__DEFINES\items.dm"
#include "code\__DEFINES\jobs.dm"
#include "code\__DEFINES\keybind.dm"
#include "code\__DEFINES\language.dm"
@@ -760,6 +762,7 @@
#include "code\game\area\campaign_maps\tgmc_raiding_base.dm"
#include "code\game\atoms\_atom.dm"
#include "code\game\atoms\atom_appearance.dm"
+#include "code\game\atoms\atom_examine.dm"
#include "code\game\atoms\atom_movable.dm"
#include "code\game\objects\empulse.dm"
#include "code\game\objects\items.dm"
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 40dbd98ebb715..e51833986fd90 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -279,7 +279,7 @@ em {
font-weight: bold;
}
.colorooc {
- color: #4c6dff;
+ color: #cca300;
font-weight: bold;
}
@@ -305,15 +305,15 @@ em {
font-weight: bold;
}
.headmentorooc {
- color: #397339;
+ color: #3b863b;
font-weight: bold;
}
.senioradminooc {
- color: #cc707f;
+ color: #df7486;
font-weight: bold;
}
.adminooc {
- color: #c3324a;
+ color: #db1d3c;
font-weight: bold;
}
.trialminooc {
@@ -329,7 +329,7 @@ em {
font-weight: bold;
}
.mentorooc {
- color: #329932;
+ color: #32b632;
font-weight: bold;
}
.maintainerooc {
@@ -361,7 +361,7 @@ em {
font-weight: bold;
}
.asay {
- color: #cc1e58;
+ color: #ff4500;
font-weight: bold;
}
.headminasay {
@@ -407,14 +407,14 @@ em {
}
.deadsay {
- color: #b560ff;
+ color: #c788ff;
}
.bigdeadsay {
- color: #b560ff;
+ color: #c788ff;
font-size: 140%;
}
.tinydeadsay {
- color: #b560ff;
+ color: #c788ff;
font-size: 85%;
}
.radio {
@@ -424,7 +424,7 @@ em {
color: #b21ab2;
}
.comradio {
- color: #517ac5;
+ color: #6089d6;
}
.syndradio {
color: #7f4648;
@@ -550,7 +550,7 @@ h2.alert {
font-size: 85%;
}
.xenonotice {
- color: #2c7f5c;
+ color: #57a383;
}
.boldnotice {
color: #6666cc;
@@ -561,7 +561,7 @@ h2.alert {
font-style: italic;
}
.xenowarning {
- color: #2c7f5c;
+ color: #57a383;
font-style: italic;
}
.boldwarning {
@@ -631,16 +631,15 @@ h2.alert {
}
.role_header {
- color: #8fb2ff;
+ color: rgb(215, 0, 0);
display: block;
text-align: center;
font-weight: bold;
font-size: 1.5em;
}
.role_body {
- color: #d41010;
+ color: #e4e4e4;
display: block;
- text-align: center;
}
.round_setup {
@@ -1026,6 +1025,36 @@ h2.alert {
height: 1px;
margin: 8px 16px 8px 16px;
}
+.examine_block .blockheader {
+ font-family: Verdana;
+ color: #abc6ec;
+ display: block;
+ text-align: center;
+ font-weight: bold;
+ font-size: 1.3em;
+}
+// Provides a horizontal bar with text in the middle
+// I got this off stackoverflow
+.separator {
+ display: flex;
+ align-items: center;
+ text-align: center;
+}
+
+.separator::before,
+.separator::after {
+ content: '';
+ flex: 1;
+ border-bottom: 1px solid rgba(100, 100, 100, 0.33);
+}
+
+.separator:not(:empty)::before {
+ margin-right: 0.25em;
+}
+
+.separator:not(:empty)::after {
+ margin-left: 0.25em;
+}
.tooltip {
font-style: italic;
@@ -1033,26 +1062,30 @@ h2.alert {
}
$ooc_alert_bg_colors: (
- 'ooc': #012753,
+ 'ooc': #4d4100,
'game': #4b0000,
);
$ooc_alert_border_colors: (
- 'ooc': #006deb,
- 'game': #db0000,
+ 'ooc': #cca30070,
+ 'game': #db000070,
);
$ooc_alert_text_colors: (
- 'ooc': #006deb,
+ 'ooc': #cca300,
'game': #db0000,
);
+$border-width: 4;
+
+$border-width-px: $border-width * 1px;
+
@each $color-type, $color in $ooc_alert_text_colors {
.ooc_alert_#{$color-type} {
background: map.get($ooc_alert_bg_colors, $color-type);
border: 1px solid map.get($ooc_alert_border_colors, $color-type);
- margin: 0.5em;
- padding: 0.5em 0.5em 0.5em 0.2em;
+ margin: 7px 4px;
+ padding: 8px 12px;
color: #ffffff;
font-weight: bold;
display: flex;
@@ -1063,6 +1096,26 @@ $ooc_alert_text_colors: (
color: map.get($ooc_alert_text_colors, $color-type);
padding: 0.5em 0 0 0.35em;
}
+ .ooc_alert_#{$color-type} .separator::before {
+ content: '';
+ flex: 1;
+ border-bottom: 1px
+ solid
+ map.get(
+ $ooc_alert_border_colors,
+ $color-type
+ );
+ }
+ .ooc_alert_#{$color-type} .separator::after {
+ content: '';
+ flex: 1;
+ border-bottom: 1px
+ solid
+ map.get(
+ $ooc_alert_border_colors,
+ $color-type
+ );
+ }
}
$alert-stripe-colors: (
@@ -1113,10 +1166,6 @@ $alert-subheader-header-colors: (
'grey': #e9aa72,
);
-$border-width: 4;
-
-$border-width-px: $border-width * 1px;
-
.faction_alert_text {
background: #202020;
padding: 0.5rem 0.5rem;
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
index 32a0b58e4872d..a211b28e662f8 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
@@ -642,7 +642,7 @@ h2.alert {
}
.role_header {
- color: #000000;
+ color: rgb(0, 0, 0);
display: block;
text-align: center;
font-weight: bold;
@@ -651,7 +651,6 @@ h2.alert {
.role_body {
color: #db0000;
display: block;
- text-align: center;
}
.round_setup {
color: #db0000;
@@ -1046,6 +1045,29 @@ h2.alert {
margin-left: 3em;
}
+// Provides a horizontal bar with text in the middle
+// I got this off stackoverflow
+.separator {
+ display: flex;
+ align-items: center;
+ text-align: center;
+}
+
+.separator::before,
+.separator::after {
+ content: '';
+ flex: 1;
+ border-bottom: 1px solid rgba(0, 0, 0, 0.2);
+}
+
+.separator:not(:empty)::before {
+ margin-right: 0.25em;
+}
+
+.separator:not(:empty)::after {
+ margin-left: 0.25em;
+}
+
.examine_block {
background: rgba(0, 0, 0, 0.1);
border: 1px solid #111a27;
@@ -1059,6 +1081,19 @@ h2.alert {
height: 1px;
margin: 8px 16px 8px 16px;
}
+.examine_block .blockheader {
+ font-family: Verdana;
+ color: #000000;
+ display: block;
+ text-align: center;
+ font-weight: bold;
+ font-size: 1.3em;
+}
+
+.tooltip {
+ font-style: italic;
+ border-bottom: 1px dashed #000;
+}
$ooc_alert_bg_colors: (
'ooc': #bdc8ff,
@@ -1075,12 +1110,16 @@ $ooc_alert_text_colors: (
'game': #b60000,
);
+$border-width: 4;
+
+$border-width-px: $border-width * 1px;
+
@each $color-type, $color in $ooc_alert_text_colors {
.ooc_alert_#{$color-type} {
background: map.get($ooc_alert_bg_colors, $color-type);
border: 1px solid map.get($ooc_alert_border_colors, $color-type);
- margin: 0.5em;
- padding: 0.5em 0.5em 0.5em 0.2em;
+ margin: 7px 4px;
+ padding: 8px 12px;
color: #000000;
font-weight: bold;
display: flex;
@@ -1091,6 +1130,26 @@ $ooc_alert_text_colors: (
color: map.get($ooc_alert_text_colors, $color-type);
padding: 0.5em 0 0 0.35em;
}
+ .ooc_alert_#{$color-type} .separator::before {
+ content: '';
+ flex: 1;
+ border-bottom: 1px
+ solid
+ map.get(
+ $ooc_alert_border_colors,
+ $color-type
+ );
+ }
+ .ooc_alert_#{$color-type} .separator::after {
+ content: '';
+ flex: 1;
+ border-bottom: 1px
+ solid
+ map.get(
+ $ooc_alert_border_colors,
+ $color-type
+ );
+ }
}
$alert-stripe-colors: (
@@ -1141,10 +1200,6 @@ $alert-subheader-header-colors: (
'grey': #002c85,
);
-$border-width: 4;
-
-$border-width-px: $border-width * 1px;
-
.faction_alert_text {
color: #202020;
background: #eaeaea;
diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss
index 61b419a5725e2..464d360a075bf 100644
--- a/tgui/packages/tgui-say/styles/colors.scss
+++ b/tgui/packages/tgui-say/styles/colors.scss
@@ -18,11 +18,11 @@ $_channel_map: (
'Mentor': #329932,
'AI': #d65d95,
'io': #1e90ff,
- 'Cmd': #3e67b2,
- 'Engi': #cc631e,
+ 'Cmd': #517ac5,
+ 'Engi': #e2772f,
'Hive': #b23593,
- 'Med': #158c78,
- 'CAS': #dd3535,
+ 'Med': #25c5aa,
+ 'CAS': #d62946,
'Req': #b88646,
'alpha': #bf2f2f,
'bravo': #d4a046,
From 39d202a4a2c47cbb1038dafe79862da6247a4390 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 14:32:46 -0600
Subject: [PATCH 02/19] uncapitalize
---
code/__DEFINES/items.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/__DEFINES/items.dm b/code/__DEFINES/items.dm
index 9807db65b67a9..aa253760555e0 100644
--- a/code/__DEFINES/items.dm
+++ b/code/__DEFINES/items.dm
@@ -1,4 +1,4 @@
///The text for weight class data lists (item examine)
#define WEIGHT_CLASS_TEXT "text"
///The tooltip desc for weight class data lists (item examine)
-#define WEIGHT_CLASS_TOOLTIP "TOOLTIP"
+#define WEIGHT_CLASS_TOOLTIP "tooltip"
From 5da208420c3f67adf8a0666e24aa2cecdc50f7ce Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 14:53:08 -0600
Subject: [PATCH 03/19] AI fix
---
code/modules/mob/living/silicon/ai/examine.dm | 4 ----
1 file changed, 4 deletions(-)
diff --git a/code/modules/mob/living/silicon/ai/examine.dm b/code/modules/mob/living/silicon/ai/examine.dm
index 8ba3f14b4dedd..272177a8038ef 100644
--- a/code/modules/mob/living/silicon/ai/examine.dm
+++ b/code/modules/mob/living/silicon/ai/examine.dm
@@ -28,7 +28,3 @@
msg += ""
return list(msg)
-
-/mob/living/silicon/ai/examine_title(mob/user, thats)
- return null
-
From 4db104947a02fc38ec2a1ce262c08d64afa98e6b Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:05:57 -0600
Subject: [PATCH 04/19] no in the job introduction, ooc color for
tguisay
---
code/datums/jobs/job/job.dm | 2 +-
tgui/packages/tgui-say/styles/colors.scss | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/datums/jobs/job/job.dm b/code/datums/jobs/job/job.dm
index 5e839236a40ea..662d8175e791e 100644
--- a/code/datums/jobs/job/job.dm
+++ b/code/datums/jobs/job/job.dm
@@ -171,7 +171,7 @@ GLOBAL_PROTECT(exp_specialmap)
message += span_role_body("Prefix your message with ; to speak on the default radio channel, in most cases this is your squad radio. For additional prefixes, examine your headset.")
if(req_admin_notify)
message += separator_hr("[span_role_header("This is an important job.")]")
- message += span_role_body("If you have to disconnect, please take a hypersleep pod. If you can't make it there, adminhelp using F1 or the Adminhelp verb.")
+ message += span_role_body("If you have to disconnect, please take a hypersleep pod. If you can't make it there, adminhelp using F1 or the Adminhelp verb.")
to_chat(new_player, fieldset_block("[span_role_header("You are the [title].")]", jointext(message, ""), "examine_block"))
/datum/outfit/job
diff --git a/tgui/packages/tgui-say/styles/colors.scss b/tgui/packages/tgui-say/styles/colors.scss
index 464d360a075bf..485fe16e88c05 100644
--- a/tgui/packages/tgui-say/styles/colors.scss
+++ b/tgui/packages/tgui-say/styles/colors.scss
@@ -10,7 +10,7 @@ $_channel_map: (
'Say': #a4bad6,
'Radio': #1fc01f,
'Me': #5975da,
- 'OOC': #4c6dff,
+ 'OOC': #cca300,
'LOOC': #3a9696,
'XOOC': #004ed8,
'MOOC': #004ed8,
From bde39fca3d0b58ca04d984e78537ebd4df370f7d Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:16:41 -0600
Subject: [PATCH 05/19] doc fix
---
code/game/atoms/atom_examine.dm | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
index a539f18c287ac..a4fda783e568e 100644
--- a/code/game/atoms/atom_examine.dm
+++ b/code/game/atoms/atom_examine.dm
@@ -77,9 +77,8 @@
*
* ### Things to keep in mind:
*
- * * TGUI tooltips in chat cannot use HTML stuff at all, so including
- * something like `ffff` will not work for tooltips.
- *
+ * * TGUI tooltips (not the main text) in chat cannot use HTML stuff at all, so
+ * including something like `ffff` will not work for tooltips.
*
* **Example usage:**
* ```byond
From 285c6a39a4d588ea006da3ec2225da7aa4775d98 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:22:05 -0600
Subject: [PATCH 06/19] updating doc again
---
code/game/atoms/atom_examine.dm | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
index a4fda783e568e..c99134ee1f410 100644
--- a/code/game/atoms/atom_examine.dm
+++ b/code/game/atoms/atom_examine.dm
@@ -82,7 +82,7 @@
*
* **Example usage:**
* ```byond
- * .["small"] = "It is a small item."
+ * .["small"] = "It is a small [examine_descriptor(user)]." // It is a small item.
* .["fireproof"] = "It is made of fire-retardant materials."
* .["and conductive"] = "Blah blah blah."
* ```
@@ -90,8 +90,6 @@
*
* It is *small*, *fireproof* *and conductive*.
*
- * where "item" is pulled from [/atom/proc/examine_descriptor]
- *
* SIGNAL FUN:
* Produces a signal [COMSIG_ATOM_EXAMINE_TAGS] - can use this to directly modify/add stuff to the examine tags list
*/
From 4a41c1ef34c55a6623a87b53648e38b06831d027 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:23:09 -0600
Subject: [PATCH 07/19] new xeno alert colors, again, darkmode only
---
tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index e51833986fd90..9a95a8d54d269 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -579,7 +579,7 @@ h2.alert {
font-size: 185%;
}
.xenodanger {
- color: #359980;
+ color: #57a383;
font-weight: bold;
}
.avoidharm {
@@ -592,12 +592,12 @@ h2.alert {
font-size: 185%;
}
.xenohighdanger {
- color: #359980;
+ color: #57a383;
font-weight: bold;
font-size: 1.5em;
}
.xenoannounce {
- color: #2c7f5c;
+ color: #57a383;
font-family: book-antiqua;
font-weight: bold;
font-style: italic;
From 10dd7bac62518accce6ef46a51cb49356f0d30fc Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 15:51:16 -0600
Subject: [PATCH 08/19] prettier
---
.../tgui-panel/styles/tgchat/chat-dark.scss | 14 ++------------
.../tgui-panel/styles/tgchat/chat-light.scss | 14 ++------------
2 files changed, 4 insertions(+), 24 deletions(-)
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 9a95a8d54d269..2195951ba8d08 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -1099,22 +1099,12 @@ $border-width-px: $border-width * 1px;
.ooc_alert_#{$color-type} .separator::before {
content: '';
flex: 1;
- border-bottom: 1px
- solid
- map.get(
- $ooc_alert_border_colors,
- $color-type
- );
+ border-bottom: 1px solid map.get($ooc_alert_border_colors, $color-type);
}
.ooc_alert_#{$color-type} .separator::after {
content: '';
flex: 1;
- border-bottom: 1px
- solid
- map.get(
- $ooc_alert_border_colors,
- $color-type
- );
+ border-bottom: 1px solid map.get($ooc_alert_border_colors, $color-type);
}
}
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
index a211b28e662f8..78ef2277be3a0 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
@@ -1133,22 +1133,12 @@ $border-width-px: $border-width * 1px;
.ooc_alert_#{$color-type} .separator::before {
content: '';
flex: 1;
- border-bottom: 1px
- solid
- map.get(
- $ooc_alert_border_colors,
- $color-type
- );
+ border-bottom: 1px solid map.get($ooc_alert_border_colors, $color-type);
}
.ooc_alert_#{$color-type} .separator::after {
content: '';
flex: 1;
- border-bottom: 1px
- solid
- map.get(
- $ooc_alert_border_colors,
- $color-type
- );
+ border-bottom: 1px solid map.get($ooc_alert_border_colors, $color-type);
}
}
From 6d94bf4ed5954e6d6dad9828af7d2c06c8d18637 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:14:28 -0600
Subject: [PATCH 09/19] Admin/mentor PMs should look better, better mentorsay
color(?)
---
code/modules/admin/admin_verbs.dm | 16 ++++++++--------
.../tgui-panel/styles/tgchat/chat-dark.scss | 2 +-
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index e96551ceeff5e..0263253b64e6d 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -991,10 +991,10 @@
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "Staff PM from-[key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")
+ html = "-- Staff private message from [key_name(src, recipient, TRUE)] --\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
- html = "Staff PM to-[key_name(recipient, src, TRUE)]: [span_linkify("[keywordparsedmsg]")]")
+ html = "-- Staff private message to [key_name(src, recipient, TRUE)] --\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
window_flash(recipient, TRUE)
window_flash(src, TRUE)
@@ -1009,7 +1009,7 @@
admin_ticket_log(src, "Reply PM from-[key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "Staff PM from-[key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")
+ html = "Staff private message from-[key_name(src, recipient, TRUE)]\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = span_notice("PM to-Staff: [span_linkify("[msg]")]"))
@@ -1030,13 +1030,13 @@
if(check_rights(R_ADMINTICKET, FALSE))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "-- Private Message --")
+ html = "-- Administrator private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "[holder.fakekey ? "Administrator" : holder.rank.name] PM from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]")
+ html = span_adminsay("[holder.fakekey ? "Administrator" : holder.rank.name] PM from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "Click on the staff member's name to reply.")
+ html = "Click on the staff member's name to reply.")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = span_notice("[holder.fakekey ? "Administrator" : holder.rank.name] PM to-[key_name(recipient, src, TRUE)]: [span_linkify("[msg]")]"))
@@ -1045,10 +1045,10 @@
else if(is_mentor(src))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "-- Mentor Message --")
+ html = "-- Mentor private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = span_notice("[holder.rank.name] PM from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
+ html = span_mentorsay("[span_tooltip(holder.rank.name, "Private message")] from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = span_notice("Click on the mentor's name to reply."))
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 2195951ba8d08..89f6a47754c54 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -345,7 +345,7 @@ em {
font-weight: bold;
}
.msay {
- color: #927c66;
+ color: #119211;
font-weight: bold;
}
.adminmsay {
From 64b1ccf094d363791cb57cbbfa3d000046247c3e Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:16:28 -0600
Subject: [PATCH 10/19] tooltips
---
code/modules/admin/admin_verbs.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 0263253b64e6d..ec5c82e6fb09a 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1033,7 +1033,7 @@
html = "-- Administrator private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = span_adminsay("[holder.fakekey ? "Administrator" : holder.rank.name] PM from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
+ html = span_adminsay("[span_tooltip(holder.fakekey ? "Administrator" : holder.rank.name, "Private message")] from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "Click on the staff member's name to reply.")
From f65fa6c70699a192fccb014364db4b541e9e8d9b Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:25:08 -0600
Subject: [PATCH 11/19] fix?
---
code/modules/admin/admin_verbs.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index ec5c82e6fb09a..015408af07434 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1033,7 +1033,7 @@
html = "-- Administrator private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = span_adminsay("[span_tooltip(holder.fakekey ? "Administrator" : holder.rank.name, "Private message")] from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
+ html = span_adminsay("[holder.fakekey ? "Administrator" : holder.rank.name] PM from- from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "Click on the staff member's name to reply.")
@@ -1048,7 +1048,7 @@
html = "-- Mentor private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = span_mentorsay("[span_tooltip(holder.rank.name, "Private message")] from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
+ html = span_mentorsay("[holder.rank.name] PM from- [key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = span_notice("Click on the mentor's name to reply."))
From 22193a1de84c5c53054b492c7f0300f0356e9237 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:26:12 -0600
Subject: [PATCH 12/19] A
---
code/modules/admin/admin_verbs.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 015408af07434..aadf726f35d22 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1033,7 +1033,7 @@
html = "-- Administrator private message --")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = span_adminsay("[holder.fakekey ? "Administrator" : holder.rank.name] PM from- from-[key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
+ html = span_adminsay("[holder.fakekey ? "Administrator" : holder.rank.name] PM from- [key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = "Click on the staff member's name to reply.")
From 1833228f85eb0b78dcd9fae2ccfa5dc6fe05a415 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 16:27:00 -0600
Subject: [PATCH 13/19] mentor
---
code/modules/admin/admin_verbs.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index aadf726f35d22..78fa3fe006227 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1045,7 +1045,7 @@
else if(is_mentor(src))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "-- Mentor private message --")
+ html = span_mentorsay("-- Mentor private message --"))
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
html = span_mentorsay("[holder.rank.name] PM from- [key_name(src, recipient, FALSE)]: [span_linkify("[msg]")]"))
From 71ba41ca601720ea6ef1ed094351911451ab2c2e Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 18:57:43 -0600
Subject: [PATCH 14/19] Move stuff around
---
code/game/atoms/atom_examine.dm | 152 ++++++++++++--------------------
code/modules/mob/mob_verbs.dm | 36 ++++++++
2 files changed, 94 insertions(+), 94 deletions(-)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
index c99134ee1f410..6860e2a32dc30 100644
--- a/code/game/atoms/atom_examine.dm
+++ b/code/game/atoms/atom_examine.dm
@@ -4,100 +4,6 @@
/// If non-null, overrides a/an/some in all cases
var/article
-/**
- * This is a mob verb for speed reasons (nice one BYOND).
- * See [this BYOND forum post](https://secure.byond.com/forum/?post=1326139&page=2#comment8198716)
- * for why this isnt something like `/atom/verb/examine`.
- *
- * SIGNAL FUN:
- * Produces a signal [COMSIG_MOB_EXAMINATE], for doing things to people who examine things,
- * like applying debilitating effects to someone who examines a specific type of atom.
- */
-/mob/verb/examinate(atom/examinify as mob|obj|turf in view())
- set name = "Examine"
- set category = "IC"
-
- if(is_blind(src))
- to_chat(src, span_warning("Something is there, but you can't see it!"))
- return
-
- face_atom(examinify)
- var/list/result = examinify.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
- var/atom_title = examinify.examine_title(src, thats = TRUE)
-
- if(length(result))
- for(var/i in 1 to (length(result) - 1))
- if(result[i] != EXAMINE_SECTION_BREAK)
- result[i] += "\n"
- else
- // remove repeated and ones on the ends.
- if((i == 1) || (i == length(result)) || (result[i - 1] == EXAMINE_SECTION_BREAK))
- result.Cut(i, i + 1)
- i--
-
- var/result_combined = (atom_title ? fieldset_block("[examine_header(atom_title)]", jointext(result, ""), "examine_block") : examine_block(jointext(result, "")))
-
- to_chat(src, span_infoplain(result_combined))
- SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, examinify)
-
-/**
- * Get the name of this object for examine
- *
- * You can override what is returned from this proc by registering to listen for the
- * [COMSIG_ATOM_GET_EXAMINE_NAME] signal
- */
-/atom/proc/get_examine_name(mob/user)
- . = "\a [src]"
- var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
- if(article)
- . = "[article] [src]"
- override[EXAMINE_POSITION_ARTICLE] = article
- if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
- . = override.Join("")
-
-///Generate the full examine string of this atom (including icon for chat)
-/atom/proc/examine_title(mob/user, thats = FALSE)
- return "[icon2html(src, user)] [thats ? "That's ":""][get_examine_name(user)]"
-
-/**
- * This is called when we want to get a sort-of "descriptor" for this item, where applicable.
- *
- * Must return a string. Can be something like "item" "weapon" etc.
- *
- * Used for [/obj/item/examine_tags], will appear in the weight class tooltip, like:
- * It is a normal-sized (whatever this returns).
- */
-/atom/proc/examine_descriptor(mob/user)
- return "object"
-
-/**
- * A list of "tags" displayed after atom's description in examine.
- * This should return an assoc list of tags -> tooltips for them.
- * Should probably be calling parent so signals can modify it.
- *
- * ### Things to keep in mind:
- *
- * * TGUI tooltips (not the main text) in chat cannot use HTML stuff at all, so
- * including something like `ffff` will not work for tooltips.
- *
- * **Example usage:**
- * ```byond
- * .["small"] = "It is a small [examine_descriptor(user)]." // It is a small item.
- * .["fireproof"] = "It is made of fire-retardant materials."
- * .["and conductive"] = "Blah blah blah."
- * ```
- * This will result in
- *
- * It is *small*, *fireproof* *and conductive*.
- *
- * SIGNAL FUN:
- * Produces a signal [COMSIG_ATOM_EXAMINE_TAGS] - can use this to directly modify/add stuff to the examine tags list
- */
-/atom/proc/examine_tags(mob/user)
- SHOULD_CALL_PARENT(TRUE)
- . = list()
- SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE_TAGS, user, .)
-
/**
* Called when a mob examines (shift click or verb) this atom
*
@@ -169,3 +75,61 @@
. += span_notice("\The [src] is full!")
SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE, user, .)
+
+/**
+ * Get the name of this object for examine
+ *
+ * You can override what is returned from this proc by registering to listen for the
+ * [COMSIG_ATOM_GET_EXAMINE_NAME] signal
+ */
+/atom/proc/get_examine_name(mob/user)
+ . = "\a [src]"
+ var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
+ if(article)
+ . = "[article] [src]"
+ override[EXAMINE_POSITION_ARTICLE] = article
+ if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
+ . = override.Join("")
+
+///Generate the full examine string of this atom (including icon for chat)
+/atom/proc/examine_title(mob/user, thats = FALSE)
+ return "[icon2html(src, user)] [thats ? "That's ":""][get_examine_name(user)]"
+
+/**
+ * This is called when we want to get a sort-of "descriptor" for this item, where applicable.
+ *
+ * Must return a string. Can be something like "item" "weapon" etc.
+ *
+ * Used for [/obj/item/examine_tags], will appear in the weight class tooltip, like:
+ * It is a normal-sized (whatever this returns).
+ */
+/atom/proc/examine_descriptor(mob/user)
+ return "object"
+
+/**
+ * A list of "tags" displayed after atom's description in examine.
+ * This should return an assoc list of tags -> tooltips for them.
+ * Should probably be calling parent so signals can modify it.
+ *
+ * ### Things to keep in mind:
+ *
+ * * TGUI tooltips (not the main text) in chat cannot use HTML stuff at all, so
+ * including something like `ffff` will not work for tooltips.
+ *
+ * **Example usage:**
+ * ```byond
+ * .["small"] = "It is a small [examine_descriptor(user)]." // It is a small item.
+ * .["fireproof"] = "It is made of fire-retardant materials."
+ * .["and conductive"] = "Blah blah blah."
+ * ```
+ * This will result in
+ *
+ * It is *small*, *fireproof* *and conductive*.
+ *
+ * SIGNAL FUN:
+ * Produces a signal [COMSIG_ATOM_EXAMINE_TAGS] - can use this to directly modify/add stuff to the examine tags list
+ */
+/atom/proc/examine_tags(mob/user)
+ SHOULD_CALL_PARENT(TRUE)
+ . = list()
+ SEND_SIGNAL(src, COMSIG_ATOM_EXAMINE_TAGS, user, .)
diff --git a/code/modules/mob/mob_verbs.dm b/code/modules/mob/mob_verbs.dm
index bf6a7005b2cad..2ba34268d6dfa 100644
--- a/code/modules/mob/mob_verbs.dm
+++ b/code/modules/mob/mob_verbs.dm
@@ -1,3 +1,39 @@
+/**
+ * This is a mob verb for speed reasons (nice one BYOND).
+ * See [this BYOND forum post](https://secure.byond.com/forum/?post=1326139&page=2#comment8198716)
+ * for why this isnt something like `/atom/verb/examine`.
+ *
+ * SIGNAL FUN:
+ * Produces a signal [COMSIG_MOB_EXAMINATE], for doing stuff to people who examine things,
+ * like applying debilitating effects to someone who examines a specific type of atom.
+ */
+/mob/verb/examinate(atom/examinify as mob|obj|turf in view())
+ set name = "Examine"
+ set category = "IC"
+
+ if(is_blind(src))
+ to_chat(src, span_warning("Something is there, but you can't see it!"))
+ return
+
+ face_atom(examinify)
+ var/list/result = examinify.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
+ var/atom_title = examinify.examine_title(src, thats = TRUE)
+
+ if(length(result))
+ for(var/i in 1 to (length(result) - 1))
+ if(result[i] != EXAMINE_SECTION_BREAK)
+ result[i] += "\n"
+ else
+ // remove repeated and ones on the ends.
+ if((i == 1) || (i == length(result)) || (result[i - 1] == EXAMINE_SECTION_BREAK))
+ result.Cut(i, i + 1)
+ i--
+
+ var/result_combined = (atom_title ? fieldset_block("[examine_header(atom_title)]", jointext(result, ""), "examine_block") : examine_block(jointext(result, "")))
+
+ to_chat(src, span_infoplain(result_combined))
+ SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, examinify)
+
/mob/verb/mode()
set name = "Activate Held Object"
set category = "Object"
From 2f432d7b4c09d84d28bf3b349035d9213f348148 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Sun, 10 Nov 2024 18:58:47 -0600
Subject: [PATCH 15/19] doc
---
code/game/atoms/atom_examine.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
index 6860e2a32dc30..471ad1a71fdc3 100644
--- a/code/game/atoms/atom_examine.dm
+++ b/code/game/atoms/atom_examine.dm
@@ -5,7 +5,7 @@
var/article
/**
- * Called when a mob examines (shift click or verb) this atom
+ * Called when a mob examines this atom. [/mob/verb/examinate]
*
* This is the actual proc that generates the text for examining something
*
From c08c88dc4d0dfbf5ad10ec403f5ce3d08f70b0c7 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Mon, 11 Nov 2024 11:11:30 -0600
Subject: [PATCH 16/19] better text for xeno slashability, and stuff that kept
me up at night
---
code/game/atoms/atom_examine.dm | 14 ++++++++++++--
code/game/objects/objs.dm | 6 +++---
.../tgui-panel/styles/tgchat/chat-dark.scss | 2 +-
3 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/code/game/atoms/atom_examine.dm b/code/game/atoms/atom_examine.dm
index 471ad1a71fdc3..3b4c91559718e 100644
--- a/code/game/atoms/atom_examine.dm
+++ b/code/game/atoms/atom_examine.dm
@@ -1,8 +1,18 @@
-//! Many procs related to examining atoms.
+//! This file contains all the procs related to examining atoms,
+//! except the verb you use to examine someone (see [/mob/verb/examinate])
/atom
/// If non-null, overrides a/an/some in all cases
var/article
+ /// Text that appears preceding the name in [/atom/proc/examine_title].
+ /// Don't include spaces after this, since that proc adds a space on its own.
+ var/examine_thats = "That's"
+
+/mob/living/carbon/human
+ examine_thats = "This is"
+
+/mob/living/silicon/ai
+ examine_thats = "This is"
/**
* Called when a mob examines this atom. [/mob/verb/examinate]
@@ -93,7 +103,7 @@
///Generate the full examine string of this atom (including icon for chat)
/atom/proc/examine_title(mob/user, thats = FALSE)
- return "[icon2html(src, user)] [thats ? "That's ":""][get_examine_name(user)]"
+ return "[icon2html(src, user)] [thats ? "[examine_thats] ":""][get_examine_name(user)]"
/**
* This is called when we want to get a sort-of "descriptor" for this item, where applicable.
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index 88666abf87bb7..bffa56f6a6ec4 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -92,7 +92,7 @@
if(!isitem(src) && (resistance_flags & PROJECTILE_IMMUNE))
.["projectile immune"] = "Projectiles cannot damage this object."
if(!isxeno(user) && !isobserver(user))
- return // humans can check the codex for these- xenos should be able to know them "in the moment"
+ return // humans can check the codex for most of these- xenos should be able to know them "in the moment"
if(resistance_flags & CRUSHER_IMMUNE)
.[span_xenonotice("crusher-proof")] = "Charging Crushers can't damage this object."
if(resistance_flags & BANISH_IMMUNE)
@@ -100,9 +100,9 @@
if(resistance_flags & PORTAL_IMMUNE)
.[span_xenonotice("portal immune")] = "Wraith portals can't teleport this object."
if(resistance_flags & XENO_DAMAGEABLE)
- .[span_xenonotice("xeno destructible")] = "Xenomorphs can slash this object."
+ .[span_xenonotice("slashable")] = "Xenomorphs can slash this object."
else if(!isitem(src))
- .[span_xenonotice("xeno indestructible")] = "Xenomorphs can't slash this object."
+ .[span_xenonotice("not slashable")] = "Xenomorphs can't slash this object."
/obj/proc/setAnchored(anchorvalue)
SEND_SIGNAL(src, COMSIG_OBJ_SETANCHORED, anchorvalue)
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 89f6a47754c54..06eed7278f149 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -553,7 +553,7 @@ h2.alert {
color: #57a383;
}
.boldnotice {
- color: #6666cc;
+ color: #6685f5;
font-weight: bold;
}
.warning {
From a2cc21d98348e84e56bdc454b2add3a58db68bd9 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Thu, 14 Nov 2024 18:11:11 -0600
Subject: [PATCH 17/19] Slightly better tooltips
---
code/game/objects/objs.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index bffa56f6a6ec4..f457a2d77395a 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -83,7 +83,7 @@
/obj/examine_tags(mob/user)
. = ..()
if(resistance_flags & INDESTRUCTIBLE)
- .["indestructible"] = "It's completely invulnerable to taking damage or being destroyed, such as by lava, explosions, plasma cutters and xenos."
+ .["indestructible"] = "It's completely invulnerable to damage or complete destruction. Some objects still have special interactions for xenos."
return // we do not want to say it's indestructible and then list 500 fucktillion things that are implied by the word "indestructible"
if(resistance_flags & UNACIDABLE)
.["[isxeno(user) ? span_xenonotice("acid-proof") : "acid-proof"]"] = "Acid does not stick to or affect this object."
@@ -102,7 +102,7 @@
if(resistance_flags & XENO_DAMAGEABLE)
.[span_xenonotice("slashable")] = "Xenomorphs can slash this object."
else if(!isitem(src))
- .[span_xenonotice("not slashable")] = "Xenomorphs can't slash this object."
+ .[span_xenonotice("not slashable")] = "Xenomorphs can't slash this object. Some objects, like airlocks, have special interactions when attacked."
/obj/proc/setAnchored(anchorvalue)
SEND_SIGNAL(src, COMSIG_OBJ_SETANCHORED, anchorvalue)
From a40e08708f371951989d37b20a7a5a1146ea6ce5 Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Thu, 14 Nov 2024 18:19:46 -0600
Subject: [PATCH 18/19] maybe less goofy staff-staff pms?
---
code/modules/admin/admin_verbs.dm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 78fa3fe006227..0bb6bc68b9997 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -991,10 +991,10 @@
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "-- Staff private message from [key_name(src, recipient, TRUE)] --\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
+ html = "-- Staff private message --\n[span_adminsay("PM from- [key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")]")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
- html = "-- Staff private message to [key_name(src, recipient, TRUE)] --\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
+ html = "-- Staff private message --\n[span_adminsay("You private messaged [key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")]")
window_flash(recipient, TRUE)
window_flash(src, TRUE)
From 4525a03e19133e50e96aeb11acae353d930a09de Mon Sep 17 00:00:00 2001
From: Neocloudy <88008002+Neocloudy@users.noreply.github.com>
Date: Fri, 15 Nov 2024 15:59:30 -0600
Subject: [PATCH 19/19] this too
---
code/modules/admin/admin_verbs.dm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm
index 0bb6bc68b9997..103a38b4d8f9b 100644
--- a/code/modules/admin/admin_verbs.dm
+++ b/code/modules/admin/admin_verbs.dm
@@ -1009,7 +1009,7 @@
admin_ticket_log(src, "Reply PM from-[key_name(src, recipient, TRUE)]: [span_linkify("[keywordparsedmsg]")]")
to_chat(recipient,
type = MESSAGE_TYPE_ADMINPM,
- html = "Staff private message from-[key_name(src, recipient, TRUE)]\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
+ html = "Reply from-[key_name(src, recipient, TRUE)]\n[span_adminsay("[span_linkify("[keywordparsedmsg]")]")]")
to_chat(src,
type = MESSAGE_TYPE_ADMINPM,
html = span_notice("PM to-Staff: [span_linkify("[msg]")]"))