Skip to content

Commit

Permalink
MILLA phase 2 (#27659)
Browse files Browse the repository at this point in the history
* MILLA phase 2

* Lint.

* Build Rust library

* Assorted bugfixes and tweaks

* Simplify fire mechanics and make hotspot sending to DM more reliable.

* Assorted tweaks, fixed an issue in the core engine and removed the softcap it made necesary.

* SM fixes, slower plasmafire, less overpowered pyro anomalies, and air alarm improvements.

* Review fixes.

* Build Rust library

* Unbalanced icon.

* Rebalance immovable rods.

* Unbalanced has alerts, can fight airflow (but get slowed)

* Build Rust library

* Stronger space cooling, slower temperature flow, faster burns, burnt floors, and a hotspot display fix.

* Build Rust library

* Tweaks to avoid merge conflict

* Oops.

* Build Rust library

* Rebalance wind.

* Rebalance temperature flow and space cooling.

* Fix gas flamethrower.

* Build Rust library

* Make air push slowdown directional, so you don't get slowed while moving with the air.

* Variable name cleanup.

* Reduce the speed of wind pushes.

* Prevent wind pushes from breaking your pull.

* Prevent swaps during wind push.

* Made supermatter crytals reliably run last in atmos machinery.

* Sped up plasmafire burning, but dropped the minimum burn amount.

* Rebalanced SM heat output.

* Rebalanced pyro anomaly.

* Build Rust library

* Lint

* Build Rust library

* Uncap fuel burnt readout.

* Added Custom air alarm mode, dropped Refill cap to ONE_ATMOSPHERE.

* Updated air alarm modes to use pressure settings instead of ONE_ATMOSPHERE

* Added a list of areas not in Filtering to atmos alert computer.

* Increase pressure gradient and vent output, especially at low distro pressure.

* Changed Immovable Rod from Moderate to Major.

* Lint

* Build Rust library

* More lint!

* Build Rust library

* Magboots, scaled slowdown, and nukie borg immunity

* Wind image

* Wind v2

* Wind v3

* pngcrush

* pngcrush again

* Moved hotspot removal into SSair, add wind effect.

* Lint

* Build Rust library

* Fix hotspots.

* Hotspot visual based on gas burnt

* Build Rust library

* Scaled wind to gas amount, stopped first wind push while moving.

* Made Rust panic logging safer.

* Made MILLA full tick and sleep timers more honest.

* Pressure overlay, ghost mode, atmos goggles.

* Build Rust library

* Lint

* Build Rust library

* More lint-y stuff.

* Build Rust library

* Repair pressure overlay if it loses its loc.

* Bind pressure overlays to their tile better.

* Build Rust library

* Make the pressure overlay work on z=1 and not proliferate effects.

* Don't block the supply shuttle.

* Don't fine for special effects.

* Maybe don't fine for ghosts, either.

* Build Rust library

* Make pressure overlay play nice with shuttles.

* Build Rust library

* Pressure scanning for borgs.

* Build Rust library

* Lint

* Build Rust library

* Made explosions not generate so much wind.

* Removed an old and non-functional proc.

* Clientless mobs can get pushed again.

* Build Rust library

* cargo fmt

* Build Rust library

* Don't divide by zero.

* Plasmafire generator for the Shadow

* Update shadow to use plasmafire generators

* Fix shadow's plasmafire generators going out on depart.

* Prevent heat2color from runtiming at absolute zero.

* Better nanofrost

* Build Rust library

* Singularity immunity

* Build Rust library

* Add back meson mode to atmospheric scanner goggles, so they don't stare deeply into the SM

* Build Rust library

* Dump panic outputs into data/ instead.

* Build Rust library

* Apply suggestions from code review

Co-authored-by: Burzah <[email protected]>
Signed-off-by: Charlie Nolan <[email protected]>

* Saner handling of MILLA crash.

* Build Rust library

---------

Signed-off-by: Charlie Nolan <[email protected]>
Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
Co-authored-by: Burzah <[email protected]>
  • Loading branch information
3 people authored Jan 1, 2025
1 parent b7c8007 commit e6f9904
Show file tree
Hide file tree
Showing 95 changed files with 2,440 additions and 1,706 deletions.
28 changes: 16 additions & 12 deletions _maps/map_files/shuttles/emergency_shadow.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@
/obj/machinery/atmospherics/pipe/simple/hidden{
dir = 5
},
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"ge" = (
/obj/structure/table/glass/reinforced/plastitanium,
Expand Down Expand Up @@ -230,9 +231,6 @@
},
/turf/simulated/floor/catwalk,
/area/shuttle/escape)
"jR" = (
/turf/simulated/floor/engine/o2,
/area/shuttle/escape)
"kx" = (
/obj/structure/chair/comfy/shuttle,
/turf/simulated/floor/mineral/plastitanium/red/brig,
Expand Down Expand Up @@ -354,7 +352,8 @@
/obj/machinery/atmospherics/pipe/manifold/hidden{
dir = 4
},
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"pi" = (
/obj/effect/turf_decal/stripes/white/line{
Expand Down Expand Up @@ -565,7 +564,8 @@
},
/area/shuttle/escape)
"zj" = (
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"zs" = (
/obj/structure/reagent_dispensers/fueltank,
Expand Down Expand Up @@ -639,7 +639,8 @@
/area/template_noop)
"CD" = (
/obj/machinery/igniter/shadow,
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"CK" = (
/obj/structure/shuttle/engine/propulsion/burst{
Expand Down Expand Up @@ -680,7 +681,8 @@
/area/shuttle/escape)
"DY" = (
/obj/machinery/atmospherics/pipe/simple/hidden/universal,
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"DZ" = (
/obj/effect/turf_decal/stripes/red/corner{
Expand Down Expand Up @@ -739,7 +741,8 @@
dir = 4;
invisibility = 99
},
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"Gx" = (
/obj/structure/extinguisher_cabinet{
Expand Down Expand Up @@ -1151,7 +1154,8 @@
dir = 9
},
/obj/machinery/atmospherics/meter,
/turf/simulated/floor/engine/plasma,
/obj/structure/plasmafire_generator/shadow,
/turf/simulated/floor/engine/airless,
/area/shuttle/escape)
"Xp" = (
/obj/structure/marker_beacon/dock_marker/collision,
Expand Down Expand Up @@ -1357,9 +1361,9 @@ Lv
OL
Bu
tb
jR
zj
CD
jR
zj
cX
wF
cH
Expand Down
6 changes: 6 additions & 0 deletions code/__DEFINES/atmospherics_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,12 @@
/// Cold environment: Normal atmosphere, -93 C.
#define ENVIRONMENT_COLD "cold"

/// How far away should we load the pressure HUD data from MILLA?
#define PRESSURE_HUD_LOAD_RADIUS 15

/// How far away should we send the pressure HUD to the player?
#define PRESSURE_HUD_RADIUS 12

// Vent pump modes
/// Don't go over the external pressure
#define ONLY_CHECK_EXT_PRESSURE 1
Expand Down
32 changes: 17 additions & 15 deletions code/__DEFINES/hud.dm
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#define DIAG_AIRLOCK_HUD "22" // Airlock shock overlay
#define GLAND_HUD "23"//Gland indicators for abductors
#define JANI_HUD "24" // Sign overlay over cleanable decals
#define PRESSURE_HUD "25" // Pressure coloring for tiles

//by default everything in the hud_list of an atom is an image
//a value in hud_list with one of these will change that behavior
Expand All @@ -42,22 +43,23 @@
#define DATA_HUD_DIAGNOSTIC_ADVANCED 6
#define DATA_HUD_HYDROPONIC 7
#define DATA_HUD_JANITOR 8
#define DATA_HUD_PRESSURE 9
//antag HUD defines
#define ANTAG_HUD_CULT 9
#define ANTAG_HUD_REV 10
#define ANTAG_HUD_OPS 11
#define ANTAG_HUD_WIZ 12
#define ANTAG_HUD_SHADOW 13
#define ANTAG_HUD_TRAITOR 14
#define ANTAG_HUD_NINJA 15
#define ANTAG_HUD_CHANGELING 16
#define ANTAG_HUD_VAMPIRE 17
#define ANTAG_HUD_ABDUCTOR 18
#define DATA_HUD_ABDUCTOR 19
#define ANTAG_HUD_EVENTMISC 20
#define ANTAG_HUD_BLOB 21
#define ANTAG_HUD_ZOMBIE 22
#define ANTAG_HUD_MIND_FLAYER 23
#define ANTAG_HUD_CULT 10
#define ANTAG_HUD_REV 11
#define ANTAG_HUD_OPS 12
#define ANTAG_HUD_WIZ 13
#define ANTAG_HUD_SHADOW 14
#define ANTAG_HUD_TRAITOR 15
#define ANTAG_HUD_NINJA 16
#define ANTAG_HUD_CHANGELING 17
#define ANTAG_HUD_VAMPIRE 18
#define ANTAG_HUD_ABDUCTOR 19
#define DATA_HUD_ABDUCTOR 20
#define ANTAG_HUD_EVENTMISC 21
#define ANTAG_HUD_BLOB 22
#define ANTAG_HUD_ZOMBIE 23
#define ANTAG_HUD_MIND_FLAYER 24

// Notification action types
#define NOTIFY_JUMP "jump"
Expand Down
9 changes: 5 additions & 4 deletions code/__DEFINES/machines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,16 @@
/**
* Air alarm modes
*/
#define AALARM_MODE_SCRUBBING 1
#define AALARM_MODE_VENTING 2 //makes draught
#define AALARM_MODE_FILTERING 1
#define AALARM_MODE_DRAUGHT 2 //makes draught
#define AALARM_MODE_PANIC 3 //like siphon, but stronger (enables widenet)
#define AALARM_MODE_REPLACEMENT 4 //sucks off all air, then refill and swithes to scrubbing
#define AALARM_MODE_CYCLE 4 //sucks off all air, then refill and swithes to scrubbing
#define AALARM_MODE_SIPHON 5 //Scrubbers suck air
#define AALARM_MODE_CONTAMINATED 6 //Turns on all filtering and widenet scrubbing.
#define AALARM_MODE_REFILL 7 //just like normal, but with triple the air output
#define AALARM_MODE_REFILL 7 //just like normal, but disables low pressure check until normalized, then switches to normal
#define AALARM_MODE_OFF 8
#define AALARM_MODE_FLOOD 9 //Emagged mode; turns off scrubbers and pressure checks on vents
#define AALARM_MODE_CUSTOM 10

#define NUKE_STATUS_INTACT 0
#define NUKE_CORE_MISSING 1
Expand Down
37 changes: 27 additions & 10 deletions code/__DEFINES/rust.dm
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@
// This needs to go BELOW the above define, otherwise the BYOND compiler can make the above immediate call disappear
#undef RUSTLIBS_SUFFIX

/// Exists by default in 516, but needs to be defined for 515 or byondapi-rs doesn't like it.
/proc/byondapi_stack_trace(err)
CRASH(err)

/proc/milla_init_z(z)
return RUSTLIB_CALL(milla_initialize, z)

/proc/is_milla_synchronous(tick)
return RUSTLIB_CALL(milla_is_synchronous, tick)

/proc/set_tile_atmos(turf/T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity)
return RUSTLIB_CALL(milla_set_tile, T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity)
/proc/set_tile_atmos(turf/T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity, hotspot_temperature, hotspot_volume)
return RUSTLIB_CALL(milla_set_tile, T, airtight_north, airtight_east, airtight_south, airtight_west, atmos_mode, environment_id, oxygen, carbon_dioxide, nitrogen, toxins, sleeping_agent, agent_b, temperature, innate_heat_capacity, hotspot_temperature, hotspot_volume)

/proc/get_tile_atmos(turf/T, list/L)
return RUSTLIB_CALL(milla_get_tile, T, L)
Expand All @@ -74,6 +75,9 @@
/proc/get_interesting_atmos_tiles()
return RUSTLIB_CALL(milla_get_interesting_tiles)

/proc/get_tracked_pressure_tiles()
return RUSTLIB_CALL(milla_get_tracked_pressure_tiles)

/proc/reduce_superconductivity(turf/T, list/superconductivity)
var/north = superconductivity[1]
var/east = superconductivity[2]
Expand All @@ -93,6 +97,14 @@

return RUSTLIB_CALL(milla_set_tile_airtight, T, north, east, south, west)

/proc/create_hotspot(turf/T, hotspot_temperature, hotspot_volume)
return RUSTLIB_CALL(milla_create_hotspot, T, hotspot_temperature, hotspot_volume)

/proc/track_pressure_tiles(atom/A, radius)
var/turf/T = get_turf(A)
if(istype(T))
return RUSTLIB_CALL(milla_track_pressure_tiles, T, radius)

/proc/get_random_interesting_tile()
return RUSTLIB_CALL(milla_get_random_interesting_tile)

Expand Down Expand Up @@ -122,15 +134,20 @@
#define MILLA_INDEX_SUPERCONDUCTIVITY_WEST 13
#define MILLA_INDEX_INNATE_HEAT_CAPACITY 14
#define MILLA_INDEX_TEMPERATURE 15
#define MILLA_INDEX_HOTSPOT_TEMPERATURE 16
#define MILLA_INDEX_HOTSPOT_VOLUME 17
#define MILLA_INDEX_WIND_X 18
#define MILLA_INDEX_WIND_Y 19
#define MILLA_INDEX_FUEL_BURNT 20

/// The number of values per tile.
#define MILLA_TILE_SIZE MILLA_INDEX_TEMPERATURE
#define MILLA_TILE_SIZE MILLA_INDEX_FUEL_BURNT

// These are only for InterestingTiles.
#define MILLA_INDEX_TURF 16
#define MILLA_INDEX_INTERESTING_REASONS 17
#define MILLA_INDEX_AIRFLOW_X 18
#define MILLA_INDEX_AIRFLOW_Y 19
#define MILLA_INDEX_TURF 21
#define MILLA_INDEX_INTERESTING_REASONS 22
#define MILLA_INDEX_AIRFLOW_X 23
#define MILLA_INDEX_AIRFLOW_Y 24

/// The number of values per interesting tile.
#define MILLA_INTERESTING_TILE_SIZE MILLA_INDEX_AIRFLOW_Y
Expand Down
3 changes: 3 additions & 0 deletions code/__DEFINES/status_effects.dm
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@

#define STATUS_EFFECT_REVERSED_HIGH_PRIESTESS /datum/status_effect/reversed_high_priestess //Bubblegum will chase the person hit by the effect, grabbing people at random. This can and WILL include the caster.

#define STATUS_EFFECT_UNBALANCED /datum/status_effect/unbalanced // Prevents you from automatically grabbing walls to stop moving in space.

#define STATUS_EFFECT_C_FOAMED /datum/status_effect/c_foamed

#define STATUS_EFFECT_TEMPORAL_SLASH /datum/status_effect/temporal_slash
Expand Down Expand Up @@ -165,6 +167,7 @@
#define STATUS_EFFECT_IMMOBILIZED /datum/status_effect/incapacitating/immobilized
#define STATUS_EFFECT_SLEEPING /datum/status_effect/incapacitating/sleeping
#define STATUS_EFFECT_SLOWED /datum/status_effect/incapacitating/slowed
#define STATUS_EFFECT_DIRECTIONAL_SLOW /datum/status_effect/incapacitating/directional_slow
#define STATUS_EFFECT_PARALYZED /datum/status_effect/incapacitating/paralyzed
#define STATUS_EFFECT_FLOORED /datum/status_effect/incapacitating/floored
#define STATUS_EFFECT_ARMBAR /datum/status_effect/judo_armbar
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/wires_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#define WIRE_BOLT_LIGHT "Bolt Lights"

// Air alarm
#define WIRE_SYPHON "Siphon"
#define WIRE_SIPHON "Siphon"
#define WIRE_AALARM "Atmospherics Alarm"

// Camera
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_DWARF "dwarf"
#define TRAIT_SILENT_FOOTSTEPS "silent_footsteps" //makes your footsteps completely silent
#define TRAIT_MESON_VISION "meson_vision"
#define TRAIT_PRESSURE_VISION "pressure_vision"
#define TRAIT_FLASH_PROTECTION "flash_protection"
#define TRAIT_NIGHT_VISION "night_vision"
#define TRAIT_EMOTE_MUTE "emote_mute"
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/type2type.dm
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@
/proc/heat2color_g(temp)
temp /= 100
if(temp <= 66)
. = max(0, min(255, 99.4708025861 * log(temp) - 161.1195681661))
. = max(0, min(255, 99.4708025861 * log(max(temp, 1)) - 161.1195681661))
else
. = max(0, min(255, 288.1221695283 * ((temp - 60) ** -0.0755148492)))

Expand All @@ -261,7 +261,7 @@
if(temp <= 16)
. = 0
else
. = max(0, min(255, 138.5177312231 * log(temp - 10) - 305.0447927307))
. = max(0, min(255, 138.5177312231 * log(max(temp - 10, 1)) - 305.0447927307))

//Argument: Give this a space-separated string consisting of 6 numbers. Returns null if you don't
/proc/text2matrix(matrixtext)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
"TRAIT_SILENT_FOOTSTEPS" = TRAIT_SILENT_FOOTSTEPS,
"TRAIT_ALCOHOL_TOLERANCE" = TRAIT_ALCOHOL_TOLERANCE,
"TRAIT_MESON_VISION" = TRAIT_MESON_VISION,
"TRAIT_PRESSURE_VISION" = TRAIT_PRESSURE_VISION,
"TRAIT_FLASH_PROTECTION" = TRAIT_FLASH_PROTECTION,
"TRAIT_NIGHT_VISION" = TRAIT_NIGHT_VISION,
"TRAIT_DRASK_SUPERCOOL" = TRAIT_DRASK_SUPERCOOL,
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/click_override.dm
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
if(get_dist(T, target_turf) > P.shock_range)
to_chat(user, "<span class='warning'>The target is too far away.</span>")
return FALSE
target_turf.hotspot_expose(2000, 400)
target_turf.hotspot_expose(2000, 1)
playsound(user.loc, 'sound/effects/eleczap.ogg', 40, 1)

var/atom/beam_from = user
Expand Down
Loading

0 comments on commit e6f9904

Please sign in to comment.