Bay12 examine overhaul.

This commit overhauls the examine system to baystation's latest system,
including a more efficient verb approach, and a new status panel tab,
which shows more information for pre-defined objects.
This commit is contained in:
Tigercat2000
2015-09-14 11:51:40 -07:00
parent cfbbf104ac
commit 0603f73232
146 changed files with 1381 additions and 1090 deletions
@@ -0,0 +1,166 @@
/obj/machinery/atmospherics/pipe
description_info = "This pipe, and all other pipes, can be connected or disconnected by a wrench. The internal pressure of the pipe must \
be below 300 kPa to do this. More pipes can be obtained from the pipe dispenser."
/obj/machinery/atmospherics/pipe/New() //This is needed or else 20+ lines of copypasta to dance around inheritence.
..()
description_info += "<br>Most pipes and atmospheric devices can be connected or disconnected with a wrench. The pipe's pressure must not be too high, \
or if it is a device, it must be turned off first."
//HE pipes
/obj/machinery/atmospherics/pipe/simple/heat_exchanging
description_info = "This radiates heat from the pipe's gas to space, cooling it down."
//Supply/Scrubber pipes
/obj/machinery/atmospherics/pipe/simple/visible/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/simple/visible/supply
description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/simple/hidden/supply
description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
//Universal adapters
/obj/machinery/atmospherics/pipe/simple/visible/universal
description_info = "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes."
/obj/machinery/atmospherics/pipe/simple/hidden/universal
description_info = "This allows you to connect 'normal' pipes, red 'scrubber' pipes, and blue 'supply' pipes."
//Three way manifolds
/obj/machinery/atmospherics/pipe/manifold
description_info = "A normal pipe with three ends to connect to."
/obj/machinery/atmospherics/pipe/manifold/visible/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/manifold/visible/supply
description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/manifold/hidden/supply
description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
//Insulated pipes
/obj/machinery/atmospherics/pipe/simple/insulated
description_info = "This is completely useless, use a normal pipe." //Sorry, but it's true.
//Four way manifolds
/obj/machinery/atmospherics/pipe/manifold4w
description_info = "This is a four-way pipe."
/obj/machinery/atmospherics/pipe/manifold4w/visible/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/manifold4w/hidden/supply
description_info = "This is a special 'supply' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
/obj/machinery/atmospherics/pipe/manifold4w/hidden/scrubbers
description_info = "This is a special 'scrubber' pipe, which does not connect to 'normal' pipes. If you want to connect it, use \
a Universal Adapter pipe."
//Endcaps
/obj/machinery/atmospherics/pipe/cap
description_info = "This is a cosmetic attachment, as pipes currently do not spill their contents into the air."
//T-shaped valves
/obj/machinery/atmospherics/tvalve
description_info = "Click this to toggle the mode. The direction with the green light is where the gas will flow."
//Normal valves
/obj/machinery/atmospherics/valve
description_info = "Click this to turn the valve. If red, the pipes on each end are seperated. Otherwise, they are connected."
//TEG ports
/obj/machinery/atmospherics/binary/circulator
description_info = "This generates electricity, depending on the difference in temperature between each side of the machine. The meter in \
the center of the machine gives an indicator of how much elecrtricity is being generated."
//Passive gates
/obj/machinery/atmospherics/binary/passive_gate
description_info = "This is a one-way regulator, allowing gas to flow only at a specific pressure and flow rate. If the light is green, it is flowing."
//Normal pumps (high power one inherits from this)
/obj/machinery/atmospherics/binary/pump
description_info = "This moves gas from one pipe to another. A higher target pressure demands more energy. The side with the red end is the output."
//Vents
/obj/machinery/atmospherics/unary/vent_pump
description_info = "This pumps the contents of the attached pipe out into the atmosphere, if needed. It can be controlled from an Air Alarm."
//Freezers
/obj/machinery/atmospherics/unary/freezer
description_info = "Cools down the gas of the pipe it is connected to. It uses massive amounts of electricity while on. \
It can be upgraded by replacing the capacitors, manipulators, and matter bins. It can be deconstructed by screwing the maintenance panel open with a \
screwdriver, and then using a crowbar."
//Heaters
/obj/machinery/atmospherics/unary/heater
description_info = "Heats up the gas of the pipe it is connected to. It uses massive amounts of electricity while on. \
It can be upgraded by replacing the capacitors, manipulators, and matter bins. It can be deconstructed by screwing the maintenance panel open with a \
screwdriver, and then using a crowbar."
//Gas injectors
/obj/machinery/atmospherics/unary/outlet_injector
description_info = "Outputs the pipe's gas into the atmosphere, similar to an airvent. It can be controlled by a nearby atmospherics computer. \
A green light on it means it is on."
//Scrubbers
/obj/machinery/atmospherics/unary/vent_scrubber
description_info = "This filters the atmosphere of harmful gas. Filtered gas goes to the pipes connected to it, typically a scrubber pipe. \
It can be controlled from an Air Alarm. It can be configured to drain all air rapidly with a 'panic syphon' from an air alarm."
//Omni filters
/obj/machinery/atmospherics/omni/filter
description_info = "Filters gas from a custom input direction, with up to two filtered outputs and a 'everything else' \
output. The filtered output's arrows glow orange."
//Omni mixers
/obj/machinery/atmospherics/omni/mixer
description_info = "Combines gas from custom input and output directions. The percentage of combined gas can be defined."
//Canisters
/obj/machinery/portable_atmospherics/canister
description_info = "The canister can be connected to a connector port with a wrench. Tanks of gas (the kind you can hold in your hand) \
can be filled by the canister, by using the tank on the canister, increasing the release pressure, then opening the valve until it is full, and then close it. \
*DO NOT* remove the tank until the valve is closed. A gas analyzer can be used to check the contents of the canister."
description_antag = "Canisters can be damaged, spilling their contents into the air, or you can just leave the release valve open."
//Portable pumps
/obj/machinery/portable_atmospherics/powered/pump
description_info = "Invaluable for filling air in a room rapidly after a breach repair. The internal gas container can be filled by \
connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \
replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the air pump."
//Portable scrubbers
/obj/machinery/portable_atmospherics/powered/scrubber
description_info = "Filters the air, placing harmful gases into the internal gas container. The container can be emptied by \
connecting it to a connector port. The pump can pump the air in (sucking) or out (blowing), at a specific target pressure. The powercell inside can be \
replaced by using a screwdriver, and then adding a new cell. A tank of gas can also be attached to the scrubber. "
//Meters
/obj/machinery/meter
description_info = "Measures the volume and temperature of the pipe under the meter."
//Pipe dispensers
/obj/machinery/pipedispenser
description_info = "This can be moved by using a wrench. You will need to wrench it again when you want to use it. You can put \
excess (atmospheric) pipes into the dispenser, as well. The dispenser requires electricity to function."
@@ -0,0 +1,35 @@
/obj/machinery/power/supermatter
description_info = "When energized by a laser (or something hitting it), it emits radiation and heat. If the heat reaches above 7000 kelvin, it will send an alert and start taking damage. \
After integrity falls to zero percent, it will delaminate, causing a massive explosion, station-wide radiation spikes, and hallucinations. \
Supermatter reacts badly to oxygen in the atmosphere. It'll also heat up really quick if it is in vacuum.<br>\
<br>\
Supermatter cores are extremely dangerous to be close to, and requires protection to handle properly. The protection you will need is:<br>\
Optical meson scanners on your eyes, to prevent hallucinations when looking at the supermatter.<br>\
Radiation helmet and suit, as the supermatter is radioactive.<br>\
<br>\
Touching the supermatter will result in *instant death*, with no corpse left behind! You can drag the supermatter, but anything else will kill you. \
It is advised to obtain a genetic backup before trying to drag it."
description_antag = "Exposing the supermatter to oxygen or vaccum will cause it to start rapidly heating up. Sabotaging the supermatter and making it explode will \
cause a period of lag as the explosion is processed by the server, as well as irradiating the entire station and causing hallucinations to happen. \
Wearing radiation equipment will protect you from most of the delamination effects sans explosion."
/obj/machinery/power/apc
description_info = "An APC (Area Power Controller) regulates and supplies backup power for the area they are in. Their power channels are divided \
out into 'environmental' (Items that manipulate airflow and temperature), 'lighting' (the lights), and 'equipment' (Everything else that consumes power). \
Power consumption and backup power cell charge can be seen from the interface, further controls (turning a specific channel on, off or automatic, \
toggling the APC's ability to charge the backup cell, or toggling power for the entire area via master breaker) first requires the interface to be unlocked \
with an ID with Engineering access or by one of the station's robots or the artificial intelligence."
description_antag = "This can be emagged to unlock it. It will cause the APC to have a blue error screen. \
Wires can be pulsed remotely with a signaler attached to it. A powersink will also drain any APCs connected to the same wire the powersink is on."
/obj/item/inflatable
description_info = "Inflate by using it in your hand. The inflatable barrier will inflate on your tile. To deflate it, use the 'deflate' verb."
/obj/structure/inflatable
description_info = "To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever."
/obj/structure/inflatable/door
description_info = "Click the door to open or close it. It only stops air while closed.<br>\
To remove these safely, use the 'deflate' verb. Hitting these with any objects will probably puncture and break it forever."
@@ -0,0 +1,42 @@
/obj/machinery/bodyscanner
description_info = "The advanced scanner detects and reports internal injuries such as bone fractures, internal bleeding, and organ damage. \
This is useful if you are about to perform surgery.<br>\
<br>\
Click your target with Grab intent, then click on the scanner to place them in it. Click the red terminal to operate. \
Right-click the scanner and click 'Eject Occupant' to remove them. You can enter the scanner yourself in a similar way, using the 'Enter Body Scanner' \
verb."
/obj/machinery/atmospherics/unary/cryo_cell
description_info = "The cryogenic chamber, or 'cryo', treats most damage types, most notably genetic damage. It also stabilizes patients \
in critical condition by placing them in stasis, so they can be treated at a later time.<br>\
<br>\
In order for it to work, it must be loaded with chemicals, and the temperature of the solution must reach a certain point. Additionally, it \
requires a supply of pure oxygen, provided by canisters that are attached. The most commonly used chemicals in the chambers are Cryoxadone and \
Clonexadone. Clonexadone is more effective in treating all damage, including Genetic damage, but is otherwise functionally identical.<br>\
<br>\
Activating the freezer nearby, and setting it to a temperature setting below 150, is recommended before operation! Further, any clothing the patient \
is wearing that act as an insulator will reduce its effectiveness, and should be removed.<br>\
<br>\
Clicking the tube with a beaker full of chemicals in hand will place it in its storage to distribute when it is activated.<br>\
<br>\
Click your target with Grab intent, then click on the tube, with an empty hand, to place them in it. Click the tube again to open the menu. \
Press the button on the menu to activate it. Once they have reached 100 health, right-click the cell and click 'Eject Occupant' to remove them. \
Remember to turn it off, once you've finished, to save power and chemicals!"
/obj/machinery/optable
description_info = "Click your target with Grab intent, then click on the table with an empty hand, to place them on it."
/obj/machinery/computer/operating
description_info = "This console gives information on the status of the patient on the adjacent operating table, notably their consciousness."
/obj/machinery/sleeper
description_info = "The sleeper allows you to clean the blood by means of dialysis, and to administer medication in a controlled environment.<br>\
<br>\
Click your target with Grab intent, then click on the sleeper to place them in it. Click the green console, with an empty hand, to open the menu. \
Click 'Start Dialysis' to begin filtering unwanted chemicals from the occupant's blood. The beaker contained will begin to fill with their \
contaminated blood, and will need to be emptied when full.<br>\
<br>\
You can also inject common medicines directly into their bloodstream.\
<br>\
Right-click the cell and click 'Eject Occupant' to remove them. You can enter the cell yourself by right clicking and selecting 'Enter Sleeper'. \
Note that you cannot control the sleeper while inside of it."
@@ -0,0 +1,8 @@
/mob/living/silicon/robot/drone
description_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, vacuum, and more. Ghosts can join the round as a maintenance drone by using the appropriate verb in the 'ghost' tab. \
An inactive drone can be rebooted by swiping an ID card on it with engineering or robotics access."
description_antag = "An Electromagnetic Sequencer can be used to subvert the drone to your cause."
@@ -0,0 +1,24 @@
/obj/item/stack/rods
description_info = "Made from metal sheets. You can build a grille by using it in your hand. \
Clicking on a floor without any tiles will reinforce the floor. You can make reinforced glass by combining rods and normal glass sheets."
/obj/item/stack/sheet/glass
description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets."
/obj/item/stack/sheet/glass/cyborg
description_info = "Use in your hand to build a window. Can be upgraded to reinforced glass by adding metal rods, which are made from metal sheets.<br>\
As a synthetic, you can acquire more sheets of glass by recharging."
/obj/item/stack/sheet/glass/reinforced
description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage."
/obj/item/stack/sheet/glass/reinforced/cyborg
description_info = "Use in your hand to build a window. Reinforced glass is much stronger against damage.<br>\
As a synthetic, you can gain more reinforced glass by recharging."
/obj/item/stack/sheet/metal/cyborg
description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it.<br>\
You can replenish your supply of metal as a synthetic by recharging."
/obj/item/stack/sheet
description_info = "Use in your hand to bring up the recipe menu. If you have enough sheets, click on something on the list to build it."
@@ -0,0 +1,21 @@
/obj/structure/girder
description_info = "Use metal sheets on this to build a normal wall. Adding plasteel instead will make a reinforced wall.<br>\
A false wall can be made by using a crowbar on this girder, and then adding metal or plasteel.<br>\
You can dismantle the grider with a wrench."
/obj/structure/girder/reinforced
description_info = "Add another sheet of plasteel to finish."
/obj/structure/grille
description_info = "A powered and knotted wire underneath this will cause the grille to shock anyone not wearing insulated gloves.<br>\
Wirecutters will turn the grille into metal rods instantly. Grilles are made with metal rods."
/obj/structure/lattice
description_info = "Add a metal floor tile to build a floor on top of the lattice.<br>\
Lattices can be made by applying metal rods to a space tile."
/obj/structure/bed
description_info = "Click and drag yourself (or anyone) to this to buckle in. Click on this with an empty hand to undo the buckles.<br>\
<br>\
Anyone with restraints, such as handcuffs, will not be able to unbuckle themselves. They must use the Resist button, or verb, to break free of \
the buckles, instead."
@@ -0,0 +1,3 @@
/turf/simulated/wall
description_info = "You can deconstruct this by welding it, and then wrenching the girder.<br>\
You can build a wall by using metal sheets and making a girder, then adding more metal or plasteel."
@@ -0,0 +1,81 @@
/*
Note: This file is meant for actual weapons (guns, swords, etc), and not the stupid 'every obj is a weapon, except when it's not' thing.
*/
//******
//*Guns*
//******
//This contains a lot of copypasta but I'm told it's better then a lot of New()s appending the var.
/obj/item/weapon/gun
description_info = "This is a gun. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire."
/obj/item/weapon/gun/energy
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger."
/obj/item/weapon/gun/energy/crossbow
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire."
description_antag = "This is a stealthy weapon which fires poisoned bolts at your target. When it hits someone, they will suffer a stun effect, in \
addition to toxins. The energy crossbow recharges itself slowly, and can be concealed in your pocket or bag."
/obj/item/weapon/gun/energy/gun
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \
in your hand. To recharge this weapon, use a weapon recharger."
/obj/item/weapon/gun/energy/gun/taser
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger."
/obj/item/weapon/gun/energy/gun/stunrevolver
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger."
/obj/item/weapon/gun/energy/gun/nuclear
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To switch between stun and lethal, click the weapon \
in your hand. Unlike most weapons, this weapon recharges itself."
/obj/item/weapon/gun/energy/captain
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. Unlike most weapons, this weapon recharges itself."
/obj/item/weapon/gun/energy/sniperrifle
description_info = "This is an energy weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. Most energy weapons can fire through windows harmlessly. To recharge this weapon, use a weapon recharger. \
To use the scope, use the appropriate verb in the object tab."
/obj/item/weapon/gun/projectile
description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. To reload, click the weapon in your hand to unload (if needed), then add the appropiate ammo. The description \
will tell you what caliber you need."
/obj/item/weapon/gun/projectile/shotgun/pump
description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. After firing, you will need to pump the gun, by clicking on the gun in your hand. To reload, load more shotgun \
shells into the gun."
/obj/item/weapon/gun/projectile/heavysniper
description_info = "This is a ballistic weapon. To fire the weapon, ensure your intent is *not* set to 'help', have your gun mode set to 'fire', \
then click where you want to fire. The gun's chamber can be opened or closed by using it in your hand. To reload, open the chamber, add a new bullet \
then close it. To use the scope, use the appropriate verb in the object tab."
//*******
//*Melee*
//*******
/obj/item/weapon/melee/baton
description_info = "The baton needs to be turned on to apply the stunning effect. Use it in your hand to toggle it on or off. If your intent is \
set to 'harm', you will inflict damage when using it, regardless if it is on or not. Each stun reduces the baton's charge, which can be replenished by \
putting it inside a weapon recharger."
/obj/item/weapon/melee/energy/sword
description_antag = "The energy sword is a very strong melee weapon, capable of severing limbs easily, if they are targeted. It can also has a chance \
to block projectiles and melee attacks while it is on and being held. The sword can be toggled on or off by using it in your hand. While it is off, \
it can be concealed in your pocket or bag."
/obj/item/weapon/melee/cultblade
description_antag = "This sword is a powerful weapon, capable of severing limbs easily, if they are targeted. Nonbelivers are unable to use this weapon."
+71
View File
@@ -0,0 +1,71 @@
/* This code is responsible for the examine tab. When someone examines something, it copies the examined object's description_info,
description_fluff, and description_antag, and shows it in a new tab.
In this file, some atom and mob stuff is defined here. It is defined here instead of in the normal files, to keep the whole system self-contained.
This means that this file can be unchecked, along with the other examine files, and can be removed entirely with no effort.
*/
/atom/
var/description_info = null //Helpful blue text.
var/description_fluff = null //Green text about the atom's fluff, if any exists.
var/description_antag = null //Malicious red text, for the antags.
//Override these if you need special behaviour for a specific type.
/atom/proc/get_description_info()
if(description_info)
return description_info
return
/atom/proc/get_description_fluff()
if(description_fluff)
return description_fluff
return
/atom/proc/get_description_antag()
if(description_antag)
return description_antag
return
/mob/living/get_description_fluff()
if(flavor_text) //Get flavor text for the green text.
return flavor_text
else //No flavor text? Try for hardcoded fluff instead.
return ..()
/mob/living/carbon/human/get_description_fluff()
return print_flavor_text(0)
/* The examine panel itself */
/client/var/description_holders[0]
/client/proc/update_description_holders(atom/A, update_antag_info=0)
description_holders["info"] = A.get_description_info()
description_holders["fluff"] = A.get_description_fluff()
description_holders["antag"] = (update_antag_info)? A.get_description_antag() : ""
description_holders["name"] = "[A.name]"
description_holders["icon"] = "\icon[A]"
description_holders["desc"] = A.desc
/client/Stat()
. = ..()
if(usr && statpanel("Examine"))
stat(null,"[description_holders["icon"]] <font size='5'>[description_holders["name"]]</font>") //The name, written in big letters.
stat(null,"[description_holders["desc"]]") //the default examine text.
if(description_holders["info"])
stat(null,"<font color='#084B8A'><b>[description_holders["info"]]</b></font>") //Blue, informative text.
if(description_holders["fluff"])
stat(null,"<font color='#298A08'><b>[description_holders["fluff"]]</b></font>") //Yellow, fluff-related text.
if(description_holders["antag"])
stat(null,"<font color='#8A0808'><b>[description_holders["antag"]]</b></font>") //Red, malicious antag-related text
//override examinate verb to update description holders when things are examined
/mob/examinate(atom/A as mob|obj|turf in view())
if(..())
return 1
var/is_antag = (isAntag(src) || isobserver(src)) //ghosts don't have minds
if(client)
client.update_description_holders(A, is_antag)