mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
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:
@@ -116,18 +116,16 @@
|
||||
SetOwnerInfo(H)
|
||||
|
||||
/obj/item/weapon/card/id/examine(mob/user)
|
||||
set src in oview(1)
|
||||
if(in_range(usr, src))
|
||||
if(..(user, 1))
|
||||
show(usr)
|
||||
usr << desc
|
||||
else
|
||||
usr << "<span class='warning'>It is too far away.</span>"
|
||||
user << "<span class='warning'>It is too far away.</span>"
|
||||
|
||||
/obj/item/weapon/card/id/proc/show(mob/user as mob)
|
||||
if(user.client) // Send the stamp images to the client
|
||||
var/datum/asset/simple/S = new/datum/asset/simple/paper()
|
||||
send_asset_list(user.client, S.assets)
|
||||
|
||||
send_asset_list(user.client, S.assets)
|
||||
|
||||
if(!front)
|
||||
front = new(photo, dir = SOUTH)
|
||||
if(!side)
|
||||
@@ -177,7 +175,7 @@
|
||||
|
||||
/obj/item/weapon/card/id/GetID()
|
||||
return src
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/proc/is_untrackable()
|
||||
return untrackable
|
||||
|
||||
@@ -222,15 +220,15 @@
|
||||
origin_tech = "syndicate=3"
|
||||
var/registered_user = null
|
||||
untrackable = 1
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/New()
|
||||
access = initial_access.Copy()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/vox
|
||||
name = "agent card"
|
||||
initial_access = list(access_maint_tunnels, access_vox, access_external_airlocks)
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/syndicate/afterattack(var/obj/item/weapon/O as obj, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
@@ -476,7 +474,7 @@
|
||||
/obj/item/weapon/card/id/centcom/New()
|
||||
access = get_all_centcom_access()
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/card/id/nanotrasen
|
||||
name = "nanotrasen ID card"
|
||||
icon_state = "nanotrasen"
|
||||
|
||||
@@ -32,12 +32,12 @@ var/global/list/moneytypes=list(
|
||||
amount = new_amount
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/spacecash/examine()
|
||||
/obj/item/weapon/spacecash/examine(mob/user)
|
||||
if(amount>1)
|
||||
usr << "\icon[src] This is a stack of [amount] [src]s."
|
||||
user << "\icon[src] This is a stack of [amount] [src]s."
|
||||
else
|
||||
usr << "\icon[src] This is \a [src]s."
|
||||
usr << "It's worth [worth*amount] credits."
|
||||
user << "\icon[src] This is \a [src]s."
|
||||
user << "It's worth [worth*amount] credits."
|
||||
|
||||
/obj/item/weapon/spacecash/update_icon()
|
||||
icon_state = "cash[worth]"
|
||||
@@ -60,12 +60,12 @@ var/global/list/moneytypes=list(
|
||||
icon_state = "cash10"
|
||||
worth = 10
|
||||
stack_color = "#663200"
|
||||
|
||||
|
||||
/obj/item/weapon/spacecash/c20
|
||||
icon_state = "cash10"
|
||||
worth = 20
|
||||
stack_color = "#663200"
|
||||
|
||||
|
||||
/obj/item/weapon/spacecash/c50
|
||||
icon_state = "cash10"
|
||||
worth = 50
|
||||
@@ -75,7 +75,7 @@ var/global/list/moneytypes=list(
|
||||
icon_state = "cash100"
|
||||
worth = 100
|
||||
stack_color = "#663200"
|
||||
|
||||
|
||||
/obj/item/weapon/spacecash/c200
|
||||
icon_state = "cash100"
|
||||
worth = 200
|
||||
|
||||
@@ -402,6 +402,6 @@ obj/item/weapon/rollingpaperpack/attack_self(mob/user)
|
||||
M.unEquip(src)
|
||||
M.put_in_l_hand(src)
|
||||
|
||||
/obj/item/weapon/rollingpaperpack/examine()
|
||||
..()
|
||||
usr << "There are [src.papers] left"
|
||||
/obj/item/weapon/rollingpaperpack/examine(mob/user)
|
||||
..(user)
|
||||
user << "There are [src.papers] left"
|
||||
|
||||
@@ -35,15 +35,13 @@
|
||||
max_water = 30
|
||||
sprite_name = "miniFE"
|
||||
|
||||
/obj/item/weapon/extinguisher/examine()
|
||||
set src in usr
|
||||
/obj/item/weapon/extinguisher/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
usr << "\icon[src] [src.name] contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
user << "\blue [R.volume] units of [R.name]"
|
||||
|
||||
usr << "\icon[src] [src.name] contains:"
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
usr << "\blue [R.volume] units of [R.name]"
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/extinguisher/New()
|
||||
create_reagents(max_water)
|
||||
|
||||
@@ -28,8 +28,9 @@
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/examine(mob/user)
|
||||
..(user)
|
||||
display_timer = (stage == READY && !nadeassembly) //show/hide the timer based on assembly state
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/chem_grenade/proc/get_trigger()
|
||||
@@ -257,7 +258,7 @@
|
||||
|
||||
if(!has_reagents)
|
||||
playsound(loc, 'sound/items/Screwdriver2.ogg', 50, 1)
|
||||
return
|
||||
return
|
||||
|
||||
if(nadeassembly)
|
||||
var/mob/M = get_mob_by_ckey(assemblyattacher)
|
||||
|
||||
@@ -126,5 +126,5 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/grenade/iedcasing/examine(mob/user)
|
||||
..()
|
||||
..(user)
|
||||
user << "You can't tell when it will explode!"
|
||||
|
||||
@@ -46,13 +46,13 @@
|
||||
return*/
|
||||
|
||||
|
||||
/obj/item/weapon/grenade/examine()
|
||||
..()
|
||||
/obj/item/weapon/grenade/examine(mob/user)
|
||||
..(user)
|
||||
if(display_timer)
|
||||
if(det_time > 1)
|
||||
usr << "The timer is set to [det_time/10] second\s."
|
||||
user << "The timer is set to [det_time/10] second\s."
|
||||
else
|
||||
usr << "\The [src] is set for instant detonation."
|
||||
user << "\The [src] is set for instant detonation."
|
||||
|
||||
/obj/item/weapon/grenade/attack_self(mob/user as mob)
|
||||
if(!active)
|
||||
|
||||
@@ -24,17 +24,16 @@
|
||||
src.icon_state = "[src.icon_type]box[total_contents]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/storage/fancy/examine()
|
||||
set src in oview(1)
|
||||
/obj/item/weapon/storage/fancy/examine(mob/user)
|
||||
if(!..(user, 1))
|
||||
return
|
||||
|
||||
if(contents.len <= 0)
|
||||
usr << "There are no [src.icon_type]s left in the box."
|
||||
user << "There are no [src.icon_type]s left in the box."
|
||||
else if(contents.len == 1)
|
||||
usr << "There is one [src.icon_type] left in the box."
|
||||
user << "There is one [src.icon_type] left in the box."
|
||||
else
|
||||
usr << "There are [src.contents.len] [src.icon_type]s in the box."
|
||||
|
||||
return
|
||||
user << "There are [src.contents.len] [src.icon_type]s in the box."
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -27,10 +27,9 @@
|
||||
max_w_class = 2
|
||||
max_combined_w_class = 14
|
||||
|
||||
examine()
|
||||
set src in oview(1)
|
||||
..()
|
||||
usr << text("The service panel is [src.open ? "open" : "closed"].")
|
||||
examine(mob/user)
|
||||
if(..(user, 1))
|
||||
user << text("The service panel is [src.open ? "open" : "closed"].")
|
||||
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(locked)
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
icon_state = "[initial(icon_state)]"
|
||||
|
||||
/obj/item/weapon/melee/baton/examine(mob/user)
|
||||
..()
|
||||
..(user)
|
||||
if(bcell)
|
||||
user <<"<span class='notice'>The baton is [round(bcell.percent())]% charged.</span>"
|
||||
if(!bcell)
|
||||
|
||||
@@ -13,63 +13,63 @@
|
||||
var/volume_rate = 500 //Needed for borg jetpack transfer
|
||||
action_button_name = "Toggle Jetpack"
|
||||
|
||||
New()
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
/obj/item/weapon/tank/jetpack/New()
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/examine(mob/user)
|
||||
if(!..(user, 0))
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
return
|
||||
if(air_contents.oxygen < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
|
||||
verb/toggle_rockets()
|
||||
set name = "Toggle Jetpack Stabilization"
|
||||
set category = "Object"
|
||||
src.stabilization_on = !( src.stabilization_on )
|
||||
usr << "You toggle the stabilization [stabilization_on? "on":"off"]."
|
||||
return
|
||||
/obj/item/weapon/tank/jetpack/verb/toggle_rockets()
|
||||
set name = "Toggle Jetpack Stabilization"
|
||||
set category = "Object"
|
||||
src.stabilization_on = !( src.stabilization_on )
|
||||
usr << "You toggle the stabilization [stabilization_on? "on":"off"]."
|
||||
return
|
||||
|
||||
|
||||
verb/toggle()
|
||||
set name = "Toggle Jetpack"
|
||||
set category = "Object"
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "[icon_state]-on"
|
||||
/obj/item/weapon/tank/jetpack/verb/toggle()
|
||||
set name = "Toggle Jetpack"
|
||||
set category = "Object"
|
||||
on = !on
|
||||
if(on)
|
||||
icon_state = "[icon_state]-on"
|
||||
// item_state = "[item_state]-on"
|
||||
ion_trail.start()
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
ion_trail.start()
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
// item_state = initial(item_state)
|
||||
ion_trail.stop()
|
||||
return
|
||||
ion_trail.stop()
|
||||
return
|
||||
|
||||
|
||||
proc/allow_thrust(num, mob/living/user as mob)
|
||||
if(!(src.on))
|
||||
return 0
|
||||
if((num < 0.005 || src.air_contents.total_moles() < num))
|
||||
src.ion_trail.stop()
|
||||
return 0
|
||||
/obj/item/weapon/tank/jetpack/proc/allow_thrust(num, mob/living/user as mob)
|
||||
if(!(src.on))
|
||||
return 0
|
||||
if((num < 0.005 || src.air_contents.total_moles() < num))
|
||||
src.ion_trail.stop()
|
||||
return 0
|
||||
|
||||
var/datum/gas_mixture/G = src.air_contents.remove(num)
|
||||
var/datum/gas_mixture/G = src.air_contents.remove(num)
|
||||
|
||||
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
|
||||
if(allgases >= 0.005)
|
||||
return 1
|
||||
var/allgases = G.carbon_dioxide + G.nitrogen + G.oxygen + G.toxins //fuck trace gases -Pete
|
||||
if(allgases >= 0.005)
|
||||
return 1
|
||||
|
||||
qdel(G)
|
||||
return
|
||||
qdel(G)
|
||||
return
|
||||
|
||||
ui_action_click()
|
||||
toggle()
|
||||
/obj/item/weapon/tank/jetpack/ui_action_click()
|
||||
toggle()
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/void
|
||||
@@ -78,9 +78,9 @@
|
||||
icon_state = "jetpack-void"
|
||||
item_state = "jetpack-void"
|
||||
|
||||
New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
/obj/item/weapon/tank/jetpack/void/New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen
|
||||
@@ -89,9 +89,9 @@
|
||||
icon_state = "jetpack"
|
||||
item_state = "jetpack"
|
||||
|
||||
New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
/obj/item/weapon/tank/jetpack/oxygen/New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/harness
|
||||
name = "jet harness (oxygen)"
|
||||
@@ -108,9 +108,9 @@
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
|
||||
New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
/obj/item/weapon/tank/jetpack/oxygenblack/New()
|
||||
..()
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
name = "Jetpack (Carbon Dioxide)"
|
||||
@@ -119,16 +119,16 @@
|
||||
icon_state = "jetpack-black"
|
||||
item_state = "jetpack-black"
|
||||
|
||||
New()
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/New()
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.carbon_dioxide < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide/examine(mob/user)
|
||||
if(!..(0))
|
||||
return
|
||||
|
||||
if(air_contents.carbon_dioxide < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
playsound(user, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
@@ -23,12 +23,11 @@
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(air_contents.oxygen < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/oxygen/yellow
|
||||
@@ -69,12 +68,11 @@
|
||||
icon_state = "oxygen"
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 1 && loc==usr)
|
||||
usr << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
|
||||
usr << sound('sound/effects/alert.ogg')
|
||||
examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(air_contents.oxygen < 1 && loc==usr)
|
||||
user << "\red <B>The meter on the [src.name] indicates you are almost out of air!</B>"
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/air/New()
|
||||
..()
|
||||
@@ -122,12 +120,11 @@
|
||||
icon_state = "plasma_fr"
|
||||
distribute_pressure = ONE_ATMOSPHERE*O2STANDARD
|
||||
|
||||
/obj/item/weapon/tank/plasma/plasmaman/examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.toxins < 0.2 && loc==usr)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of plasma!</B>")
|
||||
usr << sound('sound/effects/alert.ogg')
|
||||
/obj/item/weapon/tank/plasma/plasmaman/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(air_contents.toxins < 0.2 && loc==usr)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of plasma!</B>")
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/*
|
||||
* Emergency Oxygen
|
||||
@@ -150,12 +147,11 @@
|
||||
return
|
||||
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.oxygen < 0.2 && loc==usr)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
usr << sound('sound/effects/alert.ogg')
|
||||
examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(air_contents.oxygen < 0.2 && loc==usr)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
user << sound('sound/effects/alert.ogg')
|
||||
|
||||
/obj/item/weapon/tank/emergency_oxygen/engi
|
||||
name = "extended-capacity emergency oxygen tank"
|
||||
@@ -192,12 +188,11 @@
|
||||
src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/nitrogen/examine()
|
||||
set src in usr
|
||||
..()
|
||||
if(air_contents.nitrogen < 10)
|
||||
usr << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
/obj/item/weapon/tank/nitrogen/examine(mob/user)
|
||||
if(..(user, 0))
|
||||
if(air_contents.nitrogen < 10)
|
||||
user << text("\red <B>The meter on the [src.name] indicates you are almost out of air!</B>")
|
||||
//playsound(usr, 'sound/effects/alert.ogg', 50, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/emergency_oxygen/vox
|
||||
|
||||
@@ -39,12 +39,12 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/tank/examine()
|
||||
/obj/item/weapon/tank/examine(mob/user)
|
||||
var/obj/icon = src
|
||||
if (istype(src.loc, /obj/item/assembly))
|
||||
icon = src.loc
|
||||
if (!in_range(src, usr))
|
||||
if (icon == src) usr << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
|
||||
if (!in_range(src, user))
|
||||
if (icon == src) user << "\blue It's \a \icon[icon][src]! If you want any more information you'll need to get closer."
|
||||
return
|
||||
|
||||
var/celsius_temperature = src.air_contents.temperature-T0C
|
||||
@@ -63,7 +63,7 @@
|
||||
else
|
||||
descriptive = "furiously hot"
|
||||
|
||||
usr << "\blue \The \icon[icon][src] feels [descriptive]"
|
||||
user << "\blue \The \icon[icon][src] feels [descriptive]"
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -166,10 +166,10 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/examine()
|
||||
set src in usr
|
||||
usr << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||
return
|
||||
/obj/item/weapon/weldingtool/examine(mob/user)
|
||||
if(!..(user, 0))
|
||||
user << text("\icon[] [] contains []/[] units of fuel!", src, src.name, get_fuel(),src.max_fuel )
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/weldingtool/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
charges = amt
|
||||
|
||||
/obj/item/weapon/vending_refill/examine(mob/user)
|
||||
..()
|
||||
..(user)
|
||||
if(charges)
|
||||
user << "It can restock [charges] item(s)."
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user