and finally, the modules folder. Now I can publish and take a break

This commit is contained in:
deathride58
2018-07-02 01:19:37 -04:00
parent 91805b8789
commit b1688405d9
380 changed files with 2204 additions and 1588 deletions
@@ -42,6 +42,11 @@
active_hotspot.just_spawned = (current_cycle < SSair.times_fired)
//remove just_spawned protection if no longer processing this cell
SSair.add_to_active(src, 0)
else
var/datum/gas_mixture/heating = air_contents.remove_ratio(exposed_volume/air_contents.volume)
heating.temperature = exposed_temperature
heating.react()
assume_air(heating)
return igniting
//This is the icon for fire on turfs, also helps for nurturing small fires until they are full tile
@@ -231,7 +236,7 @@
else
chance_of_deletion = 100
if(prob(chance_of_deletion))
T.ScrapeAway()
T.Melt()
else
T.to_be_destroyed = FALSE
T.max_fire_temperature_sustained = 0
@@ -256,4 +261,4 @@
. = ..()
if(!isliving(loc))
return INITIALIZE_HINT_QDEL
#undef INSUFFICIENT
#undef INSUFFICIENT
@@ -100,28 +100,38 @@
if (atmos_overlay_types)
for(var/overlay in atmos_overlay_types-new_overlay_types) //doesn't remove overlays that would only be added
vars["vis_contents"] -= overlay
vis_contents -= overlay
if (new_overlay_types.len)
if (length(new_overlay_types))
if (atmos_overlay_types)
vars["vis_contents"] += new_overlay_types - atmos_overlay_types //don't add overlays that already exist
vis_contents += new_overlay_types - atmos_overlay_types //don't add overlays that already exist
else
vars["vis_contents"] += new_overlay_types
vis_contents += new_overlay_types
UNSETEMPTY(new_overlay_types)
src.atmos_overlay_types = new_overlay_types
/turf/open/proc/tile_graphic()
. = new /list
var/static/list/nonoverlaying_gases = typecache_of_gases_with_no_overlays()
if(air)
. = new /list
var/list/gases = air.gases
for(var/id in gases)
if (nonoverlaying_gases[id])
continue
var/gas = gases[id]
var/gas_meta = gas[GAS_META]
var/gas_overlay = gas_meta[META_GAS_OVERLAY]
if(gas_overlay && gas[MOLES] > gas_meta[META_GAS_MOLES_VISIBLE])
. += gas_overlay
/proc/typecache_of_gases_with_no_overlays()
. = list()
for (var/gastype in subtypesof(/datum/gas))
var/datum/gas/gasvar = gastype
if (!initial(gasvar.gas_overlay))
.[gastype] = TRUE
/////////////////////////////SIMULATION///////////////////////////////////
#define LAST_SHARE_CHECK \
@@ -285,8 +285,6 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
return 1
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
if(!sharer)
return 0
var/list/cached_gases = gases
var/list/sharer_gases = sharer.gases
@@ -322,7 +320,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
if(delta > 0)
heat_capacity_self_to_sharer += gas_heat_capacity
else
heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative. saves a proc call.
heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative.
gas[MOLES] -= delta
sharergas[MOLES] += delta
@@ -348,8 +346,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.1) // <10% change in sharer heat capacity
temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
var/list/unique_gases = cached_gases ^ sharer_gases
if(unique_gases.len) //if all gases were present in both mixtures, we know that no gases are 0
if(length(cached_gases ^ sharer_gases)) //if all gases were present in both mixtures, we know that no gases are 0
garbage_collect(cached_gases - sharer_gases) //any gases the sharer had, we are guaranteed to have. gases that it didn't have we are not.
sharer.garbage_collect(sharer_gases - cached_gases) //the reverse is equally true
sharer.after_share(src, atmos_adjacent_turfs)
@@ -358,8 +355,7 @@ GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
TOTAL_MOLES(cached_gases,our_moles)
var/their_moles
TOTAL_MOLES(sharer_gases,their_moles)
var/delta_pressure = temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)
return delta_pressure * R_IDEAL_GAS_EQUATION / volume
return (temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)) * R_IDEAL_GAS_EQUATION / volume
/datum/gas_mixture/after_share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
return
@@ -88,7 +88,7 @@
/datum/gas_reaction/nobliumsupression
priority = INFINITY
name = "Hyper-Noblium Reaction Supression"
name = "Hyper-Noblium Reaction Suppression"
id = "nobstop"
/datum/gas_reaction/nobliumsupression/init_reqs()
@@ -402,13 +402,13 @@
var/pressure = air.return_pressure()
var/old_heat_capacity = air.heat_capacity()
var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/tritium][MOLES],1))),cached_gases[/datum/gas/tritium][MOLES],cached_gases[/datum/gas/plasma][MOLES]/2)
var/reaction_efficency = min(1/((pressure/(0.1*ONE_ATMOSPHERE))*(max(cached_gases[/datum/gas/plasma][MOLES]/cached_gases[/datum/gas/nitrous_oxide][MOLES],1))),cached_gases[/datum/gas/nitrous_oxide][MOLES],cached_gases[/datum/gas/plasma][MOLES]/2)
var/energy_released = 2*reaction_efficency*FIRE_CARBON_ENERGY_RELEASED
if ((cached_gases[/datum/gas/tritium][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing.
if ((cached_gases[/datum/gas/nitrous_oxide][MOLES] - reaction_efficency < 0 )|| (cached_gases[/datum/gas/plasma][MOLES] - (2*reaction_efficency) < 0)) //Shouldn't produce gas from nothing.
return NO_REACTION
ASSERT_GAS(/datum/gas/bz,air)
cached_gases[/datum/gas/bz][MOLES] += reaction_efficency
cached_gases[/datum/gas/tritium][MOLES] -= reaction_efficency
cached_gases[/datum/gas/nitrous_oxide][MOLES] -= reaction_efficency
cached_gases[/datum/gas/plasma][MOLES] -= 2*reaction_efficency
@@ -422,6 +422,7 @@
priority = 5
name = "Stimulum formation"
id = "stimformation"
/datum/gas_reaction/stimformation/init_reqs()
min_requirements = list(
/datum/gas/tritium = 30,
@@ -227,7 +227,7 @@ Acts like a normal vent, but has an input AND output.
pressure_checks &= ~1
pump_direction = 0
if("stabalize" in signal.data)
if("stabilize" in signal.data)
pressure_checks |= 1
pump_direction = 1
@@ -27,7 +27,7 @@ Thus, the two variables affect pump operation are set in New():
construction_type = /obj/item/pipe/directional
pipe_state = "pump"
/obj/machinery/atmospherics/components/binary/pump/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -41,7 +41,7 @@ Thus, the two variables affect pump operation are set in New():
/obj/machinery/atmospherics/components/binary/pump/on
on = TRUE
icon_state = "pump_on_map"
/obj/machinery/atmospherics/components/binary/pump/on/layer1
piping_layer = PIPING_LAYER_MIN
pixel_x = -PIPING_LAYER_P_X
@@ -51,7 +51,7 @@ Thus, the two variables affect pump operation are set in New():
piping_layer = PIPING_LAYER_MAX
pixel_x = PIPING_LAYER_P_X
pixel_y = PIPING_LAYER_P_Y
/obj/machinery/atmospherics/components/binary/pump/Destroy()
SSradio.remove_object(src,frequency)
if(radio_connection)
@@ -132,8 +132,8 @@ Thus, the two variables affect pump operation are set in New():
switch(action)
if("power")
on = !on
investigate_log("Pump, [src.name], was turned [on ? "on" : "off"] by [key_name(usr)] at [x], [y], [z], [A]", INVESTIGATE_ATMOS)
message_admins("Pump, [src.name], turned [on ? "on" : "off"] by [ADMIN_LOOKUPFLW(usr)] at [ADMIN_COORDJMP(T)], [A]")
investigate_log("was turned [on ? "on" : "off"] by [key_name(usr)]", INVESTIGATE_ATMOS)
. = TRUE
if("pressure")
var/pressure = params["pressure"]
@@ -13,7 +13,6 @@ It's like a regular ol' straight pipe, but you can turn it on and off.
var/frequency = 0
var/id = null
var/open = FALSE
var/valve_type = "m" //lets us have a nice, clean, OOP update_icon_nopipes()
construction_type = /obj/item/pipe/binary
@@ -341,7 +341,7 @@
pressure_checks &= ~EXT_BOUND
pump_direction = SIPHONING
if("stabalize" in signal.data)
if("stabilize" in signal.data)
pressure_checks |= EXT_BOUND
pump_direction = RELEASING
@@ -399,7 +399,7 @@
user.visible_message("[user] welds the vent shut.", "<span class='notice'>You weld the vent shut.</span>", "<span class='italics'>You hear welding.</span>")
welded = TRUE
else
user.visible_message("[user] unwelds the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
user.visible_message("[user] unwelded the vent.", "<span class='notice'>You unweld the vent.</span>", "<span class='italics'>You hear welding.</span>")
welded = FALSE
update_icon()
pipe_vision_img = image(src, loc, layer = ABOVE_HUD_LAYER, dir = dir)
@@ -60,7 +60,7 @@
warning("build_pipeline(): [item.type] added to a pipenet while still having one. (pipes leading to the same spot stacking in one turf) Nearby: ([item.x], [item.y], [item.z])")
pipenetwarnings -= 1
if(pipenetwarnings == 0)
warning("build_pipeline(): further messages about pipenets will be supressed")
warning("build_pipeline(): further messages about pipenets will be suppressed")
members += item
possible_expansions += item