mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-15 12:42:50 +00:00
* Fixes 6 pAI faces PAIs are no longer coded to only recognize 9 emotions. This enables the use of the neutral, silly, nose, smirk, exclamation points, and question mark faces as a pAI. Before, those buttons did nothing. * Fixes the PDA Halogen Scanner's tendency to be number one. * Unfolded pAIs can be picked up Because who doesn't want a robotic cat on their head? Adds in the missing code to allow pAIs to actually be picked up, and held sprites for the newer 4 chassis options. * Adds the Gigaphone, a suped-up Megaphone. * Constant Chip has a sprite * Fireaxe cabinets find their fireaxes in initialize(), rather than new() * Speeds up alcohol * fixed mining cloak not being in loadouts * Admin Supermatter Setup now closes the monitoring room shutters (#5442) * Admin Supermatter Setup now closes the monitoring room shutters * Fixes a copy-paste error * Begins work on lightning. * Fixes #5447 (Deadspy submap not overwriting mapgen) (#5448) * Map fix * fixed deadspy.dmm * Added Squid plushies of varying colours I added a few Squid plushies in different colours, changing the files code/game/objects/items/toys.dm and obj/toy.dmi * Added hat functionality to Squid plushies I added the ability to wear my Squid plushies as hats. They're damn good hats. * Replaces Skrell namegen (#5453) Created a first name list for Skrell, to replace the syllable assembler. Created a surname list for Skrell to replace the syllable assembler. Replaced the Skrell namegen with pre-written namelists, instead of the old syllable assembler. * Mechoid makes mistakes. Fix telepathic gigaphones. * Lets people be colorblind Adds four types of colorblindness to the traits in the setup menu - protanopia, deuteranopia, tritanopia, and monochromacy. Previously, there were ones defined in the code, but not actually usable to players. * Whoops, worded that wrong * Adds beams to the Type var list for View Variables. * Unfuck my Master * Adds beams to the Type var selection in View Variables. * Finishes thunderstorms. * Adds logging. * APC Sprite Change - Port from Virgo recolored slightly to match closer to the old sprite - Addition of directional sprites for the APCs * Refactors supply controller. Supply consoles now run nanoUI * Missing ' * [Excitedly updates changelog] * btw i use arc * Removes supermatters from cave PoIs. * Holomap Port - Port of Holomaps from Virgo * Changing species (via ling or admin button) should no longer ruin your HUD * Converts most istype(thing,tool) procs into an appropriate thing.is_tool() format * Removes empty file, gives the QM a control console again (Was replaced with an ordering console) * Hopefully fixes some tool-conversion things * Makes the Northern Star still compile * Keeps NS up to date * Taj and Unathi should have explorer mask sprites now * Corgi rune now summons the corgi in a flash of harmless lightning * Forces mech construction to work with the is_tool() procs * Various things and floors no longer associate with dirt * MultiZ falling tweaks * Fixes the clusterbang grenade * Added new hairstyles * Added new hairstyles * Fixes spelling of Strike in Lightning Strike admin verb * I don't know how we keep breaking falling * Hallucinations now use the old system again, but with the more modern components. * Ambience Refactor (#5476) * Refactors how ambience is assigned, removes bad ambience, ports good ambience from tg * Apparently that file is still used, not worth the salt to remove it. * Changelog * The speed-related chem effects are no longer a one-or-none affair, oxy causes slowdown * Corrects noted issues * Add some missing sprites for xenoarch excavation. * Become thwarted, thot. * Fixes the Ultra AC2's burstfire bug. * The Major Bill's shuttle is actually contagious now. * penguins are from earth capitalize this, anewbe, i dare you * Mechoid's a butt * Adds new job/department specific teshari clothing to the loadout (#5481) * adding the new department specific teshari outfits * Slightly cleans up hooded suit code (#5471) * FBPs can have brute damage repaired externally again * Windoors fix * Cleans up some largecrate code * Weather refactor. * NanoUI makes me sad. * Drinking more booze gets you drunk faster * Ports the supermatter grenade, supporting code * May or may not make movement seem smoother * Fixes the Sleepy Ring * Partially ports the GLOB system * Fixes the bug(s) that allow meat bodies to have metal brains * ports VOREStation/VOREStation#4165 - i forgot to check if advanced who was a thing here * Optimizes supply UI * Transfer shuttle grammar fixes * Fixes borked E and W fish sprites * Fixes incorrect ETA in crew transfer announcement * Mech Mini 'Revamp'. Will need playtesting. (#5480) * Exosuits are now capable of holding more equipment, of specific types. * Tweaks regarding feedback in staffside thread, other concerns. * Tweak to be more consistent. Why did the Odysseus have two universals. Tweak to weapon restriction on Med - > Odyss * Weapons only fit in universal combat slots. * Adds smart magazine, magazine functionality * Adds a new subset of grenades that shoot projectiles * Low alpha now makes HUDs and tooltips not show up on you * Fixes a UI bug with emptying currently-open bags into smartfridges...hopefully. (#5515) * Update smartfridge.dm * actually indicates which line solves the bug * Adds a whole bunch of Exosuit weapons and other miscellaneous parts. * Minifrags now use the small fragments mainly as they should. * Iced beer no longer freezes you to 3 degrees C, which is enough to seriously burn a Skrell. Seriously, that's weird. * Touch stuff in reference to responses. * NanoUI now processes again * Converts more simple_animal mobs to simple_mob * Submap correction
220 lines
7.3 KiB
Plaintext
220 lines
7.3 KiB
Plaintext
|
|
datum/pipeline
|
|
var/datum/gas_mixture/air
|
|
|
|
var/list/obj/machinery/atmospherics/pipe/members
|
|
var/list/obj/machinery/atmospherics/pipe/edges //Used for building networks
|
|
|
|
var/datum/pipe_network/network
|
|
|
|
var/alert_pressure = 0
|
|
|
|
Destroy()
|
|
QDEL_NULL(network)
|
|
|
|
if(air && air.volume)
|
|
temporarily_store_air()
|
|
for(var/obj/machinery/atmospherics/pipe/P in members)
|
|
P.parent = null
|
|
members = null
|
|
edges = null
|
|
. = ..()
|
|
|
|
proc/process()//This use to be called called from the pipe networks
|
|
|
|
//Check to see if pressure is within acceptable limits
|
|
var/pressure = air.return_pressure()
|
|
if(pressure > alert_pressure)
|
|
for(var/obj/machinery/atmospherics/pipe/member in members)
|
|
if(!member.check_pressure(pressure))
|
|
break //Only delete 1 pipe per process
|
|
|
|
proc/temporarily_store_air()
|
|
//Update individual gas_mixtures by volume ratio
|
|
|
|
for(var/obj/machinery/atmospherics/pipe/member in members)
|
|
member.air_temporary = new
|
|
member.air_temporary.copy_from(air)
|
|
member.air_temporary.volume = member.volume
|
|
member.air_temporary.multiply(member.volume / air.volume)
|
|
|
|
proc/build_pipeline(obj/machinery/atmospherics/pipe/base)
|
|
air = new
|
|
|
|
var/list/possible_expansions = list(base)
|
|
members = list(base)
|
|
edges = list()
|
|
|
|
var/volume = base.volume
|
|
base.parent = src
|
|
alert_pressure = base.alert_pressure
|
|
|
|
if(base.air_temporary)
|
|
air = base.air_temporary
|
|
base.air_temporary = null
|
|
else
|
|
air = new
|
|
|
|
while(possible_expansions.len>0)
|
|
for(var/obj/machinery/atmospherics/pipe/borderline in possible_expansions)
|
|
|
|
var/list/result = borderline.pipeline_expansion()
|
|
var/edge_check = result.len
|
|
|
|
if(result.len>0)
|
|
for(var/obj/machinery/atmospherics/pipe/item in result)
|
|
if(!members.Find(item))
|
|
members += item
|
|
possible_expansions += item
|
|
|
|
volume += item.volume
|
|
item.parent = src
|
|
|
|
alert_pressure = min(alert_pressure, item.alert_pressure)
|
|
|
|
if(item.air_temporary)
|
|
air.merge(item.air_temporary)
|
|
|
|
edge_check--
|
|
|
|
if(edge_check>0)
|
|
edges += borderline
|
|
|
|
possible_expansions -= borderline
|
|
|
|
air.volume = volume
|
|
|
|
proc/network_expand(datum/pipe_network/new_network, obj/machinery/atmospherics/pipe/reference)
|
|
|
|
if(new_network.line_members.Find(src))
|
|
return 0
|
|
|
|
new_network.line_members += src
|
|
|
|
network = new_network
|
|
|
|
for(var/obj/machinery/atmospherics/pipe/edge in edges)
|
|
for(var/obj/machinery/atmospherics/result in edge.pipeline_expansion())
|
|
if(!istype(result,/obj/machinery/atmospherics/pipe) && (result!=reference))
|
|
result.network_expand(new_network, edge)
|
|
|
|
return 1
|
|
|
|
proc/return_network(obj/machinery/atmospherics/reference)
|
|
if(!network)
|
|
network = new /datum/pipe_network()
|
|
network.build_network(src, null)
|
|
//technically passing these parameters should not be allowed
|
|
//however pipe_network.build_network(..) and pipeline.network_extend(...)
|
|
// were setup to properly handle this case
|
|
|
|
return network
|
|
|
|
proc/mingle_with_turf(turf/simulated/target, mingle_volume)
|
|
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_original = new
|
|
|
|
turf_copy.copy_from(target.zone.air)
|
|
turf_copy.volume = target.zone.air.volume //Copy a good representation of the turf from parent group
|
|
turf_original.copy_from(turf_copy)
|
|
|
|
equalize_gases(list(air_sample, turf_copy))
|
|
air.merge(air_sample)
|
|
|
|
|
|
target.zone.air.remove(turf_original.total_moles)
|
|
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()
|
|
|
|
if(network)
|
|
network.update = 1
|
|
|
|
proc/temperature_interact(turf/target, share_volume, thermal_conductivity)
|
|
var/total_heat_capacity = air.heat_capacity()
|
|
var/partial_heat_capacity = total_heat_capacity*(share_volume/air.volume)
|
|
|
|
if(istype(target, /turf/simulated))
|
|
var/turf/simulated/modeled_location = target
|
|
|
|
if(modeled_location.blocks_air)
|
|
|
|
if((modeled_location.heat_capacity>0) && (partial_heat_capacity>0))
|
|
var/delta_temperature = air.temperature - modeled_location.temperature
|
|
|
|
var/heat = thermal_conductivity*delta_temperature* \
|
|
(partial_heat_capacity*modeled_location.heat_capacity/(partial_heat_capacity+modeled_location.heat_capacity))
|
|
|
|
air.temperature -= heat/total_heat_capacity
|
|
modeled_location.temperature += heat/modeled_location.heat_capacity
|
|
|
|
else
|
|
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()
|
|
|
|
var/self_temperature_delta = 0
|
|
var/sharer_temperature_delta = 0
|
|
|
|
if((sharer_heat_capacity>0) && (partial_heat_capacity>0))
|
|
var/heat = thermal_conductivity*delta_temperature* \
|
|
(partial_heat_capacity*sharer_heat_capacity/(partial_heat_capacity+sharer_heat_capacity))
|
|
|
|
self_temperature_delta = -heat/total_heat_capacity
|
|
sharer_temperature_delta = heat/sharer_heat_capacity
|
|
else
|
|
return 1
|
|
|
|
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
|
|
|
|
|
|
else
|
|
if((target.heat_capacity>0) && (partial_heat_capacity>0))
|
|
var/delta_temperature = air.temperature - target.temperature
|
|
|
|
var/heat = thermal_conductivity*delta_temperature* \
|
|
(partial_heat_capacity*target.heat_capacity/(partial_heat_capacity+target.heat_capacity))
|
|
|
|
air.temperature -= heat/total_heat_capacity
|
|
if(network)
|
|
network.update = 1
|
|
|
|
//surface must be the surface area in m^2
|
|
proc/radiate_heat_to_space(surface, thermal_conductivity)
|
|
var/gas_density = air.total_moles/air.volume
|
|
thermal_conductivity *= min(gas_density / ( RADIATOR_OPTIMUM_PRESSURE/(R_IDEAL_GAS_EQUATION*GAS_CRITICAL_TEMPERATURE) ), 1) //mult by density ratio
|
|
|
|
// We only get heat from the star on the exposed surface area.
|
|
// If the HE pipes gain more energy from AVERAGE_SOLAR_RADIATION than they can radiate, then they have a net heat increase.
|
|
var/heat_gain = AVERAGE_SOLAR_RADIATION * (RADIATOR_EXPOSED_SURFACE_AREA_RATIO * surface) * thermal_conductivity
|
|
|
|
// Previously, the temperature would enter equilibrium at 26C or 294K.
|
|
// Only would happen if both sides (all 2 square meters of surface area) were exposed to sunlight. We now assume it aligned edge on.
|
|
// It currently should stabilise at 129.6K or -143.6C
|
|
heat_gain -= surface * STEFAN_BOLTZMANN_CONSTANT * thermal_conductivity * (air.temperature - COSMIC_RADIATION_TEMPERATURE) ** 4
|
|
|
|
air.add_thermal_energy(heat_gain)
|
|
if(network)
|
|
network.update = 1
|