REVERT GAS DATUMS UNTIL COMIC FIXES THE PERFORMANCE ISSUES: PLEASE WORK ON THE GASDATUMS BRANCH https://github.com/d3athrow/vgstation13/tree/gasdatums in the mean time.

This commit is contained in:
D3athrow
2015-05-10 22:09:18 -05:00
parent 4a7106215c
commit 9c21244617
173 changed files with 3439 additions and 2786 deletions

View File

@@ -35,8 +35,6 @@
var/mob/canclone = null
incorporeal_move = 1
var/obj/item/device/analyzer/analyzer //for gas scanning
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
@@ -574,9 +572,44 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
var/datum/gas_mixture/environment = usr.loc.return_air()
if(!analyzer)
analyzer = new(usr)
usr << analyzer.output_gas_scan(environment, usr.loc, 1)
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
src << "<span class='notice'><B>Results:</B></span>"
if(abs(pressure - ONE_ATMOSPHERE) < 10)
src << "<span class='notice'>Pressure: [round(pressure,0.1)] kPa</span>"
else
src << "<span class='warning'>Pressure: [round(pressure,0.1)] kPa</span>"
if(total_moles)
var/o2_concentration = environment.oxygen/total_moles
var/n2_concentration = environment.nitrogen/total_moles
var/co2_concentration = environment.carbon_dioxide/total_moles
var/plasma_concentration = environment.toxins/total_moles
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
if(abs(n2_concentration - N2STANDARD) < 20)
src << "<span class='notice'>Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)</span>"
else
src << "<span class='warning'>Nitrogen: [round(n2_concentration*100)]% ([round(environment.nitrogen,0.01)] moles)</span>"
if(abs(o2_concentration - O2STANDARD) < 2)
src << "<span class='notice'>Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)</span>"
else
src << "<span class='warning'>Oxygen: [round(o2_concentration*100)]% ([round(environment.oxygen,0.01)] moles)</span>"
if(co2_concentration > 0.01)
src << "<span class='warning'>CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)</span>"
else
src << "<span class='notice'>CO2: [round(co2_concentration*100)]% ([round(environment.carbon_dioxide,0.01)] moles)</span>"
if(plasma_concentration > 0.01)
src << "<span class='warning'>Plasma: [round(plasma_concentration*100)]% ([round(environment.toxins,0.01)] moles)</span>"
if(unknown_concentration > 0.01)
src << "<span class='warning'>Unknown: [round(unknown_concentration*100)]% ([round(unknown_concentration*total_moles,0.01)] moles)</span>"
src << "<span class='notice'>Temperature: [round(environment.temperature-T0C,0.1)]&deg;C</span>"
src << "<span class='notice'>Heat Capacity: [round(environment.heat_capacity(),0.1)]</span>"
/mob/dead/observer/verb/toggle_darkness()
@@ -755,20 +788,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
// host.ckey = src.ckey
// //host << "<span class='info'>You are now a mouse. Try to avoid interaction with players, and do not give hints away that you are more than a simple rodent.</span>"
/mob/dead/observer/verb/find_arena()
set category = "Ghost"
set name = "Search For Arenas"
set desc = "Try to find an Arena to polish your robust bomb placement skills.."
if(!arenas.len)
usr << "There are no arenas in the world! Ask the admins to spawn one."
return
var/datum/bomberman_arena/arena_target = input("Which arena do you wish to reach?", "Arena Search Panel") in arenas
usr << "Reached [arena_target]"
usr.loc = arena_target.center
//BEGIN TELEPORT HREF CODE
/mob/dead/observer/Topic(href, href_list)
if(usr != src)
@@ -817,15 +836,6 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
return
loc = T
following = null
if(href_list["jumptoarenacood"])
var/x = text2num(href_list["X"])
var/y = text2num(href_list["Y"])
var/z = text2num(href_list["Z"])
var/client/C = usr.client
sleep(2)
C.jumptocoord(x,y,z)
..()
//END TELEPORT HREF CODE

View File

@@ -77,4 +77,4 @@ var/global/list/boo_phrases_silicon=list(
A:spookymode=1
if(istype(A, /obj/machinery/ai_status_display))
A:spookymode=1
A:spookymode=1