mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-09 06:04:23 +01:00
Merge remote-tracking branch 'upstream/master' into ContextBasedGrab
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
@@ -148,6 +148,7 @@
|
||||
var/datum/gas_mixture/removed = air_contents.remove(transfer_moles)
|
||||
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
@@ -168,6 +169,7 @@
|
||||
return
|
||||
|
||||
air_contents.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
@@ -178,6 +178,7 @@
|
||||
air_contents.merge(filtered_out)
|
||||
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
@@ -191,6 +192,7 @@
|
||||
var/datum/gas_mixture/removed = loc.remove_air(transfer_moles)
|
||||
|
||||
air_contents.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
@@ -135,8 +135,6 @@ datum/pipe_network
|
||||
gas.trace_gases += corresponding
|
||||
|
||||
corresponding.moles = trace_gas.moles*gas.volume/air_transient.volume
|
||||
gas.update_values()
|
||||
air_transient.update_values()
|
||||
return 1
|
||||
|
||||
proc/equalize_gases(datum/gas_mixture/list/gases)
|
||||
@@ -199,6 +197,5 @@ proc/equalize_gases(datum/gas_mixture/list/gases)
|
||||
gas.trace_gases += corresponding
|
||||
|
||||
corresponding.moles = trace_gas.moles*gas.volume/total_volume
|
||||
gas.update_values()
|
||||
|
||||
return 1
|
||||
@@ -52,7 +52,6 @@ datum/pipeline
|
||||
member.air_temporary.trace_gases += corresponding
|
||||
|
||||
corresponding.moles = trace_gas.moles*member.volume/air.volume
|
||||
member.air_temporary.update_values()
|
||||
|
||||
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
|
||||
air = new
|
||||
@@ -130,27 +129,16 @@ datum/pipeline
|
||||
var/datum/gas_mixture/air_sample = air.remove_ratio(mingle_volume/air.volume)
|
||||
air_sample.volume = mingle_volume
|
||||
|
||||
if(istype(target) && target.zone)
|
||||
//Have to consider preservation of group statuses
|
||||
var/datum/gas_mixture/turf_copy = new
|
||||
var/datum/gas_mixture/turf_air = target.return_air()
|
||||
|
||||
turf_copy.copy_from(target.zone.air)
|
||||
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
||||
|
||||
equalize_gases(list(air_sample, turf_copy))
|
||||
air.merge(air_sample)
|
||||
|
||||
turf_copy.subtract(target.zone.air)
|
||||
|
||||
target.zone.air.merge(turf_copy)
|
||||
|
||||
else
|
||||
var/datum/gas_mixture/turf_air = target.return_air()
|
||||
|
||||
equalize_gases(list(air_sample, turf_air))
|
||||
air.merge(air_sample)
|
||||
//turf_air already modified by equalize_gases()
|
||||
equalize_gases(list(air_sample, turf_air))
|
||||
air.merge(air_sample)
|
||||
//turf_air already modified by equalize_gases()
|
||||
|
||||
if(istype(target))
|
||||
if(target.air)
|
||||
if(target.air.check_tile_graphic())
|
||||
target.update_visuals(target.air)
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
@@ -176,12 +164,8 @@ datum/pipeline
|
||||
var/delta_temperature = 0
|
||||
var/sharer_heat_capacity = 0
|
||||
|
||||
if(modeled_location.zone)
|
||||
delta_temperature = (air.temperature - modeled_location.zone.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.zone.air.heat_capacity()
|
||||
else
|
||||
delta_temperature = (air.temperature - modeled_location.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.air.heat_capacity()
|
||||
delta_temperature = (air.temperature - modeled_location.air.temperature)
|
||||
sharer_heat_capacity = modeled_location.air.heat_capacity()
|
||||
|
||||
var/self_temperature_delta = 0
|
||||
var/sharer_temperature_delta = 0
|
||||
@@ -197,10 +181,7 @@ datum/pipeline
|
||||
|
||||
air.temperature += self_temperature_delta
|
||||
|
||||
if(modeled_location.zone)
|
||||
modeled_location.zone.air.temperature += sharer_temperature_delta/modeled_location.zone.air.group_multiplier
|
||||
else
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
modeled_location.air.temperature += sharer_temperature_delta
|
||||
|
||||
|
||||
else
|
||||
@@ -211,12 +192,5 @@ datum/pipeline
|
||||
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
||||
|
||||
air.temperature -= heat/total_heat_capacity
|
||||
if(network)
|
||||
network.update = 1
|
||||
|
||||
proc/radiate_heat(surface, thermal_conductivity)
|
||||
var/total_heat_capacity = air.heat_capacity()
|
||||
var/heat = STEFAN_BOLTZMANN_CONSTANT * surface * air.temperature ** 4 * thermal_conductivity
|
||||
air.temperature = max(0, air.temperature - heat / total_heat_capacity)
|
||||
if(network)
|
||||
network.update = 1
|
||||
@@ -21,11 +21,12 @@
|
||||
else
|
||||
var/datum/gas_mixture/environment = loc.return_air()
|
||||
environment_temperature = environment.temperature
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||
else
|
||||
parent.radiate_heat(surface, 1)
|
||||
environment_temperature = loc:temperature
|
||||
var/datum/gas_mixture/pipe_air = return_air()
|
||||
if(abs(environment_temperature-pipe_air.temperature) > minimum_temperature_difference)
|
||||
parent.temperature_interact(loc, volume, thermal_conductivity)
|
||||
|
||||
|
||||
|
||||
// BubbleWrap
|
||||
|
||||
@@ -1,645 +0,0 @@
|
||||
#define DEBUG
|
||||
|
||||
datum/air_group/var/marker
|
||||
datum/air_group/var/debugging = 0
|
||||
datum/pipe_network/var/marker
|
||||
|
||||
datum/gas_mixture
|
||||
var/turf/parent
|
||||
|
||||
/*
|
||||
turf/simulated
|
||||
New()
|
||||
..()
|
||||
|
||||
if(air)
|
||||
air.parent = src
|
||||
*/
|
||||
obj/machinery/door
|
||||
verb
|
||||
toggle_door()
|
||||
set src in world
|
||||
if(density)
|
||||
open()
|
||||
else
|
||||
close()
|
||||
|
||||
turf/space
|
||||
verb
|
||||
create_floor()
|
||||
set src in world
|
||||
new /turf/simulated/floor(src)
|
||||
|
||||
create_meteor(direction as num)
|
||||
set src in world
|
||||
|
||||
var/obj/effect/meteor/M = new( src )
|
||||
walk(M, direction,10)
|
||||
|
||||
|
||||
turf/simulated/wall
|
||||
verb
|
||||
create_floor()
|
||||
set src in world
|
||||
new /turf/simulated/floor(src)
|
||||
|
||||
obj/item/weapon/tank
|
||||
verb
|
||||
adjust_mixture(temperature as num, target_toxin_pressure as num, target_oxygen_pressure as num)
|
||||
set src in world
|
||||
if(!air_contents)
|
||||
usr << "\red ERROR: no gas_mixture associated with this tank"
|
||||
return null
|
||||
|
||||
air_contents.temperature = temperature
|
||||
air_contents.oxygen = target_oxygen_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.toxins = target_toxin_pressure*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
|
||||
turf/simulated/floor
|
||||
verb
|
||||
parent_info()
|
||||
set src in world
|
||||
if(parent)
|
||||
usr << "<B>[x],[y] parent:</B> Processing: [parent.group_processing]"
|
||||
if(parent.members)
|
||||
usr << "Members: [parent.members.len]"
|
||||
else
|
||||
usr << "Members: None?"
|
||||
if(parent.borders)
|
||||
usr << "Borders: [parent.borders.len]"
|
||||
else
|
||||
usr << "Borders: None"
|
||||
if(parent.length_space_border)
|
||||
usr << "Space Borders: [parent.space_borders.len], Space Length: [parent.length_space_border]"
|
||||
else
|
||||
usr << "Space Borders: None"
|
||||
else
|
||||
usr << "\blue [x],[y] has no parent air group."
|
||||
|
||||
verb
|
||||
create_wall()
|
||||
set src in world
|
||||
new /turf/simulated/wall(src)
|
||||
verb
|
||||
adjust_mixture(temp as num, tox as num, oxy as num)
|
||||
set src in world
|
||||
var/datum/gas_mixture/stuff = return_air()
|
||||
stuff.temperature = temp
|
||||
stuff.toxins = tox
|
||||
stuff.oxygen = oxy
|
||||
|
||||
verb
|
||||
boom(inner_range as num, middle_range as num, outer_range as num)
|
||||
set src in world
|
||||
explosion(src,inner_range,middle_range,outer_range,outer_range)
|
||||
|
||||
verb
|
||||
flag_parent()
|
||||
set src in world
|
||||
if(parent)
|
||||
parent.debugging = !parent.debugging
|
||||
usr << "[parent.members.len] set to [parent.debugging]"
|
||||
verb
|
||||
small_explosion()
|
||||
set src in world
|
||||
explosion(src, 1, 2, 3, 3)
|
||||
|
||||
verb
|
||||
large_explosion()
|
||||
set src in world
|
||||
explosion(src, 3, 5, 7, 5)
|
||||
|
||||
obj/machinery/portable_atmospherics/canister
|
||||
verb/test_release()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
valve_open = 1
|
||||
release_pressure = 1000
|
||||
/*
|
||||
obj/machinery/atmospherics
|
||||
unary
|
||||
heat_reservoir
|
||||
verb
|
||||
toggle_power()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
adjust_temp(temp as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
current_temperature = temp
|
||||
cold_sink
|
||||
verb
|
||||
toggle_power()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
adjust_temp(temp as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
current_temperature = temp
|
||||
vent_pump
|
||||
verb
|
||||
toggle_power()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
|
||||
toggle_direction()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
pump_direction = !pump_direction
|
||||
|
||||
update_icon()
|
||||
|
||||
change_pressure_parameters()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
usr << "current settings: PC=[pressure_checks], EB=[external_pressure_bound], IB=[internal_pressure_bound]"
|
||||
|
||||
var/mode = input(usr, "Select an option:") in list("Bound External", "Bound Internal", "Bound Both")
|
||||
|
||||
switch(mode)
|
||||
if("Bound External")
|
||||
pressure_checks = 1
|
||||
external_pressure_bound = input(usr, "External Pressure Bound?") as num
|
||||
if("Bound Internal")
|
||||
pressure_checks = 2
|
||||
internal_pressure_bound = input(usr, "Internal Pressure Bound?") as num
|
||||
else
|
||||
pressure_checks = 3
|
||||
external_pressure_bound = input(usr, "External Pressure Bound?") as num
|
||||
internal_pressure_bound = input(usr, "Internal Pressure Bound?") as num
|
||||
|
||||
outlet_injector
|
||||
verb
|
||||
toggle_power()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
verb
|
||||
trigger_inject()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
inject()
|
||||
|
||||
vent_scrubber
|
||||
verb
|
||||
toggle_power()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
|
||||
toggle_scrubbing()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
scrubbing = !scrubbing
|
||||
|
||||
update_icon()
|
||||
|
||||
change_rate(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
volume_rate = amount
|
||||
|
||||
mixer
|
||||
verb
|
||||
toggle()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
|
||||
change_pressure(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
target_pressure = amount
|
||||
|
||||
change_ratios()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
if(node_in1)
|
||||
var/node_ratio = input(usr, "Node 1 Ratio? ([dir2text(get_dir(src, node_in1))])") as num
|
||||
node_ratio = min(max(0,node_ratio),1)
|
||||
|
||||
node1_concentration = node_ratio
|
||||
node2_concentration = 1-node_ratio
|
||||
else
|
||||
node2_concentration = 1
|
||||
node1_concentration = 0
|
||||
|
||||
usr << "Node 1: [node1_concentration], Node 2: [node2_concentration]"
|
||||
|
||||
|
||||
filter
|
||||
verb
|
||||
toggle()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
|
||||
change_pressure(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
target_pressure = amount
|
||||
|
||||
unary/oxygen_generator
|
||||
verb
|
||||
toggle()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
|
||||
change_rate(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
oxygen_content = amount
|
||||
binary/pump
|
||||
verb
|
||||
debug()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
world << "Debugging: [x],[y]"
|
||||
|
||||
if(node1)
|
||||
world << "Input node: [node1.x],[node1.y] [network1]"
|
||||
if(node2)
|
||||
world << "Output node: [node2.x],[node2.y] [network2]"
|
||||
|
||||
toggle()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
on = !on
|
||||
|
||||
update_icon()
|
||||
change_pressure(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
target_pressure = amount
|
||||
|
||||
valve
|
||||
verb
|
||||
toggle()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
if(open)
|
||||
close()
|
||||
else
|
||||
open()
|
||||
network_data()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
world << "\blue [x],[y]"
|
||||
world << "network 1: [network_node1.normal_members.len], [network_node1.line_members.len]"
|
||||
for(var/obj/O in network_node1.normal_members)
|
||||
world << "member: [O.x], [O.y]"
|
||||
world << "network 2: [network_node2.normal_members.len], [network_node2.line_members.len]"
|
||||
for(var/obj/O in network_node2.normal_members)
|
||||
world << "member: [O.x], [O.y]"
|
||||
pipe
|
||||
verb
|
||||
destroy()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
del(src)
|
||||
|
||||
pipeline_data()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
if(parent)
|
||||
usr << "[x],[y] is in a pipeline with [parent.members.len] members ([parent.edges.len] edges)! Volume: [parent.air.volume]"
|
||||
usr << "Pressure: [parent.air.return_pressure()], Temperature: [parent.air.temperature]"
|
||||
usr << "[parent.air.oxygen], [parent.air.toxins], [parent.air.nitrogen], [parent.air.carbon_dioxide] .. [parent.alert_pressure]"
|
||||
*/
|
||||
mob
|
||||
verb
|
||||
flag_all_pipe_networks()
|
||||
set category = "Debug"
|
||||
|
||||
for(var/datum/pipe_network/network in pipe_networks)
|
||||
network.update = 1
|
||||
|
||||
mark_pipe_networks()
|
||||
set category = "Debug"
|
||||
|
||||
for(var/datum/pipe_network/network in pipe_networks)
|
||||
network.marker = rand(1,4)
|
||||
|
||||
for(var/obj/machinery/atmospherics/pipe/P in world)
|
||||
P.overlays.Cut()
|
||||
|
||||
var/datum/pipe_network/master = P.return_network()
|
||||
if(master)
|
||||
P.overlays += icon('icons/Testing/atmos_testing.dmi',"marker[master.marker]")
|
||||
else
|
||||
world << "error"
|
||||
P.overlays += icon('icons/Testing/atmos_testing.dmi',"marker0")
|
||||
|
||||
for(var/obj/machinery/atmospherics/valve/V in world)
|
||||
V.overlays.Cut()
|
||||
|
||||
if(V.network_node1)
|
||||
V.overlays += icon('icons/Testing/atmos_testing.dmi',"marker[V.network_node1.marker]")
|
||||
else
|
||||
V.overlays += icon('icons/Testing/atmos_testing.dmi',"marker0")
|
||||
|
||||
if(V.network_node2)
|
||||
V.overlays += icon('icons/Testing/atmos_testing.dmi',"marker[V.network_node2.marker]")
|
||||
else
|
||||
V.overlays += icon('icons/Testing/atmos_testing.dmi',"marker0")
|
||||
|
||||
turf/simulated
|
||||
var/fire_verbose = 0
|
||||
|
||||
verb
|
||||
mark_direction()
|
||||
set src in world
|
||||
overlays.Cut()
|
||||
for(var/direction in list(NORTH,SOUTH,EAST,WEST))
|
||||
if(group_border&direction)
|
||||
overlays += icon('icons/Testing/turf_analysis.dmi',"red_arrow",direction)
|
||||
else if(air_check_directions&direction)
|
||||
overlays += icon('icons/Testing/turf_analysis.dmi',"arrow",direction)
|
||||
air_status()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
var/datum/gas_mixture/GM = return_air()
|
||||
usr << "\blue @[x],[y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(active_hotspot)?("\red BURNING"):(null)]"
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.moles]"
|
||||
|
||||
force_temperature(temp as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
if(parent&&parent.group_processing)
|
||||
parent.suspend_group_processing()
|
||||
|
||||
air.temperature = temp
|
||||
|
||||
spark_temperature(temp as num, volume as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
hotspot_expose(temp, volume)
|
||||
|
||||
fire_verbose()
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
fire_verbose = !fire_verbose
|
||||
usr << "[x],[y] now [fire_verbose]"
|
||||
|
||||
add_sleeping_agent(amount as num)
|
||||
set src in world
|
||||
set category = "Minor"
|
||||
|
||||
if(amount>1)
|
||||
var/datum/gas_mixture/adding = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = amount
|
||||
adding.trace_gases += trace_gas
|
||||
adding.temperature = T20C
|
||||
|
||||
assume_air(adding)
|
||||
|
||||
obj/indicator
|
||||
icon = 'icons/Testing/air_meter.dmi'
|
||||
var/measure = "temperature"
|
||||
anchored = 1
|
||||
|
||||
process()
|
||||
icon_state = measurement()
|
||||
|
||||
proc/measurement()
|
||||
var/turf/T = loc
|
||||
if(!isturf(T)) return
|
||||
var/datum/gas_mixture/GM = T.return_air()
|
||||
switch(measure)
|
||||
if("temperature")
|
||||
if(GM.temperature < 0)
|
||||
return "error"
|
||||
return "[round(GM.temperature/100+0.5)]"
|
||||
if("oxygen")
|
||||
if(GM.oxygen < 0)
|
||||
return "error"
|
||||
return "[round(GM.oxygen/MOLES_CELLSTANDARD*10+0.5)]"
|
||||
if("plasma")
|
||||
if(GM.toxins < 0)
|
||||
return "error"
|
||||
return "[round(GM.toxins/MOLES_CELLSTANDARD*10+0.5)]"
|
||||
if("nitrogen")
|
||||
if(GM.nitrogen < 0)
|
||||
return "error"
|
||||
return "[round(GM.nitrogen/MOLES_CELLSTANDARD*10+0.5)]"
|
||||
else
|
||||
return "[round((GM.total_moles())/MOLES_CELLSTANDARD*10+0.5)]"
|
||||
|
||||
|
||||
Click()
|
||||
process()
|
||||
|
||||
|
||||
obj/window
|
||||
verb
|
||||
destroy()
|
||||
set category = "Minor"
|
||||
set src in world
|
||||
del(src)
|
||||
|
||||
mob
|
||||
sight = SEE_OBJS|SEE_TURFS
|
||||
|
||||
verb
|
||||
update_indicators()
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
for(var/obj/indicator/T in world)
|
||||
T.process()
|
||||
change_indicators()
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
var/str = input("Select") in list("oxygen", "nitrogen","plasma","all","temperature")
|
||||
|
||||
for(var/obj/indicator/T in world)
|
||||
T.measure = str
|
||||
T.process()
|
||||
|
||||
fire_report()
|
||||
set category = "Debug"
|
||||
usr << "\b \red Fire Report"
|
||||
for(var/obj/effect/hotspot/flame in world)
|
||||
usr << "[flame.x],[flame.y]: [flame.temperature]K, [flame.volume] L - [flame.loc:air:temperature]"
|
||||
|
||||
process_cycle()
|
||||
set category = "Debug"
|
||||
if(!master_controller)
|
||||
usr << "Cannot find master_controller"
|
||||
return
|
||||
|
||||
master_controller.process()
|
||||
update_indicators()
|
||||
|
||||
process_cycles(amount as num)
|
||||
set category = "Debug"
|
||||
if(!master_controller)
|
||||
usr << "Cannot find master_controller"
|
||||
return
|
||||
|
||||
var/start_time = world.timeofday
|
||||
|
||||
for(var/i=1; i<=amount; i++)
|
||||
master_controller.process()
|
||||
|
||||
world << "Ended [amount] cycles in [(world.timeofday-start_time)/10] seconds. [(world.timeofday-start_time)/10-amount] calculation lag"
|
||||
|
||||
update_indicators()
|
||||
|
||||
process_updates_early()
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
air_master.process_update_tiles()
|
||||
air_master.process_rebuild_select_groups()
|
||||
|
||||
mark_group_delay()
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
group.marker = 0
|
||||
|
||||
for(var/turf/simulated/floor/S in world)
|
||||
S.icon = 'icons/Testing/turf_analysis.dmi'
|
||||
if(S.parent)
|
||||
if(S.parent.group_processing)
|
||||
if (S.parent.check_delay < 2)
|
||||
S.parent.marker=1
|
||||
else if (S.parent.check_delay < 5)
|
||||
S.parent.marker=2
|
||||
else if (S.parent.check_delay < 15)
|
||||
S.parent.marker=3
|
||||
else if (S.parent.check_delay < 30)
|
||||
S.parent.marker=4
|
||||
else
|
||||
S.parent.marker=5
|
||||
if(S.parent.borders && S.parent.borders.Find(S))
|
||||
S.icon_state = "on[S.parent.marker]_border"
|
||||
else
|
||||
S.icon_state = "on[S.parent.marker]"
|
||||
|
||||
else
|
||||
if (S.check_delay < 2)
|
||||
S.icon_state= "on1_border"
|
||||
else if (S.check_delay < 5)
|
||||
S.icon_state= "on2_border"
|
||||
else if (S.check_delay < 15)
|
||||
S.icon_state= "on3_border"
|
||||
else if (S.check_delay < 30)
|
||||
S.icon_state= "on4_border"
|
||||
else
|
||||
S.icon_state = "suspended"
|
||||
else
|
||||
if(S.processing)
|
||||
S.icon_state = "individual_on"
|
||||
else
|
||||
S.icon_state = "individual_off"
|
||||
|
||||
|
||||
mark_groups()
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
group.marker = 0
|
||||
|
||||
for(var/turf/simulated/floor/S in world)
|
||||
S.icon = 'icons/Testing/turf_analysis.dmi'
|
||||
if(S.parent)
|
||||
if(S.parent.group_processing)
|
||||
if(S.parent.marker == 0)
|
||||
S.parent.marker = rand(1,5)
|
||||
if(S.parent.borders && S.parent.borders.Find(S))
|
||||
S.icon_state = "on[S.parent.marker]_border"
|
||||
else
|
||||
S.icon_state = "on[S.parent.marker]"
|
||||
|
||||
else
|
||||
S.icon_state = "suspended"
|
||||
else
|
||||
if(S.processing)
|
||||
S.icon_state = "individual_on"
|
||||
else
|
||||
S.icon_state = "individual_off"
|
||||
|
||||
get_broken_icons()
|
||||
set category = "Debug"
|
||||
getbrokeninhands()
|
||||
|
||||
|
||||
/* jump_to_dead_group() Currently in the normal admin commands but fits here
|
||||
set category = "Debug"
|
||||
if(!air_master)
|
||||
usr << "Cannot find air_system"
|
||||
return
|
||||
|
||||
var/datum/air_group/dead_groups = list()
|
||||
for(var/datum/air_group/group in air_master.air_groups)
|
||||
if (!group.group_processing)
|
||||
dead_groups += group
|
||||
var/datum/air_group/dest_group = pick(dead_groups)
|
||||
usr.loc = pick(dest_group.members)*/
|
||||
@@ -1,286 +0,0 @@
|
||||
datum/air_group
|
||||
var/group_processing = 1 //Processing all tiles as one large tile if 1
|
||||
|
||||
var/datum/gas_mixture/air = new
|
||||
|
||||
var/current_cycle = 0 //cycle that oxygen value represents
|
||||
var/archived_cycle = 0 //cycle that oxygen_archived value represents
|
||||
//The use of archived cycle saves processing power by permitting the archiving step of FET
|
||||
// to be rolled into the updating step
|
||||
|
||||
//optimization vars
|
||||
var/next_check = 0 //number of ticks before this group updates
|
||||
var/check_delay = 10 //number of ticks between updates, starts fairly high to get boring groups out of the way
|
||||
|
||||
proc/members()
|
||||
//Returns the members of the group
|
||||
proc/process_group()
|
||||
|
||||
|
||||
var/list/borders //Tiles that connect this group to other groups/individual tiles
|
||||
var/list/members //All tiles in this group
|
||||
|
||||
var/list/space_borders
|
||||
var/length_space_border = 0
|
||||
|
||||
|
||||
proc/suspend_group_processing()
|
||||
group_processing = 0
|
||||
update_tiles_from_group()
|
||||
check_delay=0
|
||||
next_check=0
|
||||
|
||||
|
||||
//Copy group air information to individual tile air
|
||||
//Used right before turning on group processing
|
||||
proc/update_group_from_tiles()
|
||||
var/sample_member = pick(members)
|
||||
var/datum/gas_mixture/sample_air = sample_member:air
|
||||
|
||||
air.copy_from(sample_air)
|
||||
air.group_multiplier = members.len
|
||||
return 1
|
||||
|
||||
|
||||
//Copy group air information to individual tile air
|
||||
//Used right before turning off group processing
|
||||
proc/update_tiles_from_group()
|
||||
for(var/member in members)
|
||||
member:air.copy_from(air)
|
||||
if (istype(member,/turf/simulated))
|
||||
var/turf/simulated/turfmem=member
|
||||
turfmem.reset_delay()
|
||||
|
||||
|
||||
proc/archive()
|
||||
air.archive()
|
||||
archived_cycle = air_master.current_cycle
|
||||
|
||||
|
||||
//If individually processing tiles, checks all member tiles to see if they are close enough that the group may resume group processing
|
||||
//Warning: Do not call, called by air_master.process()
|
||||
proc/check_regroup()
|
||||
//Purpose: Checks to see if group processing should be turned back on
|
||||
//Returns: group_processing
|
||||
if(prevent_airgroup_regroup)
|
||||
return 0
|
||||
|
||||
if(group_processing) return 1
|
||||
|
||||
var/turf/simulated/sample = pick(members)
|
||||
for(var/member in members)
|
||||
if(member:active_hotspot)
|
||||
return 0
|
||||
if(member:air.compare(sample.air)) continue
|
||||
else
|
||||
return 0
|
||||
|
||||
update_group_from_tiles()
|
||||
group_processing = 1
|
||||
return 1
|
||||
|
||||
|
||||
//Look into this
|
||||
turf/process_group()
|
||||
current_cycle = air_master.current_cycle
|
||||
if(!group_processing) //Revert to individual processing then end
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.process_cell()
|
||||
return
|
||||
|
||||
//check if we're skipping this tick
|
||||
if (next_check > 0)
|
||||
next_check--
|
||||
return 1
|
||||
var/player_count = max(player_list.len, 3) / 3
|
||||
next_check += check_delay + rand(player_count, player_count * 1.5)
|
||||
check_delay++
|
||||
|
||||
var/turf/simulated/list/border_individual = list()
|
||||
var/datum/air_group/list/border_group = list()
|
||||
|
||||
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
|
||||
var/turf/simulated/list/self_group_borders = list()
|
||||
var/turf/simulated/list/self_tile_borders = list()
|
||||
|
||||
if(archived_cycle < air_master.current_cycle)
|
||||
archive()
|
||||
//Archive air data for use in calculations
|
||||
//But only if another group didn't store it for us
|
||||
|
||||
for(var/turf/simulated/border_tile in src.borders)
|
||||
for(var/direction in cardinal) //Go through all border tiles and get bordering groups and individuals
|
||||
if(border_tile.group_border&direction)
|
||||
var/turf/simulated/enemy_tile = get_step(border_tile, direction) //Add found tile to appropriate category
|
||||
if(istype(enemy_tile) && enemy_tile.parent && enemy_tile.parent.group_processing)
|
||||
border_group += enemy_tile.parent
|
||||
enemies += enemy_tile
|
||||
self_group_borders += border_tile
|
||||
else
|
||||
border_individual += enemy_tile
|
||||
self_tile_borders += border_tile
|
||||
|
||||
var/abort_group = 0
|
||||
|
||||
// Process connections to adjacent groups
|
||||
var/border_index = 1
|
||||
for(var/datum/air_group/AG in border_group)
|
||||
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
|
||||
AG.archive()
|
||||
if(AG.current_cycle < current_cycle)
|
||||
//This if statement makes sure two groups only process their individual connections once!
|
||||
//Without it, each connection would be processed a second time as the second group is evaluated
|
||||
|
||||
var/connection_difference = 0
|
||||
var/turf/simulated/floor/self_border = self_group_borders[border_index]
|
||||
var/turf/simulated/floor/enemy_border = enemies[border_index]
|
||||
|
||||
var/result = air.check_gas_mixture(AG.air)
|
||||
if(result == 1)
|
||||
connection_difference = air.share(AG.air)
|
||||
else if(result == -1)
|
||||
AG.suspend_group_processing()
|
||||
connection_difference = air.share(enemy_border.air)
|
||||
else
|
||||
abort_group = 1
|
||||
break
|
||||
|
||||
if(connection_difference)
|
||||
if(connection_difference > 0)
|
||||
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_border))
|
||||
else
|
||||
var/turf/enemy_turf = enemy_border
|
||||
if(!isturf(enemy_turf))
|
||||
enemy_turf = enemy_border.loc
|
||||
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_turf,self_border))
|
||||
|
||||
border_index++
|
||||
|
||||
// Process connections to adjacent tiles
|
||||
border_index = 1
|
||||
if(!abort_group)
|
||||
for(var/atom/enemy_tile in border_individual)
|
||||
var/connection_difference = 0
|
||||
var/turf/simulated/floor/self_border = self_tile_borders[border_index]
|
||||
|
||||
if(istype(enemy_tile, /turf/simulated))
|
||||
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
|
||||
enemy_tile:archive()
|
||||
if(enemy_tile:current_cycle < current_cycle)
|
||||
if(air.check_gas_mixture(enemy_tile:air))
|
||||
connection_difference = air.share(enemy_tile:air)
|
||||
else
|
||||
abort_group = 1
|
||||
break
|
||||
else if(isturf(enemy_tile))
|
||||
if(air.check_turf(enemy_tile))
|
||||
connection_difference = air.mimic(enemy_tile)
|
||||
else
|
||||
abort_group = 1
|
||||
break
|
||||
|
||||
if(connection_difference)
|
||||
if(connection_difference > 0)
|
||||
self_border.consider_pressure_difference(connection_difference, get_dir(self_border,enemy_tile))
|
||||
else
|
||||
var/turf/enemy_turf = enemy_tile
|
||||
if(!isturf(enemy_turf))
|
||||
enemy_turf = enemy_tile.loc
|
||||
enemy_turf.consider_pressure_difference(-connection_difference, get_dir(enemy_tile,enemy_turf))
|
||||
|
||||
// Process connections to space
|
||||
border_index = 1
|
||||
if(!abort_group)
|
||||
if(length_space_border > 0)
|
||||
var/turf/space/sample = locate()
|
||||
var/connection_difference = 0
|
||||
|
||||
if(air.check_turf(sample))
|
||||
connection_difference = air.mimic(sample, length_space_border)
|
||||
else
|
||||
abort_group = 1
|
||||
|
||||
if(connection_difference)
|
||||
for(var/turf/simulated/self_border in space_borders)
|
||||
self_border.consider_pressure_difference_space(connection_difference)
|
||||
|
||||
if(abort_group)
|
||||
suspend_group_processing()
|
||||
else
|
||||
if(air.check_tile_graphic())
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.update_visuals(air)
|
||||
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
for(var/T in members)
|
||||
var/turf/simulated/member = T
|
||||
member.hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
member.consider_superconductivity(starting=1)
|
||||
|
||||
air.react()
|
||||
return
|
||||
|
||||
|
||||
|
||||
object/process_group()
|
||||
current_cycle = air_master.current_cycle
|
||||
|
||||
if(!group_processing) return //See if processing this group as a group
|
||||
|
||||
var/turf/simulated/list/border_individual = list()
|
||||
var/datum/air_group/list/border_group = list()
|
||||
|
||||
var/turf/simulated/list/enemies = list() //used to send the appropriate border tile of a group to the group proc
|
||||
var/enemy_index = 1
|
||||
|
||||
if(archived_cycle < air_master.current_cycle)
|
||||
archive()
|
||||
//Archive air data for use in calculations
|
||||
//But only if another group didn't store it for us
|
||||
|
||||
enemy_index = 1
|
||||
var/abort_group = 0
|
||||
for(var/datum/air_group/AG in border_group)
|
||||
if(AG.archived_cycle < archived_cycle) //archive other groups information if it has not been archived yet this cycle
|
||||
AG.archive()
|
||||
if(AG.current_cycle < current_cycle)
|
||||
//This if statement makes sure two groups only process their individual connections once!
|
||||
//Without it, each connection would be processed a second time as the second group is evaluated
|
||||
|
||||
var/result = air.check_gas_mixture(AG.air)
|
||||
if(result == 1)
|
||||
air.share(AG.air)
|
||||
else if(result == -1)
|
||||
AG.suspend_group_processing()
|
||||
var/turf/simulated/floor/enemy_border = enemies[enemy_index]
|
||||
air.share(enemy_border.air)
|
||||
else
|
||||
abort_group = 0
|
||||
break
|
||||
enemy_index++
|
||||
|
||||
if(!abort_group)
|
||||
for(var/enemy_tile in border_individual)
|
||||
if(istype(enemy_tile, /turf/simulated))
|
||||
if(enemy_tile:archived_cycle < archived_cycle) //archive tile information if not already done
|
||||
enemy_tile:archive()
|
||||
if(enemy_tile:current_cycle < current_cycle)
|
||||
if(air.check_gas_mixture(enemy_tile:air))
|
||||
air.share(enemy_tile:air)
|
||||
else
|
||||
abort_group = 1
|
||||
break
|
||||
else
|
||||
if(air.check_turf(enemy_tile))
|
||||
air.mimic(enemy_tile)
|
||||
else
|
||||
abort_group = 1
|
||||
break
|
||||
|
||||
if(abort_group)
|
||||
suspend_group_processing()
|
||||
|
||||
return
|
||||
@@ -1,101 +0,0 @@
|
||||
/turf/simulated/proc/find_group()
|
||||
//Basically, join any nearby valid groups
|
||||
// If more than one, pick one with most members at my borders
|
||||
// If can not find any but there was an ungrouped at border with me, call for group assembly
|
||||
|
||||
var/turf/simulated/floor/north = get_step(src,NORTH)
|
||||
var/turf/simulated/floor/south = get_step(src,SOUTH)
|
||||
var/turf/simulated/floor/east = get_step(src,EAST)
|
||||
var/turf/simulated/floor/west = get_step(src,WEST)
|
||||
|
||||
//Clear those we do not have access to
|
||||
if(!CanPass(null, north, null, 1) || !istype(north))
|
||||
north = null
|
||||
if(!CanPass(null, south, null, 1) || !istype(south))
|
||||
south = null
|
||||
if(!CanPass(null, east, null, 1) || !istype(east))
|
||||
east = null
|
||||
if(!CanPass(null, west, null, 1) || !istype(west))
|
||||
west = null
|
||||
|
||||
var/new_group_possible = 0
|
||||
|
||||
var/north_votes = 0
|
||||
var/south_votes = 0
|
||||
var/east_votes = 0
|
||||
|
||||
if(north)
|
||||
if(north.parent)
|
||||
north_votes = 1
|
||||
|
||||
if(south && (south.parent == north.parent))
|
||||
north_votes++
|
||||
south = null
|
||||
|
||||
if(east && (east.parent == north.parent))
|
||||
north_votes++
|
||||
east = null
|
||||
|
||||
if(west && (west.parent == north.parent))
|
||||
north_votes++
|
||||
west = null
|
||||
else
|
||||
new_group_possible = 1
|
||||
|
||||
if(south)
|
||||
if(south.parent)
|
||||
south_votes = 1
|
||||
|
||||
if(east && (east.parent == south.parent))
|
||||
south_votes++
|
||||
east = null
|
||||
|
||||
if(west && (west.parent == south.parent))
|
||||
south_votes++
|
||||
west = null
|
||||
else
|
||||
new_group_possible = 1
|
||||
|
||||
if(east)
|
||||
if(east.parent)
|
||||
east_votes = 1
|
||||
|
||||
if(west && (west.parent == east.parent))
|
||||
east_votes++
|
||||
west = null
|
||||
else
|
||||
new_group_possible = 1
|
||||
|
||||
// world << "[north_votes], [south_votes], [east_votes]"
|
||||
|
||||
var/datum/air_group/group_joined = null
|
||||
|
||||
if(west)
|
||||
if(west.parent)
|
||||
group_joined = west.parent
|
||||
else
|
||||
new_group_possible = 1
|
||||
|
||||
if(north_votes && (north_votes >= south_votes) && (north_votes >= east_votes))
|
||||
group_joined = north.parent
|
||||
else if(south_votes && (south_votes >= east_votes))
|
||||
group_joined = south.parent
|
||||
else if(east_votes)
|
||||
group_joined = east.parent
|
||||
|
||||
if (istype(group_joined))
|
||||
if (group_joined.group_processing)
|
||||
group_joined.suspend_group_processing()
|
||||
group_joined.members += src
|
||||
parent=group_joined
|
||||
|
||||
air_master.tiles_to_update += group_joined.members
|
||||
return 1
|
||||
|
||||
else if(new_group_possible)
|
||||
air_master.assemble_group_turf(src)
|
||||
return 1
|
||||
|
||||
else
|
||||
air_master.active_singletons += src
|
||||
return 1
|
||||
@@ -1,335 +0,0 @@
|
||||
/*
|
||||
Overview:
|
||||
The air_master global variable is the workhorse for the system.
|
||||
|
||||
Why are you archiving data before modifying it?
|
||||
The general concept with archiving data and having each tile keep track of when they were last updated is to keep everything symmetric
|
||||
and totally independent of the order they are read in an update cycle.
|
||||
This prevents abnormalities like air/fire spreading rapidly in one direction and super slowly in the other.
|
||||
|
||||
Why not just archive everything and then calculate?
|
||||
Efficiency. While a for-loop that goes through all tiles and groups to archive their information before doing any calculations seems simple, it is
|
||||
slightly less efficient than the archive-before-modify/read method.
|
||||
|
||||
Why is there a cycle check for calculating data as well?
|
||||
This ensures that every connection between group-tile, tile-tile, and group-group is only evaluated once per loop.
|
||||
|
||||
|
||||
|
||||
|
||||
Important variables:
|
||||
air_master.groups_to_rebuild (list)
|
||||
A list of air groups that have had their geometry occluded and thus may need to be split in half.
|
||||
A set of adjacent groups put in here will join together if validly connected.
|
||||
This is done before air system calculations for a cycle.
|
||||
air_master.tiles_to_update (list)
|
||||
Turfs that are in this list have their border data updated before the next air calculations for a cycle.
|
||||
Place turfs in this list rather than call the proc directly to prevent race conditions
|
||||
|
||||
turf/simulated.archive() and datum/air_group.archive()
|
||||
This stores all data for.
|
||||
If you modify, make sure to update the archived_cycle to prevent race conditions and maintain symmetry
|
||||
|
||||
atom/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
returns 1 for allow pass and 0 for deny pass
|
||||
Turfs automatically call this for all objects/mobs in its turf.
|
||||
This is called both as source.CanPass(target, height, air_group)
|
||||
and target.CanPass(source, height, air_group)
|
||||
|
||||
Cases for the parameters
|
||||
1. This is called with args (mover, location, height>0, air_group=0) for normal objects.
|
||||
2. This is called with args (null, location, height=0, air_group=0) for flowing air.
|
||||
3. This is called with args (null, location, height=?, air_group=1) for determining group boundaries.
|
||||
|
||||
Cases 2 and 3 would be different for doors or other objects open and close fairly often.
|
||||
(Case 3 would return 0 always while Case 2 would return 0 only when the door is open)
|
||||
This prevents the necessity of re-evaluating group geometry every time a door opens/closes.
|
||||
|
||||
|
||||
Important Procedures
|
||||
air_master.process()
|
||||
This first processes the air_master update/rebuild lists then processes all groups and tiles for air calculations
|
||||
|
||||
|
||||
*/
|
||||
|
||||
var/kill_air = 0
|
||||
|
||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
return (!density || !height || air_group)
|
||||
|
||||
turf
|
||||
CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
||||
if(!target) return 0
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
return !density
|
||||
|
||||
else // Now, doing more detailed checks for air movement and air group formation
|
||||
if(target.blocks_air||blocks_air)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(!obstacle.CanPass(mover, target, height, air_group))
|
||||
return 0
|
||||
for(var/obj/obstacle in target)
|
||||
if(!obstacle.CanPass(mover, src, height, air_group))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
var/global/datum/controller/air_system/air_master
|
||||
|
||||
datum
|
||||
controller
|
||||
air_system
|
||||
//Geoemetry lists
|
||||
var/list/datum/air_group/air_groups = list()
|
||||
var/list/turf/simulated/active_singletons = list()
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/simulated/active_super_conductivity = list()
|
||||
var/list/turf/simulated/high_pressure_delta = list()
|
||||
|
||||
//Geometry updates lists
|
||||
var/list/turf/simulated/tiles_to_update = list()
|
||||
var/list/turf/simulated/groups_to_rebuild = list()
|
||||
|
||||
var/current_cycle = 0
|
||||
|
||||
proc
|
||||
setup()
|
||||
//Call this at the start to setup air groups geometry
|
||||
//Warning: Very processor intensive but only must be done once per round
|
||||
|
||||
assemble_group_turf(turf/simulated/base)
|
||||
//Call this to try to construct a group starting from base and merging with neighboring unparented tiles
|
||||
//Expands the group until all valid borders explored
|
||||
|
||||
// assemble_group_object(obj/movable/floor/base)
|
||||
|
||||
process()
|
||||
//Call this to process air movements for a cycle
|
||||
|
||||
process_groups()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
process_singletons()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
process_high_pressure_delta()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
process_super_conductivity()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
process_update_tiles()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
process_rebuild_select_groups()
|
||||
//Used by process()
|
||||
//Warning: Do not call this
|
||||
|
||||
rebuild_group(datum/air_group)
|
||||
//Used by process_rebuild_select_groups()
|
||||
//Warning: Do not call this, add the group to air_master.groups_to_rebuild instead
|
||||
|
||||
add_singleton(turf/simulated/T)
|
||||
if(!active_singletons.Find(T))
|
||||
active_singletons += T
|
||||
|
||||
setup()
|
||||
set background = 1
|
||||
world << "\red \b Processing Geometry..."
|
||||
sleep(1)
|
||||
|
||||
var/start_time = world.timeofday
|
||||
|
||||
for(var/turf/simulated/S in world)
|
||||
if(!S.blocks_air && !S.parent)
|
||||
assemble_group_turf(S)
|
||||
S.update_air_properties()
|
||||
|
||||
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
|
||||
|
||||
assemble_group_turf(turf/simulated/base)
|
||||
|
||||
var/list/turf/simulated/members = list(base) //Confirmed group members
|
||||
var/list/turf/simulated/possible_members = list(base) //Possible places for group expansion
|
||||
var/list/turf/simulated/possible_borders = list()
|
||||
var/list/turf/simulated/possible_space_borders = list()
|
||||
var/possible_space_length = 0
|
||||
|
||||
while(possible_members.len>0) //Keep expanding, looking for new members
|
||||
for(var/turf/simulated/test in possible_members)
|
||||
test.length_space_border = 0
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(test,direction)
|
||||
if(T && !members.Find(T) && test.CanPass(null, T, null,1))
|
||||
if(istype(T,/turf/simulated) && !T:parent)
|
||||
possible_members += T
|
||||
members += T
|
||||
else if(istype(T,/turf/space))
|
||||
possible_space_borders -= test
|
||||
possible_space_borders += test
|
||||
test.length_space_border++
|
||||
else
|
||||
possible_borders -= test
|
||||
possible_borders += test
|
||||
if(test.length_space_border > 0)
|
||||
possible_space_length += test.length_space_border
|
||||
possible_members -= test
|
||||
|
||||
if(members.len > 1)
|
||||
var/datum/air_group/turf/group = new
|
||||
if(possible_borders.len>0)
|
||||
group.borders = possible_borders
|
||||
if(possible_space_borders.len>0)
|
||||
group.space_borders = possible_space_borders
|
||||
group.length_space_border = possible_space_length
|
||||
|
||||
for(var/turf/simulated/test in members)
|
||||
test.parent = group
|
||||
test.processing = 0
|
||||
active_singletons -= test
|
||||
|
||||
group.members = members
|
||||
air_groups += group
|
||||
|
||||
group.update_group_from_tiles() //Initialize air group variables
|
||||
return group
|
||||
else
|
||||
base.processing = 0 //singletons at startup are technically unconnected anyway
|
||||
base.parent = null
|
||||
|
||||
if(base.air.check_tile_graphic())
|
||||
base.update_visuals(base.air)
|
||||
|
||||
return null
|
||||
/*
|
||||
assemble_group_object(obj/movable/floor/base)
|
||||
|
||||
var/list/obj/movable/floor/members = list(base) //Confirmed group members
|
||||
var/list/obj/movable/floor/possible_members = list(base) //Possible places for group expansion
|
||||
var/list/obj/movable/floor/possible_borders = list()
|
||||
|
||||
while(possible_members.len>0) //Keep expanding, looking for new members
|
||||
for(var/obj/movable/floor/test in possible_members)
|
||||
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
|
||||
var/turf/T = get_step(test.loc,direction)
|
||||
if(T && test.loc.CanPass(null, T, null, 1))
|
||||
var/obj/movable/floor/O = locate(/obj/movable/floor) in T
|
||||
if(istype(O) && !O.parent)
|
||||
if(!members.Find(O))
|
||||
possible_members += O
|
||||
members += O
|
||||
else
|
||||
possible_borders -= test
|
||||
possible_borders += test
|
||||
possible_members -= test
|
||||
|
||||
if(members.len > 1)
|
||||
var/datum/air_group/object/group = new
|
||||
if(possible_borders.len>0)
|
||||
group.borders = possible_borders
|
||||
|
||||
for(var/obj/movable/floor/test in members)
|
||||
test.parent = group
|
||||
test.processing = 0
|
||||
active_singletons -= test
|
||||
|
||||
group.members = members
|
||||
air_groups += group
|
||||
|
||||
group.update_group_from_tiles() //Initialize air group variables
|
||||
return group
|
||||
else
|
||||
base.processing = 0 //singletons at startup are technically unconnected anyway
|
||||
base.parent = null
|
||||
|
||||
return null
|
||||
*/
|
||||
process()
|
||||
if(kill_air)
|
||||
return 1
|
||||
current_cycle++
|
||||
if(groups_to_rebuild.len > 0) process_rebuild_select_groups()
|
||||
if(tiles_to_update.len > 0) process_update_tiles()
|
||||
|
||||
process_groups()
|
||||
process_singletons()
|
||||
|
||||
process_super_conductivity()
|
||||
process_high_pressure_delta()
|
||||
|
||||
if(current_cycle%10==5) //Check for groups of tiles to resume group processing every 10 cycles
|
||||
for(var/datum/air_group/AG in air_groups)
|
||||
AG.check_regroup()
|
||||
|
||||
return 1
|
||||
|
||||
process_update_tiles()
|
||||
for(var/turf/simulated/T in tiles_to_update)
|
||||
T.update_air_properties()
|
||||
/*
|
||||
for(var/obj/movable/floor/O in tiles_to_update)
|
||||
O.update_air_properties()
|
||||
*/
|
||||
tiles_to_update.len = 0
|
||||
|
||||
process_rebuild_select_groups()
|
||||
var/turf/list/turfs = list()
|
||||
|
||||
for(var/datum/air_group/turf/turf_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
|
||||
for(var/turf in turf_AG.members)
|
||||
var/turf/simulated/T = turf
|
||||
T.parent = null
|
||||
turfs += T
|
||||
del(turf_AG)
|
||||
|
||||
for(var/turf/simulated/S in turfs) //Have old members try to form new groups
|
||||
if(!S.parent)
|
||||
assemble_group_turf(S)
|
||||
for(var/turf/simulated/S in turfs)
|
||||
S.update_air_properties()
|
||||
|
||||
// var/obj/movable/list/movable_objects = list()
|
||||
|
||||
// for(var/datum/air_group/object/object_AG in groups_to_rebuild) //Deconstruct groups, gathering their old members
|
||||
/*
|
||||
for(var/obj/movable/floor/OM in object_AG.members)
|
||||
OM.parent = null
|
||||
movable_objects += OM
|
||||
del(object_AG)
|
||||
|
||||
for(var/obj/movable/floor/OM in movable_objects) //Have old members try to form new groups
|
||||
if(!OM.parent)
|
||||
assemble_group_object(OM)
|
||||
for(var/obj/movable/floor/OM in movable_objects)
|
||||
OM.update_air_properties()
|
||||
*/
|
||||
groups_to_rebuild.len = 0
|
||||
|
||||
process_groups()
|
||||
for(var/datum/air_group/AG in air_groups)
|
||||
AG.process_group()
|
||||
|
||||
process_singletons()
|
||||
for(var/item in active_singletons)
|
||||
item:process_cell()
|
||||
|
||||
process_super_conductivity()
|
||||
for(var/turf/simulated/hot_potato in active_super_conductivity)
|
||||
hot_potato.super_conduct()
|
||||
|
||||
process_high_pressure_delta()
|
||||
for(var/turf/pressurized in high_pressure_delta)
|
||||
pressurized.high_pressure_movements()
|
||||
|
||||
high_pressure_delta.len = 0
|
||||
@@ -1,592 +0,0 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
|
||||
|
||||
atom/movable/var/pressure_resistance = 5
|
||||
atom/movable/var/last_forced_movement = 0
|
||||
|
||||
atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
if(last_forced_movement >= air_master.current_cycle)
|
||||
return 0
|
||||
else if(!anchored)
|
||||
if(pressure_difference > pressure_resistance)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
spawn step(src, direction)
|
||||
return 1
|
||||
|
||||
turf
|
||||
assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
|
||||
del(giver)
|
||||
return 0
|
||||
|
||||
return_air()
|
||||
//Create gas mixture to hold data for passing
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
GM.oxygen = oxygen
|
||||
GM.carbon_dioxide = carbon_dioxide
|
||||
GM.nitrogen = nitrogen
|
||||
GM.toxins = toxins
|
||||
|
||||
GM.temperature = temperature
|
||||
|
||||
return GM
|
||||
|
||||
remove_air(amount as num)
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
||||
if(sum>0)
|
||||
GM.oxygen = (oxygen/sum)*amount
|
||||
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
|
||||
GM.nitrogen = (nitrogen/sum)*amount
|
||||
GM.toxins = (toxins/sum)*amount
|
||||
|
||||
GM.temperature = temperature
|
||||
|
||||
return GM
|
||||
|
||||
turf
|
||||
var/pressure_difference = 0
|
||||
var/pressure_direction = 0
|
||||
var/reporting_pressure_difference
|
||||
|
||||
//optimization vars
|
||||
var/next_check = 0 //number of ticks before this tile updates
|
||||
var/check_delay = 0 //number of ticks between updates
|
||||
|
||||
proc/high_pressure_movements()
|
||||
if(reporting_pressure_difference)
|
||||
world << "pressure_difference = [pressure_difference]; pressure_direction = [pressure_direction]"
|
||||
for(var/atom/movable/in_tile in src)
|
||||
in_tile.experience_pressure_difference(pressure_difference, pressure_direction)
|
||||
|
||||
pressure_difference = 0
|
||||
|
||||
proc/consider_pressure_difference(connection_difference, connection_direction)
|
||||
if(connection_difference < 0)
|
||||
connection_difference = -connection_difference
|
||||
connection_direction = turn(connection_direction,180)
|
||||
|
||||
if(connection_difference > pressure_difference)
|
||||
if(!pressure_difference)
|
||||
air_master.high_pressure_delta += src
|
||||
pressure_difference = connection_difference
|
||||
pressure_direction = connection_direction
|
||||
|
||||
turf/simulated/proc/consider_pressure_difference_space(connection_difference)
|
||||
for(var/direction in cardinal)
|
||||
if(direction&group_border)
|
||||
if(istype(get_step(src,direction),/turf/space))
|
||||
if(!pressure_difference)
|
||||
air_master.high_pressure_delta += src
|
||||
pressure_direction = direction
|
||||
pressure_difference = connection_difference
|
||||
|
||||
|
||||
return 1
|
||||
|
||||
|
||||
turf/simulated
|
||||
|
||||
var/current_graphic = null
|
||||
|
||||
var/tmp/datum/gas_mixture/air
|
||||
|
||||
var/tmp/processing = 1
|
||||
var/tmp/datum/air_group/turf/parent
|
||||
var/tmp/group_border = 0
|
||||
var/tmp/length_space_border = 0
|
||||
|
||||
var/tmp/air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
|
||||
|
||||
var/tmp/archived_cycle = 0
|
||||
var/tmp/current_cycle = 0
|
||||
|
||||
var/tmp/obj/effect/hotspot/active_hotspot
|
||||
|
||||
var/tmp/temperature_archived //USED ONLY FOR SOLIDS
|
||||
var/tmp/being_superconductive = 0
|
||||
|
||||
proc/update_visuals(datum/gas_mixture/model)
|
||||
overlays.Cut()
|
||||
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('icons/turf/floors.dmi',siding_icon_state)
|
||||
|
||||
switch(model.graphic)
|
||||
if("plasma")
|
||||
overlays.Add(plmaster)
|
||||
if("sleeping_agent")
|
||||
overlays.Add(slmaster)
|
||||
|
||||
if(model.graphics & GRAPHICS_COLD)
|
||||
if(!was_icy)
|
||||
wet=3 // Custom ice
|
||||
was_icy=1
|
||||
var/o=""
|
||||
//if(is_plating())
|
||||
// o="snowfloor_s"
|
||||
//else
|
||||
if(is_plasteel_floor())
|
||||
o="snowfloor"
|
||||
if(o!="")
|
||||
overlays += image('icons/turf/overlays.dmi',o)
|
||||
else
|
||||
if(was_icy)
|
||||
wet=0
|
||||
was_icy=0
|
||||
if(prob(10))
|
||||
wet = 1
|
||||
if(wet_overlay)
|
||||
overlays -= wet_overlay
|
||||
wet_overlay = null
|
||||
wet_overlay = image('icons/effects/water.dmi',src,"wet_floor")
|
||||
overlays += wet_overlay
|
||||
|
||||
spawn(800)
|
||||
if (!istype(src)) return
|
||||
if(wet >= 2) return
|
||||
wet = 0
|
||||
if(wet_overlay)
|
||||
overlays -= wet_overlay
|
||||
wet_overlay = null
|
||||
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
|
||||
if(!blocks_air)
|
||||
air = new
|
||||
|
||||
air.oxygen = oxygen
|
||||
air.carbon_dioxide = carbon_dioxide
|
||||
air.nitrogen = nitrogen
|
||||
air.toxins = toxins
|
||||
|
||||
air.temperature = temperature
|
||||
|
||||
if(air_master)
|
||||
air_master.tiles_to_update.Add(src)
|
||||
|
||||
find_group()
|
||||
|
||||
// air.parent = src //TODO DEBUG REMOVE
|
||||
|
||||
else
|
||||
if(air_master)
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/floor/target = get_step(src,direction)
|
||||
if(istype(target))
|
||||
air_master.tiles_to_update.Add(target)
|
||||
|
||||
Del()
|
||||
if(air_master)
|
||||
if(parent)
|
||||
air_master.groups_to_rebuild.Add(parent)
|
||||
parent.members.Remove(src)
|
||||
else
|
||||
air_master.active_singletons.Remove(src)
|
||||
if(active_hotspot)
|
||||
active_hotspot.Kill()
|
||||
if(blocks_air)
|
||||
for(var/direction in list(NORTH, SOUTH, EAST, WEST))
|
||||
var/turf/simulated/tile = get_step(src,direction)
|
||||
if(istype(tile) && !tile.blocks_air)
|
||||
air_master.tiles_to_update.Add(tile)
|
||||
..()
|
||||
|
||||
assume_air(datum/gas_mixture/giver)
|
||||
if(!giver) return 0
|
||||
var/datum/gas_mixture/receiver = air
|
||||
if(istype(receiver))
|
||||
if(parent&&parent.group_processing)
|
||||
if(!parent.air.check_then_merge(giver))
|
||||
parent.suspend_group_processing()
|
||||
air.merge(giver)
|
||||
else
|
||||
if (giver.total_moles() > MINIMUM_AIR_TO_SUSPEND)
|
||||
reset_delay()
|
||||
|
||||
air.merge(giver)
|
||||
|
||||
if(!processing)
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
return 1
|
||||
|
||||
else return ..()
|
||||
|
||||
proc/archive()
|
||||
if(air) //For open space like floors
|
||||
air.archive()
|
||||
|
||||
temperature_archived = temperature
|
||||
archived_cycle = air_master.current_cycle
|
||||
|
||||
proc/share_air_with_tile(turf/simulated/T)
|
||||
return air.share(T.air)
|
||||
|
||||
proc/mimic_air_with_tile(turf/T)
|
||||
return air.mimic(T)
|
||||
|
||||
return_air()
|
||||
if(air)
|
||||
if(parent&&parent.group_processing)
|
||||
return parent.air
|
||||
else return air
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
remove_air(amount as num)
|
||||
if(air)
|
||||
var/datum/gas_mixture/removed = null
|
||||
|
||||
if(parent&&parent.group_processing)
|
||||
removed = parent.air.check_then_remove(amount)
|
||||
if(!removed)
|
||||
parent.suspend_group_processing()
|
||||
removed = air.remove(amount)
|
||||
else
|
||||
removed = air.remove(amount)
|
||||
|
||||
if(!processing)
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
return removed
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
proc/update_air_properties()//OPTIMIZE
|
||||
air_check_directions = 0
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(CanPass(null, get_step(src,direction), 0, 0))
|
||||
air_check_directions |= direction
|
||||
|
||||
if(parent)
|
||||
if(parent.borders)
|
||||
parent.borders -= src
|
||||
if(length_space_border > 0)
|
||||
parent.length_space_border -= length_space_border
|
||||
length_space_border = 0
|
||||
|
||||
group_border = 0
|
||||
for(var/direction in cardinal)
|
||||
if(air_check_directions&direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
|
||||
//See if actually a border
|
||||
if(!istype(T) || (T.parent!=parent))
|
||||
|
||||
//See what kind of border it is
|
||||
if(istype(T,/turf/space))
|
||||
if(parent.space_borders)
|
||||
parent.space_borders -= src
|
||||
parent.space_borders += src
|
||||
else
|
||||
parent.space_borders = list(src)
|
||||
length_space_border++
|
||||
|
||||
else
|
||||
if(parent.borders)
|
||||
parent.borders -= src
|
||||
parent.borders += src
|
||||
else
|
||||
parent.borders = list(src)
|
||||
|
||||
group_border |= direction
|
||||
|
||||
parent.length_space_border += length_space_border
|
||||
|
||||
if(air_check_directions)
|
||||
processing = 1
|
||||
if(!parent)
|
||||
air_master.add_singleton(src)
|
||||
else
|
||||
processing = 0
|
||||
|
||||
proc/process_cell()
|
||||
//this proc does all the heavy lifting for individual tile processing
|
||||
//it shares with all of its neighbors, spreads fire, calls superconduction
|
||||
//and doesn't afraid of anything
|
||||
//Comment by errorage: In other words, this is the proc that lags the game.
|
||||
|
||||
//check if we're skipping this tick
|
||||
if (next_check > 0)
|
||||
next_check--
|
||||
return 1
|
||||
var/player_count = max(player_list.len, 3) / 3
|
||||
next_check += check_delay + rand(player_count, player_count * 1.5)
|
||||
check_delay++
|
||||
|
||||
var/turf/simulated/list/possible_fire_spreads = list()
|
||||
if(processing)
|
||||
if(archived_cycle < air_master.current_cycle) //archive self if not already done
|
||||
archive()
|
||||
current_cycle = air_master.current_cycle
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(air_check_directions&direction) //Grab all valid bordering tiles
|
||||
var/turf/simulated/enemy_tile = get_step(src, direction)
|
||||
var/connection_difference = 0
|
||||
|
||||
if(istype(enemy_tile)) //enemy_tile == neighbor, btw
|
||||
if(enemy_tile.archived_cycle < archived_cycle) //archive bordering tile information if not already done
|
||||
enemy_tile.archive()
|
||||
|
||||
if (air && enemy_tile.air)
|
||||
var/delay_trigger = air.compare(enemy_tile.air)
|
||||
if (!delay_trigger) //if compare() didn't return 1, air is different enough to trigger processing
|
||||
reset_delay()
|
||||
enemy_tile.reset_delay()
|
||||
|
||||
if(enemy_tile.parent && enemy_tile.parent.group_processing) //apply tile to group sharing
|
||||
if(enemy_tile.parent.current_cycle < current_cycle) //if the group hasn't been archived, it could just be out of date
|
||||
if(enemy_tile.parent.air.check_gas_mixture(air))
|
||||
connection_difference = air.share(enemy_tile.parent.air)
|
||||
else
|
||||
enemy_tile.parent.suspend_group_processing()
|
||||
connection_difference = air.share(enemy_tile.air)
|
||||
//group processing failed so interact with individual tile
|
||||
|
||||
else
|
||||
if(enemy_tile.current_cycle < current_cycle)
|
||||
connection_difference = air.share(enemy_tile.air)
|
||||
|
||||
if(active_hotspot)
|
||||
possible_fire_spreads += enemy_tile
|
||||
else
|
||||
/* var/obj/movable/floor/movable_on_enemy = locate(/obj/movable/floor) in enemy_tile
|
||||
|
||||
if(movable_on_enemy)
|
||||
if(movable_on_enemy.parent && movable_on_enemy.parent.group_processing) //apply tile to group sharing
|
||||
if(movable_on_enemy.parent.current_cycle < current_cycle)
|
||||
if(movable_on_enemy.parent.air.check_gas_mixture(air))
|
||||
connection_difference = air.share(movable_on_enemy.parent.air)
|
||||
|
||||
else
|
||||
movable_on_enemy.parent.suspend_group_processing()
|
||||
|
||||
if(movable_on_enemy.archived_cycle < archived_cycle) //archive bordering tile information if not already done
|
||||
movable_on_enemy.archive()
|
||||
connection_difference = air.share(movable_on_enemy.air)
|
||||
//group processing failed so interact with individual tile
|
||||
else
|
||||
if(movable_on_enemy.archived_cycle < archived_cycle) //archive bordering tile information if not already done
|
||||
movable_on_enemy.archive()
|
||||
|
||||
if(movable_on_enemy.current_cycle < current_cycle)
|
||||
connection_difference = share_air_with_tile(movable_on_enemy)
|
||||
|
||||
else*/
|
||||
connection_difference = mimic_air_with_tile(enemy_tile)
|
||||
//bordering a tile with fixed air properties
|
||||
|
||||
if(connection_difference)
|
||||
if(connection_difference > 0)
|
||||
consider_pressure_difference(connection_difference, direction)
|
||||
else
|
||||
enemy_tile.consider_pressure_difference(connection_difference, direction)
|
||||
else
|
||||
air_master.active_singletons -= src //not active if not processing!
|
||||
|
||||
air.react()
|
||||
|
||||
if(active_hotspot)
|
||||
if (!active_hotspot.process(possible_fire_spreads))
|
||||
return 0
|
||||
|
||||
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
|
||||
consider_superconductivity(starting = 1)
|
||||
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
reset_delay() //hotspots always process quickly
|
||||
hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
for(var/atom/movable/item in src)
|
||||
item.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
|
||||
return 1
|
||||
|
||||
proc/super_conduct()
|
||||
var/conductivity_directions = 0
|
||||
if(blocks_air)
|
||||
//Does not participate in air exchange, so will conduct heat across all four borders at this time
|
||||
conductivity_directions = NORTH|SOUTH|EAST|WEST
|
||||
|
||||
if(archived_cycle < air_master.current_cycle)
|
||||
archive()
|
||||
|
||||
else
|
||||
//Does particate in air exchange so only consider directions not considered during process_cell()
|
||||
conductivity_directions = ~air_check_directions & (NORTH|SOUTH|EAST|WEST)
|
||||
|
||||
if(conductivity_directions>0)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in cardinal)
|
||||
if(conductivity_directions&direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
if(istype(neighbor, /turf/simulated)) //anything under this subtype will share in the exchange
|
||||
var/turf/simulated/modeled_neighbor = neighbor
|
||||
|
||||
if(modeled_neighbor.archived_cycle < air_master.current_cycle)
|
||||
modeled_neighbor.archive()
|
||||
|
||||
if(modeled_neighbor.air)
|
||||
if(air) //Both tiles are open
|
||||
|
||||
if(modeled_neighbor.parent && modeled_neighbor.parent.group_processing)
|
||||
if(parent && parent.group_processing)
|
||||
//both are acting as a group
|
||||
//modified using construct developed in datum/air_group/share_air_with_group(...)
|
||||
|
||||
var/result = parent.air.check_both_then_temperature_share(modeled_neighbor.parent.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
if(result==0)
|
||||
//have to deconstruct parent air group
|
||||
|
||||
parent.suspend_group_processing()
|
||||
if(!modeled_neighbor.parent.air.check_me_then_temperature_share(air, WINDOW_HEAT_TRANSFER_COEFFICIENT))
|
||||
//may have to deconstruct neighbors air group
|
||||
|
||||
modeled_neighbor.parent.suspend_group_processing()
|
||||
air.temperature_share(modeled_neighbor.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
else if(result==-1)
|
||||
// have to deconstruct neightbors air group but not mine
|
||||
|
||||
modeled_neighbor.parent.suspend_group_processing()
|
||||
parent.air.temperature_share(modeled_neighbor.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
else
|
||||
air.temperature_share(modeled_neighbor.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
else
|
||||
if(parent && parent.group_processing)
|
||||
if(!parent.air.check_me_then_temperature_share(air, WINDOW_HEAT_TRANSFER_COEFFICIENT))
|
||||
//may have to deconstruct neighbors air group
|
||||
|
||||
parent.suspend_group_processing()
|
||||
air.temperature_share(modeled_neighbor.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
|
||||
else
|
||||
air.temperature_share(modeled_neighbor.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
// world << "OPEN, OPEN"
|
||||
|
||||
else //Solid but neighbor is open
|
||||
if(modeled_neighbor.parent && modeled_neighbor.parent.group_processing)
|
||||
if(!modeled_neighbor.parent.air.check_me_then_temperature_turf_share(src, modeled_neighbor.thermal_conductivity))
|
||||
|
||||
modeled_neighbor.parent.suspend_group_processing()
|
||||
modeled_neighbor.air.temperature_turf_share(src, modeled_neighbor.thermal_conductivity)
|
||||
else
|
||||
modeled_neighbor.air.temperature_turf_share(src, modeled_neighbor.thermal_conductivity)
|
||||
// world << "SOLID, OPEN"
|
||||
|
||||
else
|
||||
if(air) //Open but neighbor is solid
|
||||
if(parent && parent.group_processing)
|
||||
if(!parent.air.check_me_then_temperature_turf_share(modeled_neighbor, modeled_neighbor.thermal_conductivity))
|
||||
parent.suspend_group_processing()
|
||||
air.temperature_turf_share(modeled_neighbor, modeled_neighbor.thermal_conductivity)
|
||||
else
|
||||
air.temperature_turf_share(modeled_neighbor, modeled_neighbor.thermal_conductivity)
|
||||
// world << "OPEN, SOLID"
|
||||
|
||||
else //Both tiles are solid
|
||||
share_temperature_mutual_solid(modeled_neighbor, modeled_neighbor.thermal_conductivity)
|
||||
// world << "SOLID, SOLID"
|
||||
|
||||
modeled_neighbor.consider_superconductivity()
|
||||
|
||||
else
|
||||
if(air) //Open
|
||||
if(parent && parent.group_processing)
|
||||
if(!parent.air.check_me_then_temperature_mimic(neighbor, neighbor.thermal_conductivity))
|
||||
parent.suspend_group_processing()
|
||||
air.temperature_mimic(neighbor, neighbor.thermal_conductivity)
|
||||
else
|
||||
air.temperature_mimic(neighbor, neighbor.thermal_conductivity)
|
||||
else
|
||||
mimic_temperature_solid(neighbor, neighbor.thermal_conductivity)
|
||||
|
||||
//Radiate excess tile heat to space
|
||||
if(temperature > T0C)
|
||||
// Is there a pre-defined Space Tile?
|
||||
if(!Space_Tile)
|
||||
Space_Tile = locate(/turf/space) // Define one
|
||||
//Considering 0 degC as te break even point for radiation in and out
|
||||
mimic_temperature_solid(Space_Tile, FLOOR_HEAT_TRANSFER_COEFFICIENT)
|
||||
|
||||
//Conduct with air on my tile if I have it
|
||||
if(air)
|
||||
if(parent && parent.group_processing)
|
||||
if(!parent.air.check_me_then_temperature_turf_share(src, thermal_conductivity))
|
||||
parent.suspend_group_processing()
|
||||
air.temperature_turf_share(src, thermal_conductivity)
|
||||
else
|
||||
air.temperature_turf_share(src, thermal_conductivity)
|
||||
|
||||
|
||||
//Make sure still hot enough to continue conducting heat
|
||||
if(air)
|
||||
if(air.temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
being_superconductive = 0
|
||||
air_master.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
else
|
||||
if(temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
being_superconductive = 0
|
||||
air_master.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
proc/mimic_temperature_solid(turf/model, conduction_coefficient)
|
||||
var/delta_temperature = (temperature_archived - model.temperature)
|
||||
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
|
||||
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(heat_capacity*model.heat_capacity/(heat_capacity+model.heat_capacity))
|
||||
temperature -= heat/heat_capacity
|
||||
|
||||
proc/share_temperature_mutual_solid(turf/simulated/sharer, conduction_coefficient)
|
||||
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
|
||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER && heat_capacity && sharer.heat_capacity)
|
||||
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(heat_capacity*sharer.heat_capacity/(heat_capacity+sharer.heat_capacity))
|
||||
|
||||
temperature -= heat/heat_capacity
|
||||
sharer.temperature += heat/sharer.heat_capacity
|
||||
|
||||
proc/consider_superconductivity(starting)
|
||||
|
||||
if(being_superconductive || !thermal_conductivity)
|
||||
return 0
|
||||
|
||||
if(air)
|
||||
if(air.temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return 0
|
||||
if(air.heat_capacity() < MOLES_CELLSTANDARD*0.1*0.05)
|
||||
return 0
|
||||
else
|
||||
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return 0
|
||||
|
||||
being_superconductive = 1
|
||||
|
||||
air_master.active_super_conductivity += src
|
||||
|
||||
proc/reset_delay()
|
||||
//sets this turf to process quickly again
|
||||
next_check=0
|
||||
check_delay= -5 //negative numbers mean a mandatory quick-update period
|
||||
|
||||
//if this turf has a parent air group, suspend its processing
|
||||
if (parent && parent.group_processing)
|
||||
parent.suspend_group_processing()
|
||||
@@ -1,178 +1,177 @@
|
||||
|
||||
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return null
|
||||
|
||||
|
||||
|
||||
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
|
||||
|
||||
|
||||
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
var/datum/gas_mixture/air_contents = return_air()
|
||||
if(!air_contents)
|
||||
return 0
|
||||
if(active_hotspot)
|
||||
if(soh)
|
||||
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
|
||||
if(active_hotspot.temperature < exposed_temperature)
|
||||
active_hotspot.temperature = exposed_temperature
|
||||
if(active_hotspot.volume < exposed_volume)
|
||||
active_hotspot.volume = exposed_volume
|
||||
return 1
|
||||
|
||||
var/igniting = 0
|
||||
|
||||
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && air_contents.toxins > 0.5)
|
||||
igniting = 1
|
||||
|
||||
if(igniting)
|
||||
if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5)
|
||||
return 0
|
||||
|
||||
if(parent&&parent.group_processing)
|
||||
parent.suspend_group_processing()
|
||||
|
||||
active_hotspot = new(src)
|
||||
active_hotspot.temperature = exposed_temperature
|
||||
active_hotspot.volume = exposed_volume
|
||||
|
||||
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
|
||||
//remove just_spawned protection if no longer processing this cell
|
||||
|
||||
//start processing quickly if we aren't already
|
||||
reset_delay()
|
||||
|
||||
return igniting
|
||||
|
||||
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
|
||||
/obj/effect/hotspot
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So you can't melt fire with acid.
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
layer = TURF_LAYER
|
||||
luminosity = 3
|
||||
|
||||
var/volume = 125
|
||||
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
|
||||
var/just_spawned = 1
|
||||
var/bypassing = 0
|
||||
|
||||
|
||||
/obj/effect/hotspot/proc/perform_exposure()
|
||||
var/turf/simulated/floor/location = loc
|
||||
if(!istype(location)) return 0
|
||||
|
||||
if(volume > CELL_VOLUME*0.95) bypassing = 1
|
||||
else bypassing = 0
|
||||
|
||||
if(bypassing)
|
||||
if(!just_spawned)
|
||||
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
|
||||
temperature = location.air.temperature
|
||||
else
|
||||
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
|
||||
affected.temperature = temperature
|
||||
affected.react()
|
||||
temperature = affected.temperature
|
||||
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
|
||||
location.assume_air(affected)
|
||||
|
||||
for(var/atom/item in loc)
|
||||
if(!bypassing)
|
||||
item.temperature_expose(null, temperature, volume)
|
||||
if(item) // It's possible that the item is deleted in temperature_expose
|
||||
item.fire_act(null, temperature, volume)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/obj/effect/hotspot/process(turf/simulated/list/possible_spread)
|
||||
if(just_spawned)
|
||||
just_spawned = 0
|
||||
return 0
|
||||
|
||||
var/turf/simulated/floor/location = loc
|
||||
if(!istype(location))
|
||||
Kill()
|
||||
return
|
||||
|
||||
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
|
||||
Kill()
|
||||
return
|
||||
|
||||
if(location.air.toxins < 0.5 || location.air.oxygen < 0.5)
|
||||
Kill()
|
||||
return
|
||||
|
||||
perform_exposure()
|
||||
|
||||
if(location.wet) location.wet = 0
|
||||
|
||||
if(bypassing)
|
||||
icon_state = "3"
|
||||
location.burn_tile()
|
||||
|
||||
//Possible spread due to radiated heat
|
||||
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
|
||||
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
|
||||
|
||||
for(var/turf/simulated/possible_target in possible_spread)
|
||||
if(!possible_target.active_hotspot)
|
||||
possible_target.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
|
||||
|
||||
else
|
||||
if(volume > CELL_VOLUME*0.4)
|
||||
icon_state = "2"
|
||||
else
|
||||
icon_state = "1"
|
||||
|
||||
if(temperature > location.max_fire_temperature_sustained)
|
||||
location.max_fire_temperature_sustained = temperature
|
||||
|
||||
if(location.heat_capacity && temperature > location.heat_capacity)
|
||||
location.to_be_destroyed = 1
|
||||
/*if(prob(25))
|
||||
location.ReplaceWithSpace()
|
||||
return 0*/
|
||||
return 1
|
||||
|
||||
// Garbage collect itself by nulling reference to it
|
||||
|
||||
/obj/effect/hotspot/proc/Kill()
|
||||
DestroyTurf()
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
if(T.active_hotspot == src)
|
||||
T.active_hotspot = null
|
||||
loc = null
|
||||
|
||||
/obj/effect/hotspot/proc/DestroyTurf()
|
||||
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
if(T.to_be_destroyed)
|
||||
var/chance_of_deletion
|
||||
if (T.heat_capacity) //beware of division by zero
|
||||
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
|
||||
else
|
||||
chance_of_deletion = 100
|
||||
if(prob(chance_of_deletion))
|
||||
T.ChangeTurf(/turf/space)
|
||||
else
|
||||
T.to_be_destroyed = 0
|
||||
T.max_fire_temperature_sustained = 0
|
||||
|
||||
/obj/effect/hotspot/New()
|
||||
..()
|
||||
dir = pick(cardinal)
|
||||
return
|
||||
|
||||
/*
|
||||
/obj/effect/hotspot/Del()
|
||||
if (istype(loc, /turf/simulated))
|
||||
DestroyTurf()
|
||||
..()
|
||||
*/
|
||||
|
||||
/atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return null
|
||||
|
||||
|
||||
|
||||
/turf/proc/hotspot_expose(exposed_temperature, exposed_volume, soh = 0)
|
||||
return
|
||||
|
||||
|
||||
/turf/simulated/hotspot_expose(exposed_temperature, exposed_volume, soh)
|
||||
var/datum/gas_mixture/air_contents = return_air()
|
||||
if(!air_contents)
|
||||
return 0
|
||||
if(active_hotspot)
|
||||
if(soh)
|
||||
if(air_contents.toxins > 0.5 && air_contents.oxygen > 0.5)
|
||||
if(active_hotspot.temperature < exposed_temperature)
|
||||
active_hotspot.temperature = exposed_temperature
|
||||
if(active_hotspot.volume < exposed_volume)
|
||||
active_hotspot.volume = exposed_volume
|
||||
return 1
|
||||
|
||||
var/igniting = 0
|
||||
|
||||
if((exposed_temperature > PLASMA_MINIMUM_BURN_TEMPERATURE) && air_contents.toxins > 0.5)
|
||||
igniting = 1
|
||||
|
||||
if(igniting)
|
||||
if(air_contents.oxygen < 0.5 || air_contents.toxins < 0.5)
|
||||
return 0
|
||||
|
||||
active_hotspot = new(src)
|
||||
active_hotspot.temperature = exposed_temperature
|
||||
active_hotspot.volume = exposed_volume
|
||||
|
||||
active_hotspot.just_spawned = (current_cycle < air_master.current_cycle)
|
||||
//remove just_spawned protection if no longer processing this cell
|
||||
air_master.add_to_active(src, 0)
|
||||
return igniting
|
||||
|
||||
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
|
||||
/obj/effect/hotspot
|
||||
anchored = 1
|
||||
mouse_opacity = 0
|
||||
unacidable = 1//So you can't melt fire with acid.
|
||||
icon = 'icons/effects/fire.dmi'
|
||||
icon_state = "1"
|
||||
layer = TURF_LAYER
|
||||
luminosity = 3
|
||||
|
||||
var/volume = 125
|
||||
var/temperature = FIRE_MINIMUM_TEMPERATURE_TO_EXIST
|
||||
var/just_spawned = 1
|
||||
var/bypassing = 0
|
||||
|
||||
/obj/effect/hotspot/New()
|
||||
..()
|
||||
air_master.hotspots += src
|
||||
|
||||
/obj/effect/hotspot/proc/perform_exposure()
|
||||
var/turf/simulated/floor/location = loc
|
||||
if(!istype(location) || !(location.air)) return 0
|
||||
|
||||
if(volume > CELL_VOLUME*0.95) bypassing = 1
|
||||
else bypassing = 0
|
||||
|
||||
if(bypassing)
|
||||
if(!just_spawned)
|
||||
volume = location.air.fuel_burnt*FIRE_GROWTH_RATE
|
||||
temperature = location.air.temperature
|
||||
else
|
||||
var/datum/gas_mixture/affected = location.air.remove_ratio(volume/location.air.volume)
|
||||
affected.temperature = temperature
|
||||
affected.react()
|
||||
temperature = affected.temperature
|
||||
volume = affected.fuel_burnt*FIRE_GROWTH_RATE
|
||||
location.assume_air(affected)
|
||||
|
||||
for(var/atom/item in loc)
|
||||
if(item) // It's possible that the item is deleted in temperature_expose
|
||||
item.fire_act(null, temperature, volume)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
/obj/effect/hotspot/process()
|
||||
if(just_spawned)
|
||||
just_spawned = 0
|
||||
return 0
|
||||
|
||||
var/turf/simulated/floor/location = loc
|
||||
if(!istype(location))
|
||||
Kill()
|
||||
return
|
||||
|
||||
if(location.excited_group)
|
||||
location.excited_group.reset_cooldowns()
|
||||
|
||||
if((temperature < FIRE_MINIMUM_TEMPERATURE_TO_EXIST) || (volume <= 1))
|
||||
Kill()
|
||||
return
|
||||
|
||||
if((!(location.air) || location.air.toxins < 0.5 || location.air.oxygen < 0.5))
|
||||
Kill()
|
||||
return
|
||||
|
||||
perform_exposure()
|
||||
|
||||
if(location.wet) location.wet = 0
|
||||
|
||||
if(bypassing)
|
||||
icon_state = "3"
|
||||
location.burn_tile()
|
||||
|
||||
//Possible spread due to radiated heat
|
||||
if(location.air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_SPREAD)
|
||||
var/radiated_temperature = location.air.temperature*FIRE_SPREAD_RADIOSITY_SCALE
|
||||
for(var/direction in cardinal)
|
||||
if(!(location.atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
var/turf/simulated/T = get_step(src, direction)
|
||||
if(istype(T) && T.active_hotspot)
|
||||
T.hotspot_expose(radiated_temperature, CELL_VOLUME/4)
|
||||
|
||||
else
|
||||
if(volume > CELL_VOLUME*0.4)
|
||||
icon_state = "2"
|
||||
else
|
||||
icon_state = "1"
|
||||
|
||||
if(temperature > location.max_fire_temperature_sustained)
|
||||
location.max_fire_temperature_sustained = temperature
|
||||
|
||||
if(location.heat_capacity && temperature > location.heat_capacity)
|
||||
location.to_be_destroyed = 1
|
||||
/*if(prob(25))
|
||||
location.ReplaceWithSpace()
|
||||
return 0*/
|
||||
return 1
|
||||
|
||||
// Garbage collect itself by nulling reference to it
|
||||
|
||||
/obj/effect/hotspot/proc/Kill()
|
||||
air_master.hotspots -= src
|
||||
DestroyTurf()
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/hotspot/Destroy()
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
if(T.active_hotspot == src)
|
||||
T.active_hotspot = null
|
||||
loc = null
|
||||
|
||||
/obj/effect/hotspot/proc/DestroyTurf()
|
||||
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/T = loc
|
||||
if(T.to_be_destroyed)
|
||||
var/chance_of_deletion
|
||||
if (T.heat_capacity) //beware of division by zero
|
||||
chance_of_deletion = T.max_fire_temperature_sustained / T.heat_capacity * 8 //there is no problem with prob(23456), min() was redundant --rastaf0
|
||||
else
|
||||
chance_of_deletion = 100
|
||||
if(prob(chance_of_deletion))
|
||||
T.ChangeTurf(/turf/space)
|
||||
else
|
||||
T.to_be_destroyed = 0
|
||||
T.max_fire_temperature_sustained = 0
|
||||
|
||||
/obj/effect/hotspot/New()
|
||||
..()
|
||||
dir = pick(cardinal)
|
||||
air_update_turf()
|
||||
return
|
||||
|
||||
@@ -0,0 +1,275 @@
|
||||
var/kill_air = 0
|
||||
|
||||
var/global/datum/controller/air_system/air_master
|
||||
|
||||
datum/controller/air_system
|
||||
var/list/excited_groups = list()
|
||||
var/list/active_turfs = list()
|
||||
var/list/hotspots = list()
|
||||
var/speed = 1
|
||||
|
||||
//Special functions lists
|
||||
var/list/turf/simulated/active_super_conductivity = list()
|
||||
var/list/turf/simulated/high_pressure_delta = list()
|
||||
|
||||
var/current_cycle = 0
|
||||
var/update_delay = 5
|
||||
var/failed_ticks = 0
|
||||
var/tick_progress = 0
|
||||
|
||||
|
||||
/datum/controller/air_system/proc/Setup()
|
||||
set background = 1
|
||||
world << "\red \b Processing Geometry..."
|
||||
sleep(1)
|
||||
|
||||
var/start_time = world.timeofday
|
||||
|
||||
setup_allturfs()
|
||||
|
||||
setup_overlays()
|
||||
|
||||
world << "\red \b Geometry processed in [(world.timeofday-start_time)/10] seconds!"
|
||||
|
||||
/datum/controller/air_system/proc/process()
|
||||
if(kill_air)
|
||||
return 1
|
||||
|
||||
for(var/i=0,i<speed,i++)
|
||||
current_cycle++
|
||||
|
||||
process_active_turfs()
|
||||
process_excited_groups()
|
||||
process_high_pressure_delta()
|
||||
process_hotspots()
|
||||
process_super_conductivity()
|
||||
return 1
|
||||
|
||||
/datum/controller/air_system/proc/process_hotspots()
|
||||
for(var/obj/effect/hotspot/H in hotspots)
|
||||
H.process()
|
||||
|
||||
/datum/controller/air_system/proc/process_super_conductivity()
|
||||
for(var/turf/simulated/T in active_super_conductivity)
|
||||
T.super_conduct()
|
||||
|
||||
/datum/controller/air_system/proc/process_high_pressure_delta()
|
||||
for(var/turf/T in high_pressure_delta)
|
||||
T.high_pressure_movements()
|
||||
T.pressure_difference = 0
|
||||
high_pressure_delta.len = 0
|
||||
|
||||
/datum/controller/air_system/proc/process_active_turfs()
|
||||
for(var/turf/simulated/T in active_turfs)
|
||||
T.process_cell()
|
||||
|
||||
/datum/controller/air_system/proc/remove_from_active(var/turf/simulated/T)
|
||||
if(istype(T))
|
||||
T.excited = 0
|
||||
active_turfs -= T
|
||||
if(T.excited_group)
|
||||
T.excited_group.garbage_collect()
|
||||
|
||||
/datum/controller/air_system/proc/add_to_active(var/turf/simulated/T, var/blockchanges = 1)
|
||||
if(istype(T) && T.air)
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
if(blockchanges && T.excited_group)
|
||||
T.excited_group.garbage_collect()
|
||||
else
|
||||
for(var/direction in cardinal)
|
||||
if(!(T.atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
var/turf/simulated/S = get_step(T, direction)
|
||||
if(istype(S))
|
||||
air_master.add_to_active(S)
|
||||
|
||||
/datum/controller/air_system/proc/setup_allturfs()
|
||||
for(var/turf/simulated/T in world)
|
||||
T.CalculateAdjacentTurfs()
|
||||
if(!T.blocks_air)
|
||||
if(T.air.check_tile_graphic())
|
||||
T.update_visuals(T.air)
|
||||
for(var/direction in cardinal)
|
||||
if(!(T.atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
var/turf/enemy_tile = get_step(T, direction)
|
||||
if(istype(enemy_tile,/turf/simulated/))
|
||||
var/turf/simulated/enemy_simulated = enemy_tile
|
||||
if(!T.air.compare(enemy_simulated.air))
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
break
|
||||
else
|
||||
if(!T.air.check_turf_total(enemy_tile))
|
||||
T.excited = 1
|
||||
active_turfs |= T
|
||||
|
||||
/datum/controller/air_system/proc/process_excited_groups()
|
||||
for(var/datum/excited_group/EG in excited_groups)
|
||||
EG.breakdown_cooldown ++
|
||||
if(EG.breakdown_cooldown == 10)
|
||||
EG.self_breakdown()
|
||||
return
|
||||
if(EG.breakdown_cooldown > 20)
|
||||
EG.dismantle()
|
||||
|
||||
/datum/controller/air_system/proc/setup_overlays()
|
||||
plmaster = new /obj/effect/overlay()
|
||||
plmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
plmaster.icon_state = "plasma"
|
||||
plmaster.layer = FLY_LAYER
|
||||
plmaster.mouse_opacity = 0
|
||||
|
||||
slmaster = new /obj/effect/overlay()
|
||||
slmaster.icon = 'icons/effects/tile_effects.dmi'
|
||||
slmaster.icon_state = "sleeping_agent"
|
||||
slmaster.layer = FLY_LAYER
|
||||
slmaster.mouse_opacity = 0
|
||||
|
||||
/turf/proc/CanAtmosPass(var/turf/T)
|
||||
if(!istype(T)) return 0
|
||||
var/R
|
||||
if(blocks_air || T.blocks_air)
|
||||
R = 1
|
||||
|
||||
for(var/obj/O in contents)
|
||||
if(!O.CanAtmosPass(T))
|
||||
R = 1
|
||||
if(O.BlockSuperconductivity()) //the direction and open/closed are already checked on CanAtmosPass() so there are no arguments
|
||||
var/D = get_dir(src, T)
|
||||
atmos_supeconductivity |= D
|
||||
D = get_dir(T, src)
|
||||
T.atmos_supeconductivity |= D
|
||||
return 0 //no need to keep going, we got all we asked
|
||||
|
||||
for(var/obj/O in T.contents)
|
||||
if(!O.CanAtmosPass(src))
|
||||
R = 1
|
||||
if(O.BlockSuperconductivity())
|
||||
var/D = get_dir(src, T)
|
||||
atmos_supeconductivity |= D
|
||||
D = get_dir(T, src)
|
||||
T.atmos_supeconductivity |= D
|
||||
return 0
|
||||
|
||||
var/D = get_dir(src, T)
|
||||
atmos_supeconductivity &= ~D
|
||||
D = get_dir(T, src)
|
||||
T.atmos_supeconductivity &= ~D
|
||||
|
||||
if(!R)
|
||||
return 1
|
||||
|
||||
atom/movable/proc/CanAtmosPass()
|
||||
return 1
|
||||
|
||||
atom/proc/CanPass(atom/movable/mover, turf/target, height=1.5, air_group = 0)
|
||||
return (!density || !height || air_group)
|
||||
|
||||
turf/CanPass(atom/movable/mover, turf/target, height=1.5,air_group=0)
|
||||
if(!target) return 0
|
||||
|
||||
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
|
||||
return !density
|
||||
|
||||
else // Now, doing more detailed checks for air movement and air group formation
|
||||
if(target.blocks_air||blocks_air)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(!obstacle.CanPass(mover, target, height, air_group))
|
||||
return 0
|
||||
for(var/obj/obstacle in target)
|
||||
if(!obstacle.CanPass(mover, src, height, air_group))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
|
||||
/atom/movable/proc/BlockSuperconductivity() // objects that block air and don't let superconductivity act. Only firelocks atm.
|
||||
return 0
|
||||
|
||||
/turf/proc/CalculateAdjacentTurfs()
|
||||
atmos_adjacent_turfs_amount = 0
|
||||
for(var/direction in cardinal)
|
||||
var/turf/T = get_step(src, direction)
|
||||
if(!istype(T))
|
||||
continue
|
||||
var/counterdir = get_dir(T, src)
|
||||
if(CanAtmosPass(T))
|
||||
atmos_adjacent_turfs_amount += 1
|
||||
atmos_adjacent_turfs |= direction
|
||||
if(!(T.atmos_adjacent_turfs & counterdir))
|
||||
T.atmos_adjacent_turfs_amount += 1
|
||||
T.atmos_adjacent_turfs |= counterdir
|
||||
else
|
||||
atmos_adjacent_turfs &= ~direction
|
||||
if(T.atmos_adjacent_turfs & counterdir)
|
||||
T.atmos_adjacent_turfs_amount -= 1
|
||||
T.atmos_adjacent_turfs &= ~counterdir
|
||||
|
||||
/atom/movable/proc/air_update_turf(var/command = 0)
|
||||
if(!istype(loc,/turf) && command)
|
||||
return
|
||||
for(var/turf/T in locs) // used by double wide doors and other nonexistant multitile structures
|
||||
T.air_update_turf(command)
|
||||
|
||||
/turf/proc/air_update_turf(var/command = 0)
|
||||
if(command)
|
||||
CalculateAdjacentTurfs()
|
||||
if(air_master)
|
||||
air_master.add_to_active(src,command)
|
||||
|
||||
/atom/movable/proc/move_update_air(var/turf/T)
|
||||
if(istype(T,/turf))
|
||||
T.air_update_turf(1)
|
||||
air_update_turf(1)
|
||||
|
||||
|
||||
|
||||
/atom/movable/proc/atmos_spawn_air(var/text, var/amount) //because a lot of people loves to copy paste awful code lets just make a easy proc to spawn your plasma fires
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!istype(T))
|
||||
return
|
||||
T.atmos_spawn_air(text, amount)
|
||||
|
||||
var/const/SPAWN_HEAT = 1
|
||||
|
||||
var/const/SPAWN_TOXINS = 4
|
||||
var/const/SPAWN_OXYGEN = 8
|
||||
var/const/SPAWN_CO2 = 16
|
||||
var/const/SPAWN_NITROGEN = 32
|
||||
|
||||
var/const/SPAWN_N2O = 64
|
||||
|
||||
var/const/SPAWN_AIR = 256
|
||||
|
||||
/turf/simulated/proc/atmos_spawn_air(var/flag, var/amount)
|
||||
if(!text || !amount || !air)
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/G = new
|
||||
|
||||
if(flag & SPAWN_HEAT)
|
||||
G.temperature += 1000
|
||||
|
||||
if(flag & SPAWN_TOXINS)
|
||||
G.toxins += amount
|
||||
if(flag & SPAWN_OXYGEN)
|
||||
G.oxygen += amount
|
||||
if(flag & SPAWN_CO2)
|
||||
G.carbon_dioxide += amount
|
||||
if(flag & SPAWN_NITROGEN)
|
||||
G.nitrogen += amount
|
||||
|
||||
if(flag & SPAWN_N2O)
|
||||
var/datum/gas/sleeping_agent/T = new
|
||||
T.moles += amount
|
||||
G.trace_gases += T
|
||||
|
||||
if(flag & SPAWN_AIR)
|
||||
G.oxygen += MOLES_O2STANDARD * amount
|
||||
G.nitrogen += MOLES_N2STANDARD * amount
|
||||
|
||||
air.merge(G)
|
||||
air_master.add_to_active(src, 0)
|
||||
@@ -0,0 +1,462 @@
|
||||
|
||||
|
||||
turf
|
||||
var/pressure_difference = 0
|
||||
var/pressure_direction = 0
|
||||
var/atmos_adjacent_turfs = 0
|
||||
var/atmos_adjacent_turfs_amount = 0
|
||||
var/atmos_supeconductivity = 0
|
||||
|
||||
turf/assume_air(datum/gas_mixture/giver) //use this for machines to adjust air
|
||||
del(giver)
|
||||
return 0
|
||||
|
||||
turf/return_air()
|
||||
//Create gas mixture to hold data for passing
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
GM.oxygen = oxygen
|
||||
GM.carbon_dioxide = carbon_dioxide
|
||||
GM.nitrogen = nitrogen
|
||||
GM.toxins = toxins
|
||||
|
||||
GM.temperature = temperature
|
||||
|
||||
return GM
|
||||
|
||||
turf/remove_air(amount as num)
|
||||
var/datum/gas_mixture/GM = new
|
||||
|
||||
var/sum = oxygen + carbon_dioxide + nitrogen + toxins
|
||||
if(sum>0)
|
||||
GM.oxygen = (oxygen/sum)*amount
|
||||
GM.carbon_dioxide = (carbon_dioxide/sum)*amount
|
||||
GM.nitrogen = (nitrogen/sum)*amount
|
||||
GM.toxins = (toxins/sum)*amount
|
||||
|
||||
GM.temperature = temperature
|
||||
|
||||
return GM
|
||||
|
||||
|
||||
turf/simulated
|
||||
var/datum/excited_group/excited_group
|
||||
var/excited = 0
|
||||
var/recently_active = 0
|
||||
var/datum/gas_mixture/air
|
||||
var/archived_cycle = 0
|
||||
var/current_cycle = 0
|
||||
|
||||
var/obj/effect/hotspot/active_hotspot
|
||||
|
||||
var/temperature_archived //USED ONLY FOR SOLIDS
|
||||
|
||||
turf/simulated/New()
|
||||
..()
|
||||
|
||||
if(!blocks_air)
|
||||
air = new
|
||||
|
||||
air.oxygen = oxygen
|
||||
air.carbon_dioxide = carbon_dioxide
|
||||
air.nitrogen = nitrogen
|
||||
air.toxins = toxins
|
||||
|
||||
air.temperature = temperature
|
||||
|
||||
turf/simulated/Destroy()
|
||||
if(active_hotspot)
|
||||
qdel(active_hotspot)
|
||||
..()
|
||||
|
||||
turf/simulated/assume_air(datum/gas_mixture/giver)
|
||||
if(!giver) return 0
|
||||
var/datum/gas_mixture/receiver = air
|
||||
if(istype(receiver))
|
||||
|
||||
air.merge(giver)
|
||||
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
return 1
|
||||
|
||||
else return ..()
|
||||
|
||||
turf/simulated/proc/copy_air_with_tile(turf/simulated/T)
|
||||
if(istype(T) && T.air && air)
|
||||
air.copy_from(T.air)
|
||||
|
||||
turf/simulated/proc/copy_air(datum/gas_mixture/copy)
|
||||
if(air && copy)
|
||||
air.copy_from(copy)
|
||||
|
||||
turf/simulated/return_air()
|
||||
if(air)
|
||||
return air
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
turf/simulated/remove_air(amount as num)
|
||||
if(air)
|
||||
var/datum/gas_mixture/removed = null
|
||||
|
||||
removed = air.remove(amount)
|
||||
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
return removed
|
||||
|
||||
else
|
||||
return ..()
|
||||
|
||||
turf/simulated/proc/mimic_temperature_solid(turf/model, conduction_coefficient)
|
||||
var/delta_temperature = (temperature_archived - model.temperature)
|
||||
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
|
||||
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(heat_capacity*model.heat_capacity/(heat_capacity+model.heat_capacity))
|
||||
temperature -= heat/heat_capacity
|
||||
|
||||
turf/simulated/proc/share_temperature_mutual_solid(turf/simulated/sharer, conduction_coefficient)
|
||||
var/delta_temperature = (temperature_archived - sharer.temperature_archived)
|
||||
if(abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER && heat_capacity && sharer.heat_capacity)
|
||||
|
||||
var/heat = conduction_coefficient*delta_temperature* \
|
||||
(heat_capacity*sharer.heat_capacity/(heat_capacity+sharer.heat_capacity))
|
||||
|
||||
temperature -= heat/heat_capacity
|
||||
sharer.temperature += heat/sharer.heat_capacity
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/turf/simulated/proc/process_cell()
|
||||
if(archived_cycle < air_master.current_cycle) //archive self if not already done
|
||||
archive()
|
||||
current_cycle = air_master.current_cycle
|
||||
|
||||
var/remove = 1 //set by non simulated turfs who are sharing with this turf
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(!(atmos_adjacent_turfs & direction))
|
||||
continue
|
||||
|
||||
var/turf/enemy_tile = get_step(src, direction)
|
||||
|
||||
if(istype(enemy_tile,/turf/simulated))
|
||||
var/turf/simulated/enemy_simulated = enemy_tile
|
||||
|
||||
if(current_cycle > enemy_simulated.current_cycle)
|
||||
enemy_simulated.archive()
|
||||
|
||||
/******************* GROUP HANDLING START *****************************************************************/
|
||||
|
||||
if(enemy_simulated.excited)
|
||||
if(excited_group)
|
||||
if(enemy_simulated.excited_group)
|
||||
if(excited_group != enemy_simulated.excited_group)
|
||||
excited_group.merge_groups(enemy_simulated.excited_group) //combine groups
|
||||
share_air(enemy_simulated) //share
|
||||
else
|
||||
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
|
||||
excited_group.add_turf(enemy_simulated) //add enemy to our group
|
||||
share_air(enemy_simulated) //share
|
||||
else
|
||||
if(enemy_simulated.excited_group)
|
||||
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
|
||||
enemy_simulated.excited_group.add_turf(src) //join self to enemy group
|
||||
share_air(enemy_simulated) //share
|
||||
else
|
||||
if((recently_active == 1 && enemy_simulated.recently_active == 1) || !air.compare(enemy_simulated.air))
|
||||
var/datum/excited_group/EG = new //generate new group
|
||||
EG.add_turf(src)
|
||||
EG.add_turf(enemy_simulated)
|
||||
share_air(enemy_simulated) //share
|
||||
else
|
||||
if(!air.compare(enemy_simulated.air)) //compare if
|
||||
air_master.add_to_active(enemy_simulated) //excite enemy
|
||||
if(excited_group)
|
||||
excited_group.add_turf(enemy_simulated) //add enemy to group
|
||||
else
|
||||
var/datum/excited_group/EG = new //generate new group
|
||||
EG.add_turf(src)
|
||||
EG.add_turf(enemy_simulated)
|
||||
share_air(enemy_simulated) //share
|
||||
|
||||
/******************* GROUP HANDLING FINISH *********************************************************************/
|
||||
|
||||
else
|
||||
if(!air.check_turf(enemy_tile, atmos_adjacent_turfs_amount))
|
||||
var/difference = air.mimic(enemy_tile,,atmos_adjacent_turfs_amount)
|
||||
if(difference)
|
||||
if(difference > 0)
|
||||
consider_pressure_difference(enemy_tile, difference)
|
||||
else
|
||||
enemy_tile.consider_pressure_difference(src, difference)
|
||||
remove = 0
|
||||
if(excited_group)
|
||||
last_share_check()
|
||||
|
||||
air.react()
|
||||
|
||||
if(air.check_tile_graphic())
|
||||
update_visuals(air)
|
||||
|
||||
if(air.temperature > FIRE_MINIMUM_TEMPERATURE_TO_EXIST)
|
||||
hotspot_expose(air.temperature, CELL_VOLUME)
|
||||
for(var/atom/movable/item in src)
|
||||
item.temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
temperature_expose(air, air.temperature, CELL_VOLUME)
|
||||
|
||||
if(air.temperature > MINIMUM_TEMPERATURE_START_SUPERCONDUCTION)
|
||||
if(consider_superconductivity(starting = 1))
|
||||
remove = 0
|
||||
|
||||
if(!excited_group && remove == 1)
|
||||
air_master.remove_from_active(src)
|
||||
|
||||
|
||||
/turf/simulated/proc/archive()
|
||||
if(air) //For open space like floors
|
||||
air.archive()
|
||||
temperature_archived = temperature
|
||||
archived_cycle = air_master.current_cycle
|
||||
|
||||
/turf/simulated/proc/update_visuals(datum/gas_mixture/model)
|
||||
overlays.Cut()
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('icons/turf/floors.dmi',siding_icon_state)
|
||||
switch(model.graphic)
|
||||
if("plasma")
|
||||
overlays.Add(plmaster)
|
||||
if("sleeping_agent")
|
||||
overlays.Add(slmaster)
|
||||
|
||||
/turf/simulated/proc/share_air(var/turf/simulated/T)
|
||||
if(T.current_cycle < current_cycle)
|
||||
var/difference
|
||||
difference = air.share(T.air, atmos_adjacent_turfs_amount)
|
||||
if(difference)
|
||||
if(difference > 0)
|
||||
consider_pressure_difference(T, difference)
|
||||
else
|
||||
T.consider_pressure_difference(src, difference)
|
||||
last_share_check()
|
||||
|
||||
/turf/proc/consider_pressure_difference(var/turf/simulated/T, var/difference)
|
||||
air_master.high_pressure_delta |= src
|
||||
if(difference > pressure_difference)
|
||||
pressure_direction = get_dir(src, T)
|
||||
pressure_difference = difference
|
||||
|
||||
/turf/simulated/proc/last_share_check()
|
||||
if(air.last_share > MINIMUM_AIR_TO_SUSPEND)
|
||||
excited_group.reset_cooldowns()
|
||||
|
||||
/turf/proc/high_pressure_movements()
|
||||
for(var/atom/movable/M in src)
|
||||
M.experience_pressure_difference(pressure_difference, pressure_direction)
|
||||
|
||||
|
||||
|
||||
|
||||
atom/movable/var/pressure_resistance = 5
|
||||
atom/movable/var/last_forced_movement = 0
|
||||
|
||||
atom/movable/proc/experience_pressure_difference(pressure_difference, direction)
|
||||
if(last_forced_movement >= air_master.current_cycle+2)
|
||||
return 0
|
||||
else if(!anchored)
|
||||
if(pressure_difference > pressure_resistance)
|
||||
last_forced_movement = air_master.current_cycle
|
||||
spawn step(src, direction)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
|
||||
/datum/excited_group
|
||||
var/list/turf_list = list()
|
||||
var/breakdown_cooldown = 0
|
||||
|
||||
/datum/excited_group/New()
|
||||
if(air_master)
|
||||
air_master.excited_groups += src
|
||||
|
||||
/datum/excited_group/proc/add_turf(var/turf/simulated/T)
|
||||
turf_list += T
|
||||
T.excited_group = src
|
||||
T.recently_active = 1
|
||||
reset_cooldowns()
|
||||
|
||||
/datum/excited_group/proc/merge_groups(var/datum/excited_group/E)
|
||||
if(turf_list.len > E.turf_list.len)
|
||||
air_master.excited_groups -= E
|
||||
for(var/turf/simulated/T in E.turf_list)
|
||||
T.excited_group = src
|
||||
turf_list += T
|
||||
reset_cooldowns()
|
||||
else
|
||||
air_master.excited_groups -= src
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
T.excited_group = E
|
||||
E.turf_list += T
|
||||
E.reset_cooldowns()
|
||||
|
||||
/datum/excited_group/proc/reset_cooldowns()
|
||||
breakdown_cooldown = 0
|
||||
|
||||
/datum/excited_group/proc/self_breakdown()
|
||||
var/datum/gas_mixture/A = new
|
||||
var/datum/gas/sleeping_agent/S = new
|
||||
A.trace_gases += S
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
if(T == null || !istype(T)) return
|
||||
A.oxygen += T.air.oxygen
|
||||
A.carbon_dioxide+= T.air.carbon_dioxide
|
||||
A.nitrogen += T.air.nitrogen
|
||||
A.toxins += T.air.toxins
|
||||
|
||||
if(T.air.trace_gases.len)
|
||||
for(var/datum/gas/N in T.air.trace_gases)
|
||||
S.moles += N.moles
|
||||
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
T.air.oxygen = A.oxygen/turf_list.len
|
||||
T.air.carbon_dioxide= A.carbon_dioxide/turf_list.len
|
||||
T.air.nitrogen = A.nitrogen/turf_list.len
|
||||
T.air.toxins = A.toxins/turf_list.len
|
||||
|
||||
if(S.moles > 0)
|
||||
if(T.air.trace_gases.len)
|
||||
for(var/datum/gas/G in T.air.trace_gases)
|
||||
G.moles = S.moles/turf_list.len
|
||||
else
|
||||
var/datum/gas/sleeping_agent/G = new
|
||||
G.moles = S.moles/turf_list.len
|
||||
T.air.trace_gases += G
|
||||
|
||||
if(T.air.check_tile_graphic())
|
||||
T.update_visuals(T.air)
|
||||
|
||||
|
||||
/datum/excited_group/proc/dismantle()
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
T.excited = 0
|
||||
T.recently_active = 0
|
||||
air_master.active_turfs -= T
|
||||
air_master.excited_groups -= src
|
||||
|
||||
/datum/excited_group/proc/garbage_collect()
|
||||
for(var/turf/simulated/T in turf_list)
|
||||
T.excited_group = null
|
||||
turf_list.Cut()
|
||||
air_master.excited_groups -= src
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
turf/simulated/proc/super_conduct()
|
||||
var/conductivity_directions = 0
|
||||
if(blocks_air)
|
||||
//Does not participate in air exchange, so will conduct heat across all four borders at this time
|
||||
conductivity_directions = NORTH|SOUTH|EAST|WEST
|
||||
|
||||
if(archived_cycle < air_master.current_cycle)
|
||||
archive()
|
||||
else
|
||||
//Does particate in air exchange so only consider directions not considered during process_cell()
|
||||
for(var/direction in cardinal)
|
||||
if(!(atmos_adjacent_turfs & direction) && !(atmos_supeconductivity & direction))
|
||||
conductivity_directions += direction
|
||||
|
||||
if(conductivity_directions>0)
|
||||
//Conduct with tiles around me
|
||||
for(var/direction in cardinal)
|
||||
if(conductivity_directions&direction)
|
||||
var/turf/neighbor = get_step(src,direction)
|
||||
|
||||
if(!neighbor.thermal_conductivity)
|
||||
continue
|
||||
|
||||
if(istype(neighbor, /turf/simulated)) //anything under this subtype will share in the exchange
|
||||
var/turf/simulated/T = neighbor
|
||||
|
||||
if(T.archived_cycle < air_master.current_cycle)
|
||||
T.archive()
|
||||
|
||||
if(T.air)
|
||||
if(air) //Both tiles are open
|
||||
air.temperature_share(T.air, WINDOW_HEAT_TRANSFER_COEFFICIENT)
|
||||
else //Solid but neighbor is open
|
||||
T.air.temperature_turf_share(src, T.thermal_conductivity)
|
||||
air_master.add_to_active(T, 0)
|
||||
else
|
||||
if(air) //Open but neighbor is solid
|
||||
air.temperature_turf_share(T, T.thermal_conductivity)
|
||||
else //Both tiles are solid
|
||||
share_temperature_mutual_solid(T, T.thermal_conductivity)
|
||||
T.temperature_expose(null, T.temperature, null)
|
||||
|
||||
T.consider_superconductivity()
|
||||
|
||||
else
|
||||
if(air) //Open
|
||||
air.temperature_mimic(neighbor, neighbor.thermal_conductivity)
|
||||
else
|
||||
mimic_temperature_solid(neighbor, neighbor.thermal_conductivity)
|
||||
|
||||
radiate_to_spess()
|
||||
|
||||
//Conduct with air on my tile if I have it
|
||||
if(air)
|
||||
air.temperature_turf_share(src, thermal_conductivity)
|
||||
|
||||
//Make sure still hot enough to continue conducting heat
|
||||
if(air.temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
air_master.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
else
|
||||
if(temperature < MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION)
|
||||
air_master.active_super_conductivity -= src
|
||||
return 0
|
||||
|
||||
turf/simulated/proc/consider_superconductivity(starting)
|
||||
if(!thermal_conductivity)
|
||||
return 0
|
||||
|
||||
if(air)
|
||||
if(air.temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return 0
|
||||
if(air.heat_capacity() < M_CELL_WITH_RATIO) // Was: MOLES_CELLSTANDARD*0.1*0.05 Since there are no variables here we can make this a constant.
|
||||
return 0
|
||||
else
|
||||
if(temperature < (starting?MINIMUM_TEMPERATURE_START_SUPERCONDUCTION:MINIMUM_TEMPERATURE_FOR_SUPERCONDUCTION))
|
||||
return 0
|
||||
|
||||
air_master.active_super_conductivity |= src
|
||||
return 1
|
||||
|
||||
turf/simulated/proc/radiate_to_spess() //Radiate excess tile heat to space
|
||||
if(temperature > T0C) //Considering 0 degC as te break even point for radiation in and out
|
||||
var/delta_temperature = (temperature_archived - 2.7) //hardcoded space temperature
|
||||
if((heat_capacity > 0) && (abs(delta_temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER))
|
||||
|
||||
var/heat = thermal_conductivity*delta_temperature* \
|
||||
(heat_capacity*700000/(heat_capacity+700000)) //700000 is the heat_capacity from a space turf, hardcoded here
|
||||
temperature -= heat/heat_capacity
|
||||
+11
-37
@@ -967,13 +967,11 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
X.icon_state = old_icon_state1
|
||||
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
|
||||
|
||||
var/turf/simulated/ST = T
|
||||
if(istype(ST) && ST.zone)
|
||||
var/turf/simulated/SX = X
|
||||
if(!SX.air)
|
||||
SX.make_air()
|
||||
SX.air.copy_from(ST.zone.air)
|
||||
ST.zone.remove(ST)
|
||||
// Give the new turf our air, if simulated
|
||||
if(istype(X, /turf/simulated) && istype(T, /turf/simulated))
|
||||
var/turf/simulated/sim = X
|
||||
sim.copy_air_with_tile(T)
|
||||
|
||||
|
||||
/* Quick visual fix for some weird shuttle corner artefacts when on transit space tiles */
|
||||
if(direction && findtext(X.icon_state, "swall_s"))
|
||||
@@ -1034,28 +1032,16 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl
|
||||
refined_trg -= B
|
||||
continue moving
|
||||
|
||||
var/list/doors = new/list()
|
||||
|
||||
if(toupdate.len)
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
/*if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1*/
|
||||
T1.CalculateAdjacentTurfs()
|
||||
air_master.add_to_active(T1,1)
|
||||
|
||||
if(fromupdate.len)
|
||||
for(var/turf/simulated/T2 in fromupdate)
|
||||
for(var/obj/machinery/door/D2 in T2)
|
||||
doors += D2
|
||||
/*if(T2.parent)
|
||||
air_master.groups_to_rebuild += T2.parent
|
||||
else
|
||||
air_master.tiles_to_update += T2*/
|
||||
T2.CalculateAdjacentTurfs()
|
||||
air_master.add_to_active(T2,1)
|
||||
|
||||
for(var/obj/O in doors)
|
||||
O:update_nearby_tiles(1)
|
||||
|
||||
|
||||
|
||||
@@ -1199,22 +1185,10 @@ proc/DuplicateObject(obj/original, var/perfectcopy = 0 , var/sameloc = 0)
|
||||
|
||||
|
||||
|
||||
|
||||
var/list/doors = new/list()
|
||||
|
||||
if(toupdate.len)
|
||||
for(var/turf/simulated/T1 in toupdate)
|
||||
for(var/obj/machinery/door/D2 in T1)
|
||||
doors += D2
|
||||
/*if(T1.parent)
|
||||
air_master.groups_to_rebuild += T1.parent
|
||||
else
|
||||
air_master.tiles_to_update += T1*/
|
||||
|
||||
for(var/obj/O in doors)
|
||||
O:update_nearby_tiles(1)
|
||||
|
||||
|
||||
T1.CalculateAdjacentTurfs()
|
||||
air_master.add_to_active(T1,1)
|
||||
|
||||
|
||||
return copiedobjs
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
/datum/controller/process/air/doWork()
|
||||
if(!air_processing_killed)
|
||||
if(!air_master.Tick()) //Runtimed.
|
||||
if(!air_master.process()) //Runtimed.
|
||||
air_master.failed_ticks++
|
||||
|
||||
if(air_master.failed_ticks > 5)
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
name = "mob"
|
||||
schedule_interval = 20 // every 2 seconds
|
||||
updateQueueInstance = new
|
||||
if(!mob_master)
|
||||
mob_master = new
|
||||
mob_master.Setup()
|
||||
|
||||
/datum/controller/process/mob/started()
|
||||
..()
|
||||
@@ -18,3 +21,17 @@
|
||||
if(updateQueueInstance)
|
||||
updateQueueInstance.init(mob_list, "Life")
|
||||
updateQueueInstance.Run()
|
||||
mob_master.process()
|
||||
|
||||
var/global/datum/controller/mob_system/mob_master
|
||||
|
||||
/datum/controller/mob_system
|
||||
var/current_cycle
|
||||
var/starttime
|
||||
|
||||
/datum/controller/mob_system/proc/Setup()
|
||||
world << "\red Mob ticker starting up."
|
||||
starttime = world.timeofday
|
||||
|
||||
/datum/controller/mob_system/proc/process()
|
||||
current_cycle++
|
||||
@@ -152,13 +152,13 @@ datum/controller/game_controller/proc/process()
|
||||
|
||||
air_master.current_cycle++
|
||||
// if(!air_master.tick()) Runtimed.
|
||||
if(!air_master.Tick())
|
||||
if(!air_master.process())
|
||||
air_master.failed_ticks++
|
||||
if(air_master.failed_ticks > 5)
|
||||
world << "<font color='red'><b>RUNTIMES IN ATMOS TICKER. Killing air simulation!</font></b>"
|
||||
world.log << "### ZAS SHUTDOWN"
|
||||
message_admins("ZASALERT: unable to run [air_master.tick_progress], shutting down!")
|
||||
log_admin("ZASALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
world.log << "### LINDA SHUTDOWN"
|
||||
message_admins("LINDAALERT: unable to run [air_master.tick_progress], shutting down!")
|
||||
log_admin("LINDAALERT: unable run zone/process() -- [air_master.tick_progress]")
|
||||
air_processing_killed = 1
|
||||
air_master.failed_ticks = 0
|
||||
air_cost = (world.timeofday - timer) / 10
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -252,6 +252,9 @@ its easier to just keep the beam vertical.
|
||||
/atom/proc/blob_act()
|
||||
return
|
||||
|
||||
/atom/proc/fire_act()
|
||||
return
|
||||
|
||||
/atom/proc/emag_act()
|
||||
return
|
||||
|
||||
|
||||
@@ -534,9 +534,11 @@
|
||||
"their hair","what to do next","their job","space","amusing things","sad things",
|
||||
"annoying things","happy things","something incoherent","something they did wrong")
|
||||
var/thoughts = "thinking about [pick(randomthoughts)]"
|
||||
if (M.fire_stacks)
|
||||
|
||||
if(M.fire_stacks)
|
||||
pain_condition -= 50
|
||||
thoughts = "preoccupied with the fire"
|
||||
|
||||
if (M.radiation)
|
||||
pain_condition -= 25
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@ var/global/datum/controller/gameticker/ticker
|
||||
|
||||
/datum/controller/gameticker/proc/pregame()
|
||||
login_music = pick(\
|
||||
'sound/music/THUNDERDOME.ogg',\
|
||||
'sound/music/space.ogg',\
|
||||
'sound/music/Title1.ogg',\
|
||||
'sound/music/Title2.ogg',)
|
||||
|
||||
@@ -293,7 +293,7 @@ You are weak to holy things and starlight. Don't go into space and avoid the Cha
|
||||
H.vessel.remove_reagent("blood",25)
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/V = src
|
||||
V.nutrition += blood
|
||||
V.nutrition = min(450,V.nutrition+(blood/2))
|
||||
|
||||
src.mind.vampire.draining = null
|
||||
src << "\blue You stop draining [H.name] of blood."
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/RefreshParts()
|
||||
var/H
|
||||
var/T
|
||||
@@ -58,7 +58,7 @@
|
||||
if (istype(I, /obj/item/weapon/wrench))
|
||||
if(!panel_open)
|
||||
user << "<span class='notice'>Open the maintenance panel first.</span>"
|
||||
return
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dir = pick(WEST,EAST,SOUTH,NORTH)
|
||||
var/node_connect = dir
|
||||
@@ -88,7 +88,7 @@
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/attack_hand(mob/user as mob)
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
return
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cold_sink/freezer/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
@@ -98,13 +98,13 @@
|
||||
data["gasPressure"] = round(air_contents.return_pressure())
|
||||
data["gasTemperature"] = round(air_contents.temperature)
|
||||
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C,1)
|
||||
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
|
||||
if(air_contents.total_moles() == 0 && air_contents.temperature == 0)
|
||||
data["gasTemperatureCelsius"] = 0
|
||||
data["minGasTemperature"] = round(min_temperature)
|
||||
data["maxGasTemperature"] = round(T20C)
|
||||
data["targetGasTemperature"] = round(current_temperature)
|
||||
data["targetGasTemperatureCelsius"] = round(current_temperature - T0C,1)
|
||||
|
||||
|
||||
var/temp_class = "good"
|
||||
if (air_contents.temperature > (T0C - 20))
|
||||
temp_class = "bad"
|
||||
@@ -175,7 +175,7 @@
|
||||
component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src, 1)
|
||||
RefreshParts()
|
||||
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/upgraded/New()
|
||||
..()
|
||||
var/obj/item/weapon/circuitboard/thermomachine/H = new /obj/item/weapon/circuitboard/thermomachine(null)
|
||||
@@ -215,7 +215,7 @@
|
||||
if (istype(I, /obj/item/weapon/wrench))
|
||||
if(!panel_open)
|
||||
user << "<span class='notice'>Open the maintenance panel first.</span>"
|
||||
return
|
||||
return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 50, 1)
|
||||
dir = pick(WEST,EAST,SOUTH,NORTH)
|
||||
var/node_connect = dir
|
||||
@@ -245,7 +245,7 @@
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/attack_hand(mob/user as mob)
|
||||
if(panel_open)
|
||||
user << "<span class='notice'>Close the maintenance panel first.</span>"
|
||||
return
|
||||
return
|
||||
src.ui_interact(user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/heat_reservoir/heater/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1)
|
||||
@@ -255,13 +255,13 @@
|
||||
data["gasPressure"] = round(air_contents.return_pressure())
|
||||
data["gasTemperature"] = round(air_contents.temperature)
|
||||
data["gasTemperatureCelsius"] = round(air_contents.temperature - T0C,1)
|
||||
if(air_contents.total_moles == 0 && air_contents.temperature == 0)
|
||||
if(air_contents.total_moles() == 0 && air_contents.temperature == 0)
|
||||
data["gasTemperatureCelsius"] = 0
|
||||
data["minGasTemperature"] = round(T20C)
|
||||
data["maxGasTemperature"] = round(T20C+max_temperature)
|
||||
data["targetGasTemperature"] = round(current_temperature)
|
||||
data["targetGasTemperatureCelsius"] = round(current_temperature - T0C,1)
|
||||
|
||||
|
||||
var/temp_class = "normal"
|
||||
if (air_contents.temperature > (T20C+40))
|
||||
temp_class = "bad"
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
if(target_temperature < T0C + MIN_TEMPERATURE)
|
||||
target_temperature = T0C + MIN_TEMPERATURE
|
||||
|
||||
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles)
|
||||
var/datum/gas_mixture/gas = location.remove_air(0.25*environment.total_moles())
|
||||
var/heat_capacity = gas.heat_capacity()
|
||||
var/energy_used = max( abs( heat_capacity*(gas.temperature - target_temperature) ), MAX_ENERGY_CHANGE)
|
||||
|
||||
@@ -1099,7 +1099,7 @@ FIRE ALARM
|
||||
else
|
||||
icon_state = "fire0"
|
||||
|
||||
/obj/machinery/firealarm/fire_act(datum/gas_mixture/air, temperature, volume)
|
||||
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if(src.detecting)
|
||||
if(temperature > T0C+200)
|
||||
src.alarm() // added check of detector status here
|
||||
@@ -1130,17 +1130,26 @@ FIRE ALARM
|
||||
if(wiresexposed)
|
||||
switch(buildstage)
|
||||
if(2)
|
||||
if (istype(W, /obj/item/device/multitool))
|
||||
if(istype(W, /obj/item/device/multitool))
|
||||
src.detecting = !( src.detecting )
|
||||
if (src.detecting)
|
||||
user.visible_message("\red [user] has reconnected [src]'s detecting unit!", "You have reconnected [src]'s detecting unit.")
|
||||
else
|
||||
user.visible_message("\red [user] has disconnected [src]'s detecting unit!", "You have disconnected [src]'s detecting unit.")
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wirecutters)) // cutting the wires out
|
||||
user << "<span class='warning'>You cut the wires!</span>"
|
||||
playsound(src.loc, 'sound/items/Wirecutter.ogg', 50, 1)
|
||||
var/obj/item/stack/cable_coil/new_coil = new /obj/item/stack/cable_coil()
|
||||
new_coil.amount = 5
|
||||
new_coil.loc = user.loc
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
if(1)
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
if(coil.amount < 5)
|
||||
user << "You need more cable for this!"
|
||||
user << "<span class='warning'>You cut the wires!</span>"
|
||||
return
|
||||
|
||||
coil.amount -= 5
|
||||
@@ -1148,11 +1157,11 @@ FIRE ALARM
|
||||
del(coil)
|
||||
|
||||
buildstage = 2
|
||||
user << "You wire \the [src]!"
|
||||
user << "<span class='notice'>You wire \the [src]!</span>"
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/crowbar))
|
||||
user << "You pry out the circuit!"
|
||||
user << "<span class='warning'>You pry out the circuit!</span>"
|
||||
playsound(get_turf(src), 'sound/items/Crowbar.ogg', 50, 1)
|
||||
spawn(20)
|
||||
var/obj/item/weapon/firealarm_electronics/circuit = new /obj/item/weapon/firealarm_electronics()
|
||||
@@ -1161,13 +1170,13 @@ FIRE ALARM
|
||||
update_icon()
|
||||
if(0)
|
||||
if(istype(W, /obj/item/weapon/firealarm_electronics))
|
||||
user << "You insert the circuit!"
|
||||
user << "<span class='notice'>You insert the circuit!</span>"
|
||||
del(W)
|
||||
buildstage = 1
|
||||
update_icon()
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
user << "You remove the fire alarm assembly from the wall!"
|
||||
user << "<span class='warning'>You remove the fire alarm assembly from the wall!</span>"
|
||||
new /obj/item/mounted/frame/firealarm(get_turf(user))
|
||||
playsound(get_turf(src), 'sound/items/Ratchet.ogg', 50, 1)
|
||||
del(src)
|
||||
@@ -1191,7 +1200,7 @@ FIRE ALARM
|
||||
src.updateDialog()
|
||||
last_process = world.timeofday
|
||||
|
||||
if(locate(/obj/fire) in loc)
|
||||
if(locate(/obj/effect/hotspot) in loc)
|
||||
alarm()
|
||||
|
||||
return
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
list("name" = "\[Air\]", "icon" = "grey-c-2"),
|
||||
list("name" = "\[CAUTION\]", "icon" = "yellow-c-2")
|
||||
)
|
||||
|
||||
|
||||
possibledecals = list( //var that stores all possible decals, used by ui
|
||||
list("name" = "Low temperature canister", "icon" = "cold"),
|
||||
list("name" = "High temperature canister", "icon" = "hot"),
|
||||
@@ -50,24 +50,24 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
density = 1
|
||||
var/health = 100.0
|
||||
flags = CONDUCT
|
||||
|
||||
|
||||
var/menu = 0
|
||||
//used by nanoui: 0 = main menu, 1 = relabel
|
||||
|
||||
|
||||
var/valve_open = 0
|
||||
var/release_pressure = ONE_ATMOSPHERE
|
||||
|
||||
|
||||
var/list/_color //variable that stores colours
|
||||
var/list/decals //list that stores the decals
|
||||
|
||||
|
||||
//lists for check_change()
|
||||
var/list/oldcolor
|
||||
var/list/olddecals
|
||||
|
||||
|
||||
//passed to the ui to render the color lists
|
||||
var/list/colorcontainer
|
||||
var/list/possibledecals
|
||||
|
||||
|
||||
var/can_label = 1
|
||||
var/filled = 0.5
|
||||
pressure_resistance = 7*ONE_ATMOSPHERE
|
||||
@@ -77,7 +77,7 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
var/release_log = ""
|
||||
var/busy = 0
|
||||
var/update_flag = 0
|
||||
|
||||
|
||||
New()
|
||||
..()
|
||||
_color = list(
|
||||
@@ -90,7 +90,7 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
colorcontainer = new /list(4)
|
||||
possibledecals = new /list(3)
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/proc/init_data_vars()
|
||||
//passed to the ui to render the color lists
|
||||
colorcontainer = list(
|
||||
@@ -111,7 +111,7 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
"name" = "Quaternary color",
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
//var/anycolor used by the nanoUI, 0: no color applied. 1: color applied
|
||||
for(var/C in colorcontainer)
|
||||
if(C == "prim") continue
|
||||
@@ -121,9 +121,9 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
else
|
||||
L.Add(list("anycolor" = 1))
|
||||
colorcontainer[C] = L
|
||||
|
||||
|
||||
possibledecals = new /list(3)
|
||||
|
||||
|
||||
var/i
|
||||
var/list/L = canister_icon_container.possibledecals
|
||||
for(i=1;i<=L.len;i++)
|
||||
@@ -153,11 +153,11 @@ var/datum/canister_icons/canister_icon_container = new()
|
||||
if(list2params(oldcolor) != list2params(_color))
|
||||
update_flag |= 64
|
||||
oldcolor = _color.Copy()
|
||||
|
||||
|
||||
if(list2params(olddecals) != list2params(decals))
|
||||
update_flag |= 128
|
||||
olddecals = decals.Copy()
|
||||
|
||||
|
||||
if(update_flag == old_flag)
|
||||
return 1
|
||||
else
|
||||
@@ -188,12 +188,12 @@ update_flag
|
||||
return
|
||||
|
||||
overlays.Cut()
|
||||
|
||||
|
||||
for(var/C in _color)
|
||||
if(C == "prim") continue
|
||||
if(_color[C] == "none") continue
|
||||
overlays.Add(_color[C])
|
||||
|
||||
|
||||
for(var/D in decals)
|
||||
if(decals[D])
|
||||
overlays.Add("decal-" + D)
|
||||
@@ -210,12 +210,12 @@ update_flag
|
||||
overlays += "can-o2"
|
||||
else if(update_flag & 32)
|
||||
overlays += "can-o3"
|
||||
|
||||
|
||||
update_flag &= ~196 //the flags 128 and 64 represent change, not states. As such, we have to reset them to be able to detect a change on the next go.
|
||||
return
|
||||
|
||||
//template modification exploit prevention, used in Topic()
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
/obj/machinery/portable_atmospherics/canister/proc/is_a_color(var/inputVar, var/checkColor = "all")
|
||||
if (checkColor == "prim" || checkColor == "all")
|
||||
for(var/list/L in canister_icon_container.possiblemaincolor)
|
||||
if (L["icon"] == inputVar)
|
||||
@@ -240,7 +240,7 @@ update_flag
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/machinery/portable_atmospherics/canister/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > temperature_resistance)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
@@ -294,15 +294,16 @@ update_flag
|
||||
environment.merge(removed)
|
||||
else
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
src.update_icon()
|
||||
|
||||
|
||||
if(air_contents.return_pressure() < 1)
|
||||
can_label = 1
|
||||
else
|
||||
can_label = 0
|
||||
|
||||
if(air_contents.temperature > PLASMA_FLASHPOINT)
|
||||
air_contents.zburn()
|
||||
src.updateDialog()
|
||||
return
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/return_air()
|
||||
@@ -389,7 +390,7 @@ update_flag
|
||||
return
|
||||
|
||||
init_data_vars() //set up var/colorcontainer and var/possibledecals
|
||||
|
||||
|
||||
// this is the data which will be sent to the ui
|
||||
var/data[0]
|
||||
data["name"] = name
|
||||
@@ -421,7 +422,7 @@ update_flag
|
||||
ui.open()
|
||||
// auto update every Master Controller tick
|
||||
ui.set_auto_update(1)
|
||||
|
||||
|
||||
//Disregard these, avoid cluttering up the VV window
|
||||
colorcontainer = new /list(4)
|
||||
possibledecals = new /list(3)
|
||||
@@ -436,7 +437,7 @@ update_flag
|
||||
usr << browse(null, "window=canister")
|
||||
onclose(usr, "canister")
|
||||
return
|
||||
|
||||
|
||||
if (href_list["choice"] == "menu")
|
||||
menu = text2num(href_list["mode_target"])
|
||||
|
||||
@@ -467,7 +468,7 @@ update_flag
|
||||
release_pressure = min(10*ONE_ATMOSPHERE, release_pressure+diff)
|
||||
else
|
||||
release_pressure = max(ONE_ATMOSPHERE/10, release_pressure+diff)
|
||||
|
||||
|
||||
if (href_list["rename"])
|
||||
if (can_label)
|
||||
var/T = sanitize(copytext(input("Choose canister label", "Name", name) as text|null,1,MAX_NAME_LEN))
|
||||
@@ -497,11 +498,11 @@ update_flag
|
||||
_color["quart"] = "none"
|
||||
else if (is_a_color(href_list["icon"],"quart"))
|
||||
_color["quart"] = href_list["icon"]
|
||||
|
||||
|
||||
if (href_list["choice"] == "decals")
|
||||
if (is_a_decal(href_list["icon"]))
|
||||
decals[href_list["icon"]] = (decals[href_list["icon"]] == 0)
|
||||
|
||||
|
||||
src.add_fingerprint(usr)
|
||||
update_icon()
|
||||
|
||||
@@ -540,11 +541,10 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/toxins/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "orange"
|
||||
decals["plasma"] = 1
|
||||
src.air_contents.toxins = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
@@ -554,18 +554,17 @@ update_flag
|
||||
|
||||
_color["prim"] = "blue"
|
||||
src.air_contents.oxygen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/sleeping_agent/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "redws"
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
air_contents.trace_gases += trace_gas
|
||||
trace_gas.moles = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
@@ -591,17 +590,15 @@ update_flag
|
||||
|
||||
_color["prim"] = "red"
|
||||
src.air_contents.nitrogen = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/carbon_dioxide/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "black"
|
||||
src.air_contents.carbon_dioxide = (src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
@@ -609,11 +606,10 @@ update_flag
|
||||
|
||||
/obj/machinery/portable_atmospherics/canister/air/New()
|
||||
..()
|
||||
|
||||
|
||||
_color["prim"] = "grey"
|
||||
src.air_contents.oxygen = (O2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
src.air_contents.nitrogen = (N2STANDARD*src.maximum_pressure*filled)*air_contents.volume/(R_IDEAL_GAS_EQUATION*air_contents.temperature)
|
||||
air_contents.update_values()
|
||||
|
||||
src.update_icon()
|
||||
return 1
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
environment.merge(removed)
|
||||
else
|
||||
loc.assume_air(removed)
|
||||
air_update_turf()
|
||||
else
|
||||
var/pressure_delta = target_pressure - air_contents.return_pressure()
|
||||
//Can not have a pressure delta that would cause environment pressure > tank pressure
|
||||
@@ -80,6 +81,7 @@
|
||||
removed = environment.remove(transfer_moles)
|
||||
else
|
||||
removed = loc.remove_air(transfer_moles)
|
||||
air_update_turf()
|
||||
|
||||
air_contents.merge(removed)
|
||||
//src.update_icon()
|
||||
|
||||
@@ -20,10 +20,8 @@
|
||||
if (istype(zvent_conn))
|
||||
//both floors have simulated turfs, share()
|
||||
var/turf/simulated/myturf = loc
|
||||
var/datum/gas_mixture/conn_air = zturf_conn.zone.air //TODO: pop culture reference
|
||||
var/datum/gas_mixture/conn_air = zturf_conn.air //TODO: pop culture reference
|
||||
var/datum/gas_mixture/my_air = myturf.air
|
||||
if (istype(conn_air) && istype(my_air))
|
||||
// if (!my_air.compare(conn_air))
|
||||
// myturf.reset_delay()
|
||||
// zturf_conn.reset_delay()
|
||||
my_air.share(conn_air)
|
||||
air_update_turf()
|
||||
|
||||
@@ -400,7 +400,7 @@
|
||||
expel_gas = air_contents.remove(remove_amount)
|
||||
expel_gas.temperature = T20C // Lets expel hot gas and see if that helps people not die as they are removed
|
||||
loc.assume_air(expel_gas)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/machinery/atmospherics/unary/cryo_cell/proc/go_out()
|
||||
if(!( occupant ))
|
||||
|
||||
@@ -232,37 +232,27 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/plasma
|
||||
name = "Plasma Airlock"
|
||||
name = "plasma airlock"
|
||||
desc = "No way this can end badly."
|
||||
icon = 'icons/obj/doors/Doorplasma.dmi'
|
||||
mineral = "plasma"
|
||||
|
||||
autoignition_temperature = 300
|
||||
/obj/machinery/door/airlock/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/obj/machinery/door/airlock/plasma/ignite(temperature)
|
||||
PlasmaBurn(temperature)
|
||||
/obj/machinery/door/airlock/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/obj/machinery/door/airlock/plasma/proc/PlasmaBurn(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
// if(target_tile.parent && target_tile.parent.group_processing) // THESE PROBABLY DO SOMETHING IMPORTANT BUT I DON'T KNOW HOW TO FIX IT - Erthilo
|
||||
// target_tile.parent.suspend_group_processing()
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/toxinsToDeduce = 35
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 400+T0C
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
|
||||
var/turf/T = get_turf(F)
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
|
||||
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
||||
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
|
||||
new/obj/structure/door_assembly( src.loc )
|
||||
del (src)
|
||||
|
||||
/obj/machinery/door/airlock/plasma/BlockSuperconductivity() //we don't stop the heat~
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/airlock/clown
|
||||
name = "Bananium Airlock"
|
||||
icon = 'icons/obj/doors/Doorbananium.dmi'
|
||||
@@ -918,10 +908,9 @@ About the new airlock wires panel:
|
||||
// Do nothing
|
||||
else
|
||||
playsound(src.loc, 'sound/machines/airlock.ogg', 30, 1)
|
||||
for(var/turf/turf in locs)
|
||||
var/obj/structure/window/killthis = (locate(/obj/structure/window) in turf)
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src))
|
||||
if(killthis)
|
||||
killthis.ex_act(2)//Smashin windows
|
||||
|
||||
if(density)
|
||||
return 1
|
||||
@@ -937,14 +926,11 @@ About the new airlock wires panel:
|
||||
if(visible && !glass)
|
||||
SetOpacity(1)
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
open()
|
||||
|
||||
//I shall not add a check every x ticks if a door has closed over some fire.
|
||||
var/obj/fire/fire = locate() in loc
|
||||
if(fire)
|
||||
del fire
|
||||
return
|
||||
|
||||
/obj/machinery/door/airlock/proc/lock(var/forced=0)
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
. = ..()
|
||||
if(density)
|
||||
layer = closed_layer
|
||||
update_heat_protection(get_turf(src))
|
||||
else
|
||||
layer = open_layer
|
||||
|
||||
@@ -46,14 +45,16 @@
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
airlocks += src
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/door/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
airlocks -= src
|
||||
..()
|
||||
return
|
||||
@@ -95,11 +96,13 @@
|
||||
|
||||
|
||||
/obj/machinery/door/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(air_group) return !block_air_zones
|
||||
if(air_group) return 0
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
/obj/machinery/door/CanAtmosPass()
|
||||
return !density
|
||||
|
||||
//used in the AStar algorithm to determinate if the turf the door is on is passable
|
||||
/obj/machinery/door/proc/CanAStarPass(var/obj/item/weapon/card/id/ID)
|
||||
@@ -107,9 +110,9 @@
|
||||
|
||||
/obj/machinery/door/proc/bumpopen(mob/user as mob)
|
||||
if(operating) return
|
||||
if(user.last_airflow > world.time - vsc.airflow_delay) //Fakkit
|
||||
// if(user.last_airflow > world.time) //Fakkit //remind me to figure out the linda equiv
|
||||
// if(user.last_airflow > world.time - zas_settings.Get("airflow_delay")) //Fakkit
|
||||
return
|
||||
// return
|
||||
src.add_fingerprint(user)
|
||||
if(!src.requiresID())
|
||||
user = null
|
||||
@@ -240,7 +243,8 @@
|
||||
update_icon()
|
||||
SetOpacity(0)
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(autoclose && normalspeed)
|
||||
spawn(150)
|
||||
@@ -267,12 +271,13 @@
|
||||
if(visible && !glass)
|
||||
SetOpacity(1) //caaaaarn!
|
||||
operating = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
//I shall not add a check every x ticks if a door has closed over some fire.
|
||||
var/obj/fire/fire = locate() in loc
|
||||
var/obj/effect/hotspot/fire = locate() in loc
|
||||
if(fire)
|
||||
del fire
|
||||
qdel(fire)
|
||||
return
|
||||
|
||||
/obj/machinery/door/proc/crush()
|
||||
@@ -296,14 +301,6 @@
|
||||
/obj/machinery/door/proc/requiresID()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/proc/update_heat_protection(var/turf/simulated/source)
|
||||
if(istype(source))
|
||||
if(src.density && (src.opacity || src.heat_proof))
|
||||
source.thermal_conductivity = DOOR_HEAT_TRANSFER_COEFFICIENT
|
||||
else
|
||||
source.thermal_conductivity = initial(source.thermal_conductivity)
|
||||
|
||||
/obj/machinery/door/proc/autoclose()
|
||||
var/obj/machinery/door/airlock/A = src
|
||||
if(!A.density && !A.operating && !A.locked && !A.welded && A.autoclose)
|
||||
@@ -311,7 +308,10 @@
|
||||
return
|
||||
|
||||
/obj/machinery/door/Move(new_loc, new_dir)
|
||||
update_nearby_tiles()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
. = ..()
|
||||
if(width > 1)
|
||||
if(dir in list(EAST, WEST))
|
||||
@@ -321,7 +321,10 @@
|
||||
bound_width = world.icon_size
|
||||
bound_height = width * world.icon_size
|
||||
|
||||
update_nearby_tiles()
|
||||
/obj/machinery/door/BlockSuperconductivity()
|
||||
if(opacity || heat_proof)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/door/morgue
|
||||
icon = 'icons/obj/doors/doormorgue.dmi'
|
||||
|
||||
@@ -1,85 +1,23 @@
|
||||
/var/const/OPEN = 1
|
||||
/var/const/CLOSED = 2
|
||||
|
||||
/proc/convert_k2c(var/temp)
|
||||
return ((temp - T0C)) // * 1.8) + 32
|
||||
|
||||
/proc/convert_c2k(var/temp)
|
||||
return ((temp + T0C)) // * 1.8) + 32
|
||||
|
||||
/proc/getCardinalAirInfo(var/turf/loc, var/list/stats=list("temperature"))
|
||||
var/list/temps = new/list(4)
|
||||
for(var/dir in cardinal)
|
||||
var/direction
|
||||
switch(dir)
|
||||
if(NORTH)
|
||||
direction = 1
|
||||
if(SOUTH)
|
||||
direction = 2
|
||||
if(EAST)
|
||||
direction = 3
|
||||
if(WEST)
|
||||
direction = 4
|
||||
var/turf/simulated/T=get_turf(get_step(loc,dir))
|
||||
var/list/rstats = new /list(stats.len)
|
||||
if(T && istype(T) && T.zone)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
for(var/i=1;i<=stats.len;i++)
|
||||
if(stats[i] == "pressure")
|
||||
rstats[i] = environment.return_pressure()
|
||||
else
|
||||
rstats[i] = environment.vars[stats[i]]
|
||||
else if(istype(T, /turf/simulated))
|
||||
rstats = null // Exclude zone (wall, door, etc).
|
||||
else if(istype(T, /turf))
|
||||
// Should still work. (/turf/return_air())
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
for(var/i=1;i<=stats.len;i++)
|
||||
if(stats[i] == "pressure")
|
||||
continue
|
||||
else
|
||||
rstats[i] = environment.vars[stats[i]]
|
||||
temps[direction] = rstats
|
||||
return temps
|
||||
|
||||
#define FIREDOOR_MAX_PRESSURE_DIFF 25 // kPa
|
||||
#define FIREDOOR_MAX_TEMP 50 // Celsius
|
||||
#define FIREDOOR_MIN_TEMP 0
|
||||
|
||||
// Bitflags
|
||||
#define FIREDOOR_ALERT_HOT 1
|
||||
#define FIREDOOR_ALERT_COLD 2
|
||||
// Not used #define FIREDOOR_ALERT_LOWPRESS 4
|
||||
|
||||
/obj/machinery/door/firedoor
|
||||
name = "\improper Emergency Shutter"
|
||||
desc = "Emergency air-tight shutter, capable of sealing off breached areas."
|
||||
icon = 'icons/obj/doors/DoorHazard.dmi'
|
||||
name = "Firelock"
|
||||
desc = "Apply crowbar"
|
||||
icon = 'icons/obj/doors/Doorfireglass.dmi'
|
||||
icon_state = "door_open"
|
||||
req_one_access = list(access_atmospherics, access_engine)
|
||||
opacity = 0
|
||||
density = 0
|
||||
heat_proof = 1
|
||||
glass = 1
|
||||
power_channel = ENVIRON
|
||||
|
||||
//These are frequenly used with windows, so make sure zones can pass.
|
||||
//Generally if a firedoor is at a place where there should be a zone boundery then there will be a regular door underneath it.
|
||||
block_air_zones = 0
|
||||
var/list/areas_added
|
||||
|
||||
var/blocked = 0
|
||||
var/lockdown = 0 // When the door has detected a problem, it locks.
|
||||
var/pdiff_alert = 0
|
||||
var/pdiff = 0
|
||||
var/nextstate = null
|
||||
var/net_id
|
||||
var/list/areas_added
|
||||
var/list/users_to_open
|
||||
var/list/tile_info[4]
|
||||
var/list/dir_alerts[4] // 4 dirs, bitflags
|
||||
|
||||
// MUST be in same order as FIREDOOR_ALERT_*
|
||||
var/list/ALERT_STATES=list(
|
||||
"hot",
|
||||
"cold"
|
||||
)
|
||||
var/logged_users
|
||||
|
||||
/obj/machinery/door/firedoor/New()
|
||||
. = ..()
|
||||
@@ -88,6 +26,7 @@
|
||||
spawn(1)
|
||||
del src
|
||||
return .
|
||||
|
||||
var/area/A = get_area(src)
|
||||
ASSERT(istype(A))
|
||||
|
||||
@@ -106,66 +45,16 @@
|
||||
A.all_doors.Remove(src)
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/examine()
|
||||
set src in view()
|
||||
. = ..()
|
||||
|
||||
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
|
||||
usr << "<span class='warning'>WARNING: Current pressure differential is [pdiff]kPa! Opening door may result in injury!</span>"
|
||||
|
||||
usr << "<b>Sensor readings:</b>"
|
||||
for(var/index = 1; index <= tile_info.len; index++)
|
||||
var/o = " "
|
||||
switch(index)
|
||||
if(1)
|
||||
o += "NORTH: "
|
||||
if(2)
|
||||
o += "SOUTH: "
|
||||
if(3)
|
||||
o += "EAST: "
|
||||
if(4)
|
||||
o += "WEST: "
|
||||
if(tile_info[index] == null)
|
||||
o += "<span class='warning'>DATA UNAVAILABLE</span>"
|
||||
usr << o
|
||||
continue
|
||||
var/celsius = convert_k2c(tile_info[index][1])
|
||||
var/pressure = tile_info[index][2]
|
||||
if(dir_alerts[index] & (FIREDOOR_ALERT_HOT|FIREDOOR_ALERT_COLD))
|
||||
o += "<span class='warning'>"
|
||||
else
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[celsius] Celsius</span> "
|
||||
o += "<span style='color:blue'>"
|
||||
o += "[pressure] kPa</span></li>"
|
||||
usr << o
|
||||
|
||||
if( islist(users_to_open) && users_to_open.len)
|
||||
var/users_to_open_string = users_to_open[1]
|
||||
if(users_to_open.len >= 2)
|
||||
for(var/i = 2 to users_to_open.len)
|
||||
users_to_open_string += ", [users_to_open[i]]"
|
||||
usr << "These people have opened \the [src] during an alert: [users_to_open_string]."
|
||||
|
||||
/obj/machinery/door/firedoor/Bumped(atom/AM)
|
||||
if(p_open || operating)
|
||||
return
|
||||
if(!density)
|
||||
return ..()
|
||||
if(istype(AM, /obj/mecha))
|
||||
var/obj/mecha/mecha = AM
|
||||
if (mecha.occupant)
|
||||
var/mob/M = mecha.occupant
|
||||
if(world.time - M.last_bumped <= 10) return //Can bump-open one airlock per second. This is to prevent popup message spam.
|
||||
M.last_bumped = world.time
|
||||
attack_hand(M)
|
||||
if(p_open || operating) return
|
||||
if(!density) return ..()
|
||||
return 0
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/power_change()
|
||||
if(powered(ENVIRON))
|
||||
if(powered(power_channel))
|
||||
stat &= ~NOPOWER
|
||||
latetoggle()
|
||||
else
|
||||
stat |= NOPOWER
|
||||
return
|
||||
@@ -177,6 +66,7 @@
|
||||
add_fingerprint(user)
|
||||
if(operating)
|
||||
return//Already doing something.
|
||||
|
||||
if(istype(C, /obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/W = C
|
||||
if(W.remove_fuel(0, user))
|
||||
@@ -198,24 +88,21 @@
|
||||
if( istype(C, /obj/item/weapon/crowbar) || ( istype(C,/obj/item/weapon/twohanded/fireaxe) && C:wielded == 1 ) )
|
||||
if(operating)
|
||||
return
|
||||
if( blocked )
|
||||
if(blocked)
|
||||
user.visible_message("\red \The [user] pries at \the [src] with \a [C], but \the [src] is welded in place!",\
|
||||
"You try to pry \the [src] [density ? "open" : "closed"], but it is welded in place!",\
|
||||
"You hear someone struggle and metal straining.")
|
||||
|
||||
if( stat & (BROKEN|NOPOWER) || !density || !alarmed )
|
||||
if(stat & (BROKEN|NOPOWER) || !density || !alarmed)
|
||||
user.visible_message("\red \The [user] forces \the [src] [density ? "open" : "closed"] with \a [C]!",\
|
||||
"You force \the [src] [density ? "open" : "closed"] with \the [C]!",\
|
||||
"You hear metal strain, and a door [density ? "open" : "close"].")
|
||||
else if( allowed(user) )
|
||||
|
||||
else if(allowed(user))
|
||||
user.visible_message("\blue \The [user] lifts \the [src] with \a [C].",\
|
||||
"\The [src] scans your ID, and obediently opens as you apply your [C].",\
|
||||
"You hear metal move, and a door [density ? "open" : "close"].")
|
||||
else if(lockdown)
|
||||
user.visible_message("\blue \The [user] pries at \the [src] with \a [C], but \the [src] resists being opened.",\
|
||||
"\red You pry at \the [src], but it actively resists your efforts. Maybe use your ID, perhaps?",\
|
||||
"You hear someone struggling and metal straining")
|
||||
return
|
||||
|
||||
if(density)
|
||||
spawn(0)
|
||||
open()
|
||||
@@ -223,6 +110,7 @@
|
||||
spawn(0)
|
||||
close()
|
||||
return
|
||||
|
||||
var/access_granted = 0
|
||||
var/users_name
|
||||
if(!istype(C, /obj)) //If someone hit it with their hand. We need to see if they are allowed.
|
||||
@@ -233,7 +121,7 @@
|
||||
else
|
||||
users_name = "Unknown"
|
||||
|
||||
if( ishuman(user) && !stat && ( istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda) ) )
|
||||
if(ishuman(user) && !stat && (istype(C, /obj/item/weapon/card/id) || istype(C, /obj/item/device/pda)))
|
||||
var/obj/item/weapon/card/id/ID = C
|
||||
|
||||
if( istype(C, /obj/item/device/pda) )
|
||||
@@ -248,31 +136,26 @@
|
||||
if(check_access(ID))
|
||||
access_granted = 1
|
||||
|
||||
var/answer = "Yes"
|
||||
var/answer = alert(user, "Are you sure you want to [density ? "open" : "close"] \the [src]?","\The [src] confirmation","Yes","No")
|
||||
if(answer == "No")
|
||||
return
|
||||
|
||||
if(user.stat || user.stunned || user.weakened || user.paralysis || get_dist(src, user) > 1)
|
||||
user << "Sorry, you must remain able bodied and close to \the [src] in order to use it."
|
||||
return
|
||||
|
||||
if(alarmed && density && lockdown && !access_granted/* && !( users_name in users_to_open ) */)
|
||||
// Too many shitters on /vg/ for the honor system to work.
|
||||
if(alarmed && density && !access_granted)
|
||||
user << "<span class='warning'>Access denied. Please wait for authorities to arrive, or for the alert to clear.</span>"
|
||||
return
|
||||
// End anti-shitter system
|
||||
/*
|
||||
user.visible_message("\red \The [src] opens for \the [user]",\
|
||||
"\The [src] opens after you acknowledge the consequences.",\
|
||||
"You hear a beep, and a door opening.")
|
||||
*/
|
||||
|
||||
else
|
||||
user.visible_message("\blue \The [src] [density ? "open" : "close"]s for \the [user].",\
|
||||
"\The [src] [density ? "open" : "close"]s.",\
|
||||
"You hear a beep, and a door opening.")
|
||||
// Accountability!
|
||||
if(!users_to_open)
|
||||
users_to_open = list()
|
||||
users_to_open += users_name
|
||||
if(!logged_users)
|
||||
logged_users = list()
|
||||
logged_users += users_name
|
||||
|
||||
var/needs_to_close = 0
|
||||
if(density)
|
||||
@@ -290,8 +173,8 @@
|
||||
nextstate = CLOSED
|
||||
|
||||
/obj/machinery/door/firedoor/attack_ai(mob/user as mob)
|
||||
if(operating)
|
||||
return //Already doing something.
|
||||
if(operating || stat & NOPOWER)
|
||||
return //Already doing something or depowered.
|
||||
|
||||
if(blocked)
|
||||
user << "\red \The [src] is welded solid!"
|
||||
@@ -325,49 +208,38 @@
|
||||
if(alarmed)
|
||||
nextstate = CLOSED
|
||||
|
||||
// CHECK PRESSURE
|
||||
/obj/machinery/door/firedoor/process()
|
||||
..()
|
||||
/obj/machinery/door/firedoor/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
flick("door_opening", src)
|
||||
if("closing")
|
||||
flick("door_closing", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/update_icon()
|
||||
overlays.Cut()
|
||||
if(density)
|
||||
var/changed = 0
|
||||
lockdown=0
|
||||
// Pressure alerts
|
||||
pdiff = getOPressureDifferential(src.loc)
|
||||
if(pdiff >= FIREDOOR_MAX_PRESSURE_DIFF)
|
||||
lockdown = 1
|
||||
if(!pdiff_alert)
|
||||
pdiff_alert = 1
|
||||
changed = 1 // update_icon()
|
||||
else
|
||||
if(pdiff_alert)
|
||||
pdiff_alert = 0
|
||||
changed = 1 // update_icon()
|
||||
icon_state = "door_closed"
|
||||
if(blocked)
|
||||
overlays += "welded"
|
||||
else
|
||||
icon_state = "door_open"
|
||||
if(blocked)
|
||||
overlays += "welded_open"
|
||||
return
|
||||
|
||||
tile_info = getCardinalAirInfo(src.loc,list("temperature","pressure"))
|
||||
var/old_alerts = dir_alerts
|
||||
for(var/index = 1; index <= 4; index++)
|
||||
var/list/tileinfo=tile_info[index]
|
||||
if(tileinfo==null)
|
||||
continue // Bad data.
|
||||
var/celsius = convert_k2c(tileinfo[1])
|
||||
/obj/machinery/door/firedoor/open()
|
||||
..()
|
||||
latetoggle()
|
||||
return
|
||||
|
||||
var/alerts=0
|
||||
|
||||
// Temperatures
|
||||
if(celsius >= FIREDOOR_MAX_TEMP)
|
||||
alerts |= FIREDOOR_ALERT_HOT
|
||||
lockdown = 1
|
||||
else if(celsius <= FIREDOOR_MIN_TEMP)
|
||||
alerts |= FIREDOOR_ALERT_COLD
|
||||
lockdown = 1
|
||||
|
||||
dir_alerts[index]=alerts
|
||||
|
||||
if(dir_alerts != old_alerts)
|
||||
changed = 1
|
||||
if(changed)
|
||||
update_icon()
|
||||
/obj/machinery/door/firedoor/close()
|
||||
..()
|
||||
if(locate(/mob/living) in get_turf(src))
|
||||
open()
|
||||
return
|
||||
latetoggle()
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/proc/latetoggle()
|
||||
if(operating || stat & NOPOWER || !nextstate)
|
||||
@@ -381,90 +253,30 @@
|
||||
close()
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/close()
|
||||
..()
|
||||
latetoggle()
|
||||
layer = 3.1
|
||||
|
||||
/obj/machinery/door/firedoor/open()
|
||||
..()
|
||||
latetoggle()
|
||||
layer = 2.6
|
||||
|
||||
/obj/machinery/door/firedoor/update_icon()
|
||||
overlays = 0
|
||||
if(density)
|
||||
icon_state = "door_closed"
|
||||
if(blocked)
|
||||
overlays += "welded"
|
||||
if(pdiff_alert)
|
||||
overlays += "palert"
|
||||
if(dir_alerts)
|
||||
for(var/d=1;d<=4;d++)
|
||||
var/cdir = cardinal[d]
|
||||
// Loop while i = [1, 3], incrementing each loop
|
||||
for(var/i=1;i<=ALERT_STATES.len;i++) //
|
||||
if(dir_alerts[d] & (1<<(i-1))) // Check to see if dir_alerts[d] has the i-1th bit set.
|
||||
overlays += new /icon(icon,"alert_[ALERT_STATES[i]]",dir=cdir)
|
||||
else
|
||||
icon_state = "door_open"
|
||||
if(blocked)
|
||||
overlays += "welded_open"
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/do_animate(animation)
|
||||
switch(animation)
|
||||
if("opening")
|
||||
flick("door_opening", src)
|
||||
if("closing")
|
||||
flick("door_closing", src)
|
||||
return
|
||||
|
||||
/obj/machinery/door/firedoor/border_only
|
||||
//These are playing merry hell on ZAS. Sorry fellas :(
|
||||
/*
|
||||
icon = 'icons/obj/doors/edge_Doorfire.dmi'
|
||||
glass = 1 //There is a glass window so you can see through the door
|
||||
//This is needed due to BYOND limitations in controlling visibility
|
||||
heat_proof = 1
|
||||
air_properties_vary_with_direction = 1
|
||||
flags = ON_BORDER
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
|
||||
var/turf/simulated/source = loc
|
||||
var/turf/simulated/destination = get_step(source,dir)
|
||||
|
||||
update_heat_protection(loc)
|
||||
|
||||
if(istype(source)) air_master.tiles_to_update += source
|
||||
if(istype(destination)) air_master.tiles_to_update += destination
|
||||
/obj/machinery/door/firedoor/border_only/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
*/
|
||||
|
||||
/obj/machinery/door/firedoor/multi_tile
|
||||
icon = 'icons/obj/doors/DoorHazard2x1.dmi'
|
||||
width = 2
|
||||
/obj/machinery/door/firedoor/border_only/CheckExit(atom/movable/mover as mob|obj, turf/target as turf)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/multi_tile/triple
|
||||
icon = 'icons/obj/doors/DoorHazard3x1.dmi'
|
||||
width = 3
|
||||
/obj/machinery/door/firedoor/border_only/CanAtmosPass(var/turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
@@ -53,7 +53,8 @@
|
||||
sleep(5)
|
||||
src.density = 0
|
||||
sleep(5)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -69,7 +70,8 @@
|
||||
flick("pdoorc1", src)
|
||||
src.icon_state = "pdoor1"
|
||||
src.SetOpacity(initial(opacity))
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
sleep(5)
|
||||
crush()
|
||||
src.density = 1
|
||||
@@ -147,7 +149,8 @@
|
||||
f3.density = 0
|
||||
f3.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -173,7 +176,8 @@
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
@@ -201,7 +205,8 @@
|
||||
f4.density = 0
|
||||
f4.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -229,7 +234,8 @@
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
@@ -304,7 +310,8 @@
|
||||
f3.density = 0
|
||||
f3.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -330,7 +337,8 @@
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
@@ -358,7 +366,8 @@
|
||||
f4.density = 0
|
||||
f4.SetOpacity(0)
|
||||
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -386,7 +395,8 @@
|
||||
|
||||
if (src.visible)
|
||||
src.SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
sleep(10)
|
||||
src.operating = 0
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
/obj/machinery/door/poddoor/shutters/New()
|
||||
..()
|
||||
layer = 3.1
|
||||
|
||||
|
||||
/obj/machinery/door/poddoor/shutters/preopen
|
||||
icon_state = "shutter0"
|
||||
density = 0
|
||||
@@ -41,7 +41,8 @@
|
||||
sleep(10)
|
||||
density = 0
|
||||
SetOpacity(0)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
operating = 0
|
||||
@@ -59,7 +60,8 @@
|
||||
density = 1
|
||||
if(visible)
|
||||
SetOpacity(1)
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
sleep(10)
|
||||
operating = 0
|
||||
|
||||
@@ -81,6 +81,12 @@
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/machinery/door/window/CanAtmosPass(var/turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
//used in the AStar algorithm to determinate if the turf the door is on is passable
|
||||
/obj/machinery/door/window/CanAStarPass(var/obj/item/weapon/card/id/ID, var/to_dir)
|
||||
return !density || (dir != to_dir) || check_access(ID)
|
||||
@@ -113,7 +119,8 @@
|
||||
|
||||
src.density = 0
|
||||
// src.sd_SetOpacity(0) //TODO: why is this here? Opaque windoors? ~Carn
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
|
||||
if(operating == 1) //emag again
|
||||
src.operating = 0
|
||||
@@ -136,7 +143,8 @@
|
||||
src.density = 1
|
||||
// if(src.visible)
|
||||
// SetOpacity(1) //TODO: why is this here? Opaque windoors? ~Carn
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_freelok_sight()
|
||||
sleep(10)
|
||||
|
||||
src.operating = 0
|
||||
|
||||
@@ -230,11 +230,11 @@
|
||||
open = 0
|
||||
if(!unwrenched && !circuit_removed)
|
||||
src.stat &= ~MAINT
|
||||
user << "You open the [src]'s maintenance panel."
|
||||
user << "You close \the [src]'s maintenance panel."
|
||||
else
|
||||
open = 1
|
||||
src.stat |= MAINT
|
||||
user << "You close the [src]'s maintenance panel."
|
||||
user << "You open \the [src]'s maintenance panel."
|
||||
if(istype(I,/obj/item/weapon/crowbar))
|
||||
if(open)
|
||||
user << "\blue You begin to pry out the [src]'s circuits."
|
||||
@@ -257,6 +257,7 @@
|
||||
return
|
||||
else
|
||||
..(I,user)
|
||||
|
||||
if(istype(I,/obj/item/weapon/circuitboard/programmable))
|
||||
if(!open)
|
||||
user << "You have to open the machine first!"
|
||||
@@ -553,9 +554,9 @@
|
||||
origin_tech = "engineering=3;programming=6"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Scanning Module, 1 Cable."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1)
|
||||
|
||||
//Customization of the machine
|
||||
var/datum/cargoprofile/default = new/datum/cargoprofile()
|
||||
|
||||
@@ -13,18 +13,26 @@
|
||||
/obj/machinery/shield/New()
|
||||
src.dir = pick(1,2,3,4)
|
||||
..()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
|
||||
/obj/machinery/shield/Destroy()
|
||||
opacity = 0
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/machinery/shield/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/machinery/shield/CanPass(atom/movable/mover, turf/target, height, air_group)
|
||||
if(!height || air_group) return 0
|
||||
else return ..()
|
||||
|
||||
/obj/machinery/shield/CanAtmosPass(var/turf/T)
|
||||
return !density
|
||||
|
||||
/obj/machinery/shield/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
if(!istype(W)) return
|
||||
|
||||
|
||||
@@ -189,6 +189,7 @@
|
||||
//world << "now at [removed.temperature]"
|
||||
|
||||
env.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
//world << "turf now at [env.temperature]"
|
||||
|
||||
|
||||
@@ -871,14 +871,10 @@
|
||||
sleep(10)
|
||||
|
||||
if(helmet)
|
||||
if(radiation_level > 2)
|
||||
helmet.decontaminate()
|
||||
if(radiation_level > 1)
|
||||
helmet.clean_blood()
|
||||
|
||||
if(suit)
|
||||
if(radiation_level > 2)
|
||||
suit.decontaminate()
|
||||
if(radiation_level > 1)
|
||||
suit.clean_blood()
|
||||
|
||||
|
||||
@@ -788,16 +788,16 @@
|
||||
/obj/machinery/vending/snack
|
||||
name = "Getmore Chocolate Corp"
|
||||
desc = "A snack machine courtesy of the Getmore Chocolate Corporation, based out of Mars"
|
||||
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!;Now featuring Discount Dan's food line!"
|
||||
product_slogans = "Try our new nougat bar!;Twice the calories for half the price!"
|
||||
product_ads = "The healthiest!;Award-winning chocolate bars!;Mmm! So good!;Oh my god it's so juicy!;Have a snack.;Snacks are good for you!;Have some more Getmore!;Best quality snacks straight from mars.;We love chocolate!;Try our new jerky!"
|
||||
icon_state = "snack"
|
||||
products = list(/obj/item/weapon/reagent_containers/food/snacks/candy/candybar = 6,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 6,/obj/item/weapon/reagent_containers/food/snacks/chips =6,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 6,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 6,/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 6,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6,/obj/item/weapon/reagent_containers/food/drinks/dansoup/random = 20,/obj/item/weapon/reagent_containers/food/snacks/danburrito/random = 20)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 6)
|
||||
contraband = list(/obj/item/weapon/reagent_containers/food/snacks/syndicake = 6)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/candy/candybar = 20,/obj/item/weapon/reagent_containers/food/drinks/dry_ramen = 30,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chips =25,/obj/item/weapon/reagent_containers/food/snacks/sosjerky = 30,/obj/item/weapon/reagent_containers/food/snacks/no_raisin = 20,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 30,/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 25,/obj/item/weapon/reagent_containers/food/drinks/dansoup/random = 10,/obj/item/weapon/reagent_containers/food/snacks/danburrito/random = 12)
|
||||
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie = 30,/obj/item/weapon/reagent_containers/food/snacks/cheesiehonkers = 25)
|
||||
refill_canister = /obj/item/weapon/vending_refill/snack
|
||||
|
||||
/obj/machinery/vending/snack/New()
|
||||
@@ -845,20 +845,6 @@
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
|
||||
//New Cola Machine
|
||||
/obj/machinery/vending/soda
|
||||
name = "Donk Co. Cola"
|
||||
desc = "A cola vendor provided by Donk Company, Inc."
|
||||
icon_state = "soda"
|
||||
product_slogans = "Donk Co. Cola: Refreshing, delicious, and robust!"
|
||||
product_ads = "Refreshing!;Hope you're thirsty!;Over 1 million drinks sold!;Thirsty? Why not cola?;Please, have a drink!;Drink up!;The best drinks in space."
|
||||
products = list(/obj/item/weapon/reagent_containers/food/drinks/cans/robust = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/pubber = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/grifeo = 10,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grones = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/runoff = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/horror = 10,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/orangeaid = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/limeaid = 10, /obj/item/weapon/reagent_containers/food/drinks/cans/decirprevo = 10)
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/cans/robust = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/pubber = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/grifeo = 35,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/grones = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/runoff = 35, /obj/item/weapon/reagent_containers/food/drinks/cans/horror = 35,
|
||||
/obj/item/weapon/reagent_containers/food/drinks/cans/orangeaid = 50, /obj/item/weapon/reagent_containers/food/drinks/cans/limeaid = 50, /obj/item/weapon/reagent_containers/food/drinks/cans/decirprevo = 60)
|
||||
|
||||
|
||||
//This one's from bay12
|
||||
/obj/machinery/vending/cart
|
||||
|
||||
@@ -44,9 +44,6 @@
|
||||
for(var/atom/A in contents)
|
||||
A.clean_blood()
|
||||
|
||||
for(var/obj/item/I in contents)
|
||||
I.decontaminate()
|
||||
|
||||
//Tanning!
|
||||
for(var/obj/item/stack/sheet/hairlesshide/HH in contents)
|
||||
var/obj/item/stack/sheet/wetleather/WL = new(src)
|
||||
|
||||
@@ -668,7 +668,7 @@
|
||||
check_for_internal_damage(list(MECHA_INT_FIRE,MECHA_INT_TEMP_CONTROL,MECHA_INT_CONTROL_LOST,MECHA_INT_SHORT_CIRCUIT),1)
|
||||
return
|
||||
|
||||
/obj/mecha/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/mecha/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature>src.max_temperature)
|
||||
src.log_message("Exposed to dangerous temperature.",1)
|
||||
src.take_damage(5,"fire")
|
||||
|
||||
@@ -35,7 +35,9 @@
|
||||
..()
|
||||
|
||||
/obj/structure/alien/resin/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/alien/resin/wall
|
||||
name = "resin wall"
|
||||
@@ -229,7 +231,7 @@
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/structure/alien/weeds/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/alien/weeds/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
@@ -387,7 +389,7 @@
|
||||
del(src) //Remove the egg after it has been hit after bursting.
|
||||
|
||||
|
||||
/obj/structure/alien/egg/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/alien/egg/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 500)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
@@ -118,10 +118,7 @@
|
||||
..()
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(istype(T))
|
||||
var/datum/gas_mixture/payload = new
|
||||
payload.toxins = 60
|
||||
T.zone.air.merge(payload)
|
||||
T.hotspot_expose(1000, CELL_VOLUME)
|
||||
T.atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 3)
|
||||
|
||||
/////////////////////
|
||||
|
||||
|
||||
@@ -171,7 +171,6 @@ steam.start() -- spawns the effect
|
||||
..()
|
||||
playsound(src.loc, "sparks", 100, 1)
|
||||
var/turf/T = loc
|
||||
|
||||
if (istype(T, /turf))
|
||||
T.hotspot_expose(1000, 100)
|
||||
spawn (100)
|
||||
@@ -953,7 +952,7 @@ steam.start() -- spawns the effect
|
||||
|
||||
// foam disolves when heated
|
||||
// except metal foams
|
||||
/obj/effect/effect/foam/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/effect/effect/foam/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!metal && prob(max(0, exposed_temperature - 475)))
|
||||
flick("[icon_state]-disolve", src)
|
||||
|
||||
@@ -1040,16 +1039,19 @@ steam.start() -- spawns the effect
|
||||
|
||||
New()
|
||||
..()
|
||||
update_nearby_tiles(1)
|
||||
|
||||
|
||||
air_update_turf(1)
|
||||
|
||||
Destroy()
|
||||
|
||||
density = 0
|
||||
update_nearby_tiles(1)
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
proc/updateicon()
|
||||
if(metal == 1)
|
||||
icon_state = "metalfoam"
|
||||
@@ -1109,6 +1111,9 @@ steam.start() -- spawns the effect
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
|
||||
CanAtmosPass()
|
||||
return !density
|
||||
|
||||
/datum/effect/effect/system/reagents_explosion
|
||||
var/amount // TNT equivalent
|
||||
var/flashing = 0 // does explosion creates flash effect?
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
else
|
||||
return
|
||||
|
||||
/obj/effect/glowshroom/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/effect/glowshroom/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
endurance -= 5
|
||||
CheckEndurance()
|
||||
|
||||
@@ -46,35 +46,12 @@
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggern2o(obj)
|
||||
//example: n2o triggerproc
|
||||
//note: im lazy
|
||||
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
trace_gas.moles = 30
|
||||
payload += trace_gas
|
||||
|
||||
target.zone.air.merge(payload)
|
||||
|
||||
atmos_spawn_air(SPAWN_N2O, 360)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
/obj/effect/mine/proc/triggerplasma(obj)
|
||||
for (var/turf/simulated/floor/target in range(1,src))
|
||||
if(!target.blocks_air)
|
||||
|
||||
var/datum/gas_mixture/payload = new
|
||||
|
||||
payload.toxins = 30
|
||||
|
||||
target.zone.air.merge(payload)
|
||||
|
||||
target.hotspot_expose(1000, CELL_VOLUME)
|
||||
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 360)
|
||||
spawn(0)
|
||||
del(src)
|
||||
|
||||
|
||||
@@ -110,11 +110,15 @@
|
||||
icon = 'icons/mob/screen1.dmi'
|
||||
icon_state = "x"
|
||||
var/btype = 0 // 0=radio, 1=prox, 2=time
|
||||
var/btemp1 = 1500
|
||||
var/btemp2 = 1000 // tank temperatures
|
||||
|
||||
timer
|
||||
btype = 2
|
||||
|
||||
syndicate
|
||||
btemp1 = 150
|
||||
btemp2 = 20
|
||||
|
||||
proximity
|
||||
btype = 1
|
||||
@@ -136,14 +140,8 @@
|
||||
PT.master = V
|
||||
OT.master = V
|
||||
|
||||
PT.air_contents.temperature = PLASMA_FLASHPOINT
|
||||
PT.air_contents.toxins = 12
|
||||
PT.air_contents.carbon_dioxide = 8
|
||||
PT.air_contents.update_values()
|
||||
|
||||
OT.air_contents.temperature = PLASMA_FLASHPOINT
|
||||
OT.air_contents.oxygen = 20
|
||||
OT.air_contents.update_values()
|
||||
PT.air_contents.temperature = btemp1 + T0C
|
||||
OT.air_contents.temperature = btemp2 + T0C
|
||||
|
||||
var/obj/item/device/assembly/S
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
if(health <= 0)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/spider/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/effect/spider/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
health -= 5
|
||||
healthcheck()
|
||||
|
||||
@@ -39,5 +39,5 @@
|
||||
// Make space carp
|
||||
var/mob/living/simple_animal/hostile/carp/C = new /mob/living/simple_animal/hostile/carp(get_turf(src))
|
||||
// Make carp non-hostile to user, yes this means
|
||||
C.faction |= "\ref[owner]"
|
||||
C.faction |= list("syndicate", "\ref[owner]")
|
||||
qdel(src)
|
||||
@@ -1223,10 +1223,10 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
if (istype(A, /obj/machinery/atmospherics/pipe/tank))
|
||||
var/obj/icon = A
|
||||
for (var/mob/O in viewers(user, null))
|
||||
O << "\red [user] has used [src] on \icon[icon] [A]"
|
||||
|
||||
var/obj/machinery/atmospherics/pipe/tank/T = A
|
||||
for (var/mob/O in viewers(user, null))
|
||||
O << "\red [user] has used [src] on \icon[icon] [T]"
|
||||
|
||||
var/pressure = T.parent.air.return_pressure()
|
||||
var/total_moles = T.parent.air.total_moles()
|
||||
|
||||
@@ -1424,4 +1424,4 @@ var/global/list/obj/item/device/pda/PDAs = list()
|
||||
|
||||
/obj/item/device/pda/proc/JFLOG(message as text)
|
||||
if (config)
|
||||
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
|
||||
log_pda("[JFLOG_DescribeSelf()] >>> [message]")
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/obj/item/latexballon/bullet_act()
|
||||
burst()
|
||||
|
||||
/obj/item/latexballon/fire_act(datum/gas_mixture/air, temperature, volume)
|
||||
/obj/item/latexballon/temperature_expose(datum/gas_mixture/air, temperature, volume)
|
||||
if(temperature > T0C+100)
|
||||
burst()
|
||||
return
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
var/tape_type = /obj/item/tape
|
||||
var/icon_base
|
||||
|
||||
var/list/image/hazard_overlays
|
||||
var/list/tape_roll_applications = list()
|
||||
|
||||
/obj/item/tape
|
||||
name = "tape"
|
||||
icon = 'icons/policetape.dmi'
|
||||
@@ -16,6 +19,24 @@
|
||||
density = 1
|
||||
var/icon_base
|
||||
|
||||
/obj/item/tape/New()
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/New() //just using tape is not enough to guarantee the overlays are genned
|
||||
..()
|
||||
if(!hazard_overlays)
|
||||
hazard_overlays = list()
|
||||
hazard_overlays["[NORTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "N")
|
||||
hazard_overlays["[EAST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "E")
|
||||
hazard_overlays["[SOUTH]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "S")
|
||||
hazard_overlays["[WEST]"] = new/image('icons/effects/warning_stripes.dmi', icon_state = "W")
|
||||
|
||||
/obj/item/taperoll/police
|
||||
name = "police tape"
|
||||
desc = "A roll of police tape used to block off crime scenes from the public."
|
||||
@@ -97,7 +118,10 @@
|
||||
usr << "\blue You finish placing the [src]." //Git Test
|
||||
|
||||
/obj/item/taperoll/afterattack(var/atom/A, mob/user as mob, proximity)
|
||||
if (proximity && istype(A, /obj/machinery/door/airlock))
|
||||
if (!proximity)
|
||||
return
|
||||
|
||||
if(istype(A, /obj/machinery/door/airlock))
|
||||
var/turf/T = get_turf(A)
|
||||
var/obj/item/tape/P = new tape_type(T.x,T.y,T.z)
|
||||
P.loc = locate(T.x,T.y,T.z)
|
||||
@@ -105,6 +129,23 @@
|
||||
P.layer = 3.2
|
||||
user << "\blue You finish placing the [src]."
|
||||
|
||||
if (istype(A, /turf/simulated/floor) ||istype(A, /turf/unsimulated/floor))
|
||||
var/turf/F = A
|
||||
var/direction = user.loc == F ? user.dir : turn(user.dir, 180)
|
||||
var/icon/hazard_overlay = hazard_overlays["[direction]"]
|
||||
if(tape_roll_applications[F] == null)
|
||||
tape_roll_applications[F] = 0
|
||||
|
||||
if(tape_roll_applications[F] & direction) // hazard_overlay in F.overlays wouldn't work.
|
||||
user.visible_message("[user] uses the adhesive of \the [src] to remove area markings from \the [F].", "You use the adhesive of \the [src] to remove area markings from \the [F].")
|
||||
F.overlays -= hazard_overlay
|
||||
tape_roll_applications[F] &= ~direction
|
||||
else
|
||||
user.visible_message("[user] applied \the [src] on \the [F] to create area markings.", "You apply \the [src] on \the [F] to create area markings.")
|
||||
F.overlays |= hazard_overlay
|
||||
tape_roll_applications[F] |= direction
|
||||
return
|
||||
|
||||
/obj/item/tape/Bumped(M as mob)
|
||||
if(src.allowed(M))
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
icon_state = "sheet-glass"
|
||||
g_amt = 0
|
||||
created_window = /obj/structure/window/basic
|
||||
|
||||
|
||||
/obj/item/stack/sheet/glass/full/New()
|
||||
..()
|
||||
amount = 50
|
||||
@@ -106,6 +106,7 @@
|
||||
W.ini_dir = W.dir
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
W.air_update_turf(1)
|
||||
src.use(1)
|
||||
if("Full Window")
|
||||
if(!src) return 1
|
||||
@@ -119,6 +120,7 @@
|
||||
var/obj/structure/window/W = new full_window( user.loc, 0 )
|
||||
W.state = 0
|
||||
W.anchored = 0
|
||||
W.air_update_turf(1)
|
||||
src.use(2)
|
||||
return 0
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
//Step two - washing..... it's actually in washing machine code.
|
||||
|
||||
//Step three - drying
|
||||
/obj/item/stack/sheet/wetleather/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/item/stack/sheet/wetleather/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
..()
|
||||
if(exposed_temperature >= drying_threshold_temperature)
|
||||
wetness--
|
||||
|
||||
@@ -25,6 +25,10 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
|
||||
new/datum/stack_recipe("brown comfy chair", /obj/structure/stool/bed/chair/comfy/brown, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("lime comfy chair", /obj/structure/stool/bed/chair/comfy/lime, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("teal comfy chair", /obj/structure/stool/bed/chair/comfy/teal, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("red comfy chair", /obj/structure/stool/bed/chair/comfy/red, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("blue comfy chair", /obj/structure/stool/bed/chair/comfy/blue, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("purple comfy chair", /obj/structure/stool/bed/chair/comfy/purp, 2, one_per_turf = 1, on_floor = 1), \
|
||||
new/datum/stack_recipe("green comfy chair", /obj/structure/stool/bed/chair/comfy/green, 2, one_per_turf = 1, on_floor = 1), \
|
||||
), 2), \
|
||||
null, \
|
||||
new/datum/stack_recipe("table parts", /obj/item/weapon/table_parts, 2), \
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
icon = 'icons/obj/trash.dmi'
|
||||
w_class = 1.0
|
||||
desc = "This is rubbish."
|
||||
autoignition_temperature = AUTOIGNITION_PAPER
|
||||
|
||||
raisins
|
||||
name = "4no raisins"
|
||||
icon_state= "4no_raisins"
|
||||
|
||||
@@ -156,7 +156,7 @@ RCD
|
||||
if(do_after(user, 50))
|
||||
if(!useResource(20, user)) return 0
|
||||
activate()
|
||||
del(A)
|
||||
qdel(A)
|
||||
return 1
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
m_amt = 0
|
||||
max_water = 30
|
||||
sprite_name = "miniFE"
|
||||
|
||||
|
||||
/obj/item/weapon/extinguisher/examine()
|
||||
set src in usr
|
||||
|
||||
@@ -160,6 +160,7 @@
|
||||
if(isliving(atm)) //For extinguishing mobs on fire
|
||||
var/mob/living/M = atm
|
||||
M.ExtinguishMob()
|
||||
|
||||
if(W.loc == my_target) break
|
||||
sleep(2)
|
||||
|
||||
@@ -168,4 +169,3 @@
|
||||
step(user, user.inertia_dir)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -189,8 +189,8 @@
|
||||
/obj/item/weapon/flamethrower/proc/flame_turf(turflist)
|
||||
if(!lit || operating) return
|
||||
operating = 1
|
||||
for(var/turf/T in turflist)
|
||||
if(T.density || istype(T, /turf/space))
|
||||
for(var/turf/simulated/T in turflist)
|
||||
if(!T.air)
|
||||
break
|
||||
if(!previousturf && length(turflist)>1)
|
||||
previousturf = get_turf(src)
|
||||
@@ -210,17 +210,16 @@
|
||||
/obj/item/weapon/flamethrower/proc/ignite_turf(turf/target)
|
||||
//TODO: DEFERRED Consider checking to make sure tank pressure is high enough before doing this...
|
||||
//Transfer 5% of current tank air contents to turf
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100))
|
||||
//air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
new/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel(target,air_transfer.toxins,get_dir(loc,target))
|
||||
air_transfer.toxins = 0
|
||||
var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.05)
|
||||
air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE
|
||||
target.assume_air(air_transfer)
|
||||
//Burn it based on transfered gas
|
||||
//target.hotspot_expose(part4.air_contents.temperature*2,300)
|
||||
target.hotspot_expose((ptank.air_contents.temperature*2) + 380,500) // -- More of my "how do I shot fire?" dickery. -- TLE
|
||||
//location.hotspot_expose(1000,500,1)
|
||||
air_master.add_to_active(target, 0)
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/flamethrower/full/New(var/loc)
|
||||
..()
|
||||
weldtool = new /obj/item/weapon/weldingtool(src)
|
||||
|
||||
@@ -8,8 +8,6 @@
|
||||
var/mob/affecting = null
|
||||
var/deity_name = "Christ"
|
||||
|
||||
autoignition_temperature = 522 // Kelvin
|
||||
|
||||
suicide_act(mob/user)
|
||||
viewers(user) << "<span class='warning'><b>[user] stares into [src.name] and attempts to trascend understanding of the universe!</b></span>"
|
||||
return (user.dust())
|
||||
@@ -20,8 +18,6 @@
|
||||
desc = "To be applied to the head repeatedly."
|
||||
icon_state ="bible"
|
||||
|
||||
autoignition_temperature = 0 // Not actually paper
|
||||
|
||||
/obj/item/weapon/storage/bible/booze/New()
|
||||
..()
|
||||
new /obj/item/weapon/reagent_containers/food/drinks/cans/beer(src)
|
||||
|
||||
@@ -26,9 +26,6 @@
|
||||
item_state = "syringe_kit"
|
||||
foldable = /obj/item/stack/sheet/cardboard //BubbleWrap
|
||||
|
||||
autoignition_temperature = 522 // Kelvin
|
||||
|
||||
|
||||
/obj/item/weapon/storage/box/large
|
||||
name = "large box"
|
||||
desc = "You could build a fort with this."
|
||||
@@ -39,8 +36,6 @@
|
||||
storage_slots = 21
|
||||
max_combined_w_class = 42 // 21*2
|
||||
|
||||
autoignition_temperature = 530 // Kelvin
|
||||
|
||||
/obj/item/weapon/storage/box/survival
|
||||
New()
|
||||
..()
|
||||
|
||||
@@ -80,9 +80,8 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen
|
||||
name = "Jetpack (Oxygen)"
|
||||
@@ -92,9 +91,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/oxygen/harness
|
||||
name = "jet harness (oxygen)"
|
||||
@@ -113,9 +110,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
/obj/item/weapon/tank/jetpack/carbondioxide
|
||||
name = "Jetpack (Carbon Dioxide)"
|
||||
@@ -128,9 +123,7 @@
|
||||
..()
|
||||
src.ion_trail = new /datum/effect/effect/system/ion_trail_follow()
|
||||
src.ion_trail.set_up(src)
|
||||
//src.air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust(0,(6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
return
|
||||
air_contents.carbon_dioxide = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
|
||||
examine()
|
||||
set src in usr
|
||||
|
||||
@@ -19,8 +19,7 @@
|
||||
|
||||
New()
|
||||
..()
|
||||
//src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
air_contents.adjust((6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C))
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
return
|
||||
|
||||
|
||||
@@ -59,9 +58,6 @@
|
||||
trace_gas.moles = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
|
||||
src.air_contents.trace_gases += trace_gas
|
||||
//
|
||||
air_contents.update_values()
|
||||
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -85,12 +81,8 @@
|
||||
|
||||
src.air_contents.oxygen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * O2STANDARD
|
||||
src.air_contents.nitrogen = (6*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C) * N2STANDARD
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Plasma
|
||||
*/
|
||||
@@ -101,15 +93,13 @@
|
||||
flags = CONDUCT
|
||||
slot_flags = null //they have no straps!
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/New()
|
||||
..()
|
||||
|
||||
src.air_contents.toxins = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/tank/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
..()
|
||||
|
||||
@@ -152,9 +142,6 @@
|
||||
New()
|
||||
..()
|
||||
src.air_contents.oxygen = (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
|
||||
return
|
||||
|
||||
|
||||
@@ -182,7 +169,6 @@
|
||||
New()
|
||||
..()
|
||||
src.air_contents.oxygen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
src.air_contents.update_values()
|
||||
return
|
||||
|
||||
/*
|
||||
@@ -199,8 +185,6 @@
|
||||
..()
|
||||
|
||||
src.air_contents.nitrogen = (3*ONE_ATMOSPHERE)*70/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
return
|
||||
|
||||
/obj/item/weapon/tank/nitrogen/examine()
|
||||
@@ -224,7 +208,4 @@
|
||||
..()
|
||||
src.air_contents.oxygen -= (3*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
src.air_contents.nitrogen = (10*ONE_ATMOSPHERE)*volume/(R_IDEAL_GAS_EQUATION*T20C)
|
||||
//
|
||||
src.air_contents.update_values()
|
||||
|
||||
return
|
||||
@@ -357,8 +357,8 @@
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
update_nearby_tiles()
|
||||
var/hotspot = (locate(/obj/fire) in T)
|
||||
air_update_turf()
|
||||
var/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot && !istype(T, /turf/space))
|
||||
var/CT = 10
|
||||
var/datum/gas_mixture/lowertemp = T.remove_air( T:air:total_moles() )
|
||||
|
||||
@@ -267,7 +267,6 @@
|
||||
var/turf/location = get_turf(user)
|
||||
if (istype(location, /turf))
|
||||
location.hotspot_expose(700, 50, 1)
|
||||
|
||||
if(isliving(O))
|
||||
var/mob/living/L = O
|
||||
L.IgniteMob()
|
||||
|
||||
@@ -178,14 +178,14 @@ obj/item/weapon/twohanded/
|
||||
if(A && wielded && (istype(A,/obj/structure/window) || istype(A,/obj/structure/grille))) //destroys windows and grilles in one hit
|
||||
|
||||
if(istype(A,/obj/structure/window))
|
||||
var/pdiff=performWallPressureCheck(A.loc)
|
||||
/* var/pdiff=performWallPressureCheck(A.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(A.loc)]!")
|
||||
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")
|
||||
log_admin("[A] with pdiff [pdiff] fire-axed by [user.real_name] ([user.ckey]) at [A.loc]!")*///TODO: Figure out how the hell to remake this proc
|
||||
var/obj/structure/window/W = A
|
||||
W.destroy()
|
||||
else
|
||||
del(A)
|
||||
qdel(A)
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
icon = 'icons/obj/barsigns.dmi'
|
||||
icon_state = "empty"
|
||||
anchored = 1
|
||||
var/nopick = 0
|
||||
New()
|
||||
ChangeSign(pick("magmasea", "limbo", "rustyaxe", "armokbar", "brokendrum", "meadbay", "thecavern", "cindikate", "theorchard", "lv426", "zocalo", "4theemprah", "ishimura", "tardis", "quarks", "tenforward", "thepranicngpony", "vault13", "solaris", "thehive", "cantina", "theouterspess", "milliways42", "thetimeofeve", "spaceasshole", "dwarffortress", "thebark", "thedrunkcarp", "theharmbaton", "thenest", "officerbeersky", "thesingulo"))
|
||||
return
|
||||
@@ -10,3 +11,18 @@
|
||||
//on = 0
|
||||
//brightness_on = 4 //uncomment these when the lighting fixes get in
|
||||
return
|
||||
|
||||
/obj/structure/sign/double/barsign/attackby(obj/item/I, mob/user)
|
||||
if(nopick)
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/weapon/card/id))
|
||||
var/obj/item/weapon/card/id/card = I
|
||||
if(access_bar in card.GetAccess())
|
||||
var/sign_type = input(user, "What would you like to change the barsign to?") as null|anything in list("Off", "Magma Sea", "Limbo", "Rusty Axe", "Armok Bar", "Broken Drum", "Mead bay", "The Cavern", "Cindi Kate", "The Orchard", "LV 426", "Zocalo", "4 The Emprah", "Ishimura", "Tardis", "Quarks", "Ten Forward", "The Pranicng Pony", "Vault 13", "Solaris", "The Hive", "Cantina", "The Outer Spess", "Milliways 42", "The Time Of Eve", "Space Asshole", "Dwarf Fortress", "The Bark", "The Drunk Carp", "The Harm Baton", "The Nest", "Officer Beersky", "The Singulo", "On")
|
||||
if(sign_type == null)
|
||||
return
|
||||
else
|
||||
sign_type = replacetext(lowertext(sign_type), " ", "") // lowercase, strip spaces - along with choices for user options, avoids huge if-else-else
|
||||
src.ChangeSign(sign_type)
|
||||
user << "You change the barsign."
|
||||
@@ -105,6 +105,10 @@
|
||||
new /obj/item/weapon/storage/backpack/cultpack (src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/weapon/storage/fancy/candle_box(src)
|
||||
new /obj/item/clothing/gloves/ring/silver(src)
|
||||
new /obj/item/clothing/gloves/ring/silver(src)
|
||||
new /obj/item/clothing/gloves/ring/gold(src)
|
||||
new /obj/item/clothing/gloves/ring/gold(src)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,17 @@
|
||||
#define SHOWER_OPEN_LAYER OBJ_LAYER + 0.4
|
||||
#define SHOWER_CLOSED_LAYER MOB_LAYER + 0.1
|
||||
|
||||
/obj/structure/curtain
|
||||
icon = 'icons/obj/curtain.dmi'
|
||||
name = "curtain"
|
||||
icon_state = "closed"
|
||||
layer = MOB_LAYER + 0.1
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
opacity = 1
|
||||
density = 0
|
||||
|
||||
/obj/structure/curtain/open
|
||||
icon_state = "open"
|
||||
layer = OBJ_LAYER
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
opacity = 0
|
||||
|
||||
/obj/structure/curtain/bullet_act(obj/item/projectile/P, def_zone)
|
||||
@@ -27,10 +30,10 @@
|
||||
opacity = !opacity
|
||||
if(opacity)
|
||||
icon_state = "closed"
|
||||
layer = MOB_LAYER + 0.1
|
||||
layer = SHOWER_CLOSED_LAYER
|
||||
else
|
||||
icon_state = "open"
|
||||
layer = OBJ_LAYER
|
||||
layer = SHOWER_OPEN_LAYER
|
||||
|
||||
/obj/structure/curtain/black
|
||||
name = "black curtain"
|
||||
@@ -45,3 +48,12 @@
|
||||
name = "shower curtain"
|
||||
color = "#ACD1E9"
|
||||
alpha = 200
|
||||
|
||||
/obj/structure/curtain/open/shower/engineering
|
||||
color = "#FFA500"
|
||||
|
||||
/obj/structure/curtain/open/shower/security
|
||||
color = "#AA0000"
|
||||
|
||||
#undef SHOWER_OPEN_LAYER
|
||||
#undef SHOWER_CLOSED_LAYER
|
||||
@@ -6,68 +6,6 @@
|
||||
// Also affects admin alerts.
|
||||
#define FALSEDOOR_MAX_PRESSURE_DIFF 25.0
|
||||
|
||||
/**
|
||||
* Gets the highest and lowest pressures from the tiles in cardinal directions
|
||||
* around us, then checks the difference.
|
||||
*/
|
||||
/proc/getOPressureDifferential(var/turf/loc)
|
||||
var/minp=16777216;
|
||||
var/maxp=0;
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/T=get_turf(get_step(loc,dir))
|
||||
var/cp=0
|
||||
if(T && istype(T) && T.zone)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
cp = environment.return_pressure()
|
||||
else
|
||||
if(istype(T,/turf/simulated))
|
||||
continue
|
||||
if(cp<minp)minp=cp
|
||||
if(cp>maxp)maxp=cp
|
||||
return abs(minp-maxp)
|
||||
|
||||
// Checks pressure here vs. around us.
|
||||
/proc/performFalseWallPressureCheck(var/turf/loc)
|
||||
var/turf/simulated/lT=loc
|
||||
if(!istype(lT) || !lT.zone)
|
||||
return 0
|
||||
var/datum/gas_mixture/myenv=lT.return_air()
|
||||
var/pressure=myenv.return_pressure()
|
||||
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/T=get_turf(get_step(loc,dir))
|
||||
if(T && istype(T) && T.zone)
|
||||
var/datum/gas_mixture/environment = T.return_air()
|
||||
var/pdiff = abs(pressure - environment.return_pressure())
|
||||
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
|
||||
return pdiff
|
||||
return 0
|
||||
|
||||
/proc/performWallPressureCheck(var/turf/loc)
|
||||
var/pdiff = getOPressureDifferential(loc)
|
||||
if(pdiff > FALSEDOOR_MAX_PRESSURE_DIFF)
|
||||
return pdiff
|
||||
return 0
|
||||
|
||||
/client/proc/pdiff()
|
||||
set name = "Get PDiff"
|
||||
set category = "Debug"
|
||||
|
||||
if(!mob || !holder)
|
||||
return
|
||||
var/turf/T = mob.loc
|
||||
|
||||
if (!( istype(T, /turf) ))
|
||||
return
|
||||
|
||||
var/pdiff = getOPressureDifferential(T)
|
||||
var/fwpcheck=performFalseWallPressureCheck(T)
|
||||
var/wpcheck=performWallPressureCheck(T)
|
||||
|
||||
src << "Pressure Differential (cardinals): [pdiff]"
|
||||
src << "FWPCheck: [fwpcheck]"
|
||||
src << "WPCheck: [wpcheck]"
|
||||
|
||||
/obj/structure/falsewall
|
||||
name = "wall"
|
||||
desc = "A huge chunk of metal used to seperate rooms."
|
||||
@@ -97,7 +35,7 @@
|
||||
for(var/obj/structure/falsewall/W in range(temploc,1))
|
||||
W.relativewall()
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/falsewall/relativewall()
|
||||
|
||||
if(!density)
|
||||
@@ -140,7 +78,7 @@
|
||||
SetOpacity(1)
|
||||
update_icon()
|
||||
opening = 0
|
||||
|
||||
|
||||
/obj/structure/falsewall/proc/do_the_flick()
|
||||
if(density)
|
||||
flick("[walltype]fwall_opening", src)
|
||||
@@ -154,7 +92,7 @@
|
||||
relativewall()
|
||||
else
|
||||
icon_state = "[walltype]fwall_open"
|
||||
|
||||
|
||||
/obj/structure/falsewall/proc/ChangeToWall(delete = 1)
|
||||
var/turf/T = get_turf(src)
|
||||
if(!walltype || walltype == "metal")
|
||||
@@ -257,7 +195,7 @@
|
||||
junction |= get_dir(src,W)
|
||||
icon_state = "rwall[junction]"
|
||||
return
|
||||
|
||||
|
||||
/*
|
||||
* Uranium Falsewalls
|
||||
*/
|
||||
@@ -321,7 +259,17 @@
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = ""
|
||||
mineral = "plasma"
|
||||
walltype = "plasma"
|
||||
walltype = "plasma"
|
||||
|
||||
/obj/structure/falsewall/plasma/proc/burnbabyburn(user)
|
||||
playsound(src, 'sound/items/Welder.ogg', 100, 1)
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 400)
|
||||
new /obj/structure/girder/displaced(loc)
|
||||
qdel(src)
|
||||
|
||||
/obj/structure/falsewall/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
burnbabyburn()
|
||||
|
||||
//-----------wtf?-----------start
|
||||
/obj/structure/falsewall/clown
|
||||
|
||||
@@ -10,18 +10,6 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/structure/window/full/update_nearby_tiles(need_rebuild)
|
||||
if(!air_master) return 0
|
||||
if(!loc) return 0
|
||||
|
||||
var/turf/simulated/source = get_turf(src)
|
||||
if(istype(source))
|
||||
air_master.tiles_to_update |= source
|
||||
for(var/dir in cardinal)
|
||||
var/turf/simulated/target = get_step(source,dir)
|
||||
if(istype(target)) air_master.tiles_to_update |= target
|
||||
return 1
|
||||
|
||||
/obj/structure/window/full/is_fulltile()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -71,17 +71,10 @@
|
||||
if(/obj/item/stack/sheet/metal, /obj/item/stack/sheet/metal/cyborg)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false wall made by [user.real_name] (user.ckey) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
user << "\blue Now adding plating..."
|
||||
@@ -99,17 +92,10 @@
|
||||
if(/obj/item/stack/sheet/plasteel)
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall/reinforced (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false rwall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false rwall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
new /obj/structure/falsewall/reinforced (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if (src.icon_state == "reinforced") //I cant believe someone would actually write this line of code...
|
||||
if(S.amount < 1) return ..()
|
||||
@@ -139,18 +125,11 @@
|
||||
var/M = S.sheettype
|
||||
if(!anchored)
|
||||
if(S.amount < 2) return
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(!pdiff)
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
new F (src.loc)
|
||||
del(src)
|
||||
else
|
||||
user << "\red There is too much air moving through the gap! The door wouldn't stay closed if you built it."
|
||||
message_admins("Attempted false [M] wall made by [user.real_name] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)] had a pressure difference of [pdiff]!")
|
||||
log_admin("Attempted false [M] wall made by [user.real_name] ([user.ckey]) at [loc] had a pressure difference of [pdiff]!")
|
||||
return
|
||||
S.use(2)
|
||||
user << "\blue You create a false wall! Push on it to open or close the passage."
|
||||
var/F = text2path("/obj/structure/falsewall/[M]")
|
||||
new F (src.loc)
|
||||
del(src)
|
||||
else
|
||||
if(S.amount < 2) return ..()
|
||||
user << "\blue Now adding plating..."
|
||||
@@ -187,7 +166,7 @@
|
||||
if(health <= 0)
|
||||
new /obj/item/stack/sheet/metal(get_turf(src))
|
||||
del(src)
|
||||
|
||||
|
||||
if(istype(Proj ,/obj/item/projectile/beam/pulse))
|
||||
src.ex_act(2)
|
||||
..()
|
||||
@@ -248,7 +227,7 @@
|
||||
else if(istype(W, /obj/item/weapon/pickaxe/diamonddrill))
|
||||
user << "\blue You drill through the girder!"
|
||||
dismantle()
|
||||
|
||||
|
||||
/obj/structure/cultgirder/proc/dismantle()
|
||||
new /obj/effect/decal/remains/human(get_turf(src))
|
||||
qdel(src)
|
||||
@@ -256,7 +235,7 @@
|
||||
/obj/structure/cultgirder/blob_act()
|
||||
if(prob(40))
|
||||
dismantle()
|
||||
|
||||
|
||||
/obj/structure/cultgirder/bullet_act(var/obj/item/projectile/Proj) //No beam check- How else will you destroy the cult girder with silver bullets?????
|
||||
health -= Proj.damage
|
||||
..()
|
||||
|
||||
@@ -258,7 +258,7 @@
|
||||
return 0
|
||||
return 0
|
||||
|
||||
/obj/structure/grille/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/grille/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(!destroyed)
|
||||
if(exposed_temperature > T0C + 1500)
|
||||
health -= 1
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
|
||||
New(location)
|
||||
..()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf()
|
||||
|
||||
Del()
|
||||
update_nearby_tiles()
|
||||
air_update_turf()
|
||||
..()
|
||||
|
||||
CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
@@ -217,7 +217,7 @@
|
||||
Close()
|
||||
else
|
||||
Open()
|
||||
update_nearby_tiles()
|
||||
air_update_turf()
|
||||
|
||||
proc/Open()
|
||||
isSwitchingStates = 1
|
||||
|
||||
@@ -20,12 +20,17 @@
|
||||
..()
|
||||
icon_state = mineralType
|
||||
name = "[mineralType] door"
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
|
||||
Destroy()
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
Bumped(atom/user)
|
||||
..()
|
||||
if(!state)
|
||||
@@ -51,6 +56,9 @@
|
||||
return !opacity
|
||||
return !density
|
||||
|
||||
CanAtmosPass()
|
||||
return !density
|
||||
|
||||
proc/TryToSwitchState(atom/user)
|
||||
if(isSwitchingStates) return
|
||||
if(ismob(user))
|
||||
@@ -82,7 +90,7 @@
|
||||
state = 1
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf()
|
||||
|
||||
proc/Close()
|
||||
isSwitchingStates = 1
|
||||
@@ -94,7 +102,7 @@
|
||||
state = 0
|
||||
update_icon()
|
||||
isSwitchingStates = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf()
|
||||
|
||||
update_icon()
|
||||
if(state)
|
||||
@@ -187,34 +195,21 @@
|
||||
/obj/structure/mineral_door/transparent/plasma
|
||||
mineralType = "plasma"
|
||||
|
||||
/*
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/WT = W
|
||||
if(WT.remove_fuel(0, user))
|
||||
TemperatureAct(100)
|
||||
..()
|
||||
|
||||
fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > 300)
|
||||
TemperatureAct(exposed_temperature)
|
||||
|
||||
proc/TemperatureAct(temperature)
|
||||
for(var/turf/simulated/floor/target_tile in range(2,loc))
|
||||
|
||||
var/datum/gas_mixture/napalm = new
|
||||
|
||||
var/toxinsToDeduce = temperature/10
|
||||
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 200+T0C
|
||||
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
|
||||
hardness -= toxinsToDeduce/100
|
||||
CheckHardness()
|
||||
*/
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 500)
|
||||
hardness = 0
|
||||
CheckHardness()
|
||||
|
||||
/obj/structure/mineral_door/transparent/diamond
|
||||
mineralType = "diamond"
|
||||
|
||||
@@ -54,13 +54,20 @@
|
||||
buckle_mob(M, user)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/afterbuckle(mob/M as mob) //Called after somebody buckled / unbuckled
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/unbuckle()
|
||||
if(buckled_mob)
|
||||
if(buckled_mob.buckled == src) //this is probably unneccesary, but it doesn't hurt
|
||||
buckled_mob.buckled = null
|
||||
buckled_mob.anchored = initial(buckled_mob.anchored)
|
||||
buckled_mob.update_canmove()
|
||||
|
||||
var/M = buckled_mob
|
||||
buckled_mob = null
|
||||
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/obj/structure/stool/bed/proc/manual_unbuckle(mob/user as mob)
|
||||
@@ -110,6 +117,7 @@
|
||||
M.update_canmove()
|
||||
src.buckled_mob = M
|
||||
src.add_fingerprint(user)
|
||||
afterbuckle(M)
|
||||
return
|
||||
|
||||
/*
|
||||
|
||||
@@ -73,7 +73,6 @@
|
||||
|
||||
// Chair types
|
||||
/obj/structure/stool/bed/chair/wood
|
||||
autoignition_temperature = AUTOIGNITION_WOOD
|
||||
// TODO: Special ash subtype that looks like charred chair legs
|
||||
|
||||
/obj/structure/stool/bed/chair/wood/normal
|
||||
@@ -97,26 +96,53 @@
|
||||
/obj/structure/stool/bed/chair/comfy
|
||||
name = "comfy chair"
|
||||
desc = "It looks comfy."
|
||||
icon_state = "comfychair"
|
||||
color = rgb(255,255,255)
|
||||
var/image/armrest = null
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/New()
|
||||
armrest = image("icons/obj/objects.dmi", "comfychair_armrest")
|
||||
armrest.layer = MOB_LAYER + 0.1
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/afterbuckle()
|
||||
if(buckled_mob)
|
||||
overlays += armrest
|
||||
else
|
||||
overlays -= armrest
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/brown
|
||||
icon_state = "comfychair_brown"
|
||||
color = rgb(141,70,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
icon_state = "comfychair_beige"
|
||||
/obj/structure/stool/bed/chair/comfy/red
|
||||
color = rgb(218,2,10)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/teal
|
||||
icon_state = "comfychair_teal"
|
||||
color = rgb(0,234,250)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
color = rgb(60,60,60)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/green
|
||||
color = rgb(1,196,8)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/purp
|
||||
color = rgb(112,2,176)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/blue
|
||||
color = rgb(2,9,210)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/beige
|
||||
color = rgb(255,253,195)
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
color = rgb(255,251,0)
|
||||
|
||||
/obj/structure/stool/bed/chair/office
|
||||
anchored = 0
|
||||
movable = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/black
|
||||
icon_state = "comfychair_black"
|
||||
|
||||
/obj/structure/stool/bed/chair/comfy/lime
|
||||
icon_state = "comfychair_lime"
|
||||
|
||||
/obj/structure/stool/bed/chair/office/Move()
|
||||
..()
|
||||
if(buckled_mob)
|
||||
@@ -166,7 +192,7 @@
|
||||
name = "old ratty sofa"
|
||||
icon_state = "sofamiddle"
|
||||
anchored = 1
|
||||
density = 1
|
||||
|
||||
/obj/structure/stool/bed/chair/sofa/left
|
||||
icon_state = "sofaend_left"
|
||||
/obj/structure/stool/bed/chair/sofa/right
|
||||
|
||||
@@ -561,7 +561,6 @@
|
||||
icon_state = "wood_table"
|
||||
parts = /obj/item/weapon/table_parts/wood
|
||||
health = 50
|
||||
autoignition_temperature = AUTOIGNITION_WOOD // TODO: Special ash subtype that looks like charred table legs.
|
||||
|
||||
/obj/structure/table/woodentable/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
|
||||
|
||||
@@ -30,20 +30,32 @@ obj/structure/windoor_assembly
|
||||
obj/structure/windoor_assembly/New(dir=NORTH)
|
||||
..()
|
||||
src.ini_dir = src.dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
|
||||
obj/structure/windoor_assembly/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
|
||||
/obj/structure/windoor_assembly/Move()
|
||||
var/turf/T = loc
|
||||
..()
|
||||
move_update_air(T)
|
||||
|
||||
/obj/structure/windoor_assembly/update_icon()
|
||||
icon_state = "[facing]_[secure ? "secure_" : ""]windoor_assembly[state]"
|
||||
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
/obj/structure/windoor_assembly/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
if(istype(mover) && mover.checkpass(PASSGLASS))
|
||||
return 1
|
||||
if(get_dir(loc, target) == dir) //Make sure looking at appropriate border
|
||||
if(air_group) return 0
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
/obj/structure/windoor_assembly/CanAtmosPass(var/turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
else
|
||||
return 1
|
||||
|
||||
@@ -60,13 +60,9 @@ var/global/wcColored
|
||||
/obj/structure/window/bullet_act(var/obj/item/projectile/Proj)
|
||||
if((Proj.damage_type == BRUTE || Proj.damage_type == BURN))
|
||||
health -= Proj.damage
|
||||
update_nearby_icons()
|
||||
air_update_turf(1)
|
||||
..()
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window destroyed by [Proj.firer.name] ([formatPlayerPanel(Proj.firer,Proj.firer.ckey)]) via \an [Proj]! pdiff = [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("Window destroyed by ([Proj.firer.ckey]) via \an [Proj]! pdiff = [pdiff] at [loc]!")
|
||||
destroy()
|
||||
return
|
||||
|
||||
@@ -118,11 +114,7 @@ var/global/wcColored
|
||||
..()
|
||||
visible_message("<span class='danger'>[src] was hit by [AM].</span>")
|
||||
var/tforce = 0
|
||||
var/mob/M=null
|
||||
if(ismob(AM))
|
||||
tforce = 40
|
||||
M=AM
|
||||
else if(isobj(AM))
|
||||
if(isobj(AM))
|
||||
var/obj/item/I = AM
|
||||
tforce = I.throwforce
|
||||
if(reinf) tforce *= 0.25
|
||||
@@ -132,23 +124,7 @@ var/global/wcColored
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(AM, src))
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
if(M)
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [M.real_name] ([M.ckey])!")
|
||||
else
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] deanchored by [AM]!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] deanchored by [AM]!")
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
if(M)
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [M.real_name][isAntag(M) ? "(ANTAG)" : ""] ([formatPlayerPanel(M,M.ckey)])!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [M.real_name] ([M.ckey])!")
|
||||
else
|
||||
msg_admin_attack("Window with pdiff [pdiff] at [formatJumpTo(loc)] destroyed by [AM]!")
|
||||
log_admin("Window with pdiff [pdiff] at [loc] destroyed by [AM]!")
|
||||
destroy()
|
||||
|
||||
|
||||
@@ -156,10 +132,6 @@ var/global/wcColored
|
||||
if(HULK in user.mutations)
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window destroyed by hulk [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
|
||||
destroy()
|
||||
else if (usr.a_intent == "harm")
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
@@ -185,9 +157,6 @@ var/global/wcColored
|
||||
health -= damage
|
||||
if(health <= 0)
|
||||
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window destroyed by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) with pdiff [pdiff] at [formatJumpTo(loc)]!")
|
||||
destroy()
|
||||
else //for nicer text~
|
||||
user.visible_message("<span class='danger'>[user] smashes into [src]!</span>")
|
||||
@@ -255,21 +224,11 @@ var/global/wcColored
|
||||
update_nearby_icons()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (anchored ? "<span class='notice'>You have fastened the frame to the floor.</span>" : "<span class='notice'>You have unfastened the frame from the floor.</span>")
|
||||
if(!anchored)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else if(!reinf)
|
||||
anchored = !anchored
|
||||
update_nearby_icons()
|
||||
playsound(loc, 'sound/items/Screwdriver.ogg', 75, 1)
|
||||
user << (anchored ? "<span class='notice'>You have fastened the window to the floor.</span>" : "<span class='notice'>You have unfastened the window.</span>")
|
||||
if(!anchored)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else if(istype(W, /obj/item/weapon/crowbar) && reinf && state <= 1)
|
||||
state = 1 - state
|
||||
playsound(loc, 'sound/items/Crowbar.ogg', 75, 1)
|
||||
@@ -297,7 +256,7 @@ var/global/wcColored
|
||||
user << "<span class='notice'>You have disassembled the window.</span>"
|
||||
disassembled = 1
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
del(src)
|
||||
else
|
||||
@@ -308,10 +267,6 @@ var/global/wcColored
|
||||
anchored = 0
|
||||
update_nearby_icons()
|
||||
step(src, get_dir(user, src))
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window with pdiff [pdiff] deanchored by [user.real_name][isAntag(user) ? "(ANTAG)" : ""] ([formatPlayerPanel(user,user.ckey)]) at [formatJumpTo(loc)]!")
|
||||
log_admin("Window with pdiff [pdiff] deanchored by [user.real_name] ([user.ckey]) at [loc]!")
|
||||
else
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
..()
|
||||
@@ -328,9 +283,6 @@ var/global/wcColored
|
||||
if(sound_effect)
|
||||
playsound(loc, 'sound/effects/Glasshit.ogg', 75, 1)
|
||||
if(health <= 0)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
msg_admin_attack("Window with pdiff [pdiff] broken at [formatJumpTo(loc)]!")
|
||||
destroy()
|
||||
return
|
||||
|
||||
@@ -344,10 +296,9 @@ var/global/wcColored
|
||||
usr << "It is fastened to the floor therefore you can't rotate it!"
|
||||
return 0
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
dir = turn(dir, 90)
|
||||
// updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
ini_dir = dir
|
||||
return
|
||||
|
||||
@@ -361,10 +312,9 @@ var/global/wcColored
|
||||
usr << "It is fastened to the floor therefore you can't rotate it!"
|
||||
return 0
|
||||
|
||||
update_nearby_tiles(need_rebuild=1) //Compel updates before
|
||||
dir = turn(dir, 270)
|
||||
// updateSilicate()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
ini_dir = dir
|
||||
return
|
||||
|
||||
@@ -389,24 +339,23 @@ var/global/wcColored
|
||||
ini_dir = dir
|
||||
if(!color && !istype(src,/obj/structure/window/plasmabasic) && !istype(src,/obj/structure/window/plasmareinforced))
|
||||
color = color_windows(src)
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf(1)
|
||||
update_nearby_icons()
|
||||
return
|
||||
|
||||
/obj/structure/window/Destroy()
|
||||
density = 0
|
||||
update_nearby_tiles()
|
||||
air_update_turf(1)
|
||||
if(loc && !disassembled)
|
||||
playsound(get_turf(src), "shatter", 70, 1)
|
||||
update_nearby_icons()
|
||||
..()
|
||||
|
||||
|
||||
/obj/structure/window/Move()
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
var/turf/T = loc
|
||||
..()
|
||||
dir = ini_dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
move_update_air(T)
|
||||
|
||||
//checks if this window is full-tile one
|
||||
/obj/structure/window/proc/is_fulltile()
|
||||
@@ -414,7 +363,14 @@ var/global/wcColored
|
||||
return 1
|
||||
return 0
|
||||
|
||||
//This proc is used to update the icons of nearby windows. It should not be confused with update_nearby_tiles(), which is an atmos proc!
|
||||
/obj/structure/window/CanAtmosPass(turf/T)
|
||||
if(get_dir(loc, T) == dir)
|
||||
return !density
|
||||
if(dir == SOUTHWEST || dir == SOUTHEAST || dir == NORTHWEST || dir == NORTHEAST)
|
||||
return !density
|
||||
return 1
|
||||
|
||||
//This proc is used to update the icons of nearby windows.
|
||||
/obj/structure/window/proc/update_nearby_icons()
|
||||
if(!loc) return 0
|
||||
update_icon()
|
||||
@@ -425,7 +381,7 @@ var/global/wcColored
|
||||
/obj/structure/window/update_icon()
|
||||
return
|
||||
|
||||
/obj/structure/window/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
/obj/structure/window/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 800)
|
||||
hit(round(exposed_volume / 100), 0)
|
||||
..()
|
||||
@@ -447,15 +403,23 @@ var/global/wcColored
|
||||
/obj/structure/window/plasmabasic/New(Loc,re=0)
|
||||
..()
|
||||
ini_dir = dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf()
|
||||
update_nearby_icons()
|
||||
return
|
||||
|
||||
/obj/structure/window/plasmabasic/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 32000)
|
||||
hit(round(exposed_volume / 1000), 0)
|
||||
..()
|
||||
|
||||
/obj/structure/window/plasmabasic/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
if(exposed_temperature > T0C + 32000)
|
||||
hit(round(exposed_volume / 1000), 0)
|
||||
..()
|
||||
|
||||
/obj/structure/window/plasmabasic/BlockSuperconductivity()
|
||||
return 1
|
||||
|
||||
/obj/structure/window/plasmareinforced
|
||||
name = "reinforced plasma window"
|
||||
desc = "A plasma-glass alloy window, with rods supporting it. It looks hopelessly tough to break. It also looks completely fireproof, considering how basic plasma windows are insanely fireproof."
|
||||
@@ -470,13 +434,19 @@ var/global/wcColored
|
||||
/obj/structure/window/plasmareinforced/New(Loc,re=0)
|
||||
..()
|
||||
ini_dir = dir
|
||||
update_nearby_tiles(need_rebuild=1)
|
||||
air_update_turf()
|
||||
update_nearby_icons()
|
||||
return
|
||||
|
||||
/obj/structure/window/plasmareinforced/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/obj/structure/window/plasmareinforced/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
return
|
||||
|
||||
/obj/structure/window/plasmareinforced/BlockSuperconductivity()
|
||||
return 1 //okay this SHOULD MAKE THE TOXINS CHAMBER WORK
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
desc = "It looks rather strong. Might take a few good hits to shatter it."
|
||||
|
||||
@@ -14,6 +14,9 @@
|
||||
if(!height || air_group) return 0
|
||||
else return ..()
|
||||
|
||||
CanAtmosPass(turf/T)
|
||||
return !density
|
||||
|
||||
/obj/structure/shuttle/engine
|
||||
name = "engine"
|
||||
density = 1
|
||||
|
||||
@@ -15,6 +15,9 @@
|
||||
..()
|
||||
levelupdate()
|
||||
|
||||
/turf/simulated/proc/burn_tile()
|
||||
return
|
||||
|
||||
/turf/simulated/proc/MakeSlippery(var/wet_setting = 1) // 1 = Water, 2 = Lube
|
||||
if(wet >= wet_setting)
|
||||
return
|
||||
@@ -157,7 +160,7 @@
|
||||
else
|
||||
M.inertia_dir = 0
|
||||
return
|
||||
else if(!istype(M, /mob/living/carbon/metroid) || (M:species.bodyflags & FEET_NOSLIP))
|
||||
else if(!istype(M, /mob/living/carbon/slime) || (M:species.bodyflags & FEET_NOSLIP))
|
||||
if (M.m_intent == "run" && prob(30))
|
||||
M.stop_pulling()
|
||||
step(M, M.dir)
|
||||
|
||||
@@ -44,15 +44,6 @@ var/list/wood_icons = list("wood","wood-broken")
|
||||
else
|
||||
icon_regular_floor = icon_state
|
||||
|
||||
/turf/simulated/floor/ignite(var/temperature)
|
||||
on_fire=1
|
||||
visible_message("\The [src] bursts into flame!")
|
||||
overlays += image(fire_dmi,fire_sprite)
|
||||
spawn(rand(fire_time_min,fire_time_max) SECONDS)
|
||||
if(!on_fire)
|
||||
return
|
||||
burn_tile()
|
||||
|
||||
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0, air_group=0)
|
||||
// if ((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
// if (!( locate(/obj/machinery/mass_driver, src) ))
|
||||
@@ -302,7 +293,7 @@ turf/simulated/floor/proc/update_icon()
|
||||
src.icon_state = "sand[pick("1","2","3")]"
|
||||
broken = 1
|
||||
|
||||
/turf/simulated/floor/proc/burn_tile()
|
||||
/turf/simulated/floor/burn_tile()
|
||||
if(istype(src,/turf/simulated/floor/engine)) return
|
||||
if(istype(src,/turf/simulated/floor/plating/airless/asteroid)) return//Asteroid tiles don't burn
|
||||
if(broken || burnt) return
|
||||
|
||||
@@ -74,14 +74,14 @@
|
||||
/turf/simulated/floor/engine/n20
|
||||
New()
|
||||
. = ..()
|
||||
//var/datum/gas_mixture/adding = new
|
||||
var/datum/gas_mixture/adding = new
|
||||
var/datum/gas/sleeping_agent/trace_gas = new
|
||||
|
||||
air.trace_gases += trace_gas
|
||||
trace_gas.moles = 70000
|
||||
air.oxygen = 0
|
||||
air.nitrogen = 0
|
||||
air.update_values()
|
||||
trace_gas.moles = 2000
|
||||
adding.trace_gases += trace_gas
|
||||
adding.temperature = T20C
|
||||
|
||||
assume_air(adding)
|
||||
|
||||
/turf/simulated/floor/engine/vacuum
|
||||
name = "vacuum floor"
|
||||
@@ -120,7 +120,7 @@
|
||||
/turf/simulated/floor/greengrid
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "gcircuit"
|
||||
|
||||
|
||||
/turf/simulated/floor/greengrid/airless
|
||||
icon_state = "gcircuit"
|
||||
name = "airless floor"
|
||||
@@ -154,7 +154,7 @@
|
||||
name = "plating"
|
||||
icon = 'icons/turf/floors.dmi'
|
||||
icon_state = "plating"
|
||||
|
||||
|
||||
/turf/simulated/shuttle/plating/vox //Vox skipjack plating
|
||||
oxygen = 0
|
||||
nitrogen = MOLES_N2STANDARD + MOLES_O2STANDARD
|
||||
@@ -162,7 +162,7 @@
|
||||
/turf/simulated/shuttle/floor4 // Added this floor tile so that I have a seperate turf to check in the shuttle -- Polymorph
|
||||
name = "Brig floor" // Also added it into the 2x3 brig area of the shuttle.
|
||||
icon_state = "floor4"
|
||||
|
||||
|
||||
/turf/simulated/shuttle/floor4/vox //Vox skipjack floors
|
||||
name = "skipjack floor"
|
||||
oxygen = 0
|
||||
@@ -235,10 +235,10 @@
|
||||
name = "snow"
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
icon_state = "snow"
|
||||
|
||||
|
||||
/turf/simulated/floor/plating/snow/ex_act(severity)
|
||||
return
|
||||
|
||||
|
||||
/turf/simulated/floor/snow
|
||||
name = "snow"
|
||||
icon = 'icons/turf/snow.dmi'
|
||||
|
||||
@@ -317,10 +317,6 @@
|
||||
else if(!is_sharp(W) && W.force >= 10 || W.force >= 20)
|
||||
user << "<span class='notice'>\The [src] crumbles away under the force of your [W.name].</span>"
|
||||
src.dismantle_wall(1)
|
||||
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff)
|
||||
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) broke a rotting wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
|
||||
return
|
||||
|
||||
//THERMITE related stuff. Calls src.thermitemelt() which handles melting simulated walls and the relevant effects
|
||||
@@ -374,10 +370,6 @@
|
||||
|
||||
if( user.loc == T && user.get_active_hand() == WT )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff)
|
||||
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismanted a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("[user.real_name] ([user.ckey]) dismanted a wall with a pdiff of [pdiff] at [loc]!")
|
||||
dismantle_wall()
|
||||
return
|
||||
else
|
||||
@@ -397,10 +389,6 @@
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>You remove the outer plating.</span>"
|
||||
dismantle_wall()
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff)
|
||||
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) dismantled with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("[user.real_name] ([user.ckey]) dismantled with a pdiff of [pdiff] at [loc]!")
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart.</span>", 2)
|
||||
return
|
||||
@@ -418,10 +406,6 @@
|
||||
if( user.loc == T && user.get_active_hand() == W )
|
||||
user << "<span class='notice'>Your drill tears though the last of the reinforced plating.</span>"
|
||||
dismantle_wall()
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff)
|
||||
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) drilled a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("[user.real_name] ([user.ckey]) drilled a wall with a pdiff of [pdiff] at [loc]!")
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was drilled through by [user]!</span>", 1, "<span class='warning'>You hear the grinding of metal.</span>", 2)
|
||||
return
|
||||
@@ -443,10 +427,6 @@
|
||||
playsound(src, "sparks", 50, 1)
|
||||
playsound(src, 'sound/weapons/blade1.ogg', 50, 1)
|
||||
dismantle_wall(1)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff)
|
||||
message_admins("[user.real_name] ([formatPlayerPanel(user,user.ckey)]) sliced up a wall with a pdiff of [pdiff] at [formatJumpTo(loc)]!")
|
||||
log_admin("[user.real_name] ([user.ckey]) sliced up a wall with a pdiff of [pdiff] at [loc]!")
|
||||
for(var/mob/O in viewers(user, 5))
|
||||
O.show_message("<span class='warning'>The wall was sliced apart by [user]!</span>", 1, "<span class='warning'>You hear metal being sliced apart and sparks flying.</span>", 2)
|
||||
return
|
||||
|
||||
@@ -78,47 +78,29 @@
|
||||
|
||||
/turf/simulated/wall/mineral/plasma
|
||||
name = "plasma wall"
|
||||
desc = "A wall with plasma plating. This is definitely a bad idea."
|
||||
desc = "A wall with plasma plating. This is definately a bad idea."
|
||||
icon_state = "plasma0"
|
||||
walltype = "plasma"
|
||||
mineral = "plasma"
|
||||
thermal_conductivity = 0.04
|
||||
|
||||
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
|
||||
/turf/simulated/wall/mineral/plasma/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
||||
ignite(is_hot(W))
|
||||
return
|
||||
..()
|
||||
|
||||
/turf/simulated/wall/mineral/plasma/proc/PlasmaBurn(temperature)
|
||||
var/pdiff=performWallPressureCheck(src.loc)
|
||||
if(pdiff>0)
|
||||
message_admins("Plasma wall with pdiff [pdiff] at [formatJumpTo(loc)] just caught fire!")
|
||||
spawn(2)
|
||||
new /obj/structure/girder(src)
|
||||
src.ChangeTurf(/turf/simulated/floor)
|
||||
for(var/turf/simulated/floor/target_tile in range(0,src))
|
||||
/*if(target_tile.parent && target_tile.parent.group_processing)
|
||||
target_tile.parent.suspend_group_processing()*/
|
||||
var/datum/gas_mixture/napalm = new
|
||||
var/toxinsToDeduce = 20
|
||||
napalm.toxins = toxinsToDeduce
|
||||
napalm.temperature = 400+T0C
|
||||
target_tile.assume_air(napalm)
|
||||
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
||||
for(var/obj/structure/falsewall/plasma/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
|
||||
var/turf/T = get_turf(F)
|
||||
T.ChangeTurf(/turf/simulated/wall/mineral/plasma/)
|
||||
del (F)
|
||||
for(var/turf/simulated/wall/mineral/plasma/W in range(3,src))
|
||||
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
||||
for(var/obj/machinery/door/airlock/plasma/D in range(3,src))
|
||||
D.ignite(temperature/4)
|
||||
atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 400)
|
||||
|
||||
/turf/simulated/wall/mineral/plasma/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
/turf/simulated/wall/mineral/plasma/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
/turf/simulated/wall/mineral/plasma/ignite(exposed_temperature)
|
||||
/turf/simulated/wall/mineral/plasma/proc/ignite(exposed_temperature)
|
||||
if(exposed_temperature > 300)
|
||||
PlasmaBurn(exposed_temperature)
|
||||
|
||||
|
||||
+57
-99
@@ -36,6 +36,16 @@
|
||||
return
|
||||
return
|
||||
|
||||
// Adds the adjacent turfs to the current atmos processing
|
||||
/turf/Destroy()
|
||||
if(air_master)
|
||||
for(var/direction in cardinal)
|
||||
if(atmos_adjacent_turfs & direction)
|
||||
var/turf/simulated/T = get_step(src, direction)
|
||||
if(istype(T))
|
||||
air_master.add_to_active(T)
|
||||
..()
|
||||
|
||||
/turf/ex_act(severity)
|
||||
return 0
|
||||
|
||||
@@ -213,117 +223,65 @@
|
||||
del L
|
||||
|
||||
//Creates a new turf
|
||||
/turf/proc/ChangeTurf(var/turf/N)
|
||||
if (!N)
|
||||
return
|
||||
|
||||
/turf/proc/ChangeTurf(var/path)
|
||||
if(!path) return
|
||||
if(path == type) return src
|
||||
var/old_lumcount = lighting_lumcount - initial(lighting_lumcount)
|
||||
var/old_opacity = opacity
|
||||
//world << "Replacing [src.type] with [N]"
|
||||
if(air_master)
|
||||
air_master.remove_from_active(src)
|
||||
|
||||
if(connections) connections.erase_all()
|
||||
var/turf/W = new path(src)
|
||||
|
||||
if(istype(src,/turf/simulated))
|
||||
//Yeah, we're just going to rebuild the whole thing.
|
||||
//Despite this being called a bunch during explosions,
|
||||
//the zone will only really do heavy lifting once.
|
||||
var/turf/simulated/S = src
|
||||
if(S.zone) S.zone.rebuild()
|
||||
if(istype(W, /turf/simulated))
|
||||
W:Assimilate_Air()
|
||||
W.RemoveLattice()
|
||||
|
||||
if(ispath(N, /turf/simulated/floor))
|
||||
//if the old turf had a zone, connect the new turf to it as well - Cael
|
||||
//Adjusted by SkyMarshal 5/10/13 - The air master will handle the addition of the new turf.
|
||||
//if(zone)
|
||||
// zone.RemoveTurf(src)
|
||||
// if(!zone.CheckStatus())
|
||||
// zone.SetStatus(ZONE_ACTIVE)
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount) //light levels of the turf have changed. We need to shift it to another lighting-subarea
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
var/turf/simulated/W = new N( locate(src.x, src.y, src.z) )
|
||||
//W.Assimilate_Air()
|
||||
if(old_opacity != W.opacity) //opacity has changed. Need to update surrounding lights
|
||||
if(W.lighting_lumcount) //unless we're being illuminated, don't bother (may be buggy, hard to test)
|
||||
W.UpdateAffectingLights()
|
||||
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
W.levelupdate()
|
||||
W.CalculateAdjacentTurfs()
|
||||
return W
|
||||
|
||||
|
||||
if(old_opacity != W.opacity) //opacity has changed. Need to update surrounding lights
|
||||
if(W.lighting_lumcount) //unless we're being illuminated, don't bother (may be buggy, hard to test)
|
||||
W.UpdateAffectingLights()
|
||||
|
||||
if (istype(W,/turf/simulated/floor))
|
||||
W.RemoveLattice()
|
||||
|
||||
if(air_master)
|
||||
air_master.mark_for_update(src)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
else
|
||||
//if(zone)
|
||||
// zone.RemoveTurf(src)
|
||||
// if(!zone.CheckStatus())
|
||||
// zone.SetStatus(ZONE_ACTIVE)
|
||||
|
||||
var/turf/W = new N( locate(src.x, src.y, src.z) )
|
||||
W.lighting_lumcount += old_lumcount
|
||||
if(old_lumcount != W.lighting_lumcount)
|
||||
W.lighting_changed = 1
|
||||
lighting_controller.changed_turfs += W
|
||||
|
||||
if(air_master)
|
||||
air_master.mark_for_update(src)
|
||||
|
||||
W.levelupdate()
|
||||
return W
|
||||
|
||||
/*
|
||||
//////Assimilate Air//////
|
||||
/turf/simulated/proc/Assimilate_Air()
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
var/aco = 0
|
||||
var/atox = 0
|
||||
var/atemp = 0
|
||||
var/turf_count = 0
|
||||
if(air)
|
||||
var/aoxy = 0//Holders to assimilate air from nearby turfs
|
||||
var/anitro = 0
|
||||
var/aco = 0
|
||||
var/atox = 0
|
||||
var/atemp = 0
|
||||
var/turf_count = 0
|
||||
|
||||
for(var/direction in cardinal)//Only use cardinals to cut down on lag
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))//Counted as no air
|
||||
turf_count++//Considered a valid turf for air calcs
|
||||
continue
|
||||
else if(istype(T,/turf/simulated/floor))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)//Add the air's contents to the holders
|
||||
aoxy += S.air.oxygen
|
||||
anitro += S.air.nitrogen
|
||||
aco += S.air.carbon_dioxide
|
||||
atox += S.air.toxins
|
||||
atemp += S.air.temperature
|
||||
turf_count ++
|
||||
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
|
||||
air.nitrogen = (anitro/max(turf_count,1))
|
||||
air.carbon_dioxide = (aco/max(turf_count,1))
|
||||
air.toxins = (atox/max(turf_count,1))
|
||||
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
|
||||
air.update_values()
|
||||
for(var/direction in cardinal)//Only use cardinals to cut down on lag
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))//Counted as no air
|
||||
turf_count++//Considered a valid turf for air calcs
|
||||
continue
|
||||
else if(istype(T,/turf/simulated/floor))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)//Add the air's contents to the holders
|
||||
aoxy += S.air.oxygen
|
||||
anitro += S.air.nitrogen
|
||||
aco += S.air.carbon_dioxide
|
||||
atox += S.air.toxins
|
||||
atemp += S.air.temperature
|
||||
turf_count ++
|
||||
air.oxygen = (aoxy/max(turf_count,1))//Averages contents of the turfs, ignoring walls and the like
|
||||
air.nitrogen = (anitro/max(turf_count,1))
|
||||
air.carbon_dioxide = (aco/max(turf_count,1))
|
||||
air.toxins = (atox/max(turf_count,1))
|
||||
air.temperature = (atemp/max(turf_count,1))//Trace gases can get bant
|
||||
if(air_master)
|
||||
air_master.add_to_active(src)
|
||||
|
||||
//cael - duplicate the averaged values across adjacent turfs to enforce a seamless atmos change
|
||||
for(var/direction in cardinal)//Only use cardinals to cut down on lag
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(istype(T,/turf/space))//Counted as no air
|
||||
continue
|
||||
else if(istype(T,/turf/simulated/floor))
|
||||
var/turf/simulated/S = T
|
||||
if(S.air)//Add the air's contents to the holders
|
||||
S.air.oxygen = air.oxygen
|
||||
S.air.nitrogen = air.nitrogen
|
||||
S.air.carbon_dioxide = air.carbon_dioxide
|
||||
S.air.toxins = air.toxins
|
||||
S.air.temperature = air.temperature
|
||||
S.air.update_values()
|
||||
*/
|
||||
/turf/proc/ReplaceWithLattice()
|
||||
src.ChangeTurf(/turf/space)
|
||||
new /obj/structure/lattice( locate(src.x, src.y, src.z) )
|
||||
|
||||
@@ -572,9 +572,6 @@ var/global/nologevent = 0
|
||||
<A href='?src=\ref[src];quick_create_object=1'>Quick Create Object</A><br>
|
||||
<A href='?src=\ref[src];create_turf=1'>Create Turf</A><br>
|
||||
<A href='?src=\ref[src];create_mob=1'>Create Mob</A><br>
|
||||
<br><A href='?src=\ref[src];vsc=airflow'>Edit Airflow Settings</A><br>
|
||||
<A href='?src=\ref[src];vsc=plasma'>Edit Plasma Settings</A><br>
|
||||
<A href='?src=\ref[src];vsc=default'>Choose a default ZAS setting</A><br>
|
||||
"}
|
||||
|
||||
usr << browse(dat, "window=admin2;size=210x280")
|
||||
|
||||
@@ -129,8 +129,6 @@ var/list/admin_verbs_server = list(
|
||||
var/list/admin_verbs_debug = list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
/client/proc/Debug2,
|
||||
/client/proc/kill_air,
|
||||
/client/proc/ZASSettings,
|
||||
/client/proc/cmd_debug_make_powernets,
|
||||
/client/proc/debug_controller,
|
||||
/client/proc/cmd_debug_mob_lists,
|
||||
|
||||
@@ -3048,18 +3048,6 @@
|
||||
src.admincaster_signature = adminscrub(input(usr, "Provide your desired signature", "Network Identity Handler", ""))
|
||||
src.access_news_network()
|
||||
|
||||
else if(href_list["vsc"])
|
||||
if(check_rights(R_ADMIN|R_SERVER))
|
||||
if(href_list["vsc"] == "airflow")
|
||||
vsc.ChangeSettingsDialog(usr,vsc.settings)
|
||||
if(href_list["vsc"] == "plasma")
|
||||
vsc.ChangeSettingsDialog(usr,vsc.plc.settings)
|
||||
// zas_settings.ChangeSettingsDialog(usr,zas_settings.settings)
|
||||
if(href_list["vsc"] == "default")
|
||||
vsc.SetDefault(usr)
|
||||
// zas_settings.SetDefault(usr)
|
||||
// player info stuff
|
||||
|
||||
if(href_list["add_player_info"])
|
||||
var/key = href_list["add_player_info"]
|
||||
var/add = input("Add Player Info") as null|text
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
/client/proc/air_status(turf/target as turf)
|
||||
set category = "Debug"
|
||||
set name = "Display Air Status"
|
||||
|
||||
if(!isturf(target))
|
||||
return
|
||||
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/burning = 0
|
||||
if(istype(target, /turf/simulated))
|
||||
var/turf/simulated/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
usr << "\blue @[target.x],[target.y] ([GM.group_multiplier]): O:[GM.oxygen] T:[GM.toxins] N:[GM.nitrogen] C:[GM.carbon_dioxide] w [GM.temperature] Kelvin, [GM.return_pressure()] kPa [(burning)?("\red BURNING"):(null)]"
|
||||
for(var/datum/gas/trace_gas in GM.trace_gases)
|
||||
usr << "[trace_gas.type]: [trace_gas.moles]"
|
||||
feedback_add_details("admin_verb","DAST") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/fix_next_move()
|
||||
set category = "Debug"
|
||||
set name = "Unfreeze Everyone"
|
||||
|
||||
@@ -143,10 +143,6 @@ var/intercom_range_display_status = 0
|
||||
src.verbs += /client/proc/print_jobban_old
|
||||
src.verbs += /client/proc/print_jobban_old_filter
|
||||
src.verbs += /client/proc/forceEvent
|
||||
src.verbs += /client/proc/Zone_Info
|
||||
src.verbs += /client/proc/Test_ZAS_Connection
|
||||
src.verbs += /client/proc/ZoneTick
|
||||
//src.verbs += /client/proc/TestZASRebuild
|
||||
//src.verbs += /client/proc/cmd_admin_rejuvenate
|
||||
|
||||
feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -156,6 +156,7 @@
|
||||
ground_zero.assume_air(air_contents)
|
||||
ground_zero.hotspot_expose(1000, 125)
|
||||
|
||||
air_update_turf()
|
||||
if(master)
|
||||
del(master)
|
||||
del(src)
|
||||
@@ -165,4 +166,5 @@
|
||||
var/turf/simulated/T = get_turf(src)
|
||||
if(!T)
|
||||
return
|
||||
T.assume_air(removed)
|
||||
T.assume_air(removed)
|
||||
air_update_turf()
|
||||
@@ -19,6 +19,10 @@
|
||||
var/obj/structure/reagent_dispensers/fueltank/tank = src.loc.loc
|
||||
if (tank)
|
||||
tank.explode()
|
||||
if (istype(src.loc.loc, /obj/item/weapon/reagent_containers/glass/beaker/))
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/beakerbomb = src.loc.loc
|
||||
if(beakerbomb)
|
||||
beakerbomb.heat_beaker()
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(3, 1, src)
|
||||
|
||||
+137
-208
@@ -1,5 +1,3 @@
|
||||
//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:32
|
||||
|
||||
/obj/item/device/assembly/infra
|
||||
name = "infrared emitter"
|
||||
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
|
||||
@@ -10,173 +8,133 @@
|
||||
|
||||
bomb_name = "tripwire mine"
|
||||
|
||||
secured = 0
|
||||
|
||||
var/on = 0
|
||||
var/visible = 0
|
||||
var/obj/effect/beam/i_beam/first = null
|
||||
var/obj/effect/beam/i_beam/last = null
|
||||
|
||||
proc
|
||||
trigger_beam()
|
||||
|
||||
describe()
|
||||
return "The infrared trigger is [on?"on":"off"]."
|
||||
|
||||
activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
on = !on
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
|
||||
toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
on = 0
|
||||
if(first) del(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/device/assembly/infra/describe()
|
||||
return "The infrared trigger is [on?"on":"off"]."
|
||||
|
||||
/obj/item/device/assembly/infra/activate()
|
||||
if(!..()) return 0//Cooldown check
|
||||
on = !on
|
||||
update_icon()
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
attached_overlays += "infrared_on"
|
||||
return 1
|
||||
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
/obj/item/device/assembly/infra/toggle_secure()
|
||||
secured = !secured
|
||||
if(secured)
|
||||
processing_objects.Add(src)
|
||||
else
|
||||
on = 0
|
||||
if(first) qdel(first)
|
||||
processing_objects.Remove(src)
|
||||
update_icon()
|
||||
return secured
|
||||
|
||||
/obj/item/device/assembly/infra/update_icon()
|
||||
overlays.Cut()
|
||||
attached_overlays = list()
|
||||
if(on)
|
||||
overlays += "infrared_on"
|
||||
attached_overlays += "infrared_on"
|
||||
|
||||
process()//Old code
|
||||
if(!on)
|
||||
if(first)
|
||||
del(first)
|
||||
return
|
||||
if(first || !secured) return
|
||||
var/turf/T = null
|
||||
if(istype(loc,/turf))
|
||||
T = loc
|
||||
else if (holder)
|
||||
if (istype(holder.loc,/turf))
|
||||
T = holder.loc
|
||||
else if (holder.master && istype(holder.master.loc,/turf)) //for onetankbombs and other tertiary builds with assemblies
|
||||
T = holder.loc.loc
|
||||
else if(istype(loc,/obj/item/weapon/grenade) && istype(loc.loc,/turf))
|
||||
T = loc.loc
|
||||
if(T)
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(T)
|
||||
I.master = src
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
step(I, I.dir)
|
||||
if(I)
|
||||
I.density = 0
|
||||
first = I
|
||||
I.vis_spread(visible)
|
||||
spawn(0)
|
||||
if(I)
|
||||
//world << "infra: setting limit"
|
||||
I.limit = 8
|
||||
//world << "infra: processing beam \ref[I]"
|
||||
I.process()
|
||||
return
|
||||
return
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
return
|
||||
|
||||
|
||||
attack_hand()
|
||||
del(first)
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
Move()
|
||||
var/t = dir
|
||||
..()
|
||||
dir = t
|
||||
del(first)
|
||||
return
|
||||
|
||||
|
||||
holder_movement()
|
||||
if(!holder) return 0
|
||||
del(first)
|
||||
return 1
|
||||
|
||||
|
||||
trigger_beam()
|
||||
if((!secured)||(!on)||(cooldown > 0)) return 0
|
||||
pulse(0)
|
||||
visible_message("\icon[src] *beep* *beep*")
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return
|
||||
|
||||
|
||||
interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
if(holder)
|
||||
dat += "<BR>Beam direction: [dir2text(dir)] <A href='?src=\ref[src];rotate=-1'>Counter-clockwise</A> | <A href='?src=\ref[src];rotate=1'>Clockwise</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
|
||||
Topic(href, href_list)
|
||||
..()
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
/obj/item/device/assembly/infra/process()
|
||||
if(!on)
|
||||
if(first)
|
||||
qdel(first)
|
||||
return
|
||||
if(!secured)
|
||||
return
|
||||
if(first && last)
|
||||
last.process()
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
if(T)
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(T)
|
||||
I.master = src
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
first = I
|
||||
step(I, I.dir)
|
||||
if(first)
|
||||
I.density = 0
|
||||
I.vis_spread(visible)
|
||||
I.limit = 8
|
||||
I.process()
|
||||
|
||||
if(href_list["rotate"])
|
||||
switch(href_list["rotate"])
|
||||
if("-1")
|
||||
dir = turn(dir,90)
|
||||
update_icon()
|
||||
del(first)
|
||||
if("1")
|
||||
dir = turn(dir,-90)
|
||||
update_icon()
|
||||
del(first)
|
||||
/obj/item/device/assembly/infra/attack_hand()
|
||||
qdel(first)
|
||||
..()
|
||||
return
|
||||
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
/obj/item/device/assembly/infra/Move()
|
||||
var/t = dir
|
||||
..()
|
||||
dir = t
|
||||
qdel(first)
|
||||
return
|
||||
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
spawn(0)
|
||||
if(first)
|
||||
first.vis_spread(visible)
|
||||
/obj/item/device/assembly/infra/holder_movement()
|
||||
if(!holder) return 0
|
||||
// dir = holder.dir
|
||||
qdel(first)
|
||||
return 1
|
||||
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
/obj/item/device/assembly/infra/proc/trigger_beam()
|
||||
if((!secured)||(!on)||(cooldown > 0))
|
||||
return 0
|
||||
pulse(0)
|
||||
audible_message("\icon[src] *beep* *beep*", null, 3)
|
||||
cooldown = 2
|
||||
spawn(10)
|
||||
process_cooldown()
|
||||
return
|
||||
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
/obj/item/device/assembly/infra/interact(mob/user as mob)//TODO: change this this to the wire control panel
|
||||
if(!secured) return
|
||||
user.set_machine(src)
|
||||
var/dat = text("<TT><B>Infrared Laser</B>\n<B>Status</B>: []<BR>\n<B>Visibility</B>: []<BR>\n</TT>", (on ? text("<A href='?src=\ref[];state=0'>On</A>", src) : text("<A href='?src=\ref[];state=1'>Off</A>", src)), (src.visible ? text("<A href='?src=\ref[];visible=0'>Visible</A>", src) : text("<A href='?src=\ref[];visible=1'>Invisible</A>", src)))
|
||||
dat += "<BR><BR><A href='?src=\ref[src];refresh=1'>Refresh</A>"
|
||||
dat += "<BR><BR><A href='?src=\ref[src];close=1'>Close</A>"
|
||||
user << browse(dat, "window=infra")
|
||||
onclose(user, "infra")
|
||||
return
|
||||
|
||||
/obj/item/device/assembly/infra/Topic(href, href_list)
|
||||
..()
|
||||
if(!usr.canmove || usr.stat || usr.restrained() || !in_range(loc, usr))
|
||||
usr << browse(null, "window=infra")
|
||||
onclose(usr, "infra")
|
||||
return
|
||||
if(href_list["state"])
|
||||
on = !(on)
|
||||
update_icon()
|
||||
if(href_list["visible"])
|
||||
visible = !(visible)
|
||||
if(first)
|
||||
first.vis_spread(visible)
|
||||
if(href_list["close"])
|
||||
usr << browse(null, "window=infra")
|
||||
return
|
||||
if(usr)
|
||||
attack_self(usr)
|
||||
|
||||
/obj/item/device/assembly/infra/verb/rotate()//This could likely be better
|
||||
set name = "Rotate Infrared Laser"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
if(usr.stat || !usr.canmove || usr.restrained())
|
||||
return
|
||||
|
||||
|
||||
verb/rotate()//This could likely be better
|
||||
set name = "Rotate Infrared Laser"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
|
||||
dir = turn(dir, 90)
|
||||
return
|
||||
dir = turn(dir, 90)
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -187,41 +145,30 @@
|
||||
icon = 'icons/obj/projectiles.dmi'
|
||||
icon_state = "ibeam"
|
||||
var/obj/effect/beam/i_beam/next = null
|
||||
var/obj/effect/beam/i_beam/previous = null
|
||||
var/obj/item/device/assembly/infra/master = null
|
||||
var/limit = null
|
||||
var/visible = 0.0
|
||||
var/left = null
|
||||
anchored = 1.0
|
||||
flags = 0
|
||||
|
||||
|
||||
/obj/effect/beam/i_beam/proc/hit()
|
||||
//world << "beam \ref[src]: hit"
|
||||
if(master)
|
||||
//world << "beam hit \ref[src]: calling master \ref[master].hit"
|
||||
master.trigger_beam()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/proc/vis_spread(v)
|
||||
//world << "i_beam \ref[src] : vis_spread"
|
||||
visible = v
|
||||
spawn(0)
|
||||
if(next)
|
||||
//world << "i_beam \ref[src] : is next [next.type] \ref[next], calling spread"
|
||||
next.vis_spread(v)
|
||||
return
|
||||
return
|
||||
if(next)
|
||||
next.vis_spread(v)
|
||||
|
||||
|
||||
/obj/effect/beam/i_beam/process()
|
||||
//world << "i_beam \ref[src] : process"
|
||||
|
||||
if((loc.density || !(master)))
|
||||
// world << "beam hit loc [loc] or no master [master], deleting"
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
//world << "proccess: [src.left] left"
|
||||
|
||||
if(left > 0)
|
||||
left--
|
||||
if(left < 1)
|
||||
@@ -232,58 +179,40 @@
|
||||
else
|
||||
invisibility = 0
|
||||
|
||||
|
||||
//world << "now [src.left] left"
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
|
||||
I.master = master
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
//world << "created new beam \ref[I] at [I.x] [I.y] [I.z]"
|
||||
step(I, I.dir)
|
||||
|
||||
if(I)
|
||||
//world << "step worked, now at [I.x] [I.y] [I.z]"
|
||||
if(!(next))
|
||||
//world << "no next"
|
||||
if(!next && (limit > 0))
|
||||
var/obj/effect/beam/i_beam/I = new /obj/effect/beam/i_beam(loc)
|
||||
I.master = master
|
||||
I.density = 1
|
||||
I.dir = dir
|
||||
I.previous = src
|
||||
next = I
|
||||
step(I, I.dir)
|
||||
if(next)
|
||||
I.density = 0
|
||||
//world << "spreading"
|
||||
I.vis_spread(visible)
|
||||
next = I
|
||||
spawn(0)
|
||||
//world << "limit = [limit] "
|
||||
if((I && limit > 0))
|
||||
I.limit = limit - 1
|
||||
//world << "calling next process"
|
||||
I.process()
|
||||
return
|
||||
else
|
||||
//world << "is a next: \ref[next], deleting beam \ref[I]"
|
||||
del(I)
|
||||
else
|
||||
//world << "step failed, deleting \ref[next]"
|
||||
del(next)
|
||||
spawn(10)
|
||||
process()
|
||||
return
|
||||
return
|
||||
I.limit = limit - 1
|
||||
master.last = I
|
||||
I.process()
|
||||
|
||||
/obj/effect/beam/i_beam/Bump()
|
||||
del(src)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Bumped()
|
||||
hit()
|
||||
return
|
||||
|
||||
/obj/effect/beam/i_beam/Crossed(atom/movable/AM as mob|obj)
|
||||
if(istype(AM, /obj/effect/beam))
|
||||
return
|
||||
spawn(0)
|
||||
hit()
|
||||
return
|
||||
return
|
||||
hit()
|
||||
|
||||
/obj/effect/beam/i_beam/Destroy()
|
||||
del(next)
|
||||
..()
|
||||
return
|
||||
if(master.first == src)
|
||||
master.first = null
|
||||
if(next)
|
||||
qdel(next)
|
||||
next = null
|
||||
if(previous)
|
||||
previous.next = null
|
||||
master.last = previous
|
||||
..()
|
||||
@@ -53,6 +53,7 @@
|
||||
affecting = H.get_organ(type)
|
||||
H.Stun(3)
|
||||
if(affecting)
|
||||
affecting.take_damage(1, 0)
|
||||
H.updatehealth()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
desc = "Because you really needed another excuse to punch your crewmates."
|
||||
icon_state = "boxing"
|
||||
item_state = "boxing"
|
||||
species_restricted = null
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/gloves.dmi'
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/obj/item/clothing/gloves/ring
|
||||
name = "iron ring"
|
||||
desc = "A band that goes around your finger. It's considered gauche to wear more than one."
|
||||
gender = "neuter" // not plural anymore
|
||||
transfer_prints = TRUE
|
||||
icon_state = "ironring"
|
||||
item_state = ""
|
||||
icon = 'icons/obj/clothing/rings.dmi'
|
||||
var/material = "iron"
|
||||
var/stud = 0
|
||||
species_restricted = null
|
||||
|
||||
New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
update_icon()
|
||||
if(stud)
|
||||
icon_state = "d_[initial(icon_state)]"
|
||||
else
|
||||
icon_state = initial(icon_state)
|
||||
examine()
|
||||
..()
|
||||
usr << "This one is made of [material]."
|
||||
if(stud)
|
||||
usr << "It is adorned with a single gem."
|
||||
|
||||
/obj/item/clothing/gloves/ring/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/stack/sheet/mineral/diamond))
|
||||
var/obj/item/stack/sheet/mineral/diamond/D = I
|
||||
if(stud)
|
||||
usr << "<span class='notice'>The [src] already has a gem.</span>"
|
||||
else
|
||||
if(D.amount >= 1)
|
||||
D.use(1)
|
||||
stud = 1
|
||||
update_icon()
|
||||
usr << "<span class='notice'>You socket the diamond into the [src].</span>"
|
||||
|
||||
// s'pensive
|
||||
/obj/item/clothing/gloves/ring/silver
|
||||
name = "silver ring"
|
||||
icon_state = "silverring"
|
||||
material = "silver"
|
||||
|
||||
/obj/item/clothing/gloves/ring/silver/blessed // todo
|
||||
name = "blessed silver ring"
|
||||
|
||||
/obj/item/clothing/gloves/ring/gold
|
||||
name = "gold ring"
|
||||
icon_state = "goldring"
|
||||
material = "gold"
|
||||
|
||||
/obj/item/clothing/gloves/ring/gold/blessed
|
||||
name = "wedding band"
|
||||
|
||||
// cheap
|
||||
/obj/item/clothing/gloves/ring/plastic
|
||||
name = "white plastic ring"
|
||||
icon_state = "whitering"
|
||||
material = "plastic"
|
||||
|
||||
/obj/item/clothing/gloves/ring/plastic/blue
|
||||
name = "blue plastic ring"
|
||||
icon_state = "bluering"
|
||||
|
||||
/obj/item/clothing/gloves/ring/plastic/red
|
||||
name = "red plastic ring"
|
||||
icon_state = "redring"
|
||||
|
||||
/obj/item/clothing/gloves/ring/plastic/random
|
||||
New()
|
||||
var/c = pick("white","blue","red")
|
||||
name = "[c] plastic ring"
|
||||
icon_state = "[c]ring"
|
||||
|
||||
// weird
|
||||
/obj/item/clothing/gloves/ring/glass
|
||||
name = "glass ring"
|
||||
icon_state = "whitering"
|
||||
material = "glass"
|
||||
|
||||
/obj/item/clothing/gloves/ring/plasma
|
||||
name = "plasma ring"
|
||||
icon_state = "plasmaring"
|
||||
material = "plasma"
|
||||
|
||||
/obj/item/clothing/gloves/ring/uranium
|
||||
name = "uranium ring"
|
||||
icon_state = "uraniumring"
|
||||
material = "uranium"
|
||||
|
||||
// cultish
|
||||
/obj/item/clothing/gloves/ring/shadow
|
||||
name = "shadow ring"
|
||||
icon_state = "shadowring"
|
||||
material = "shadows"
|
||||
@@ -7,3 +7,4 @@
|
||||
else
|
||||
biomass_infestation()
|
||||
spacevines_spawned = 1
|
||||
v
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user