-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for required slots, validate shipdefs on startup #6013
Merged
sturnclaw
merged 15 commits into
pioneerspacesim:master
from
sturnclaw:hull-validation-nonempty
Jan 14, 2025
Merged
Add support for required slots, validate shipdefs on startup #6013
sturnclaw
merged 15 commits into
pioneerspacesim:master
from
sturnclaw:hull-validation-nonempty
Jan 14, 2025
Conversation
This file contains 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
- Fonts may not be fully loaded upon entering the menu, leading to incorrect calculated notification sizes. - Fix assertion when hovering a non-expiring notification.
- Hook for various at-startup checks to run, including validity/integrity checks to make errors visible before starting or loading a game.
- Indicates that the slot is a "required" slot and the contents must not be empty - Implicitly requires the "default" field to be populated with a valid equipment ID
- Fill required slots with specified default items if present. - Currently no ability to replace default items in required slots via an autofit rule.
- All slots with default items will be populated on ship purchase. - Item cost is not yet factored into the overall cost of the ship.
- Framework to run a number of at-startup data validation tasks and collate the results into an easily-browsable display for modders/developers
- Checks for most common issues with ship configs. - Meant to ensure crash bugs with ship configs don't slip through into a release. - Also applies to modded ship files.
- Equipment in required slots can be replaced, but cannot be sold such that the slot is left empty.
sturnclaw
force-pushed
the
hull-validation-nonempty
branch
from
January 13, 2025 21:40
4440763
to
de1cb24
Compare
- Remove the 'misc' equipment namespace, move thruster equipment into their own namespace.
- Compute ship cost as basePrice + default equipment cost. - Cache a list of equipment when viewing advertisements and install on purchase. - Remove manual computation of hyperdrive cost in trade-in value since hyperdrives are included in ship costs.
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.
This PR tackles one of the last outstanding issues with the equipment system, by introducing the concept of a required or "non-empty" equipment slot. Required slots must have a default item, and do not support being left empty.
As part of this work, I've written a front-end and framework to run arbitrary validation passes at game load time, and a set of validation functions for ship JSON definitions.
This allows us to have a much higher level of confidence in the data that's being exported from Notion, and significantly reduces the workload required to test individual ships and catch common errors (like missing language strings).
This PR also gives the
default
field a proper use now; when purchasing a ship, slots will be prefilled with the default items specified in the ship JSON. This is done without regard to station stock or techlevel, as it's assumed that the items are shipped "preinstalled" in the (effectively) factory-new ship you're buying from the ship salesroom.TODO: