Commit graph

492 commits

Author SHA1 Message Date
b67517dc59 merged OriginalTrack and Slot to avoid confusion with the Track module 2022-08-19 18:50:33 +02:00
49c8353252 Slot is now a dataclass instead of a simple typehint (should now allow support for the abbreviated slot like LC, MMM, ...) 2022-08-18 23:04:01 +02:00
3bfcfe53e4 OriginalTrack is now a dataclass for better readability 2022-08-18 22:22:12 +02:00
025d985316 ModConfig have been converted to a dataclass to improve readability (no redundant __init__, __slots__ and from_json) 2022-08-18 21:34:27 +02:00
95f3943b02 AbstractModSettings.get now return an AbstractModSettings object instead of a dictionary of AbstractModSettings 2022-08-18 19:45:12 +02:00
6d5dae63af made the mod_settings window wider 2022-08-17 22:00:36 +02:00
014bd74d4d error log now contains the installer version 2022-08-17 21:41:15 +02:00
1b579bec4c added a "Check" type for mod_settings (used for balancing option in MKWF) 2022-08-17 20:49:41 +02:00
ba4980e0b9 fix: If parameter where missing in StrEditor, the installer would still try to evaluate it in safe_eval, resulting in a crash 2022-08-17 19:42:41 +02:00
adec26c4c1 added note for settings that will enable the cheat mode 2022-08-17 19:15:28 +02:00
da9ec18ef3 mod_settings can now have a description from message.json 2022-08-17 19:00:35 +02:00
433bf08b9b added translate_external for message that need translation from outside of the installer. 2022-08-17 18:43:40 +02:00
d3ca353ecd some fields of Rename and StrEditor patch now support MultipleSafeEval 2022-08-16 21:50:28 +02:00
8edf1d60d2 fix: opening and closing the source game or destination game window without selecting a file would default to the installer path instead of nothing 2022-08-16 21:31:42 +02:00
ec94ddece8 the code is now fully translatable 2022-08-15 23:06:23 +02:00
65e7fb7118 fixed TrackGroup not being usable because of the get_ctfile that was missing argument 2022-08-15 22:02:55 +02:00
8c3d5c4005 added readthedocs help button 2022-08-15 20:40:59 +02:00
a8b454baa8 added the text for the main progress bar 2022-08-15 15:02:08 +02:00
3ad596f8c6 fixed the progress bar interderminate mode not being animated 2022-08-15 14:15:24 +02:00
c0915ae13e added a 2nd progress bar 2022-08-15 14:14:53 +02:00
917f491ad1 security: safe_eval now cache depending on the env to avoid any potential issue and calling a method from an args or trying to modify it is disabled 2022-08-15 12:00:18 +02:00
8afd7e7926 safe_eval and multiple_safe_eval are now 20x faster (~2.5s -> ~0.13s) 2022-08-15 10:58:36 +02:00
89de19c723 safe_eval now cache return_lambda=True callable 2022-08-15 00:03:55 +02:00
6ecf752b6d reorganised PatchObject, PatchFile and PatchDirectory to make them more readable. mode="edit" have been replaced by source="game" | "patch". "overwrite" -> "replace". 2022-08-14 21:52:07 +02:00
781e564dd2 implemented SzsEdit to allow easier track modification (changing laps count, ...) 2022-08-14 19:17:26 +02:00
20a7abadaf Sorting and filtering settings don't apply to arena, so remove them from the previews 2022-08-14 15:02:38 +02:00
1c55ced628 added _PREPATCH. Same as _PATCH, but is applied before the lecode patch. 2022-08-14 13:55:51 +02:00
506ee740f5 added TemplateSafeEval, TemplateMultipleSafeEval and Env type hint 2022-08-14 12:47:35 +02:00
923f696e24 fixed 2 wrong type hint about layer 2022-08-14 11:52:49 +02:00
17edaa3ea1 Some Exception have been moved to their correct scope instead of keeping them at a higher one 2022-08-14 11:46:40 +02:00
0bb12a0835 now using TYPE_CHECKING instead of using dummy type int 2022-08-14 11:45:34 +02:00
95c9b4a1e2 fixed an issue with arenas name not being correctly patched 2022-08-14 09:10:02 +02:00
922669fdaf Fixed an issue where in case of name conflict, the compressed game would add a number suffix after the extension "MKWF v0.12.wbfs (1)" instead of "MKWF v0.12 (1).wbfs" 2022-08-13 22:49:04 +02:00
71229d2e2e fixed a typo (koppa -> koopa) 2022-08-13 22:27:49 +02:00
a51d6f2173 implemented Arena (game text are missing) 2022-08-13 12:16:37 +02:00
8eda2b4f3d implemented EDIT so that game's name and id6 can now be modified 2022-08-12 19:18:13 +02:00
94dddac6d4 implemented Game conversion to WBFS / ISO / CISO after installing the mod 2022-08-11 22:57:41 +02:00
cd61ce59c4 fixed "tags_template" to "tags_templates" 2022-08-11 18:56:59 +02:00
f13b18aa57 fully implemented the AbstractTrack and DefaultTrack, removing the necessity of default_track in mod_config.json 2022-08-11 18:56:49 +02:00
99287bbd56 started making a AbstractTrack class to implement more type of "track".
Removed get_suffix and get_prefix to replace them with get_tag_template and tags_template in mod_config.json
2022-08-10 22:33:10 +02:00
7d15d98999 error in safe_eval now raise SafeEvalException instead of Exception 2022-08-08 18:37:12 +02:00
e4ea183c7f changed compile filename from <string> to <safe_eval> for the errors 2022-08-08 18:06:25 +02:00
cd13753960 lambda was already disabled in the la case 2022-08-08 18:03:53 +02:00
746b9f91f2 added is_modified to ModSettings type 2022-08-07 23:06:10 +02:00
47da0f0be4 global_settings can now be modified in mod_config.json (to change default value for example), but you can't add your own global_settings. Merged track_new_if with override_randm_rew to the global settings replace_random_new 2022-08-07 23:04:06 +02:00
453b631325 clicking on any mod settings widget will automatically enable the settings, instead of needing to enable it manually. 2022-08-07 20:47:26 +02:00
e46acba9a6 there is now a default options in the settings, allowing for default value if the option is disabled (instead of always None) 2022-08-07 20:14:46 +02:00
d3ff94b940 the settings button wasn't disabled when installing the mod 2022-08-07 18:37:14 +02:00
3f58094d59 implemented sort_tracks_by option 2022-08-07 18:19:25 +02:00
cc41a22a82 implemented highlight_if option 2022-08-07 14:45:06 +02:00
b9873a6c49 adapted safe_eval call and optimised them. MKWF safe_eval are now easier to read 2022-08-06 23:28:52 +02:00
c232a8e328 renamed special ct_icon to ct_icons 2022-08-06 22:00:27 +02:00
42fef0b2e3 replaced the old safe_eval by the new safe_eval (from test, normal mode allow for ~26s -> ~13s, and with lambda mode ~26s -> ~0.03s) 2022-08-06 18:51:48 +02:00
998d1274ef started the rewrote of safe_eval to use AST (making it way easier to read and edit) and could fix some security issue.
Also allow for lambda expression to avoid recompiling and checking the expression at every call
2022-08-06 00:12:02 +02:00
1372a0eac2 fixed an issue where the custom tracks were no longer copied to the game 2022-08-05 18:57:47 +02:00
9b07400a3e implemented track filter in the settings (renamed remove_track_if -> include_track_if) 2022-08-05 18:37:20 +02:00
13bf66c94e mod settings name can now be translated in the settings window 2022-08-02 22:02:25 +02:00
6b001709c5 Custom tracks are now cached in a folder with the mod name instead of all sharing the same directory 2022-08-02 19:29:15 +02:00
e126a6b45b disk space check was done on the wrong directory 2022-08-02 18:37:47 +02:00
edb19e02e4 added a safe type function (disable the creation of class) 2022-08-02 18:03:40 +02:00
4ebd01e924 added a root property for all the container with the main window. (self.master.master ... -> self.root). Fixed an issue with mystuff profile not being deleted properly 2022-08-02 18:01:25 +02:00
5dcb0d4343 fully implemented track_selecting preview 2022-08-02 17:59:37 +02:00
222886e009 use import instead of using sys.modules to avoid a useless sys import 2022-08-02 17:57:46 +02:00
7d7df10217 removed "Track Filters" and "Debug Mode" menu since their are replaced by the mod settings window 2022-08-02 17:55:41 +02:00
d1b17e0a77 the lpar file is now customizable with the mod settings function 2022-08-01 23:06:21 +02:00
59106d8ed9 module filtering subclasses have been simplified to made the code easier to read with less directory inside other useless directory and comment have been added 2022-07-31 23:05:54 +02:00
547e9108da factorized global and specific window into the same one 2022-07-31 19:59:28 +02:00
4e596022a7 made the settings entry and combobox the same size 2022-07-31 19:51:31 +02:00
a2037fd084 implemented settings preview, tweaked some visual and made the preview window code a bit simpler 2022-07-31 19:09:49 +02:00
0a2adb1e6b can no longer modify the textbox in the track_formatting preview window 2022-07-31 00:09:53 +02:00
b4e52cfe58 started implementing ModSettings (only gui testing for now) 2022-07-31 00:03:19 +02:00
51a6e46930 added a scrollbar and made the text widget resizable 2022-07-29 21:01:52 +02:00
b3f85bbe43 implemented track_formatting interface 2022-07-29 19:46:21 +02:00
c39b6f4d4e testing track formatting 2022-07-28 23:00:36 +02:00
d615bbccb6 added the interface for the mod settings 2022-07-28 20:03:38 +02:00
ae5e9976e5 implemented track_new_if to select track that should be selected by "Random: New tracks" 2022-07-27 20:32:25 +02:00
677fb35427 added dict to safe_eval 2022-07-27 20:31:19 +02:00
9ece2b491b made the final message code more readable 2022-07-26 18:10:03 +02:00
0555539543 added custom message for when an installation end 2022-07-25 23:52:31 +02:00
d37ee5a79c added error.log file when an error was occuring 2022-07-25 21:57:00 +02:00
5466a88c2d moved bmg_color_text in safe_eval to ModConfig 2022-07-25 18:48:45 +02:00
abad5f8b5d backslash where only doubled inside multiple safe eval 2022-07-25 18:48:22 +02:00
9c2823af95 removed unnecessary import 2022-07-24 23:16:58 +02:00
8964a052c8 fixed a typo 2022-07-24 23:16:36 +02:00
340f985673 tracks prefix and suffix are now evaluated from mod_config.safe_eval instead of normal safe_eval 2022-07-24 23:16:29 +02:00
d25bc524c7 moved safe_eval from Patch to ModConfig for more global access 2022-07-24 23:14:28 +02:00
5ea1d87974 implemented macros to make safe_eval expression more readable. 2022-07-24 21:52:24 +02:00
62a2e31ce2 fixed safe_eval for PatchFile. Now condition need to be exactly True instead of everything but False 2022-07-24 17:38:55 +02:00
7866f5ca36 fixed JAP originals tracks prefix 2022-07-24 17:20:34 +02:00
70e324c03a fixed MyStuff patcher looking for files at the harddrive root 2022-07-24 00:32:50 +02:00
f519bbd554 added a textwrap to the progress bar description 2022-07-24 00:18:12 +02:00
c2e4833ee4 added MyStuff interface and made it work 2022-07-24 00:17:10 +02:00
062c1272dd made the installer interface a bit wider 2022-07-24 00:02:54 +02:00
ca698217dd added a TODO: patcher don't work on JAP 2022-07-22 15:11:24 +02:00
e570291b23 renamed all the wu8 to wbz to fit the correct extension 2022-07-22 14:42:14 +02:00
7f01c0b66b implemented MyStuff code 2022-07-22 12:54:14 +02:00
0f25ac8720 implemented threads amount options, added checkbox to language options and changed some part of the Option class 2022-07-22 12:00:01 +02:00
332edcdcc5 implemented threads amount options, added checkbox to language options and changed some part of the Option class 2022-07-22 11:59:50 +02:00
0e4c318c19 optimised regex used in bmg layer (100 seconds -> 1.7 seconds for Regex) (2 seconds -> 0.7 seconds for Original Track) 2022-07-22 00:01:02 +02:00
413e906547 track disabled in multiplayer are replaced by their original wii track corresponding to their special slot 2022-07-21 19:27:11 +02:00