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
+3 -4
View File
@@ -67,10 +67,9 @@
return
/obj/item/weapon/fuel/examine()
set src in view(1)
if(usr && !usr.stat)
usr << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]."
/obj/item/weapon/fuel/examine(mob/user)
if(..(user, 1))
user << "A magnetic storage ring, it contains [fuel]kg of [content ? content : "nothing"]."
/obj/item/weapon/fuel/proc/injest(mob/M as mob)
switch(content)
+10 -13
View File
@@ -196,31 +196,28 @@
spawn(5)
src.update()
/obj/machinery/power/apc/examine()
set src in oview(1)
if(usr /*&& !usr.stat*/)
..()
/obj/machinery/power/apc/examine(mob/user)
if(..(user, 1))
if(stat & BROKEN)
usr << "Looks broken."
user << "Looks broken."
return
if(opened)
if(has_electronics && terminal)
usr << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
user << "The cover is [opened==2?"removed":"open"] and the power cell is [ cell ? "installed" : "missing"]."
else if (!has_electronics && terminal)
usr << "There are some wires but no any electronics."
user << "There are some wires but no any electronics."
else if (has_electronics && !terminal)
usr << "Electronics installed but not wired."
user << "Electronics installed but not wired."
else /* if (!has_electronics && !terminal) */
usr << "There is no electronics nor connected wires."
user << "There is no electronics nor connected wires."
else
if (stat & MAINT)
usr << "The cover is closed. Something wrong with it: it doesn't work."
user << "The cover is closed. Something wrong with it: it doesn't work."
else if (malfhack)
usr << "The cover is broken. It may be hard to force it open."
user << "The cover is broken. It may be hard to force it open."
else
usr << "The cover is closed."
user << "The cover is closed."
// update the APC icon to show the three base states
// also add overlays for indicator lights
+6 -5
View File
@@ -541,15 +541,16 @@ obj/structure/cable/proc/cableColor(var/colorC)
else
w_class = 2.0
/obj/item/stack/cable_coil/examine()
set src in view(1)
/obj/item/stack/cable_coil/examine(mob/user)
if(!..(user, 1))
return
if(get_amount() == 1)
usr << "A short piece of power cable."
user << "A short piece of power cable."
else if(get_amount() == 2)
usr << "A piece of power cable."
user << "A piece of power cable."
else
usr << "A coil of power cable. There are [get_amount()] lengths of cable in the coil."
user << "A coil of power cable. There are [get_amount()] lengths of cable in the coil."
/obj/item/stack/cable_coil/verb/make_restraint()
+5 -6
View File
@@ -55,15 +55,14 @@
return power_used
/obj/item/weapon/stock_parts/cell/examine()
set src in view(1)
if(usr /*&& !usr.stat*/)
/obj/item/weapon/stock_parts/cell/examine(mob/user)
if(..(user, 1))
if(maxcharge <= 2500)
usr << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%."
user << "[desc]\nThe manufacturer's label states this cell has a power rating of [maxcharge], and that you should not swallow it.\nThe charge meter reads [round(src.percent() )]%."
else
usr << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%."
user << "This power cell has an exciting chrome finish, as it is an uber-capacity cell type! It has a power rating of [maxcharge]!\nThe charge meter reads [round(src.percent() )]%."
if(crit_fail)
usr << "\red This power cell seems to be faulty."
user << "\red This power cell seems to be faulty."
/obj/item/weapon/stock_parts/cell/attack_self(mob/user as mob)
src.add_fingerprint(user)
+15 -21
View File
@@ -26,20 +26,15 @@
if (fixture_type == "bulb")
icon_state = "bulb-construct-stage1"
/obj/machinery/light_construct/examine()
set src in view()
..()
if (!(usr in view(2))) return
switch(src.stage)
if(1)
usr << "It's an empty frame."
return
if(2)
usr << "It's wired."
return
if(3)
usr << "The casing is closed."
return
/obj/machinery/light_construct/examine(mob/user)
if(..(user, 2))
switch(src.stage)
if(1)
usr << "It's an empty frame."
if(2)
usr << "It's wired."
if(3)
usr << "The casing is closed."
/obj/machinery/light_construct/attackby(obj/item/weapon/W as obj, mob/living/user as mob, params)
src.add_fingerprint(user)
@@ -268,18 +263,17 @@
update()
// examine verb
/obj/machinery/light/examine()
set src in oview(1)
if(usr && !usr.stat)
/obj/machinery/light/examine(mob/user)
if(..(user, 1))
switch(status)
if(LIGHT_OK)
usr << "[desc] It is turned [on? "on" : "off"]."
user << "[desc] It is turned [on? "on" : "off"]."
if(LIGHT_EMPTY)
usr << "[desc] The [fitting] has been removed."
user << "[desc] The [fitting] has been removed."
if(LIGHT_BURNED)
usr << "[desc] The [fitting] is burnt out."
user << "[desc] The [fitting] is burnt out."
if(LIGHT_BROKEN)
usr << "[desc] The [fitting] has been smashed."
user << "[desc] The [fitting] has been smashed."
@@ -114,7 +114,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
src.dir = turn(src.dir, 90)
return 1
/obj/structure/particle_accelerator/examine()
/obj/structure/particle_accelerator/examine(mob/user)
switch(src.construction_state)
if(0)
src.desc = text("A [name], looks like it's not attached to the flooring")
@@ -126,8 +126,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
src.desc = text("The [name] is assembled")
if(powered)
src.desc = src.desc_holder
..()
return
..(user)
/obj/structure/particle_accelerator/attackby(obj/item/W, mob/user, params)
if(istool(W))
@@ -311,21 +310,6 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin
/obj/machinery/particle_accelerator/update_icon()
return
/obj/machinery/particle_accelerator/examine()
switch(src.construction_state)
if(0)
src.desc = text("A [name], looks like it's not attached to the flooring")
if(1)
src.desc = text("A [name], it is missing some cables")
if(2)
src.desc = text("A [name], the panel is open")
if(3)
src.desc = text("The [name] is assembled")
if(powered)
src.desc = src.desc_holder
..()
return
/obj/machinery/particle_accelerator/attackby(obj/item/W, mob/user, params)
if(istool(W))
if(src.process_tool_hit(W,user))
+4 -4
View File
@@ -21,12 +21,12 @@
icon_state_off = "switch-up"
/obj/structure/powerswitch/examine()
..()
/obj/structure/powerswitch/examine(mob/user)
..(user)
if(on)
usr << "The switch is in the on position"
user << "The switch is in the on position"
else
usr << "The switch is in the off position"
user << "The switch is in the off position"
/obj/structure/powerswitch/attack_ai(mob/user)
user << "\red You're an AI. This is a manual switch. It's not going to work."