Fixed air alarms & problematic N2O tank

This commit is contained in:
ZomgPonies
2013-10-05 03:23:50 -04:00
parent be8d2f8f99
commit 77567ba6cd
5 changed files with 48 additions and 35 deletions
+6 -6
View File
@@ -1,11 +1,11 @@
// BEGIN_INTERNALS
/*
MAP_ICON_TYPE: 0
WINDOW: icons\mob\head.dmi;icons\mob\monkey.dmi;icons\mob\suit.dmi;icons\obj\clothing\hats.dmi;icons\obj\clothing\suits.dmi
LAST_COMPILE_VERSION: 499.1202
DIR: code code\modules\mob\living\carbon code\WorkInProgress\ZomgPonies icons\obj icons\obj\clothing
FILE: icons\obj\clothing\suits.dmi
LAST_COMPILE_TIME: 1378734876
AUTO_FILE_DIR: OFF
WINDOW: code\game\objects\items\contraband.dm;code\game\objects\items\weapons\extinguisher.dm
LAST_COMPILE_VERSION: 500.1210
DIR: code code\__HELPERS code\ATMOSPHERICS\components code\ATMOSPHERICS\components\unary code\datums\diseases code\datums\diseases\advance code\datums\diseases\advance\symptoms code\defines\obj code\game code\game\gamemodes\changeling code\game\gamemodes\vox code\game\gamemodes\vox\heist code\game\gamemodes\vox\trade code\game\jobs code\game\jobs\job code\game\machinery\computer code\game\mecha\combat code\game\mecha\equipment code\game\mecha\equipment\tools code\game\mecha\equipment\weapons code\game\objects code\game\objects\effects\decals code\game\objects\effects\decals\Cleanable code\game\objects\effects\spawners code\game\objects\items code\game\objects\items\stacks\sheets code\game\objects\items\weapons code\game\objects\items\weapons\implants code\game\objects\items\weapons\melee code\game\objects\items\weapons\storage code\game\objects\storage code\game\objects\structures\stool_bed_chair_nest code\game\turfs\simulated code\modules code\modules\admin\verbs code\modules\clothing\gloves code\modules\clothing\head code\modules\clothing\shoes code\modules\clothing\spacesuits code\modules\clothing\suits code\modules\clothing\under code\modules\customitems code\modules\events code\modules\mob\dead\observer code\modules\mob\living code\modules\mob\living\carbon code\modules\mob\living\carbon\alien code\modules\mob\living\carbon\alien\humanoid code\modules\mob\living\carbon\alien\larva code\modules\mob\living\carbon\alien\special code\modules\mob\living\carbon\brain code\modules\mob\living\carbon\human code\modules\mob\living\carbon\monkey code\modules\mob\living\silicon code\modules\mob\living\silicon\robot code\modules\mob\living\simple_animal code\modules\mob\new_player code\modules\projectiles\ammunition code\modules\projectiles\guns code\modules\projectiles\guns\projectile code\modules\projectiles\projectile code\modules\reagents\reagent_containers code\modules\reagents\reagent_containers\food code\modules\reagents\reagent_containers\food\snacks code\modules\store code\WorkInProgress code\WorkInProgress\Mini code\WorkInProgress\ZomgPonies icons\effects maps
FILE: code\game\objects\items\weapons\extinguisher.dm
LAST_COMPILE_TIME: 1380905897
AUTO_FILE_DIR: ON
*/
// END_INTERNALS
+3
View File
@@ -92,6 +92,9 @@
for(var/obj/machinery/computer/station_alert/a in machines)
a.cancelAlarm("Atmosphere", src, src)
atmosalm = danger_level
for (var/obj/machinery/alarm/AA in src)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted)
AA.update_icon()
return 1
return 0
+23 -19
View File
@@ -108,20 +108,22 @@
var/list/TLV = list()
/obj/machinery/alarm/server/New()
..()
req_access = list(access_rd, access_atmospherics, access_engine_equip)
/obj/machinery/alarm/server
preset = AALARM_PRESET_SERVER
apply_preset(1)
req_access = list(access_rd, access_atmospherics, access_engine_equip)
/obj/machinery/alarm/vox/New()
..()
req_access = list()
/obj/machinery/alarm/vox
preset = AALARM_PRESET_VOX
apply_preset(1)
req_access = list()
/obj/machinery/alarm/proc/apply_preset(var/no_cycle_after=0)
// Propogate settings.
for (var/area/A in alarm_area.related)
for (var/obj/machinery/alarm/AA in A)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.preset != src.preset)
AA.preset=preset
apply_preset(1) // Only this air alarm should send a cycle.
TLV["oxygen"] = list(16, 19, 135, 140) // Partial pressure, kpa
TLV["nitrogen"] = list(-1, -1, -1, -1) // Partial pressure, kpa
@@ -132,8 +134,9 @@
TLV["temperature"] = list(T0C-26, T0C, T0C+40, T0C+66) // K
target_temperature = T0C+20
switch(preset)
if(AALARM_PRESET_VOX) // Same as usual, but without oxygen.
TLV["oxygen"] = list(-1.0, -1.0, 1, 5) // Partial pressure, kpa
if(AALARM_PRESET_VOX) // Same as usual, s/nitrogen/oxygen
TLV["nitrogen"] = list(16, 19, 135, 140) // Vox use same partial pressure values for N2 as humans do for O2.
TLV["oxygen"] = list(-1.0, -1.0, 1, 2) // Under 1 kPa (PP), vox don't notice squat (vox_oxygen_max)
if(AALARM_PRESET_SERVER) // Cold as fuck.
TLV["oxygen"] = list(-1.0, -1.0,-1.0,-1.0) // Partial pressure, kpa
TLV["carbon_dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
@@ -178,6 +181,7 @@
name = "[alarm_area.name] Air Alarm"
// breathable air according to human/Life()
/*
TLV["oxygen"] = list(16, 19, 135, 140) // Partial pressure, kpa
TLV["nitrogen"] = list(-1, -1, -1, -1) // Partial pressure, kpa
TLV["carbon_dioxide"] = list(-1.0, -1.0, 5, 10) // Partial pressure, kpa
@@ -185,6 +189,8 @@
TLV["other"] = list(-1.0, -1.0, 0.5, 1.0) // Partial pressure, kpa
TLV["pressure"] = list(ONE_ATMOSPHERE*0.80,ONE_ATMOSPHERE*0.90,ONE_ATMOSPHERE*1.10,ONE_ATMOSPHERE*1.20) /* kpa */
TLV["temperature"] = list(T0C-26, T0C, T0C+40, T0C+66) // K
*/
apply_preset(1) // Don't cycle.
/obj/machinery/alarm/initialize()
@@ -453,11 +459,6 @@
if (alarm_area.atmosalert(new_danger_level))
post_alert(new_danger_level)
for (var/area/A in alarm_area.related)
for (var/obj/machinery/alarm/AA in A)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
AA.update_icon()
if(danger_level > 1)
air_doors_close(0)
else
@@ -465,6 +466,12 @@
update_icon()
for (var/area/A in alarm_area.related)
for (var/obj/machinery/alarm/AA in A)
if ( !(AA.stat & (NOPOWER|BROKEN)) && !AA.shorted && AA.danger_level != new_danger_level)
AA.danger_level=new_danger_level
AA.update_icon()
/obj/machinery/alarm/proc/post_alert(alert_level)
var/datum/radio_frequency/frequency = radio_controller.return_frequency(alarm_frequency)
if(!frequency)
@@ -686,9 +693,6 @@
return ui_interact(user)
/obj/machinery/alarm/attack_robot(mob/user)
// if(isMoMMI(user) && wiresexposed)
// return interact(user)
// else
return attack_ai(user)
/obj/machinery/alarm/attack_hand(mob/user)
@@ -1302,7 +1306,7 @@ table tr:first-child th:first-child { border: none;}
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
var/min_temperature = max(selected[2] - T0C, MIN_TEMPERATURE)
var/input_temperature = input("What temperature would you like the system to mantain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
var/input_temperature = input("What temperature would you like the system to maintain? (Capped between [min_temperature]C and [max_temperature]C)", "Thermostat Controls") as num|null
if(input_temperature==null)
return
if(!input_temperature || input_temperature > max_temperature || input_temperature < min_temperature)
+4 -6
View File
@@ -74,14 +74,12 @@
/turf/simulated/floor/engine/n20
New()
..()
var/datum/gas_mixture/adding = new
// EXACTLY the same code as fucking roomfillers. If this doesn't work, something's fucked.
var/datum/gas/sleeping_agent/trace_gas = new
trace_gas.moles = 2000
adding.trace_gases += trace_gas
adding.temperature = T20C
assume_air(adding)
air.trace_gases += trace_gas
trace_gas.moles = 9*4000
air.update_values()
/turf/simulated/floor/engine/vacuum
name = "vacuum floor"
+12 -4
View File
@@ -64,15 +64,23 @@ Used In File(s): /code/game/machinery/alarm.dm
<div class="statusLabel">Local Status:</div>
{^{if air.danger.overall == 0}}
{^{if atmos_alarm}}
<div class="average">Caution: Atmos alert in area</div>
<div class="average">Caution: Atmos alert in area
{{else}}
<div class="good">Optimal</div>
<div class="good">Optimal
{{/if}}
{{else air.danger.overall == 1}}
<div class="average">Caution</div>
<div class="average">Caution
{{else}}
<div class="notice">DANGER: Internals Required</div>
<div class="notice">DANGER: Internals Required
{{/if}}
{^{if !locked}}
{^{if atmos_alarm}}
{^{:~link('Reset Alarm',null,{'atmos_reset':1},null,'linkOn')}}
{{else}}
{^{:~link('Activate Alarm',null,{'atmos_alarm':1},null,'red')}}
{{/if}}
{{/if}}
</div>
</div>
<div class="line">
<!--