Skip to content

Commit

Permalink
Adds the atmos type: NoDecay (ParadiseSS13#26432)
Browse files Browse the repository at this point in the history
* ddsadsa

ddsadsa

* adds a new MILLA atmos  type

* Build MILLA

* oopsie

* comments

* Update code/__DEFINES/atmospherics_defines.dm

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

* adds commenting

* merged and redid commenting

* Build MILLA

---------

Signed-off-by: Kyani <[email protected]>
Co-authored-by: paradisess13[bot] <165046124+paradisess13[bot]@users.noreply.github.com>
Co-authored-by: Charlie Nolan <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2024
1 parent de23804 commit 58097d7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/atmospherics_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
#define ATMOS_MODE_SPACE 0 //! Tile is exposed to space and loses air every second
#define ATMOS_MODE_SEALED 1 //! Tile has no special behaviour
#define ATMOS_MODE_EXPOSED_TO_ENVIRONMENT 2 //! Tile is exposed to the environment, ex: lavaland
#define ATMOS_MODE_NO_DECAY 3 //! Prevents hot tiles from automatically decaying towards T20C.

/// Lavaland environment: hot, low pressure.
#define ENVIRONMENT_LAVALAND "lavaland"
Expand Down
Binary file modified milla.dll
Binary file not shown.
1 change: 1 addition & 0 deletions milla/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ pub(crate) fn internal_set_tile(
};
}
}
3 => tile.mode = AtmosMode::NoDecay,
_ => return Err(eyre!("Invalid atmos_mode: {}", value)),
}
}
Expand Down
3 changes: 3 additions & 0 deletions milla/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ pub(crate) enum AtmosMode {
Sealed,
/// Tile is exposed to the given environment.
ExposedTo { environment_id: u8 },
/// Prevents hot tiles from automatically decaying towards T20C
NoDecay,
}

impl From<AtmosMode> for ByondValue {
Expand All @@ -138,6 +140,7 @@ impl From<AtmosMode> for ByondValue {
AtmosMode::Space => ByondValue::from(0.0),
AtmosMode::Sealed => ByondValue::from(1.0),
AtmosMode::ExposedTo { .. } => ByondValue::from(2.0),
AtmosMode::NoDecay => ByondValue::from(3.0),
}
}
}
Expand Down
1 change: 1 addition & 0 deletions milla/src/simulate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ pub(crate) fn apply_tile_mode(
my_inactive_tile.thermal_energy *= 1.0 - SPACE_COOLING_FACTOR;
}
}
AtmosMode::NoDecay => {} // No special interactions
}
Ok(())
}
Expand Down
Binary file modified tools/ci/libmilla_ci.so
Binary file not shown.

0 comments on commit 58097d7

Please sign in to comment.