-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
Misc cleanup, fixes, and Lua function library improvements #5773
Merged
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
- Add simple implementation of Self/Io-style prototypes - Prototypes operate on a zero-copy delegation model where a new clone is an almost-empty instance - Add table.merge to shallow copy values from one table to another - Add table.append to concatenate an array to another - Add utils.to_array to transform the values of a table into an array
- Avoids runtime errors when interpolating non-string values
- class.New propagates all its arguments to the base class New function - class.Constructor forwards to the parent constructor if it exists
- Simplifies API of querying screenspace position of previously submitted elements, e.g. ui.dummy
- Add type information for Color objects - Define the pigui 'ui' interface as a class so all assigned functions are available for autocomplete - Fix incorrect parameters in LuaRand type information
Previously, an error in an individual tab's refresh() function would go uncaught and prevent the entire TabView from functioning until the game was restarted.
Commodity market reuses almost no code from the equipment market, so it makes little sense to depend on it.
Is |
|
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 is a bit of a catch-all arising from development of #5734 and contains most of the feature-agnostic commits from that branch.
In no particular order:
utils.proto
helper function for working with a prototype-based object modelutils.print_r
which caused it to print incorrect information about recursive tables (tables that have already been printed)utils.inherits
- you can now receive arguments from the default.New()
constructor of a subclass.ui
object. Documenting forwarded methods from C++ is still a WIP and will be improved over time.