-
Notifications
You must be signed in to change notification settings - Fork 5
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
0.11 #102
Open
nvs
wants to merge
21
commits into
master
Choose a base branch
from
0.11
base: master
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.
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
This reverts commit af80cd7. It was found that braces were not properly supported via the frontier pattern. So here we are. Some proper testing would have found this sooner...
In an attempt to make the libraries more obvious, all conversions on the trigger string values are removed (i.e. converting `\r\n' to `\n`). More noteworthy is the addition of comment support. Comments within the WTS file have little impact; however, they can serve as a guide to identify the purpose of a given trigger string. Perhaps a user will find this helpful (e.g. when supporting multiple languages). ```lua return { [1] = { value = '', comment = '' } } ```
First off, the breaking change: The output format has changed, and no longer has objects within the primary table. The aim here is future-proofing. And making library behavior more consistent across supported file formats. Or something like that. ```lua return { version = 2, objects = { -- Objects here. } } ``` And then some formatting changes. Perhaps look into a tool to automatically format things? Crazy, right?
Remove flag to handle metatable and introduce caching to handle cyclical tables.
Hopefully this streamlines options handling.
Issue: #99 Use of LPeg for `unpack` not only improves performance, but arguably makes it easier to understand the logic involved. Plus, it looks nice. Right? Right...? Also support `position` for `unpack`.
The other ids are ordered according to how they are found in their respective files. The ones found only in Warcraft III's Lua environment will be sorted via `table.sort` from now on.
The output format has changed. Now a list sorted by module names is returned, with each element containing the module name, path, and, by default, the module contents. These modules are iterable via `ipairs` (i.e. `[1, N]`). This is a breaking change. Additionally, the root module is now specified by name instead of path, and an attempt is made to find it within the provided path. In the output, `modules [0]` will represent the root module.
Allow the ability to `pack` the `war3map.lua`, using the following format to specify modules: ```lua local input = { { name = '', path = '', contents = '' }, -- More modules. } ``` Modules are expected to be iterable via `ipairs` (i.e. `[1, N]`). Note that `modules [0]` will represent the root object, and will be included at the end of the output file. The root object should probably contain `main` and `config`. Note that the output of `Modules.load` can be passed directly to this module to produce a usable `war3map.lua`.
Issue: #99 Switching to LPEG should make it easier to properly support the file format. In particular, double quoted lists are now handled properly. Additionally, fewer assumptions regarding values are made. For unquoted values, everything until the EOL is now returned. Within the game files there are cases where trailing comments are not removed. There are cases where they are. How are we supposed to know? For quoted values, both single and double, the quotes are no longer removed. There are cases where some values must be double quoted. Others must be singled quoted. Again, how are we supposed to know? So we make less assumptions, and let the user decide.
Issue: #99 Now attempt to automatically determine if the file format is for Reforged (1.32). This is done by looking at the flags value. If it is a printable character (i.e. greater than `0x20`), then we make the assumption that it is the latest file format. Previously, we required the user to supply a version table. Furthermore, we adjust a few things, including the output format and introducing `position` for `unpack`. This could be considered a breaking change.
Issue: #99 As with the unit version, we now automatically detect the file format introduced with Reforged (1.32). This is done by looking at the byte that either represents a doodad's flags or skin. If this byte is a printable character (i.e. greater than `0x20`), we assume it is a skin, and thus the latest format. Other changes include support of `position` in `unpack` and adjustments to the output format.
Issue: #99 Format `3` of the map is now supported. The output format for the module has changed as well.
Issue: #99
Issue: #99
Issue: #99
Issue: #99 We now automatically determine the correct file format in both `unpack` and `pack`. This is done by seeing if the entire input is consumed in `unpack`, and checking for the presence of the new camera values in `pack`. Other changes include support of `position` in `unpack`.
Issue: #99
Issue: #99 Note that the output format has changed.
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.
No description provided.