mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +01:00
Examine Blocks (#67937)
* adds examine_block class and a define for it made some outputs in chat use examine_block * add examine block to tip of the round clean up some ------ and ***** seperators added <hr> tags to divide sections cleaned up botany plant analyzer text outputs * bullet points for reagents * removes <hr> from mobs examines fixes AIs and borgs having a double "That's Default Cyborg!" removed some \n newlines minor code edits * removes all <hr> bold names in get_examine_name() cleaned up plant analyzer output formatting adjust colors and margins of examine_block class remove \a from borg examine() * remove max-width from css * changed margin and padding units from px to em * minor edit
This commit is contained in:
@@ -34,3 +34,5 @@
|
||||
text = "DEBUG: [msg]")
|
||||
/// Used for debug messages to the server
|
||||
#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) ("<div class='examine_block'>" + str + "</div>")
|
||||
|
||||
@@ -407,4 +407,4 @@
|
||||
message = html_encode(message)
|
||||
else
|
||||
message = copytext(message, 2)
|
||||
to_chat(target, span_purple("<span class='oocplain'><b>Tip of the round: </b>[message]</span>"))
|
||||
to_chat(target, span_purple(examine_block("<span class='oocplain'><b>Tip of the round: </b>[message]</span>")))
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
RegisterSignal(parent, COMSIG_ADD_MOOD_EVENT_RND, .proc/add_event) //Mood events that are only for RnD members
|
||||
|
||||
/datum/component/mood/proc/print_mood(mob/user)
|
||||
var/msg = "[span_info("*---------*\n<EM>My current mental status:</EM>")]\n"
|
||||
var/msg = "[span_info("<EM>My current mental status:</EM>")]\n"
|
||||
msg += span_notice("My current sanity: ") //Long term
|
||||
switch(sanity)
|
||||
if(SANITY_GREAT to INFINITY)
|
||||
@@ -102,7 +102,7 @@
|
||||
msg += span_boldnicegreen(event.description + "\n")
|
||||
else
|
||||
msg += "[span_grey("I don't have much of a reaction to anything right now.")]\n"
|
||||
to_chat(user, msg)
|
||||
to_chat(user, examine_block(msg))
|
||||
|
||||
///Called after moodevent/s have been added/removed.
|
||||
/datum/component/mood/proc/update_mood()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(href_list["examine"])
|
||||
to_chat(user, span_notice("[build_label_text(source)]"))
|
||||
to_chat(user, span_notice(examine_block("[build_label_text(source)]")))
|
||||
|
||||
/**
|
||||
*
|
||||
|
||||
+2
-2
@@ -263,12 +263,12 @@
|
||||
if(!length(shown_skills))
|
||||
to_chat(user, span_notice("You don't seem to have any particularly outstanding skills."))
|
||||
return
|
||||
var/msg = "[span_info("*---------*\n<EM>Your skills</EM>")]\n<span class='notice'>"
|
||||
var/msg = "[span_info("<EM>Your skills</EM>")]\n<span class='notice'>"
|
||||
for(var/i in shown_skills)
|
||||
var/datum/skill/the_skill = i
|
||||
msg += "[initial(the_skill.name)] - [get_skill_level_name(the_skill)]\n"
|
||||
msg += "</span>"
|
||||
to_chat(user, msg)
|
||||
to_chat(user, examine_block(msg))
|
||||
|
||||
/datum/mind/proc/set_death_time()
|
||||
SIGNAL_HANDLER
|
||||
|
||||
+8
-4
@@ -602,10 +602,10 @@
|
||||
* [COMSIG_ATOM_GET_EXAMINE_NAME] signal
|
||||
*/
|
||||
/atom/proc/get_examine_name(mob/user)
|
||||
. = "\a [src]"
|
||||
. = "\a <b>[src]</b>"
|
||||
var/list/override = list(gender == PLURAL ? "some" : "a", " ", "[name]")
|
||||
if(article)
|
||||
. = "[article] [src]"
|
||||
. = "[article] <b>[src]</b>"
|
||||
override[EXAMINE_POSITION_ARTICLE] = article
|
||||
if(SEND_SIGNAL(src, COMSIG_ATOM_GET_EXAMINE_NAME, user, override) & COMPONENT_EXNAME_CHANGED)
|
||||
. = override.Join("")
|
||||
@@ -637,7 +637,11 @@
|
||||
* Produces a signal [COMSIG_PARENT_EXAMINE]
|
||||
*/
|
||||
/atom/proc/examine(mob/user)
|
||||
. = list("[get_examine_string(user, TRUE)].")
|
||||
var/examine_string = get_examine_string(user, thats = TRUE)
|
||||
if(examine_string)
|
||||
. = list("[examine_string].")
|
||||
else
|
||||
. = list()
|
||||
|
||||
. += get_name_chaser(user)
|
||||
if(desc)
|
||||
@@ -654,7 +658,7 @@
|
||||
if(length(reagents.reagent_list))
|
||||
if(user.can_see_reagents()) //Show each individual reagent
|
||||
for(var/datum/reagent/current_reagent as anything in reagents.reagent_list)
|
||||
. += "[round(current_reagent.volume, 0.01)] units of [current_reagent.name]"
|
||||
. += "• [round(current_reagent.volume, 0.01)] units of [current_reagent.name]"
|
||||
if(reagents.is_reacting)
|
||||
. += span_warning("It is currently reacting!")
|
||||
. += span_notice("The solution's pH is [round(reagents.ph, 0.01)] and has a temperature of [reagents.chem_temp]K.")
|
||||
|
||||
@@ -189,5 +189,5 @@
|
||||
message += span_notice("Volume: [volume] L") // don't want to change the order volume appears in, suck it
|
||||
|
||||
// we let the join apply newlines so we do need handholding
|
||||
to_chat(user, jointext(message, "\n"), type = MESSAGE_TYPE_INFO)
|
||||
to_chat(user, examine_block(jointext(message, "\n")), type = MESSAGE_TYPE_INFO)
|
||||
return TRUE
|
||||
|
||||
@@ -377,7 +377,7 @@
|
||||
// we handled the last <br> so we don't need handholding
|
||||
|
||||
if(tochat)
|
||||
to_chat(user, jointext(render_list, ""), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
|
||||
to_chat(user, examine_block(jointext(render_list, "")), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
|
||||
else
|
||||
return(jointext(render_list, ""))
|
||||
|
||||
@@ -436,7 +436,7 @@
|
||||
render_list += "<span class='alert ml-2'>[allergies]</span>\n"
|
||||
|
||||
// we handled the last <br> so we don't need handholding
|
||||
to_chat(user, jointext(render_list, ""), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
|
||||
to_chat(user, examine_block(jointext(render_list, "")), trailing_newline = FALSE, type = MESSAGE_TYPE_INFO)
|
||||
|
||||
/obj/item/healthanalyzer/AltClick(mob/user)
|
||||
..()
|
||||
@@ -475,7 +475,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice ml-1'>No wounds detected in subject.</span>")
|
||||
else
|
||||
to_chat(user, jointext(render_list, ""), type = MESSAGE_TYPE_INFO)
|
||||
to_chat(user, examine_block(jointext(render_list, "")), type = MESSAGE_TYPE_INFO)
|
||||
|
||||
/obj/item/healthanalyzer/wound
|
||||
name = "first aid analyzer"
|
||||
|
||||
@@ -23,8 +23,7 @@
|
||||
slime_scan(T, user)
|
||||
|
||||
/proc/slime_scan(mob/living/simple_animal/slime/T, mob/living/user)
|
||||
var/to_render = "========================\
|
||||
\n<b>Slime scan results:</b>\
|
||||
var/to_render = "<b>Slime scan results:</b>\
|
||||
\n[span_notice("[T.colour] [T.is_adult ? "adult" : "baby"] slime")]\
|
||||
\nNutrition: [T.nutrition]/[T.get_max_nutrition()]"
|
||||
if (T.nutrition < T.get_starve_nutrition())
|
||||
@@ -51,4 +50,4 @@
|
||||
if(T.effectmod)
|
||||
to_render += "\n[span_notice("Core mutation in progress: [T.effectmod]")]\
|
||||
\n[span_notice("Progress in core mutation: [T.applied] / [SLIME_EXTRACT_CROSSING_REQUIRED]")]"
|
||||
to_chat(user, to_render + "\n========================")
|
||||
to_chat(user, examine_block(to_render))
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
var/output_message = ""
|
||||
for(var/datum/spacevine_mutation/SM in mutations)
|
||||
kudzu_mutations += "[(kudzu_mutations == "") ? "" : ", "][SM.name]"
|
||||
output_message += "- Plant Mutations: [(kudzu_mutations == "") ? "None." : "[kudzu_mutations]."]"
|
||||
output_message += "Plant Mutations: [(kudzu_mutations == "") ? "None." : "[kudzu_mutations]."]"
|
||||
return output_message
|
||||
|
||||
/obj/item/seeds/kudzu/on_chem_reaction(datum/reagents/reagents)
|
||||
|
||||
@@ -74,19 +74,19 @@
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/do_plant_stats_scan(atom/scan_target, mob/user)
|
||||
if(istype(scan_target, /obj/machinery/hydroponics))
|
||||
to_chat(user, scan_tray_stats(scan_target))
|
||||
to_chat(user, examine_block(scan_tray_stats(scan_target)))
|
||||
return TRUE
|
||||
if(istype(scan_target, /obj/structure/glowshroom))
|
||||
var/obj/structure/glowshroom/shroom_plant = scan_target
|
||||
to_chat(user, scan_plant_stats(shroom_plant.myseed))
|
||||
to_chat(user, examine_block(scan_plant_stats(shroom_plant.myseed)))
|
||||
return TRUE
|
||||
if(istype(scan_target, /obj/item/graft))
|
||||
to_chat(user, get_graft_text(scan_target))
|
||||
to_chat(user, examine_block(get_graft_text(scan_target)))
|
||||
return TRUE
|
||||
if(isitem(scan_target))
|
||||
var/obj/item/scanned_object = scan_target
|
||||
if(scanned_object.get_plant_seed() || istype(scanned_object, /obj/item/seeds))
|
||||
to_chat(user, scan_plant_stats(scanned_object))
|
||||
to_chat(user, examine_block(scan_plant_stats(scanned_object)))
|
||||
return TRUE
|
||||
if(isliving(scan_target))
|
||||
var/mob/living/L = scan_target
|
||||
@@ -107,19 +107,19 @@
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/do_plant_chem_scan(atom/scan_target, mob/user)
|
||||
if(istype(scan_target, /obj/machinery/hydroponics))
|
||||
to_chat(user, scan_tray_chems(scan_target))
|
||||
to_chat(user, examine_block(scan_tray_chems(scan_target)))
|
||||
return TRUE
|
||||
if(istype(scan_target, /obj/structure/glowshroom))
|
||||
var/obj/structure/glowshroom/shroom_plant = scan_target
|
||||
to_chat(user, scan_plant_chems(shroom_plant.myseed))
|
||||
to_chat(user, examine_block(scan_plant_chems(shroom_plant.myseed)))
|
||||
return TRUE
|
||||
if(istype(scan_target, /obj/item/graft))
|
||||
to_chat(user, get_graft_text(scan_target))
|
||||
to_chat(user, examine_block(get_graft_text(scan_target)))
|
||||
return TRUE
|
||||
if(isitem(scan_target))
|
||||
var/obj/item/scanned_object = scan_target
|
||||
if(scanned_object.get_plant_seed() || istype(scanned_object, /obj/item/seeds))
|
||||
to_chat(user, scan_plant_chems(scanned_object))
|
||||
to_chat(user, examine_block(scan_plant_chems(scanned_object)))
|
||||
return TRUE
|
||||
if(isliving(scan_target))
|
||||
var/mob/living/L = scan_target
|
||||
@@ -167,24 +167,24 @@
|
||||
* Returns the formatted message as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/scan_tray_stats(obj/machinery/hydroponics/scanned_tray)
|
||||
var/returned_message = "*---------*\n"
|
||||
var/returned_message = ""
|
||||
if(scanned_tray.myseed)
|
||||
returned_message += "*** [span_bold("[scanned_tray.myseed.plantname]")] ***\n"
|
||||
returned_message += "- Plant Age: [span_notice("[scanned_tray.age]")]\n"
|
||||
returned_message += "- Plant Health: [span_notice("[scanned_tray.plant_health]")]\n"
|
||||
returned_message += scan_plant_stats(scanned_tray.myseed)
|
||||
returned_message += "[span_bold("[scanned_tray.myseed.plantname]")]"
|
||||
returned_message += "\nPlant Age: [span_notice("[scanned_tray.age]")]"
|
||||
returned_message += "\nPlant Health: [span_notice("[scanned_tray.plant_health]")]"
|
||||
returned_message += scan_plant_stats(scanned_tray.myseed, TRUE)
|
||||
returned_message += "\n<b>Growth medium</b>"
|
||||
else
|
||||
returned_message += span_bold("No plant found.\n")
|
||||
returned_message += span_bold("No plant found.")
|
||||
|
||||
returned_message += "- Weed level: [span_notice("[scanned_tray.weedlevel] / [MAX_TRAY_WEEDS]")]\n"
|
||||
returned_message += "- Pest level: [span_notice("[scanned_tray.pestlevel] / [MAX_TRAY_PESTS]")]\n"
|
||||
returned_message += "- Toxicity level: [span_notice("[scanned_tray.toxic] / [MAX_TRAY_TOXINS]")]\n"
|
||||
returned_message += "- Water level: [span_notice("[scanned_tray.waterlevel] / [scanned_tray.maxwater]")]\n"
|
||||
returned_message += "- Nutrition level: [span_notice("[scanned_tray.reagents.total_volume] / [scanned_tray.maxnutri]")]\n"
|
||||
returned_message += "\nWeed level: [span_notice("[scanned_tray.weedlevel] / [MAX_TRAY_WEEDS]")]"
|
||||
returned_message += "\nPest level: [span_notice("[scanned_tray.pestlevel] / [MAX_TRAY_PESTS]")]"
|
||||
returned_message += "\nToxicity level: [span_notice("[scanned_tray.toxic] / [MAX_TRAY_TOXINS]")]"
|
||||
returned_message += "\nWater level: [span_notice("[scanned_tray.waterlevel] / [scanned_tray.maxwater]")]"
|
||||
returned_message += "\nNutrition level: [span_notice("[scanned_tray.reagents.total_volume] / [scanned_tray.maxnutri]")]"
|
||||
if(scanned_tray.yieldmod != 1)
|
||||
returned_message += "- Yield modifier on harvest: [span_notice("[scanned_tray.yieldmod]x")]\n"
|
||||
returned_message += "\nYield modifier on harvest: [span_notice("[scanned_tray.yieldmod]x")]"
|
||||
|
||||
returned_message += "*---------*"
|
||||
return span_info(returned_message)
|
||||
|
||||
/**
|
||||
@@ -196,22 +196,21 @@
|
||||
* Returns the formatted message as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/scan_tray_chems(obj/machinery/hydroponics/scanned_tray)
|
||||
var/returned_message = "*---------*\n"
|
||||
var/returned_message = ""
|
||||
if(scanned_tray.myseed)
|
||||
returned_message += "*** [span_bold("[scanned_tray.myseed.plantname]")] ***\n"
|
||||
returned_message += "- Plant Age: [span_notice("[scanned_tray.age]")]\n"
|
||||
returned_message += scan_plant_chems(scanned_tray.myseed)
|
||||
returned_message += "[span_bold("[scanned_tray.myseed.plantname]")]"
|
||||
returned_message += "\nPlant Age: [span_notice("[scanned_tray.age]")]"
|
||||
returned_message += scan_plant_chems(scanned_tray.myseed, TRUE)
|
||||
else
|
||||
returned_message += span_bold("No plant found.\n")
|
||||
returned_message += span_bold("No plant found.")
|
||||
|
||||
returned_message += "- Tray contains:\n"
|
||||
returned_message += "\nGrowth medium contains:"
|
||||
if(scanned_tray.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/reagent_id in scanned_tray.reagents.reagent_list)
|
||||
returned_message += "- [span_notice("[reagent_id.volume] / [scanned_tray.maxnutri] units of [reagent_id]")]\n"
|
||||
returned_message += "\n[span_notice("• [reagent_id.volume] / [scanned_tray.maxnutri] units of [reagent_id]")]"
|
||||
else
|
||||
returned_message += "[span_notice("No reagents found.")]\n"
|
||||
returned_message += "\n[span_notice("No reagents found.")]"
|
||||
|
||||
returned_message += "*---------*"
|
||||
return span_info(returned_message)
|
||||
|
||||
/**
|
||||
@@ -222,8 +221,12 @@
|
||||
*
|
||||
* Returns the formatted output as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/scan_plant_stats(obj/item/scanned_object)
|
||||
var/returned_message = "*---------*\nThis is [span_name("\a [scanned_object]")].\n"
|
||||
/obj/item/plant_analyzer/proc/scan_plant_stats(obj/item/scanned_object, in_tray = FALSE)
|
||||
var/returned_message = ""
|
||||
if(!in_tray)
|
||||
returned_message += "This is [span_name("\a [scanned_object]")]."
|
||||
else
|
||||
returned_message += "\n<b>Seed Stats</b>"
|
||||
var/obj/item/seeds/our_seed = scanned_object
|
||||
if(!istype(our_seed)) //if we weren't passed a seed, we were passed a plant with a seed
|
||||
our_seed = scanned_object.get_plant_seed()
|
||||
@@ -231,9 +234,8 @@
|
||||
if(our_seed && istype(our_seed))
|
||||
returned_message += get_analyzer_text_traits(our_seed)
|
||||
else
|
||||
returned_message += "*---------*\nNo genes found.\n*---------*"
|
||||
returned_message += "\nNo genes found."
|
||||
|
||||
returned_message += "\n"
|
||||
return span_info(returned_message)
|
||||
|
||||
/**
|
||||
@@ -244,8 +246,12 @@
|
||||
*
|
||||
* Returns the formatted output as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/scan_plant_chems(obj/item/scanned_object)
|
||||
var/returned_message = "*---------*\nThis is [span_name("\a [scanned_object]")].\n"
|
||||
/obj/item/plant_analyzer/proc/scan_plant_chems(obj/item/scanned_object, in_tray = FALSE)
|
||||
var/returned_message = ""
|
||||
if(!in_tray)
|
||||
returned_message += "This is [span_name("\a [scanned_object]")]."
|
||||
else
|
||||
returned_message += "\n<b>Seed Stats</b>"
|
||||
var/obj/item/seeds/our_seed = scanned_object
|
||||
if(!istype(our_seed)) //if we weren't passed a seed, we were passed a plant with a seed
|
||||
our_seed = scanned_object.get_plant_seed()
|
||||
@@ -255,9 +261,8 @@
|
||||
else if (our_seed.reagents_add?.len) //we have a seed with reagent genes
|
||||
returned_message += get_analyzer_text_chem_genes(our_seed)
|
||||
else
|
||||
returned_message += "*---------*\nNo reagents found.\n*---------*"
|
||||
returned_message += "\nNo reagents found."
|
||||
|
||||
returned_message += "\n"
|
||||
return span_info(returned_message)
|
||||
|
||||
/**
|
||||
@@ -270,28 +275,28 @@
|
||||
/obj/item/plant_analyzer/proc/get_analyzer_text_traits(obj/item/seeds/scanned)
|
||||
var/text = ""
|
||||
if(scanned.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
|
||||
text += "- Plant type: [span_notice("Weed. Can grow in nutrient-poor soil.")]\n"
|
||||
text += "\nPlant type: [span_notice("Weed. Can grow in nutrient-poor soil.")]"
|
||||
else if(scanned.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism))
|
||||
text += "- Plant type: [span_notice("Mushroom. Can grow in dry soil.")]\n"
|
||||
text += "\nPlant type: [span_notice("Mushroom. Can grow in dry soil.")]"
|
||||
else if(scanned.get_gene(/datum/plant_gene/trait/plant_type/alien_properties))
|
||||
text += "- Plant type: [span_warning("UNKNOWN")] \n"
|
||||
text += "\nPlant type: [span_warning("UNKNOWN")]"
|
||||
else
|
||||
text += "- Plant type: [span_notice("Normal plant")]\n"
|
||||
text += "\nPlant type: [span_notice("Normal plant")]"
|
||||
|
||||
if(scanned.potency != -1)
|
||||
text += "- Potency: [span_notice("[scanned.potency]")]\n"
|
||||
text += "\nPotency: [span_notice("[scanned.potency]")]"
|
||||
if(scanned.yield != -1)
|
||||
text += "- Yield: [span_notice("[scanned.yield]")]\n"
|
||||
text += "- Maturation speed: [span_notice("[scanned.maturation]")]\n"
|
||||
text += "\nYield: [span_notice("[scanned.yield]")]"
|
||||
text += "\nMaturation speed: [span_notice("[scanned.maturation]")]"
|
||||
if(scanned.yield != -1)
|
||||
text += "- Production speed: [span_notice("[scanned.production]")]\n"
|
||||
text += "- Endurance: [span_notice("[scanned.endurance]")]\n"
|
||||
text += "- Lifespan: [span_notice("[scanned.lifespan]")]\n"
|
||||
text += "- Instability: [span_notice("[scanned.instability]")]\n"
|
||||
text += "- Weed Growth Rate: [span_notice("[scanned.weed_rate]")]\n"
|
||||
text += "- Weed Vulnerability: [span_notice("[scanned.weed_chance]")]\n"
|
||||
text += "\nProduction speed: [span_notice("[scanned.production]")]"
|
||||
text += "\nEndurance: [span_notice("[scanned.endurance]")]"
|
||||
text += "\nLifespan: [span_notice("[scanned.lifespan]")]"
|
||||
text += "\nInstability: [span_notice("[scanned.instability]")]"
|
||||
text += "\nWeed Growth Rate: [span_notice("[scanned.weed_rate]")]"
|
||||
text += "\nWeed Vulnerability: [span_notice("[scanned.weed_chance]")]"
|
||||
if(scanned.rarity)
|
||||
text += "- Species Discovery Value: [span_notice("[scanned.rarity]")]\n"
|
||||
text += "\nSpecies Discovery Value: [span_notice("[scanned.rarity]")]"
|
||||
var/all_removable_traits = ""
|
||||
var/all_immutable_traits = ""
|
||||
for(var/datum/plant_gene/trait/traits in scanned.genes)
|
||||
@@ -302,17 +307,14 @@
|
||||
else
|
||||
all_immutable_traits += "[(all_immutable_traits == "") ? "" : ", "][traits.get_name()]"
|
||||
|
||||
text += "- Plant Traits: [span_notice("[all_removable_traits? all_removable_traits : "None."]")]\n"
|
||||
text += "- Core Plant Traits: [span_notice("[all_immutable_traits? all_immutable_traits : "None."]")]\n"
|
||||
text += "\nPlant Traits: [span_notice("[all_removable_traits? all_removable_traits : "None."]")]"
|
||||
text += "\nCore Plant Traits: [span_notice("[all_immutable_traits? all_immutable_traits : "None."]")]"
|
||||
var/datum/plant_gene/scanned_graft_result = scanned.graft_gene? new scanned.graft_gene : new /datum/plant_gene/trait/repeated_harvest
|
||||
text += "- Grafting this plant would give: [span_notice("[scanned_graft_result.get_name()]")]\n"
|
||||
text += "\nGrafting this plant would give: [span_notice("[scanned_graft_result.get_name()]")]"
|
||||
QDEL_NULL(scanned_graft_result) //graft genes are stored as typepaths so if we want to get their formatted name we need a datum ref - musn't forget to clean up afterwards
|
||||
text += "*---------*"
|
||||
var/unique_text = scanned.get_unique_analyzer_text()
|
||||
if(unique_text)
|
||||
text += "\n"
|
||||
text += unique_text
|
||||
text += "\n*---------*"
|
||||
text += "\n[unique_text]"
|
||||
return text
|
||||
|
||||
/**
|
||||
@@ -323,12 +325,9 @@
|
||||
* Returns the formatted output as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/get_analyzer_text_chem_genes(obj/item/seeds/scanned)
|
||||
var/text = ""
|
||||
text += "- Plant Reagent Genes -\n"
|
||||
text += "*---------*\n"
|
||||
var/text = "\nPlant Reagent Genes:"
|
||||
for(var/datum/plant_gene/reagent/gene in scanned.genes)
|
||||
text += "- [gene.get_name()] -\n"
|
||||
text += "*---------*"
|
||||
text += "\n• [gene.get_name()]"
|
||||
return text
|
||||
|
||||
/**
|
||||
@@ -341,21 +340,19 @@
|
||||
/obj/item/plant_analyzer/proc/get_analyzer_text_chem_contents(obj/item/scanned_plant)
|
||||
var/text = ""
|
||||
var/reagents_text = ""
|
||||
text += "- Plant Reagents -\n"
|
||||
text += "Maximum reagent capacity: [scanned_plant.reagents.maximum_volume]\n"
|
||||
text += "\nPlant Reagents:"
|
||||
var/chem_cap = 0
|
||||
for(var/_reagent in scanned_plant.reagents.reagent_list)
|
||||
var/datum/reagent/reagent = _reagent
|
||||
var/amount = reagent.volume
|
||||
chem_cap += reagent.volume
|
||||
reagents_text += "\n- [reagent.name]: [amount]"
|
||||
if(chem_cap > 100)
|
||||
text += "- [span_danger("Reagent Traits Over 100% Production")]\n"
|
||||
|
||||
reagents_text += "\n• [reagent.name]: [amount]"
|
||||
if(reagents_text)
|
||||
text += "*---------*"
|
||||
text += reagents_text
|
||||
text += "\n*---------*"
|
||||
text += "\nMaximum reagent capacity: [scanned_plant.reagents.maximum_volume]"
|
||||
if(chem_cap > 100)
|
||||
text += "\n[span_danger("Reagent Traits Over 100% Production")]"
|
||||
|
||||
return text
|
||||
|
||||
/**
|
||||
@@ -366,19 +363,17 @@
|
||||
* Returns the formatted output as text.
|
||||
*/
|
||||
/obj/item/plant_analyzer/proc/get_graft_text(obj/item/graft/scanned_graft)
|
||||
var/text = "*---------*\n- Plant Graft -\n"
|
||||
var/text = "Plant Graft"
|
||||
if(scanned_graft.parent_name)
|
||||
text += "- Parent Plant: [span_notice("[scanned_graft.parent_name]")] -\n"
|
||||
text += "\nParent Plant: [span_notice("[scanned_graft.parent_name]")]"
|
||||
if(scanned_graft.stored_trait)
|
||||
text += "- Graftable Traits: [span_notice("[scanned_graft.stored_trait.get_name()]")] -\n"
|
||||
text += "*---------*\n"
|
||||
text += "- Yield: [span_notice("[scanned_graft.yield]")]\n"
|
||||
text += "- Production speed: [span_notice("[scanned_graft.production]")]\n"
|
||||
text += "- Endurance: [span_notice("[scanned_graft.endurance]")]\n"
|
||||
text += "- Lifespan: [span_notice("[scanned_graft.lifespan]")]\n"
|
||||
text += "- Weed Growth Rate: [span_notice("[scanned_graft.weed_rate]")]\n"
|
||||
text += "- Weed Vulnerability: [span_notice("[scanned_graft.weed_chance]")]\n"
|
||||
text += "*---------*"
|
||||
text += "\nGraftable Traits: [span_notice("[scanned_graft.stored_trait.get_name()]")]"
|
||||
text += "\nYield: [span_notice("[scanned_graft.yield]")]"
|
||||
text += "\nProduction speed: [span_notice("[scanned_graft.production]")]"
|
||||
text += "\nEndurance: [span_notice("[scanned_graft.endurance]")]"
|
||||
text += "\nLifespan: [span_notice("[scanned_graft.lifespan]")]"
|
||||
text += "\nWeed Growth Rate: [span_notice("[scanned_graft.weed_rate]")]"
|
||||
text += "\nWeed Vulnerability: [span_notice("[scanned_graft.weed_chance]")]"
|
||||
return span_info(text)
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/t_has = p_have()
|
||||
var/t_is = p_are()
|
||||
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!")
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] \a <EM>[src]</EM>!>")
|
||||
var/obscured = check_obscured_slots()
|
||||
|
||||
if (handcuffed)
|
||||
@@ -150,7 +150,7 @@
|
||||
. += "[t_He] look[p_s()] very happy."
|
||||
if(MOOD_LEVEL_HAPPY4 to INFINITY)
|
||||
. += "[t_He] look[p_s()] ecstatic."
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(HAS_TRAIT(L, TRAIT_PROSOPAGNOSIA) || HAS_TRAIT(L, TRAIT_INVISIBLE_MAN))
|
||||
obscure_name = TRUE
|
||||
|
||||
. = list("<span class='info'>*---------*\nThis is <EM>[!obscure_name ? name : "Unknown"]</EM>!")
|
||||
. = list("<span class='info'>This is <EM>[!obscure_name ? name : "Unknown"]</EM>!")
|
||||
|
||||
var/obscured = check_obscured_slots()
|
||||
|
||||
@@ -399,7 +399,7 @@
|
||||
"<a href='?src=[REF(src)];hud=s;add_comment=1;examine_time=[world.time]'>\[Add comment\]</a>"), "")
|
||||
else if(isobserver(user))
|
||||
. += span_info("<b>Traits:</b> [get_quirk_string(FALSE, CAT_QUIRK_ALL)]")
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
SEND_SIGNAL(src, COMSIG_PARENT_EXAMINE, user, .)
|
||||
|
||||
|
||||
@@ -709,8 +709,9 @@
|
||||
return
|
||||
var/list/combined_msg = list()
|
||||
|
||||
visible_message(span_notice("[src] examines [p_them()]self."), \
|
||||
span_notice("You check yourself for injuries."))
|
||||
visible_message(span_notice("[src] examines [p_them()]self."))
|
||||
|
||||
combined_msg += span_notice("<b>You check yourself for injuries.</b>")
|
||||
|
||||
var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
|
||||
@@ -894,7 +895,7 @@
|
||||
if(quirks.len)
|
||||
combined_msg += span_notice("You have these quirks: [get_quirk_string(FALSE, CAT_QUIRK_ALL)].")
|
||||
|
||||
to_chat(src, combined_msg.Join("\n"))
|
||||
to_chat(src, examine_block(combined_msg.Join("\n")))
|
||||
|
||||
/mob/living/carbon/human/damage_clothes(damage_amount, damage_type = BRUTE, damage_flag = 0, def_zone)
|
||||
if(damage_type != BRUTE && damage_type != BURN)
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
return
|
||||
|
||||
var/list/print_msg = list()
|
||||
print_msg += span_info("*---------*")
|
||||
print_msg += span_userdanger("As you snap back to consciousness, you recall people messing with your stuff...")
|
||||
|
||||
afk_thefts = reverse_range(afk_thefts)
|
||||
@@ -28,7 +27,6 @@
|
||||
|
||||
if(LAZYLEN(afk_thefts) >= AFK_THEFT_MAX_MESSAGES)
|
||||
print_msg += span_warning("There may have been more, but that's all you can remember...")
|
||||
print_msg += span_info("*---------*")
|
||||
|
||||
to_chat(src, print_msg.Join("\n"))
|
||||
to_chat(src, examine_block(print_msg.Join("\n")))
|
||||
LAZYNULL(afk_thefts)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/ai/examine(mob/user)
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] <EM>[src]</EM>!")
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] <EM>[src]</EM>!")
|
||||
if (stat == DEAD)
|
||||
. += span_deadsay("It appears to be powered-down.")
|
||||
else
|
||||
@@ -14,9 +14,12 @@
|
||||
else
|
||||
. += span_warning("<B>Its casing is melted and heat-warped!</B>")
|
||||
if(deployed_shell)
|
||||
. += "The wireless networking light is blinking.\n"
|
||||
. += "The wireless networking light is blinking."
|
||||
else if (!shunted && !client)
|
||||
. += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem...\n"
|
||||
. += "*---------*</span>"
|
||||
. += "[src]Core.exe has stopped responding! NTOS is searching for a solution to the problem..."
|
||||
. += "</span>"
|
||||
|
||||
. += ..()
|
||||
|
||||
/mob/living/silicon/ai/get_examine_string(mob/user, thats = FALSE)
|
||||
return null
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/mob/living/silicon/robot/examine(mob/user)
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!")
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] <EM>[src]</EM>!")
|
||||
if(desc)
|
||||
. += "[desc]"
|
||||
|
||||
@@ -43,6 +43,9 @@
|
||||
. += span_warning("It doesn't seem to be responding.")
|
||||
if(DEAD)
|
||||
. += span_deadsay("It looks like its system is corrupted and requires a reset.")
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
. += ..()
|
||||
|
||||
/mob/living/silicon/robot/get_examine_string(mob/user, thats = FALSE)
|
||||
return null
|
||||
|
||||
@@ -92,13 +92,13 @@
|
||||
text_span = "purple"
|
||||
if(THEME_HOLY)
|
||||
text_span = "blue"
|
||||
. = list("<span class='[text_span]'>*---------*\nThis is [icon2html(src, user)] \a <b>[src]</b>!\n[desc]")
|
||||
. = list("<span class='[text_span]'>This is [icon2html(src, user)] \a <b>[src]</b>!\n[desc]")
|
||||
if(health < maxHealth)
|
||||
if(health >= maxHealth/2)
|
||||
. += span_warning("[t_He] look[t_s] slightly dented.")
|
||||
else
|
||||
. += span_warning("<b>[t_He] look[t_s] severely dented!</b>")
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
/mob/living/simple_animal/hostile/construct/attack_animal(mob/living/simple_animal/user, list/modifiers)
|
||||
if(isconstruct(user)) //is it a construct?
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
dust()
|
||||
|
||||
/mob/living/simple_animal/drone/examine(mob/user)
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <b>[src]</b>!")
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] \a <b>[src]</b>!")
|
||||
|
||||
//Hands
|
||||
for(var/obj/item/I in held_items)
|
||||
@@ -286,7 +286,7 @@
|
||||
. += span_deadsay("A message repeatedly flashes on its display: \"REBOOT -- REQUIRED\".")
|
||||
else
|
||||
. += span_deadsay("A message repeatedly flashes on its display: \"ERROR -- OFFLINE\".")
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
|
||||
/mob/living/simple_animal/drone/assess_threat(judgement_criteria, lasercolor = "", datum/callback/weaponcheck=null) //Secbots won't hunt maintenance drones.
|
||||
|
||||
@@ -19,13 +19,13 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/guardian/dextrous/examine(mob/user)
|
||||
if(dextrous)
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src)] \a <b>[src]</b>!\n[desc]")
|
||||
. = list("<span class='info'>This is [icon2html(src)] \a <b>[src]</b>!\n[desc]")
|
||||
for(var/obj/item/I in held_items)
|
||||
if(!(I.item_flags & ABSTRACT))
|
||||
. += "It has [I.get_examine_string(user)] in its [get_held_index_name(get_held_index_of_item(I))]."
|
||||
if(internal_storage && !(internal_storage.item_flags & ABSTRACT))
|
||||
. += "It is holding [internal_storage.get_examine_string(user)] in its internal storage."
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
else
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -438,7 +438,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_animal/slime/examine(mob/user)
|
||||
. = list("<span class='info'>*---------*\nThis is [icon2html(src, user)] \a <EM>[src]</EM>!")
|
||||
. = list("<span class='info'>This is [icon2html(src, user)] \a <EM>[src]</EM>!")
|
||||
if (stat == DEAD)
|
||||
. += span_deadsay("It is limp and unresponsive.")
|
||||
else
|
||||
@@ -465,7 +465,7 @@
|
||||
if(10)
|
||||
. += span_warning("<B>It is radiating with massive levels of electrical activity!</B>")
|
||||
|
||||
. += "*---------*</span>"
|
||||
. += "</span>"
|
||||
|
||||
/mob/living/simple_animal/slime/proc/discipline_slime(mob/user)
|
||||
if(stat)
|
||||
|
||||
@@ -534,7 +534,11 @@
|
||||
else
|
||||
result = examinify.examine(src) // if a tree is examined but no client is there to see it, did the tree ever really exist?
|
||||
|
||||
to_chat(src, "<span class='infoplain'>[result.Join("\n")]</span>")
|
||||
if(result.len)
|
||||
for(var/i in 1 to (length(result) - 1))
|
||||
result[i] += "\n"
|
||||
|
||||
to_chat(src, examine_block("<span class='infoplain'>[result.Join()]</span>"))
|
||||
SEND_SIGNAL(src, COMSIG_MOB_EXAMINATE, examinify)
|
||||
|
||||
|
||||
|
||||
@@ -887,6 +887,13 @@ em {
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
.examine_block {
|
||||
background: #1b1c1e;
|
||||
border: 1px solid #a4bad6;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em 0.75em;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
font-style: italic;
|
||||
border-bottom: 1px dashed #fff;
|
||||
|
||||
@@ -919,6 +919,13 @@ h2.alert {
|
||||
margin-left: 3em;
|
||||
}
|
||||
|
||||
.examine_block {
|
||||
background: #f2f7fa;
|
||||
border: 1px solid #111a27;
|
||||
margin: 0.5em;
|
||||
padding: 0.5em 0.75em;
|
||||
}
|
||||
|
||||
.tooltip {
|
||||
font-style: italic;
|
||||
border-bottom: 1px dashed #000;
|
||||
|
||||
Reference in New Issue
Block a user