Skip to content
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

Add a recursive json finding function to CoolUtil.hx #15582

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

EgguMan
Copy link
Contributor

@EgguMan EgguMan commented Sep 24, 2024

I added a recursive function to CoolUtil.hx to allow the game to find Json's in folders, and sub-folders.

I can't quite implement it completely into the codebase, as I do not know anything about the newer mod classes, (I stick with 0.6.3) so if someone would like they could implement it to be used those.

Example use in code

// assets/characters/bf.json
// assets/characters/gf.json
// assets/characters/opponents/dad.json

characterList = CoolUtil.recursivelyReadFolders('assets/characters', true);

// ['bf', 'gf', 'opponents/dad']

Copy link
Contributor

@crowplexus crowplexus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very useful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants