diff --git a/code/game/atoms.dm b/code/game/atoms.dm index bd0c9cdb54..c4039d80a7 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -12,6 +12,11 @@ var/throwpass = 0 var/germ_level = GERM_LEVEL_AMBIENT // The higher the germ level, the more germ on the atom. + //Examine tab vars + var/desc_info = null //Blue 'tutorial' text, which details how this atom works, and perhaps some tips and tricks. + var/desc_fluff = null //Yellow text, with quotes, to tell a short blurb or a paragraph about this atom's place in the fluff, should one exist. + + ///Chemistry. var/datum/reagents/reagents = null @@ -202,11 +207,36 @@ its easier to just keep the beam vertical. user << "\icon[src] That's [f_name] [suffix]" + if(name) //This shouldn't be needed but I'm paranoid. + user.desc_name_holder = "[src.name]" //\icon[src] + + user.desc_icon_holder = "\icon[src]" + if(desc) user << desc + user.desc_holder = src.desc + else + user.desc_holder = null //This is needed, or else if you examine one thing with a desc, then another without, the panel will retain the first examined's desc. + + user.desc_info_holder = get_desc_info() + user.desc_fluff_holder = get_desc_fluff() return distance == -1 || (get_dist(src, user) <= distance) +//Override these if you need special behaviour for a specific type. + +/atom/proc/get_desc_info() + if(desc_info) + return desc_info + else + return + +/atom/proc/get_desc_fluff() + if(desc_fluff) + return src.desc_fluff + else + return + // called by mobs when e.g. having the atom as their machine, pulledby, loc (AKA mob being inside the atom) or buckled var set. // see code/modules/mob/mob_movement.dm for more. /atom/proc/relaymove() diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 687314f1dd..e40e57327e 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -451,6 +451,7 @@ msg += "\n[t_He] is [pose]" user << msg + ..() //Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records. /proc/hasHUD(mob/M as mob, hudtype) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index dd5bfe7d59..df6c3a16de 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1236,7 +1236,7 @@ // Might need re-wording. user << "There is no exposed flesh or thin material [target_zone == "head" ? "on their head" : "on their body"] to inject into." -/mob/living/carbon/human/print_flavor_text() +/mob/living/carbon/human/print_flavor_text(var/shrink = 1) var/list/equipment = list(src.head,src.wear_mask,src.glasses,src.w_uniform,src.wear_suit,src.gloves,src.shoes) var/head_exposed = 1 var/face_exposed = 1 @@ -1272,7 +1272,13 @@ if((T == "head" && head_exposed) || (T == "face" && face_exposed) || (T == "eyes" && eyes_exposed) || (T == "torso" && torso_exposed) || (T == "arms" && arms_exposed) || (T == "hands" && hands_exposed) || (T == "legs" && legs_exposed) || (T == "feet" && feet_exposed)) flavor_text += flavor_texts[T] flavor_text += "\n\n" - return ..() + if(!shrink) + return flavor_text + else + return ..() + +/mob/living/carbon/human/get_desc_fluff() + return print_flavor_text(0) /mob/living/carbon/human/getDNA() if(species.flags & NO_SCAN) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 68e9b0f0e8..10933d576b 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -172,6 +172,14 @@ // ++++ROCKDTBEN++++ MOB PROCS //END +/mob/living/get_desc_fluff() + if(flavor_text) //Get flavor text for the yellow text. + return flavor_text + else if(desc_fluff) //No flavor text? Try for hardcoded fluff instead. + return desc_fluff + else + return + /mob/proc/get_contents() diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index bd89b867ee..d67ccebd09 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -3,6 +3,11 @@ real_name = "drone" icon = 'icons/mob/robots.dmi' icon_state = "repairbot" + desc_info = "Drones are player-controlled synthetics which are lawed to maintain the station and not \ + interact with anyone else, except for other drones. They hold a wide array of tools to build, repair, maintain, and clean. \ + They fuction similarly to other synthetics, in that they require recharging regularly, have laws, and are resilient to many hazards, \ + such as fire, radiation, vaccum, and more. Ghosts can join the round as a maintenance drone by using the appropiate verb in the 'ghost' tab." + //desc_fluff is already provided with flavor_text. maxHealth = 35 health = 35 universal_speak = 0 diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 15347c2580..33fe1e288e 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -833,6 +833,15 @@ note dizziness decrements automatically in the mob's Life() proc. statpanel("Spells","[S.charge_counter]/[S.charge_max]",S) if("holdervar") statpanel("Spells","[S.holder_var_type] [S.holder_var_amount]",S) + if(client) + statpanel("Examine") + stat(null,"[desc_icon_holder] [desc_name_holder]") //The name, written in big letters. + stat(null,"[desc_holder]") //the default examine text. + if(desc_info_holder) + stat(null,"[desc_info_holder]") //Blue, informative text. + if(desc_fluff_holder) + stat(null,"[desc_fluff_holder]") //Yellow, fluff-related text. + @@ -1210,4 +1219,4 @@ mob/proc/yank_out_object() /mob/verb/westfaceperm() set hidden = 1 facing_dir = null - set_face_dir(WEST) + set_face_dir(WEST) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 1b9f1c1b76..8fdc91dac0 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -223,3 +223,11 @@ var/list/shouldnt_see = list() //list of objects that this mob shouldn't see in the stat panel. this silliness is needed because of AI alt+click and cult blood runes var/list/active_genes=list() + + //Examine tab vars + //These hold the descriptions and other info, to relay to the actual tab. + var/desc_name_holder = null + var/desc_holder = null + var/desc_info_holder = null + var/desc_fluff_holder = null + var/desc_icon_holder = null diff --git a/interface/skin.dmf b/interface/skin.dmf index 8eee4e1817..c526fec17a 100644 --- a/interface/skin.dmf +++ b/interface/skin.dmf @@ -1820,7 +1820,7 @@ window "infowindow" elem "info" type = INFO pos = 0,0 - size = 638x475 + size = 636x451 anchor1 = 0,0 anchor2 = 100,100 font-family = "" @@ -1843,7 +1843,7 @@ window "infowindow" tab-font-family = "" tab-font-size = 0 tab-font-style = "" - allow-html = false + allow-html = true multi-line = true on-show = ".winset\"rpane.infob.is-visible=true;rpane.browseb.is-visible=true?rpane.infob.pos=130,0:rpane.infob.pos=65,0 rpane.textb.is-visible=true rpane.infob.is-checked=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=infowindow\"" on-hide = ".winset\"rpane.infob.is-visible=false;rpane.browseb.is-visible=true?rpane.browseb.is-checked=true rpane.rpanewindow.left=browserwindow:rpane.textb.is-visible=true rpane.rpanewindow.pos=0,30 rpane.rpanewindow.size=0x0 rpane.rpanewindow.left=\""