Give players the option to buy shuttles with an oxygen-free atmosphere#4209
Open
isilkor wants to merge 12 commits intonew-frontiers-14:masterfrom
Open
Give players the option to buy shuttles with an oxygen-free atmosphere#4209isilkor wants to merge 12 commits intonew-frontiers-14:masterfrom
isilkor wants to merge 12 commits intonew-frontiers-14:masterfrom
Conversation
Contributor
|
RSI Diff Bot; head commit bfbcf19 merging into acc57f1 Resources/Textures/_NF/Structures/Piping/Atmospherics/gasmixer_overlay.rsi
|
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
50795f1 to
dd1f875
Compare
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
dd1f875 to
15291e8
Compare
15291e8 to
b711a0e
Compare
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
b711a0e to
9ecdc0d
Compare
Contributor
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
9ecdc0d to
84e4e03
Compare
MarkerSystem only allows showing and hiding entire sprites, which we don't want in this case. All other pre-existing systems lose out to the T-ray scanner, which always shows all layers. We want to make some sprite layers only visible when markers are shown in the sandbox, so we have to add a new system that dynamically adds/removes sprite layers depending on whether or not the markers are supposed to be visible.
Where we had an enabled gas mixer, we're now using the distro mixer. Some shuttles had incorrect settings: the Infiltrator used a mixer that was not enabled at round start, while the Bookworm had a 50:50 mix configured. Both are now correctly set up. A bunch of scrapyard shuttles did not have a properly set up gas mixer; either it was turned off at purchase, or it did not have any mix settings configured. Those shuttles remain unchanged.
This mostly exists so freezers in a ship bought with pure nitrogen atmosphere also actually contain a pure nitrogen atmosphere instead of the regular freezer mix, which would immediately trigger air alarms. As an aside: why the heck is the list of possible markers hardcoded in fixgridatmos. You can just put the atmosphere definition on the marker component. It's going to be fine. Nobody is running fixgridatmos in a tight loop.
84e4e03 to
bfbcf19
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




About the PR
This PR adds a new dropdown to the shipyard menu that allows players to choose a non-standard atmosphere for their new ship. The options in this list are defined by a new kind of prototype,
shuttleAtmosphere, which defines the content of the atmosphere itself, plus optionally changes to air alarms and linked gas scrubbers that should be applied on purchase.Why / Balance
Vox have been kept down by the oppressive oxygen-containing atmosphere usually present on shuttles for too long. It was either this or armed revolution. Also some people were asking for it on Discord.
Technical details
When spawning a ship, the shipyard code will now replace the atmosphere in every tile that doesn't contain a
FixAtmosMarker. It will also replace the atmosphere in tiles with aFixAtmosMarker, depending on the configuration of the target atmosphere - this is pretty much only intended for nitrogen ship freezers for now.After replacing the atmosphere, the shipyard iterates over all gas mixers with the new
GasMixerAutoSetupComponent. This component assists the setup code in figuring out which inlet will receive which gas from the distribution canisters, because the alternative would have been doing some heuristics on the configured ratios and hoping that anything that is set somewhat near a 80:20 mixture is a distro mixer. To make it easier for mappers, gas mixers now have versions pre-configured for distribution. These are immediately distinguishable when mapping by their input arrows taking on the same color as the expected gas on that side (see figure 1). When spawn markers are invisible, the mixers look the same as any other (figure 2).Another pass then configures all sensor devices linked to air alarms. There's no new component for this because I have not found an air alarm in use that wasn't set to track the ship's default atmosphere. As such, we can just replace the settings there with settings from the target atmosphere prototype.
How to test
Purchase a Piecrust with nitrogen atmosphere. Watch your cow and chickens suffocate. But at least the air alarm on the freezer doesn't close all airlocks. Note that the shipyard UI automatically switched back to station atmosphere. Look at the admin log and find that the special atmosphere is listed as part of the purchase.
Look at the gas mixer and see that it is configured for 100% nitrogen (coming in on the primary port) and 0% oxygen.
Look at the air alarm and see that all sensors are reporting normal, with the thresholds set to warn when oxygen is detected in the atmosphere.
Sell off the Piecrust and re-buy it with standard atmosphere. Look at the admin log and see that the purchase entry does not show any special atmosphere.
Do the same with all 102 other shuttles.With the shipyard console open, select nitrogen-only atmosphere, then disable cvar
shuttle.shipyard_allow_custom_atmosand purchase the shuttle. Note that the purchased ship has standard atmosphere and the shipyard console, when reopened, no longer offers a choice of premium atmospheres.Media
Requirements
Breaking changes
None, but new shuttles should map "Distro"-suffixed gas mixers instead of manually configured ones. I'm planning to make some effort in keeping this PR updated with changes to shuttles that get merged.
Changelog
🆑 Bonfire Lit