-
Notifications
You must be signed in to change notification settings - Fork 31
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
Refactor/definitions #328
Open
susch19
wants to merge
8
commits into
feature/crafting
Choose a base branch
from
refactor/definitions
base: feature/crafting
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Refactor/definitions #328
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
Member
susch19
commented
Dec 18, 2024
- Lese Dir die Contribution Datei durch.
- Beachte den Code of Conduct.
- Damit der Pull Request angenommen wird, muss er unserem Code Style entsprechen.
- Schreibe einen aussagekräftigen Titel und eine kurze Zusammenfassung was Du geändert hast.
* Improved custom type support for definition extensions * removed BaseRegistrar, since this class did nothing Co-authored-by: Marcus Aurelius <[email protected]>
* Auto generate first draft of the json definitions * Register all Definitions on the Registrar base on types to get them in the manager * Create all required base type definition classes to deal with them in the future Co-authored-by: susch19 <[email protected]>
* because we needed more type information inside the json * deserialize the json and therefore the definitions, so that we can continue to get octo awesome running again * move definitionsmanager ctor into initializer, so we have no ring references and the ctor doesn't do more than it should
* so that the serialized definitions are loaded into the game and are able to be used for rendering and game logic * reimplement tree logic, since these weren't "real" definitions, but rather code in a definitions class * centralized the deserialized registration for definitions, so that mods can have their own base types without needing to implement a lot of specific code * add an action service, so that one can implement custom logic for specific definitions as function or action * store and load definition indices, so that even if a mod adds new types, the worlds should be compatible with our serialization format and otherwise we now have the possibility to warn about incompatibility
* so that it works with the new definition json * add new network block definition, so that we can deserialize the INetworkBlock Definition into our new system * register all the node types into our definition action service, so it is more generic and at the same place as the other definition extension methods * add methods to definition action service without additional parameters, if you just want to return something or act on something specific
* migrate all the item definitions with can mine and register create item, so that we could remove those as well * remove all the block and material definitions, since they are now unused * fix the places where we used the old way of definitions and methods on the definitioins * add burnable definition, so that we can use this for furnace fuel, instead of relying on solid blocks density
* so that the definitions are converted to const strings for typo safety * use the newly generated const strings * create a seperate const strings file for things like methods and the special hand item
* so we know the runtime type variations of a specific definition and therefore have something similar to the ore dict of a similar game * Use ConstStrings in more places, so we reduce the chance of typo or rename errors * only create items based on there actual material, so we don't end up with food material axe for example * add grouping to actions, so that we can remove the complete group at the dispose of the registering component, so that we don't end up firing the same event twice after reload of save game
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.