mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 07:27:57 +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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user