mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 10:21:11 +00:00
Adds further checking and variable presets to ZAS, and made the contamination overlay actually work.
This commit is contained in:
@@ -48,44 +48,6 @@ atom/movable/RepelAirflowDest(n)
|
||||
|
||||
*/
|
||||
|
||||
vs_control/var
|
||||
airflow_lightest_pressure = 30
|
||||
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
|
||||
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
|
||||
airflow_light_pressure = 45
|
||||
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
|
||||
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
|
||||
airflow_medium_pressure = 90
|
||||
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
|
||||
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
|
||||
airflow_heavy_pressure = 95
|
||||
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
|
||||
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
|
||||
airflow_dense_pressure = 120
|
||||
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
|
||||
airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
|
||||
airflow_stun_pressure = 100
|
||||
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
|
||||
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
|
||||
airflow_stun_cooldown = 60
|
||||
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
|
||||
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
|
||||
airflow_stun = 0.15
|
||||
airflow_stun_NAME = "Airflow Impact - Stunning"
|
||||
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
|
||||
airflow_damage = 0.3
|
||||
airflow_damage_NAME = "Airflow Impact - Damage"
|
||||
airflow_damage_DESC = "Damage from airflow impacts."
|
||||
airflow_speed_decay = 1.5
|
||||
airflow_speed_decay_NAME = "Airflow Speed Decay"
|
||||
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
|
||||
airflow_delay = 30
|
||||
airflow_delay_NAME = "Airflow Retrigger Delay"
|
||||
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
|
||||
airflow_mob_slowdown = 1
|
||||
airflow_mob_slowdown_NAME = "Airflow Slowdown"
|
||||
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
|
||||
|
||||
mob/var/tmp/last_airflow_stun = 0
|
||||
mob/proc/airflow_stun()
|
||||
if(stat == 2)
|
||||
@@ -309,6 +271,8 @@ atom/movable
|
||||
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
|
||||
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
|
||||
return
|
||||
if(!istype(loc, /turf))
|
||||
return
|
||||
step_towards(src, src.airflow_dest)
|
||||
if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
|
||||
airflow_dest = null
|
||||
@@ -363,6 +327,8 @@ atom/movable
|
||||
src.airflow_dest = locate(min(max(src.x + xo, 1), world.maxx), min(max(src.y + yo, 1), world.maxy), src.z)
|
||||
if ((src.x == 1 || src.x == world.maxx || src.y == 1 || src.y == world.maxy))
|
||||
return
|
||||
if(!istype(loc, /turf))
|
||||
return
|
||||
step_towards(src, src.airflow_dest)
|
||||
if(ismob(src) && src:client) src:client:move_delay = world.time + vsc.airflow_mob_slowdown
|
||||
airflow_dest = null
|
||||
|
||||
@@ -5,7 +5,7 @@ Indirect connections will not merge the two zones after they reach equilibrium.
|
||||
|
||||
connection
|
||||
var
|
||||
turf //The turfs involved in the connection.
|
||||
turf/simulated //The turfs involved in the connection.
|
||||
A
|
||||
B
|
||||
zone
|
||||
@@ -30,22 +30,15 @@ connection
|
||||
zone_B = B.zone
|
||||
ref_B = "\ref[B]"
|
||||
|
||||
if(!air_master.tiles_with_connections)
|
||||
air_master.tiles_with_connections = list()
|
||||
|
||||
if(air_master.tiles_with_connections[ref_A])
|
||||
var/list/A_connections = air_master.tiles_with_connections[ref_A]
|
||||
A_connections |= src
|
||||
if(!A.connections)
|
||||
A.connections = list(src)
|
||||
else
|
||||
var/list/A_connections = list(src)
|
||||
air_master.tiles_with_connections[ref_A] = A_connections
|
||||
A.connections += src
|
||||
|
||||
if(air_master.tiles_with_connections[ref_B])
|
||||
var/list/B_connections = air_master.tiles_with_connections[ref_B]
|
||||
B_connections |= src
|
||||
if(!B.connections)
|
||||
B.connections = list(src)
|
||||
else
|
||||
var/list/B_connections = list(src)
|
||||
air_master.tiles_with_connections[ref_B] = B_connections
|
||||
B.connections += src
|
||||
|
||||
if(!A.zone.connected_zones)
|
||||
A.zone.connected_zones = list()
|
||||
@@ -74,23 +67,15 @@ connection
|
||||
A.zone.connections.Remove(src)
|
||||
if(!A.zone.connections.len)
|
||||
del A.zone.connections
|
||||
if(ref_A in air_master.tiles_with_connections)
|
||||
var/list/A_connections = air_master.tiles_with_connections[ref_A]
|
||||
A_connections -= src
|
||||
if(A_connections && !A_connections.len)
|
||||
del A_connections
|
||||
air_master.tiles_with_connections.Remove(ref_A)
|
||||
if(istype(A))
|
||||
A.connections -= src
|
||||
if(B)
|
||||
if(B.zone && B.zone.connections)
|
||||
B.zone.connections.Remove(src)
|
||||
if(!B.zone.connections.len)
|
||||
del B.zone.connections
|
||||
if(ref_B in air_master.tiles_with_connections)
|
||||
var/list/B_connections = air_master.tiles_with_connections[ref_B]
|
||||
B_connections -= src
|
||||
if(B_connections && !B_connections.len)
|
||||
del B_connections
|
||||
air_master.tiles_with_connections.Remove(ref_B)
|
||||
if(istype(B))
|
||||
B.connections -= src
|
||||
if(zone_A)
|
||||
if(zone_A && zone_A.connections)
|
||||
zone_A.connections.Remove(src)
|
||||
@@ -193,7 +178,7 @@ connection
|
||||
|
||||
proc/CheckPassSanity()
|
||||
Cleanup()
|
||||
if(!A.CanPass(null, B, 0, 0) || !B.CanPass(null, A, 0, 0))
|
||||
if(!A.CanPass(null, B, 0, 0))
|
||||
del src
|
||||
if(A.HasDoor(B) || B.HasDoor(A))
|
||||
indirect = 1
|
||||
|
||||
@@ -61,7 +61,7 @@ proc/FloodFill(turf/start)
|
||||
for(var/d in cardinal)
|
||||
var/turf/O = get_step(T,d)
|
||||
//Simple pass check.
|
||||
if(O.ZCanPass(T) && !(O in open) && !(O in closed))
|
||||
if(istype(O) && O.ZCanPass(T) && !(O in open) && !(O in closed))
|
||||
open += O
|
||||
else
|
||||
doors += T
|
||||
@@ -72,19 +72,38 @@ proc/FloodFill(turf/start)
|
||||
closed += T
|
||||
|
||||
for(var/turf/T in doors)
|
||||
var/force_connection = 1
|
||||
var/turf/O = get_step(T,NORTH)
|
||||
if(O in closed)
|
||||
closed += T
|
||||
continue
|
||||
else if(T.ZCanPass(O))
|
||||
force_connection = 0
|
||||
|
||||
O = get_step(T,WEST)
|
||||
if(O in closed)
|
||||
closed += T
|
||||
continue
|
||||
else if(force_connection && T.ZCanPass(O))
|
||||
force_connection = 0
|
||||
|
||||
if(force_connection)
|
||||
O = get_step(T,SOUTH)
|
||||
if(O in closed)
|
||||
closed += T
|
||||
else if(!T.ZCanPass(O) && get_step(T,EAST) in closed)
|
||||
closed += T
|
||||
|
||||
|
||||
return closed
|
||||
|
||||
turf/proc/ZCanPass(turf/T, var/include_space = 0)
|
||||
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
|
||||
if(!istype(T))
|
||||
return 0
|
||||
|
||||
if(istype(T,/turf/space) && !include_space) return 0
|
||||
if(istype(T,/turf/space) && !include_space)
|
||||
return 0
|
||||
else
|
||||
if(T.blocks_air||blocks_air)
|
||||
return 0
|
||||
@@ -92,13 +111,35 @@ turf/proc/ZCanPass(turf/T, var/include_space = 0)
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
continue
|
||||
if(!obstacle.CanPass(0, T, 1.5, 1))
|
||||
if(!obstacle.CanPass(null, T, 1.5, 1))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
continue
|
||||
if(!obstacle.CanPass(0, src, 1.5, 1))
|
||||
if(!obstacle.CanPass(null, src, 1.5, 1))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
return 1
|
||||
|
||||
turf/proc/ZAirPass(turf/T)
|
||||
//Fairly standard pass checks for turfs, objects and directional windows. Also stops at the edge of space.
|
||||
if(!istype(T))
|
||||
return 0
|
||||
|
||||
if(T.blocks_air||blocks_air)
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in src)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, T, 0, 0))
|
||||
return 0
|
||||
|
||||
for(var/obj/obstacle in T)
|
||||
if(istype(obstacle,/obj/machinery/door) && !istype(obstacle,/obj/machinery/door/window))
|
||||
continue
|
||||
if(!obstacle.CanPass(null, src, 0, 0))
|
||||
return 0
|
||||
|
||||
return 1
|
||||
@@ -2,6 +2,7 @@ turf/var/zone/zone
|
||||
|
||||
var/list/zones = list()
|
||||
var/list/DoorDirections = list(NORTH,WEST) //Which directions doors turfs can connect to zones
|
||||
var/list/CounterDoorDirections = list(SOUTH,EAST) //Which directions doors turfs can connect to zones
|
||||
|
||||
zone
|
||||
var
|
||||
|
||||
@@ -100,7 +100,6 @@ datum
|
||||
|
||||
//Geometry updates lists
|
||||
var/list/turf/simulated/tiles_to_update = list()
|
||||
var/list/turf/simulated/tiles_with_connections = list()
|
||||
var/list/connection/connections_checked = list()
|
||||
// var/list/turf/simulated/groups_to_rebuild = list()
|
||||
|
||||
@@ -145,7 +144,7 @@ datum
|
||||
for(var/turf/simulated/S in world)
|
||||
if(S.z < 5)
|
||||
S.update_air_properties()
|
||||
S.check_connections()
|
||||
// S.check_connections()
|
||||
|
||||
world << "\red \b Geometry processed in [time2text(world.timeofday-start_time, "mm:ss")] minutes!"
|
||||
spawn start()
|
||||
|
||||
@@ -51,6 +51,7 @@ turf
|
||||
// current_cycle = 0
|
||||
|
||||
obj/fire/active_hotspot
|
||||
tmp/list/connections
|
||||
|
||||
// temperature_archived //USED ONLY FOR SOLIDS
|
||||
// being_superconductive = 0
|
||||
@@ -171,31 +172,34 @@ turf
|
||||
air_check_directions = 0
|
||||
|
||||
for(var/direction in cardinal)
|
||||
if(CanPass(null, get_step(src,direction), 0, 0))
|
||||
if(ZAirPass(get_step(src,direction)))
|
||||
air_check_directions |= direction
|
||||
var/has_door = HasDoor(src)
|
||||
|
||||
if(!zone && CanPass(null, src, 1.5, 1)) //No zone and not a wall, lets add ourself to a zone.
|
||||
for(var/direction in cardinal)
|
||||
if(has_door && !(direction in DoorDirections))
|
||||
continue
|
||||
if(!zone && !blocks_air) //No zone, but not a wall.
|
||||
for(var/direction in DoorDirections) //Check door directions first.
|
||||
if(air_check_directions&direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(T.zone && T.CanPass(null, src, 1.5, 1))
|
||||
T.zone.AddTurf(src)
|
||||
break
|
||||
else if(T.zone && get_dir(T,src) in DoorDirections)
|
||||
if(T.zone)
|
||||
T.zone.AddTurf(src)
|
||||
break
|
||||
if(!zone) //Still no zone
|
||||
for(var/direction in CounterDoorDirections) //Check the others second.
|
||||
if(air_check_directions&direction)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
if(T.zone)
|
||||
T.zone.AddTurf(src)
|
||||
break
|
||||
if(!zone) //No zone found, new zone!
|
||||
new/zone(src)
|
||||
if(!zone) //Still no zone, the floodfill determined it is not part of a larger zone. Force a zone on it.
|
||||
new/zone(list(src))
|
||||
|
||||
if(air_master.tiles_with_connections["\ref[src]"]) //Check pass sanity of the connections.
|
||||
var/list/connections = air_master.tiles_with_connections["\ref[src]"]
|
||||
if(connections) //Check pass sanity of the connections.
|
||||
for(var/connection/C in connections)
|
||||
air_master.connections_checked += C
|
||||
if(!(C in air_master.connections_checked))
|
||||
air_master.connections_checked += C
|
||||
|
||||
update_zone_properties(has_door) //Update self zone and adjacent zones.
|
||||
update_zone_properties() //Update self zone and adjacent zones.
|
||||
|
||||
if(air_check_directions)
|
||||
processing = 1
|
||||
@@ -203,34 +207,22 @@ turf
|
||||
processing = 0
|
||||
|
||||
|
||||
proc/update_zone_properties(var/has_door = 0)
|
||||
proc/update_zone_properties()
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/T = get_step(src,direction)
|
||||
var/turf/T = get_step(src,direction)
|
||||
if(air_check_directions&direction) //I can connect air in this direction
|
||||
if(!istype(T)) //Space
|
||||
if(!CanPass(null, T, 1.5, 1) && CanPass(src, T, 0, 0)) //Normally would block it, instead lets make a connection to it.
|
||||
if(zone)
|
||||
zone.AddSpace(T)
|
||||
else if(!CanPass(src, T, 0, 0) || !CanPass(T, src, 0, 0)) //I block the air or it blocks air, disconnect from it if connected.
|
||||
if(zone && T in zone.space_tiles)
|
||||
zone.RemoveSpace(T)
|
||||
else if(zone)
|
||||
zone.rebuild = 1
|
||||
continue
|
||||
|
||||
else if(!T.CanPass(null, src, 1.5, 1) && !T.CanPass(null, src, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(!CanPass(null, T, 0, 0)) //If I block air, we must look to see if the adjacent turfs need rebuilt.
|
||||
if(T.zone && !T.zone.rebuild)
|
||||
for(var/direction2 in cardinal - direction) //Check all other directions for air that might be connected.
|
||||
var/turf/simulated/NT = get_step(src, direction2)
|
||||
if(NT && NT.zone && NT.zone == T.zone)
|
||||
if(NT && NT.zone && NT.zone == T.zone && !NT.HasDoor())
|
||||
T.zone.rebuild = 1
|
||||
|
||||
else if(T.CanPass(null, src, 0, 0) && (!has_door || direction in DoorDirections))
|
||||
if(T.zone != zone)
|
||||
ZConnect(src,T)
|
||||
else
|
||||
ZConnect(src,T)
|
||||
|
||||
else if(zone && !zone.rebuild)
|
||||
for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
|
||||
var/turf/simulated/NT = get_step(T, direction2)
|
||||
if(NT && NT.zone && NT.zone == zone)
|
||||
zone.rebuild = 1
|
||||
// else if(zone && !zone.rebuild)
|
||||
// for(var/direction2 in cardinal - reverse_direction(direction)) //Check all other directions for air that might be connected.
|
||||
// var/turf/simulated/NT = get_step(T, direction2)
|
||||
// if(NT && NT.zone && NT.zone == zone)
|
||||
// zone.rebuild = 1
|
||||
@@ -12,8 +12,6 @@ Attach to transfer valve and open. BOOM.
|
||||
|
||||
|
||||
|
||||
vs_control/var/IgnitionLevel = 0.5
|
||||
vs_control/var/IgnitionLevel_DESC = "Moles of oxygen+plasma - co2 needed to burn."
|
||||
|
||||
//Some legacy definitions so fires can be started.
|
||||
atom/proc/temperature_expose(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
|
||||
@@ -20,9 +20,13 @@
|
||||
|
||||
proc/AddSpace(turf/space/S)
|
||||
//Adds a space tile to the list, and creates the list if null.
|
||||
if(istype(S,/turf/space))
|
||||
if(!space_tiles) space_tiles = list()
|
||||
if(istype(S))
|
||||
if(!space_tiles)
|
||||
space_tiles = list()
|
||||
else if(S in space_tiles)
|
||||
return
|
||||
space_tiles += S
|
||||
contents -= S
|
||||
|
||||
proc/RemoveSpace(turf/space/S)
|
||||
//Removes a space tile from the list, and deletes the list if length is 0.
|
||||
@@ -102,7 +106,7 @@ proc/ZMerge(zone/A,zone/B)
|
||||
|
||||
del B
|
||||
|
||||
proc/ZConnect(turf/A,turf/B)
|
||||
proc/ZConnect(turf/simulated/A,turf/simulated/B)
|
||||
//Connects two zones by forming a connection object representing turfs A and B.
|
||||
|
||||
//Make sure that if it's space, it gets added to space_tiles instead.
|
||||
@@ -115,15 +119,19 @@ proc/ZConnect(turf/A,turf/B)
|
||||
B.zone.AddSpace(A)
|
||||
return
|
||||
|
||||
if(!istype(A) || !istype(B))
|
||||
return
|
||||
|
||||
//Make some preliminary checks to see if the connection is valid.
|
||||
if(!A.zone || !B.zone) return
|
||||
if(A.zone == B.zone) return
|
||||
if(!A.CanPass(0,B,0,0) || !B.CanPass(0,A,0,0)) return
|
||||
if(!A.CanPass(null,B,0,0)) return
|
||||
if(A.CanPass(null,B,1.5,1))
|
||||
return ZMerge(A.zone,B.zone)
|
||||
|
||||
//Ensure the connection isn't already made.
|
||||
if(air_master.tiles_with_connections["\ref[A]"])
|
||||
var/list/connections = air_master.tiles_with_connections["\ref[A]"]
|
||||
for(var/connection/C in connections)
|
||||
if(A.connections)
|
||||
for(var/connection/C in A.connections)
|
||||
C.Cleanup()
|
||||
if(C && (C.B == B || C.A == B))
|
||||
return
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
var/image/contamination_overlay = image('icons/effects/contamination.dmi')
|
||||
|
||||
pl_control/var
|
||||
PLASMA_DMG = 3
|
||||
PLASMA_DMG_NAME = "Plasma Damage Amount"
|
||||
@@ -50,11 +52,11 @@ obj/item/proc
|
||||
//Do a contamination overlay? Temporary measure to keep contamination less deadly than it was.
|
||||
if(!contaminated)
|
||||
contaminated = 1
|
||||
overlays += 'icons/effects/contamination.dmi'
|
||||
overlays += contamination_overlay
|
||||
|
||||
decontaminate()
|
||||
contaminated = 0
|
||||
overlays -= 'icons/effects/contamination.dmi'
|
||||
overlays -= contamination_overlay
|
||||
|
||||
/mob/proc/contaminate()
|
||||
|
||||
@@ -112,6 +114,7 @@ obj/item/proc
|
||||
src << "\red High levels of toxins cause you to spontaneously mutate."
|
||||
domutcheck(src,null)
|
||||
|
||||
|
||||
/mob/living/carbon/human/proc/burn_eyes()
|
||||
//The proc that handles eye burning.
|
||||
if(prob(20)) src << "\red Your eyes burn!"
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
#define QUANTIZE(variable) (round(variable,0.0001))
|
||||
vs_control/var/zone_share_percent = 10
|
||||
vs_control/var/zone_share_percent_NAME = "Zone Share Percent"
|
||||
vs_control/var/zone_share_percent_DESC = "Percentage of air difference to move per tick"
|
||||
zone/proc/process()
|
||||
//Deletes zone if empty.
|
||||
if(!contents.len)
|
||||
@@ -24,11 +21,8 @@ zone/proc/process()
|
||||
if(space_tiles)
|
||||
for(var/T in space_tiles)
|
||||
if(!istype(T,/turf/space))
|
||||
space_tiles -= T
|
||||
continue
|
||||
total_space++
|
||||
if(space_tiles && !space_tiles.len)
|
||||
del space_tiles
|
||||
RemoveSpace(T)
|
||||
total_space = space_tiles.len
|
||||
|
||||
//Add checks to ensure that we're not sucking air out of an empty room.
|
||||
if(total_space && air.total_moles > 0.1 && air.temperature > TCMB+0.5)
|
||||
@@ -221,9 +215,6 @@ zone/proc/Rebuild()
|
||||
list/new_contents
|
||||
problem = 0
|
||||
|
||||
if(space_tiles)
|
||||
del(space_tiles)
|
||||
|
||||
contents.Remove(null) //I can't believe this is needed.
|
||||
|
||||
if(!contents.len)
|
||||
@@ -232,7 +223,7 @@ zone/proc/Rebuild()
|
||||
var/list/turfs_to_consider = contents.Copy()
|
||||
do
|
||||
if(sample)
|
||||
turfs_to_consider -= sample
|
||||
turfs_to_consider.Remove(sample)
|
||||
if(!turfs_to_consider.len)
|
||||
break
|
||||
sample = pick(turfs_to_consider) //Nor this.
|
||||
@@ -283,4 +274,13 @@ zone/proc/Rebuild()
|
||||
T.zone = src
|
||||
else if(!T.zone)
|
||||
T.zone = src
|
||||
air.group_multiplier = contents.len
|
||||
air.group_multiplier = contents.len
|
||||
|
||||
if(space_tiles)
|
||||
var/list/new_space_tiles = space_tiles.Copy()
|
||||
space_tiles = null
|
||||
for(var/turf/space/S in new_space_tiles)
|
||||
for(var/direction in cardinal)
|
||||
var/turf/simulated/T = get_step(S,direction)
|
||||
if(istype(T) && T.zone)
|
||||
T.zone.AddSpace(S)
|
||||
@@ -1,4 +1,49 @@
|
||||
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
|
||||
airflow_lightest_pressure_NAME = "Airflow - Small Movement Threshold %"
|
||||
airflow_lightest_pressure_DESC = "Percent of 1 Atm. at which items with the small weight classes will move."
|
||||
airflow_light_pressure = 45
|
||||
airflow_light_pressure_NAME = "Airflow - Medium Movement Threshold %"
|
||||
airflow_light_pressure_DESC = "Percent of 1 Atm. at which items with the medium weight classes will move."
|
||||
airflow_medium_pressure = 90
|
||||
airflow_medium_pressure_NAME = "Airflow - Heavy Movement Threshold %"
|
||||
airflow_medium_pressure_DESC = "Percent of 1 Atm. at which items with the largest weight classes will move."
|
||||
airflow_heavy_pressure = 95
|
||||
airflow_heavy_pressure_NAME = "Airflow - Mob Movement Threshold %"
|
||||
airflow_heavy_pressure_DESC = "Percent of 1 Atm. at which mobs will move."
|
||||
airflow_dense_pressure = 120
|
||||
airflow_dense_pressure_NAME = "Airflow - Dense Movement Threshold %"
|
||||
airflow_dense_pressure_DESC = "Percent of 1 Atm. at which items with canisters and closets will move."
|
||||
airflow_stun_pressure = 100
|
||||
airflow_stun_pressure_NAME = "Airflow - Mob Stunning Threshold %"
|
||||
airflow_stun_pressure_DESC = "Percent of 1 Atm. at which mobs will be stunned by airflow."
|
||||
airflow_stun_cooldown = 60
|
||||
airflow_stun_cooldown_NAME = "Aiflow Stunning - Cooldown"
|
||||
airflow_stun_cooldown_DESC = "How long, in tenths of a second, to wait before stunning them again."
|
||||
airflow_stun = 0.15
|
||||
airflow_stun_NAME = "Airflow Impact - Stunning"
|
||||
airflow_stun_DESC = "How much a mob is stunned when hit by an object."
|
||||
airflow_damage = 0.3
|
||||
airflow_damage_NAME = "Airflow Impact - Damage"
|
||||
airflow_damage_DESC = "Damage from airflow impacts."
|
||||
airflow_speed_decay = 1.5
|
||||
airflow_speed_decay_NAME = "Airflow Speed Decay"
|
||||
airflow_speed_decay_DESC = "How rapidly the speed gained from airflow decays."
|
||||
airflow_delay = 30
|
||||
airflow_delay_NAME = "Airflow Retrigger Delay"
|
||||
airflow_delay_DESC = "Time in deciseconds before things can be moved by airflow again."
|
||||
airflow_mob_slowdown = 1
|
||||
airflow_mob_slowdown_NAME = "Airflow Slowdown"
|
||||
airflow_mob_slowdown_DESC = "Time in tenths of a second to add as a delay to each movement by a mob if they are fighting the pull of the airflow."
|
||||
|
||||
|
||||
vs_control
|
||||
var
|
||||
list/settings = list()
|
||||
@@ -120,12 +165,13 @@ vs_control
|
||||
////world << "Plasma randomized."
|
||||
|
||||
proc/SetDefault(var/mob/user)
|
||||
var/list/setting_choices = list("Original", "Hazard - Low", "Hazard - High", "Oh Shit!")
|
||||
var/list/setting_choices = list("Plasma - Standard", "Plasma - Low Hazard", "Plasma - High Hazard", "Plasma - Oh Shit!",\
|
||||
"ZAS - Normal", "ZAS - Forgiving", "ZAS - Dangerous", "ZAS - Hellish")
|
||||
var/def = input(user, "Which of these presets should be used?") as null|anything in setting_choices
|
||||
if(!def)
|
||||
return
|
||||
switch(def)
|
||||
if("Original")
|
||||
if("Plasma - Standard")
|
||||
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
@@ -150,7 +196,7 @@ vs_control
|
||||
//plc.PLASMA_DMG_QUOTIENT = 10
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
if("Hazard - Low")
|
||||
if("Plasma - Low Hazard")
|
||||
plc.CLOTH_CONTAMINATION = 0 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
@@ -177,7 +223,7 @@ vs_control
|
||||
|
||||
plc.CONTAMINATION_LOSS = 0
|
||||
|
||||
if("Hazard - High")
|
||||
if("Plasma - High Hazard")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 0
|
||||
@@ -199,7 +245,7 @@ vs_control
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
if("Oh Shit!")
|
||||
if("Plasma - Oh Shit!")
|
||||
plc.CLOTH_CONTAMINATION = 1 //If this is on, plasma does damage by getting into cloth.
|
||||
|
||||
plc.PLASMAGUARD_ONLY = 1
|
||||
@@ -221,6 +267,71 @@ vs_control
|
||||
//plc.PLASMA_DMG_OFFSET = 3
|
||||
//plc.PLASMA_DMG_QUOTIENT = 5
|
||||
|
||||
if("ZAS - Normal")
|
||||
zone_share_percent = 10
|
||||
IgnitionLevel = 0.5
|
||||
airflow_lightest_pressure = 30
|
||||
airflow_light_pressure = 45
|
||||
airflow_medium_pressure = 90
|
||||
airflow_heavy_pressure = 95
|
||||
airflow_dense_pressure = 120
|
||||
airflow_stun_pressure = 100
|
||||
airflow_stun_cooldown = 60
|
||||
airflow_stun = 0.15
|
||||
airflow_damage = 0.3
|
||||
airflow_speed_decay = 1.5
|
||||
airflow_delay = 30
|
||||
airflow_mob_slowdown = 1
|
||||
|
||||
if("ZAS - Forgiving")
|
||||
zone_share_percent = 6
|
||||
IgnitionLevel = 1
|
||||
airflow_lightest_pressure = 45
|
||||
airflow_light_pressure = 60
|
||||
airflow_medium_pressure = 120
|
||||
airflow_heavy_pressure = 110
|
||||
airflow_dense_pressure = 200
|
||||
airflow_stun_pressure = 150
|
||||
airflow_stun_cooldown = 90
|
||||
airflow_stun = 0.15
|
||||
airflow_damage = 0.15
|
||||
airflow_speed_decay = 1.5
|
||||
airflow_delay = 50
|
||||
airflow_mob_slowdown = 0
|
||||
|
||||
if("ZAS - Dangerous")
|
||||
zone_share_percent = 15
|
||||
IgnitionLevel = 0.4
|
||||
airflow_lightest_pressure = 25
|
||||
airflow_light_pressure = 35
|
||||
airflow_medium_pressure = 75
|
||||
airflow_heavy_pressure = 80
|
||||
airflow_dense_pressure = 100
|
||||
airflow_stun_pressure = 90
|
||||
airflow_stun_cooldown = 50
|
||||
airflow_stun = 2
|
||||
airflow_damage = 1
|
||||
airflow_speed_decay = 1.2
|
||||
airflow_delay = 25
|
||||
airflow_mob_slowdown = 2
|
||||
|
||||
if("ZAS - Hellish")
|
||||
zone_share_percent = 20
|
||||
IgnitionLevel = 0.3
|
||||
airflow_lightest_pressure = 20
|
||||
airflow_light_pressure = 30
|
||||
airflow_medium_pressure = 70
|
||||
airflow_heavy_pressure = 75
|
||||
airflow_dense_pressure = 80
|
||||
airflow_stun_pressure = 70
|
||||
airflow_stun_cooldown = 40
|
||||
airflow_stun = 3
|
||||
airflow_damage = 2
|
||||
airflow_speed_decay = 1
|
||||
airflow_delay = 20
|
||||
airflow_mob_slowdown = 3
|
||||
|
||||
|
||||
world << "\blue <b>[key_name(user)] changed the global plasma/ZAS settings to \"[def]\"</b>"
|
||||
|
||||
pl_control
|
||||
|
||||
Reference in New Issue
Block a user