mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
ZAS fixes.
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
var/global/vs_control/vsc = new
|
||||
|
||||
vs_control/var
|
||||
// zone_share_percent = 12
|
||||
// zone_share_percent_NAME = "Zone Share Percent"
|
||||
// zone_share_percent_DESC = "Percentage of air difference to move per tick"
|
||||
IgnitionLevel = 0.5
|
||||
IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn."
|
||||
airflow_lightest_pressure = 30
|
||||
@@ -49,10 +46,7 @@ vs_control
|
||||
list/settings = list()
|
||||
list/bitflags = list("1","2","4","8","16","32","64","128","256","512","1024")
|
||||
pl_control/plc = new()
|
||||
/*RPREV_REQUIRE_HEADS_ALIVE = 0
|
||||
RPREV_REQUIRE_HEADS_ALIVE_DESC = "Require the heads to be captured alive in RP Rev, rather than either dead or captured."
|
||||
RPREV_REQUIRE_REVS_ALIVE = 0
|
||||
RPREV_REQUIRE_REVS_ALIVE_DESC = "Require the rev leaders to be captured alive in RP Rev, rather than either dead or captured."*/
|
||||
|
||||
New()
|
||||
. = ..()
|
||||
settings = vars.Copy()
|
||||
@@ -142,7 +136,6 @@ vs_control
|
||||
if(how == "Toggle")
|
||||
newvar = (newvar?"ON":"OFF")
|
||||
world << "\blue <b>[key_name(user)] changed the setting [display_description] to [newvar].</b>"
|
||||
//user << "[which] has been changed to [newvar]."
|
||||
if(ch in plc.settings)
|
||||
ChangeSettingsDialog(user,plc.settings)
|
||||
else
|
||||
@@ -162,7 +155,6 @@ vs_control
|
||||
proc/ChangePlasma()
|
||||
for(var/V in plc.settings)
|
||||
plc.Randomize(V)
|
||||
////world << "Plasma randomized."
|
||||
|
||||
proc/SetDefault(var/mob/user)
|
||||
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
|
||||
@@ -173,100 +165,35 @@ vs_control
|
||||
switch(def)
|
||||
if("Plasma - Standard")
|
||||
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
|
||||
//plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters,
|
||||
|
||||
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
|
||||
|
||||
plc.SKIN_BURNS = 0 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
//plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
|
||||
plc.PLASMA_HALLUCINATION = 0
|
||||
|
||||
//plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
//plc.PLASMA_COLOR = "onturf" //Plasma can change colors yaaaay!
|
||||
|
||||
//plc.PLASMA_DMG_OFFSET = 1
|
||||
//plc.PLASMA_DMG_QUOTIENT = 10
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
|
||||
if("Plasma - Low Hazard")
|
||||
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
|
||||
// plc.CANISTER_CORROSION = 0 //If this is on, plasma must be stored in orange tanks and canisters,
|
||||
|
||||
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
|
||||
|
||||
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000
|
||||
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
plc.EYE_BURNS = 0 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
|
||||
// plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
// plc.PLASMA_COLOR = "onturf" //RBPYB
|
||||
|
||||
//if(prob(20))
|
||||
// plc.PLASMA_COLOR = pick("red","yellow","blue","purple")
|
||||
|
||||
//plc.PLASMA_DMG_OFFSET = 1.5
|
||||
//plc.PLASMA_DMG_QUOTIENT = 8
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
|
||||
if("Plasma - High Hazard")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
|
||||
// plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters,
|
||||
|
||||
plc.GENETIC_CORRUPTION = 0 //Chance of genetic corruption as well as toxic damage, X in 1000.
|
||||
|
||||
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
// plc.PLASMA_INJECTS_TOXINS = 0 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
|
||||
// plc.N2O_REACTION = 0 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
// plc.PLASMA_COLOR = "onturf"//pick("red","yellow","blue","purple") //RBPYB
|
||||
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
if("Plasma - Oh Shit!")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 1
|
||||
|
||||
// plc.CANISTER_CORROSION = 1 //If this is on, plasma must be stored in orange tanks and canisters,
|
||||
|
||||
plc.GENETIC_CORRUPTION = 5 //Chance of genetic corruption as well as toxic damage, X in 1000.
|
||||
|
||||
plc.SKIN_BURNS = 1 //Plasma has an effect similar to mustard gas on the un-suited.
|
||||
|
||||
// plc.PLASMA_INJECTS_TOXINS = 1 //Plasma damage injects the toxins chemical to do damage over time.
|
||||
|
||||
plc.EYE_BURNS = 1 //Plasma burns the eyes of anyone not wearing eye protection.
|
||||
|
||||
// plc.N2O_REACTION = 1 //Plasma can react with N2O, making sparks and starting a fire if levels are high.
|
||||
|
||||
// plc.PLASMA_COLOR = "onturf" //RBPYB
|
||||
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
if("ZAS - Normal")
|
||||
IgnitionLevel = 0.5
|
||||
airflow_lightest_pressure = 30
|
||||
@@ -346,40 +273,27 @@ pl_control
|
||||
|
||||
settings -= "settings"
|
||||
proc/Randomize(V)
|
||||
//world << "Randomizing [V]"
|
||||
var/newvalue
|
||||
if("[V]_RANDOM" in vars)
|
||||
if(isnum(vars["[V]_RANDOM"]))
|
||||
newvalue = prob(vars["[V]_RANDOM"])
|
||||
if(newvalue)
|
||||
//world << "Probability [vars["[V]_RANDOM"]]%: Success."
|
||||
else
|
||||
//world << "Probability [vars["[V]_RANDOM"]]%: Failure."
|
||||
else if(istext(vars["[V]_RANDOM"]))
|
||||
var/txt = vars["[V]_RANDOM"]
|
||||
if(findtextEx(txt,"PROB"))
|
||||
//world << "Probability/Roll Combo \..."
|
||||
txt = dd_text2list(txt,"/")
|
||||
txt[1] = dd_replacetext(txt[1],"PROB","")
|
||||
var/p = text2num(txt[1])
|
||||
var/r = txt[2]
|
||||
//world << "Prob:[p]% Roll:[r]"
|
||||
if(prob(p))
|
||||
newvalue = roll(r)
|
||||
//world << "Success. New value: [newvalue]"
|
||||
else
|
||||
newvalue = vars[V]
|
||||
//world << "Probability check failed."
|
||||
else if(findtextEx(txt,"PICK"))
|
||||
txt = dd_replacetext(txt,"PICK","")
|
||||
//world << "Pick: [txt]"
|
||||
txt = dd_text2list(txt,",")
|
||||
newvalue = pick(txt)
|
||||
//world << "Picked: [newvalue]"
|
||||
else
|
||||
newvalue = roll(txt)
|
||||
//world << "Roll: [txt] - [newvalue]"
|
||||
else
|
||||
newvalue = vars[V]
|
||||
vars[V] = newvalue
|
||||
////world << "Plasma color updated."
|
||||
vars[V] = newvalue
|
||||
@@ -45,46 +45,24 @@ turf
|
||||
datum/gas_mixture/air
|
||||
|
||||
processing = 1
|
||||
// group_border = 0
|
||||
// length_space_border = 0
|
||||
|
||||
air_check_directions = 0 //Do not modify this, just add turf to air_master.tiles_to_update
|
||||
|
||||
// archived_cycle = 0
|
||||
// current_cycle = 0
|
||||
|
||||
obj/fire/active_hotspot
|
||||
|
||||
// temperature_archived //USED ONLY FOR SOLIDS
|
||||
// being_superconductive = 0
|
||||
|
||||
proc/update_visuals()
|
||||
overlays = null
|
||||
|
||||
proc
|
||||
process_cell()
|
||||
update_air_properties()
|
||||
archive()
|
||||
|
||||
mimic_air_with_tile(turf/model)
|
||||
share_air_with_tile(turf/simulated/sharer)
|
||||
|
||||
mimic_temperature_with_tile(turf/model)
|
||||
share_temperature_with_tile(turf/simulated/sharer)
|
||||
|
||||
|
||||
super_conduct()
|
||||
|
||||
update_visuals()
|
||||
overlays = null
|
||||
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('floors.dmi',siding_icon_state)
|
||||
var/datum/gas_mixture/model = return_air()
|
||||
switch(model.graphic)
|
||||
if(1)
|
||||
overlays.Add(plmaster) //TODO: Make invisible plasma an option
|
||||
if(2)
|
||||
overlays.Add(slmaster)
|
||||
var/siding_icon_state = return_siding_icon_state()
|
||||
if(siding_icon_state)
|
||||
overlays += image('floors.dmi',siding_icon_state)
|
||||
var/datum/gas_mixture/model = return_air()
|
||||
switch(model.graphic)
|
||||
if(1)
|
||||
overlays.Add(plmaster) //TODO: Make invisible plasma an option
|
||||
if(2)
|
||||
overlays.Add(slmaster)
|
||||
|
||||
|
||||
|
||||
@@ -105,8 +83,6 @@ turf
|
||||
if(air_master)
|
||||
air_master.tiles_to_update.Add(src)
|
||||
|
||||
// air.parent = src //TODO DEBUG REMOVE
|
||||
|
||||
else
|
||||
if(air_master)
|
||||
for(var/direction in cardinal)
|
||||
@@ -132,19 +108,6 @@ turf
|
||||
else
|
||||
return ..()
|
||||
|
||||
// archive()
|
||||
// if(air) //For open space like floors
|
||||
// air.archive()
|
||||
|
||||
// temperature_archived = temperature
|
||||
// archived_cycle = air_master.current_cycle
|
||||
|
||||
share_air_with_tile(turf/simulated/T)
|
||||
return air.share(T.air)
|
||||
|
||||
mimic_air_with_tile(turf/T)
|
||||
return air.mimic(T)
|
||||
|
||||
return_air()
|
||||
if(zone)
|
||||
return zone.air
|
||||
@@ -170,7 +133,7 @@ turf
|
||||
else
|
||||
return ..()
|
||||
|
||||
update_air_properties()
|
||||
proc/update_air_properties()
|
||||
. = 1
|
||||
air_check_directions = 0
|
||||
|
||||
|
||||
@@ -359,6 +359,7 @@ proc/ShareSpace(datum/gas_mixture/A, list/unsimulated_tiles)
|
||||
|
||||
if(sharing_lookup_table.len >= unsimulated_tiles.len) //6 or more interconnecting tiles will max at 42% of air moved per tick.
|
||||
ratio = sharing_lookup_table[unsimulated_tiles.len]
|
||||
ratio *= 2
|
||||
|
||||
A.oxygen = max(0, (A.oxygen - oxy_avg) * (1-ratio) + oxy_avg )
|
||||
A.nitrogen = max(0, (A.nitrogen - nit_avg) * (1-ratio) + nit_avg )
|
||||
|
||||
Reference in New Issue
Block a user