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

feat: Add ExportFiles command to WKit Scripting #1017

Merged
merged 1 commit into from
Nov 24, 2022
Merged

Conversation

dragonzkiller
Copy link
Member

Implemented:

  • Export files from wkit scripts (requires file to already be added to project)
// export either a single item
wkit.ExportFiles("base\\gameplay\\gui\\world\\arcade_games\\roach_race\\art\\roach_race_sprites_1080p.xbm");

// or an array of items
wkit.ExportFiles(["base\\gameplay\\gui\\world\\arcade_games\\roach_race\\art\\roach_race_sprites_1080p.xbm",
    "base\\gameplay\\gui\\world\\arcade_games\\roach_race\\art\\roach_race_sides.xbm"]);

// function can warn of files that do not exist in the project
wkit.ExportFiles(["base\\gameplay\\gui\\world\\arcade_games\\roach_race\\art\\roach_race_sprites_1080p.xbm",
    "base\\gameplay\\code\\CDPR_bugless_code\\literally_anything.cpp"]);

// function can error on invalid type conversions (e.g. random integer)
wkit.ExportFiles(0);
wkit.ExportFiles(["base\\gameplay\\gui\\world\\arcade_games\\roach_race\\art\\roach_race_sprites_1080p.xbm",
    0]);

Please feel free to murder my code and clean it up, or suggest new function names, etc. There's also more nasty type things because of the V8 interpreter.

Copy link
Member

@rfuzzo rfuzzo left a comment

Choose a reason for hiding this comment

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

should be fine

@rfuzzo rfuzzo merged commit 92f95b6 into main Nov 24, 2022
@rfuzzo rfuzzo deleted the feature/script-exports branch November 24, 2022 06:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants