Fixed bug in return of completed data for assault extdata#2435
Open
Traelblaser wants to merge 2 commits intoWindower:devfrom
Open
Fixed bug in return of completed data for assault extdata#2435Traelblaser wants to merge 2 commits intoWindower:devfrom
Traelblaser wants to merge 2 commits intoWindower:devfrom
Conversation
ef343eb to
1621610
Compare
Contributor
Author
5a569d3 to
18795cd
Compare
z16
reviewed
Apr 30, 2025
| completed = S{data}, | ||
| completed = names, | ||
| flags = flags, | ||
| } |
Member
There was a problem hiding this comment.
Not too happy with the structure of the result table. I would return something like this:
return {
type = 'Assault Log',
area = 'Ilrusi', -- will need to be looked up based on ID
log = {
{ name = 'Golden Salvage', completed = false },
...
},
}With my above suggestion, this could be:
return {
type = 'Assault Log',
area = missions[item_id].name,
log = table.range(10):map(function(index)
return {
name = missions[item_id][index],
completed = flags[index],
}
end),
}| [9] = "Red Versus Blue", | ||
| [10] = "Bloody Rhondo" | ||
|
|
||
| [1] = {name="Leujaom Cleansing"}, |
Member
There was a problem hiding this comment.
Would change this back to being raw strings, and assemble the name attribute later. Also, please move the missions table outside of the function and close over it, like this:
do
local missions = {
[2491] = { name = 'Leujaoam',
[1] = 'Leujaoam Cleansing', -- also fix Leujaoam in this name please
[2] = 'Orichalcum Survey',
...
},
}
function decode.AssaultLog(item_id, str)
-- use the `missions` variable here
end
end
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.

Tweaks return value of completed as follows:

From: (buggy code)
To: (what was intended)
