-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Update tree data and asset handeling #8295
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
base: dev
Are you sure you want to change the base?
Update tree data and asset handeling #8295
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks mostly fine to me, I just had some nitpicks. I'm almost positive it doesn't work with the alternate trees though :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the 3.19 Assets become the generic one, but we also have a 3_19.lua file now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we name this folder "sprites" instead of "data"? I had to look at where they were moved from to make sense of it.
-- Retrieve the file at the given Path | ||
local function getFile(Path, altPath) | ||
local text | ||
local File = io.open("TreeData/"..Path..".lua", "r") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Can we keep variable names lowercased if they are just an instance of a class?
local File = io.open("TreeData/"..Path..".lua", "r") | |
local file = io.open("TreeData/"..Path..".lua", "r") |
-- Migrate to old format | ||
class.classes = class.ascendancies | ||
end | ||
class.classes = class.classes or class.ascendancies |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe leave a comment in there explaining why this logic is here
self.legion = main.tree.legion | ||
if not self.legion then | ||
self.legion = LoadModule("Data/TimelessJewelData/LegionPassives") | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this logic just for being able to skip these loops if the legion nodes have already been loaded?
"minor" rework to how we handle and store tree data and assets
The 4 main goals with this are to
src\TreeData\assets\non_sprite
still having alot of loose files, this can be cleaned up more if desired)There are many other changes that could improve this more, eg not having to redo spritesheets which are duplicates across multiple tree versions, but I have decided to limit the scope of this a bit to make it easier to merge
I have a followup PR which moves most of the logic over to use spritesheets (that were introduced in 3.19), but again I have decided to limit the scope of this a bit to make it easier to merge, and will open that PR once this is merged