mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 06:58:30 +01:00
Fixes some runtimes [IDB IGNORE] (#17194)
* Fixes some runtimes * typo * No more infinite mannequins * crash * More runtime fixes and pressure fling Makes it so you can unwrench pipes that are pressurized, at the cost of being flung back from the pipe. Higher pressure = longer distance and faster. * Fixes a memory leak and a bug
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
/proc/atmosanalyzer_scan(var/atom/target, var/datum/gas_mixture/mixture, var/mob/user)
|
||||
var/list/results = list()
|
||||
|
||||
if (mixture && mixture.total_moles > 0)
|
||||
if(mixture && mixture.total_moles > 0)
|
||||
var/pressure = mixture.return_pressure()
|
||||
var/total_moles = mixture.total_moles
|
||||
results += span_notice("Pressure: [round(pressure,0.1)] kPa")
|
||||
@@ -42,10 +42,16 @@
|
||||
return atmosanalyzer_scan(src, src.air_contents, user)
|
||||
|
||||
/obj/machinery/atmospherics/pipe/atmosanalyze(var/mob/user)
|
||||
return atmosanalyzer_scan(src, src.parent.air, user)
|
||||
if(parent && parent.air) //Sometimes we may have a pipe that has no parent. This seems to happen if you add a pipe onto a pipeline, causing it to delete the parent for every pipe on that pipeline...Yeah. It's complicated and a bug.
|
||||
return atmosanalyzer_scan(src, src.parent.air, user)
|
||||
|
||||
// This one is strange. The connector is not guaranteed to have a network (if you placed it down by itself)
|
||||
// 'gases' is also a list. But the atmos analyzer wants you to give it a gas mixture.
|
||||
// The 'gases' list holds ONE gas mixture.
|
||||
/obj/machinery/atmospherics/portables_connector/atmosanalyze(var/mob/user)
|
||||
return atmosanalyzer_scan(src, src.network.gases, user)
|
||||
if(network && network.gases)
|
||||
var/list/datum/gas_mixture/analyzed_gas = network.gases[1]
|
||||
return atmosanalyzer_scan(src, analyzed_gas, user)
|
||||
|
||||
/obj/machinery/atmospherics/unary/atmosanalyze(var/mob/user)
|
||||
return atmosanalyzer_scan(src, src.air_contents, user)
|
||||
@@ -67,7 +73,7 @@
|
||||
|
||||
/obj/machinery/meter/atmosanalyze(var/mob/user)
|
||||
var/datum/gas_mixture/mixture = null
|
||||
if(src.target)
|
||||
if(target && target.parent)
|
||||
mixture = src.target.parent.air
|
||||
return atmosanalyzer_scan(src, mixture, user)
|
||||
|
||||
|
||||
@@ -84,6 +84,8 @@
|
||||
var/list/RGB2 = ReadRGB(rgb2)
|
||||
|
||||
// add missing alpha if needed
|
||||
if(!RGB1 || !RGB2) //Don't blend if we don't two! No use blending what we don't have!
|
||||
return
|
||||
if(RGB1.len < RGB2.len) RGB1 += 255
|
||||
else if(RGB2.len < RGB1.len) RGB2 += 255
|
||||
var/usealpha = RGB1.len > 3
|
||||
|
||||
Reference in New Issue
Block a user