Commit graph

56 commits

Author SHA1 Message Date
925dc205b7 fix: add-section paths were not correctly added to the list of cheat code to patch 2023-01-31 20:04:47 +01:00
423a02ce4c remade all the translation in a easier, faster and more readable way 2022-09-01 18:10:38 +02:00
162e56b1e0 progress bar path are now relative to the extracted game path 2022-08-27 20:09:36 +02:00
fb8d20c08f some of the Track class now remember the mod_config object for easier call. default_track_attributes have been added to set default value of the track attribute object to avoid unreadable safe eval of getattr 2022-08-20 00:24:30 +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
d3ca353ecd some fields of Rename and StrEditor patch now support MultipleSafeEval 2022-08-16 21:50:28 +02:00
ec94ddece8 the code is now fully translatable 2022-08-15 23:06:23 +02:00
c0915ae13e added a 2nd progress bar 2022-08-15 14:14:53 +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
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
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
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
b9873a6c49 adapted safe_eval call and optimised them. MKWF safe_eval are now easier to read 2022-08-06 23:28:52 +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
b4e52cfe58 started implementing ModSettings (only gui testing for now) 2022-07-31 00:03:19 +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
ca698217dd added a TODO: patcher don't work on JAP 2022-07-22 15:11:24 +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
15d84f757c simplified safe_eval by removing extra_token_map because env do the same thing but better and by making patch.safe_eval more similar to the normal safe_eval 2022-07-21 01:24:24 +02:00
150f0d6e60 added FormatOriginalTrackLayer, allowing for patching originals tracks name like the custom tracks (with tags name, ...) 2022-07-20 23:47:28 +02:00
1d88f89f3d patch_data have been renamed cat_data and can both patch and filters a bmg file 2022-07-20 23:27:02 +02:00
8d30d1238a added CTFileLayer (allow for patching a bmg file with the ctfile with all the tracks name) 2022-07-19 18:23:41 +02:00
8d0544a084 in order to stay constitent with the operation style, bmg-edit have been splitted into bmg-decode, bmg-encode and bmgtxt-edit. This will also allow more possibility. 2022-07-16 22:48:17 +02:00
43018abdca fixed an issue where a .d directory in a Patch would not get his .szs equivalent extracted if the subfile where all at the root level (causing an issue with the MKWF Font patch) 2022-07-16 22:17:56 +02:00
4ede6f0b6b renamed img-generator to img-edit, split PatchOperation.py into a whole module 2022-07-16 01:18:58 +02:00
de52540735 added overwrite mode for PatchFile (write only if already existing) and shortened the writing code to the write_patch function 2022-07-16 00:01:15 +02:00
04268a17a1 added seek(0) before writing a PatchFile 2022-07-15 20:25:04 +02:00
22adc6e29e removed a TODO 2022-07-15 16:41:52 +02:00
5aeb864ef7 added a TODO about using regex to speed up the patch of bmg-edit 2022-07-15 00:31:28 +02:00
4d071e190f extracted szs directory will now be repacked into szs files 2022-07-15 00:28:04 +02:00
7f5e709aec started implementing main.dol and StaticR.rel patching 2022-07-15 00:05:54 +02:00
ebb74a61df implemented decode_data in img (tpl -> png) and added img-decode operation (useful if a texture modification need the original game image as a base) 2022-07-14 18:30:06 +02:00
5ddae33393 added main.dol patch for lecode, and optionnally region, server url and section (cheat code) 2022-07-14 17:06:59 +02:00
f11c8a5de2 added rename operation 2022-07-14 16:15:41 +02:00
2f71615ef3 removed a already implemented example and a todo 2022-07-14 15:48:06 +02:00
fbdd207c52 added special operation, allowing for replacing a file_content with a precalculated file, useful for ct_icons.tpl for example 2022-07-14 15:47:35 +02:00
cab9b7745d added bmg regex operation support + decoding and encoding are now only done at the start and end of a whole operation instead at every Layer 2022-07-12 22:42:41 +02:00
efd314fb9a patch.multiple_safe_eval and patch.safe_eval are now the safe function with a multiple parameter 2022-07-12 20:57:11 +02:00
cb38bf3ae5 Patch.safe_eval now have a env parameter where any variable can be used for the safe_eval 2022-07-12 20:31:47 +02:00
cb069fe240 safe_eval now has mod_config in the environnement 2022-07-12 20:02:03 +02:00
cf0f61d8ee implemented bmg patch operation by id 2022-07-11 23:46:48 +02:00
804c9f38f6 removed the need of temporary file by using stdin as input data 2022-07-10 23:56:57 +02:00
69aa29c630 fixed untouched patched file content being erased if the mode was set to "edit" 2022-07-10 22:54:26 +02:00