Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/atmospherics/Connections.dm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#define WOOSH \
if(connecting_turfs.len && (REALTIMEOFDAY > last_woosh + 2 SECONDS)){ \
playsound(pick(connecting_turfs),abs(differential) > zas_settings.airflow_heavy_pressure ? 'modular_pariah/master_files/sound/effects/space_wind_big.ogg' : 'modular_pariah/master_files/sound/effects/space_wind.ogg',100,TRUE,null,pressure_affected = FALSE); \
playsound(pick(connecting_turfs),abs(differential) > zas_settings.airflow_mob_pressure ? 'modular_pariah/master_files/sound/effects/space_wind_big.ogg' : 'modular_pariah/master_files/sound/effects/space_wind.ogg',100,TRUE,null,pressure_affected = FALSE); \
last_woosh = REALTIMEOFDAY;\
} \
1 change: 0 additions & 1 deletion code/__DEFINES/obj_flags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#define BLOCK_Z_IN_UP (1<<9) // Should this object block z uprise from below?
#define BLOCK_Z_FALL (1<<10) // Should this object block falling?
#define NO_BUILD (1<<11) // Can we build on this object?
#define PLASMAGUARD (1<<12) //Immune to plasma contamination

// If you add new ones, be sure to add them to /obj/Initialize as well for complete mapping support

Expand Down
45 changes: 1 addition & 44 deletions code/controllers/subsystem/airflow.dm
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,7 @@ SUBSYSTEM_DEF(airflow)
target.airflow_process_delay -= 1
continue

else if (target.airflow_process_delay)
target.airflow_process_delay = 0

target.airflow_speed = min(target.airflow_speed, 15)
target.airflow_speed = clamp(0, target.airflow_speed, 15)
target.airflow_speed -= zas_settings.airflow_speed_decay

if (target.airflow_skip_speedcheck)
Expand Down Expand Up @@ -119,43 +116,3 @@ SUBSYSTEM_DEF(airflow)
/datum/controller/subsystem/airflow/proc/HandleDel(datum/source)
SIGNAL_HANDLER
processing -= source

/atom/movable/proc/prepare_airflow(strength)
if (!airflow_dest || airflow_speed < 0 || last_airflow > world.time - zas_settings.airflow_delay)
return FALSE
if (airflow_speed)
airflow_speed = strength / max(get_dist(src, airflow_dest), 1)
return FALSE
if(!check_airflow_movable(strength*10)) //Repel/Gotoairflowdest() divide the differential by a max of 10, so we're undoing that here
return FALSE
if (airflow_dest == loc)
step_away(src, loc)
if (ismob(src))
to_chat(src, span_warning("You are pushed away by a rush of air!"))

last_airflow = world.time

var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2)
if (airflow_falloff < 1)
airflow_dest = null
return FALSE

airflow_speed = min(max(strength * (9 / airflow_falloff), 1), 9)
return TRUE


/atom/movable/proc/GotoAirflowDest(strength)
if (!prepare_airflow(strength))
return
airflow_xo = airflow_dest.x - x
airflow_yo = airflow_dest.y - y
airflow_dest = null
SSairflow.Enqueue(src)

/atom/movable/proc/RepelAirflowDest(strength)
if (!prepare_airflow(strength))
return
airflow_xo = -(airflow_dest.x - x)
airflow_yo = -(airflow_dest.y - y)
airflow_dest = null
SSairflow.Enqueue(src)
4 changes: 3 additions & 1 deletion code/controllers/subsystem/airmachines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ SUBSYSTEM_DEF(airmachines)
name = "Air (Machines)"
priority = FIRE_PRIORITY_AIRMACHINES
init_order = INIT_ORDER_AIRMACHINES
flags = SS_KEEP_TIMING
flags = SS_POST_FIRE_TIMING
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME

wait = 0.5 SECONDS

var/cached_cost

var/list/pipe_init_dirs_cache = list()
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystem/zas.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ SUBSYSTEM_DEF(zas)
name = "Air Core"
priority = FIRE_PRIORITY_AIR
init_order = INIT_ORDER_AIR
flags = SS_KEEP_TIMING
flags = SS_POST_FIRE_TIMING
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
wait = 2 SECONDS

Expand Down Expand Up @@ -466,9 +466,9 @@ SUBSYSTEM_DEF(zas)
if(!B.connections)
B.connections = new

if(A.connections.get(a_to_b))
if(A.connections.get_connection_for_dir(a_to_b))
return
if(B.connections.get(b_to_a))
if(B.connections.get_connection_for_dir(b_to_a))
return
if(!space && (A.zone == B.zone))
return
Expand Down
6 changes: 1 addition & 5 deletions code/game/atom/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -549,16 +549,12 @@

///Return the current air environment in this atom
/atom/proc/return_air()
if(loc)
return loc.return_air()
else
return null
return loc?.return_air()

///Return the current air environment in this atom. If this atom is a turf, it will not automatically update the zone.
/atom/proc/unsafe_return_air()
return return_air()


///Return the air if we can analyze it
/atom/proc/return_analyzable_air()
return null
Expand Down
9 changes: 9 additions & 0 deletions code/game/atoms_movable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -629,14 +629,23 @@
if(!bumped_atom)
CRASH("Bump was called with no argument.")
SEND_SIGNAL(src, COMSIG_MOVABLE_BUMP, bumped_atom)

. = ..()

if(!QDELETED(throwing))
throwing.finalize(hit = TRUE, target = bumped_atom)
. = TRUE
if(QDELETED(bumped_atom))
return

bumped_atom.BumpedBy(src)

if(moving_by_airflow && !QDELING(src))
if(airflow_speed >= 1 && airflow_dest)
AirflowBump(bumped_atom)
else
SSairflow.Dequeue(src)

/atom/movable/Exited(atom/movable/gone, direction)
. = ..()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
if(!on)
return

var/datum/gas_mixture/air_sample = unsafe_return_air()
var/datum/gas_mixture/air_sample = loc.unsafe_return_air()
var/datum/signal/signal = new(src, list(
"sigtype" = "status",
"tag" = id_tag,
Expand Down
10 changes: 10 additions & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ GLOBAL_PROTECT(admin_verbs_debug)
/client/proc/debug_spell_requirements,
/client/proc/analyze_openturf,
/client/proc/debug_health,
/client/proc/change_zas_settings,
)

GLOBAL_LIST_INIT(admin_verbs_possess, list(/proc/possess, GLOBAL_PROC_REF(release)))
Expand Down Expand Up @@ -1036,3 +1037,12 @@ GLOBAL_PROTECT(admin_verbs_hideable)
to_chat(world, span_boldannounce("The gamemode is now: [fake_name ? SSticker.mode_display_name : SSticker.mode.name]."))

message_admins("[key_name_admin(usr)] has set the gamemode to [SSticker.mode.type].")

/client/proc/change_zas_settings()
set name = "ZAS Settings"
set category = "Debug"

if(!check_rights(R_DEBUG))
return

zas_settings.ui_interact(mob)
Loading
Loading