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 -3
View File
@@ -31,9 +31,9 @@
last_regen = world.time
update_icon()
/obj/item/weapon/gun/launcher/spikethrower/examine()
..()
usr << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining."
/obj/item/weapon/gun/launcher/spikethrower/examine(mob/user)
..(user)
user << "It has [spikes] [spikes == 1 ? "spike" : "spikes"] remaining."
/obj/item/weapon/gun/launcher/spikethrower/update_icon()
icon_state = "spikethrower[spikes]"
+4 -5
View File
@@ -76,8 +76,7 @@
..()
return
examine()
set src in view(1)
..()
if(!power_supply)
usr <<"<span class='warning'>The weapon does not have a power source installed.</span>" */
examine(mob/user)
if(..(user, 1))
if(!power_supply)
usr <<"<span class='warning'>The weapon does not have a power source installed.</span>" */
@@ -313,7 +313,7 @@ modules/mob/living/carbon/human/life.dm if you die, you will be zoomed out.
can_charge = 0
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
..()
..(user)
if(power_supply)
user <<"<span class='notice'>[src] is [round(power_supply.percent())]% charged.</span>"
+3 -4
View File
@@ -25,10 +25,9 @@
max_charges = Ceiling(max_charges / 2)
..()
/obj/item/weapon/gun/magic/wand/examine()
..()
usr << "Has [charges] charge\s remaining."
return
/obj/item/weapon/gun/magic/wand/examine(mob/user)
..(user)
user << "Has [charges] charge\s remaining."
/obj/item/weapon/gun/magic/wand/attack_self(mob/living/user as mob)
if(charges)
+3 -4
View File
@@ -126,10 +126,9 @@
update_icon()
return
/obj/item/weapon/gun/projectile/examine()
..()
usr << "Has [get_ammo()] round\s remaining."
return
/obj/item/weapon/gun/projectile/examine(mob/user)
..(user)
user << "Has [get_ammo()] round\s remaining."
/obj/item/weapon/gun/projectile/proc/get_ammo(var/countchambered = 1)
var/boolets = 0 //mature var names for mature people
@@ -246,14 +246,14 @@
/obj/item/weapon/crossbowframe/update_icon()
icon_state = "crossbowframe[buildstate]"
/obj/item/weapon/crossbowframe/examine()
..()
/obj/item/weapon/crossbowframe/examine(mob/user)
..(user)
switch(buildstate)
if(1) usr << "It has a loose rod frame in place."
if(2) usr << "It has a steel backbone welded in place."
if(3) usr << "It has a steel backbone and a cell mount installed."
if(4) usr << "It has a steel backbone, plastic lath and a cell mount installed."
if(5) usr << "It has a steel cable loosely strung across the lath."
if(1) user << "It has a loose rod frame in place."
if(2) user << "It has a steel backbone welded in place."
if(3) user << "It has a steel backbone and a cell mount installed."
if(4) user << "It has a steel backbone, plastic lath and a cell mount installed."
if(5) user << "It has a steel cable loosely strung across the lath."
/obj/item/weapon/crossbowframe/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/stack/rods))
@@ -96,15 +96,13 @@
in_chamber = contents[1]
return !isnull(in_chamber)
/obj/item/weapon/gun/launcher/pneumatic/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "The valve is dialed to [pressure_setting]%."
if(tank)
usr << "The tank dial reads [tank.air_contents.return_pressure()] kPa."
else
usr << "Nothing is attached to the tank valve!"
/obj/item/weapon/gun/launcher/pneumatic/examine(mob/user)
if(..(user, 2))
user << "The valve is dialed to [pressure_setting]%."
if(tank)
user << "The tank dial reads [tank.air_contents.return_pressure()] kPa."
else
user << "Nothing is attached to the tank valve!"
/obj/item/weapon/gun/launcher/pneumatic/special_check(user)
@@ -145,14 +143,14 @@
/obj/item/weapon/cannonframe/update_icon()
icon_state = "pneumatic[buildstate]"
/obj/item/weapon/cannonframe/examine()
..()
/obj/item/weapon/cannonframe/examine(mob/user)
..(user)
switch(buildstate)
if(1) usr << "It has a pipe segment installed."
if(2) usr << "It has a pipe segment welded in place."
if(3) usr << "It has an outer chassis installed."
if(4) usr << "It has an outer chassis welded in place."
if(5) usr << "It has a transfer valve installed."
if(1) user << "It has a pipe segment installed."
if(2) user << "It has a pipe segment welded in place."
if(3) user << "It has an outer chassis installed."
if(4) user << "It has an outer chassis welded in place."
if(5) user << "It has a transfer valve installed."
/obj/item/weapon/cannonframe/attackby(obj/item/W as obj, mob/user as mob, params)
if(istype(W,/obj/item/pipe))
@@ -60,9 +60,9 @@
boolets += magazine.ammo_count(countempties)
return boolets
/obj/item/weapon/gun/projectile/revolver/examine()
..()
usr << "[get_ammo(0,0)] of those are live rounds."
/obj/item/weapon/gun/projectile/revolver/examine(mob/user)
..(user)
user << "[get_ammo(0,0)] of those are live rounds."
/obj/item/weapon/gun/projectile/revolver/detective
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
@@ -16,11 +16,9 @@
var/max_rockets = 1
var/list/rockets = new/list()
/obj/item/weapon/gun/rocketlauncher/examine()
set src in view()
..()
if (!(usr in view(2)) && usr!=src.loc) return
usr << "\blue [rockets.len] / [max_rockets] rockets."
/obj/item/weapon/gun/rocketlauncher/examine(mob/user)
if(..(user, 2))
user << "\blue [rockets.len] / [max_rockets] rockets."
/obj/item/weapon/gun/rocketlauncher/attackby(obj/item/I as obj, mob/user as mob, params)
if(istype(I, /obj/item/ammo_casing/rocket))
@@ -69,10 +69,10 @@
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
chambered = AC
/obj/item/weapon/gun/projectile/shotgun/examine()
..()
/obj/item/weapon/gun/projectile/shotgun/examine(mob/user)
..(user)
if (chambered)
usr << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
// COMBAT SHOTGUN //
@@ -130,7 +130,7 @@
. = ..()
/obj/item/weapon/gun/projectile/shotgun/boltaction/examine(mob/user)
..()
..(user)
user << "The bolt is [bolt_open ? "open" : "closed"]."
/////////////////////////////