mirror of
https://github.com/ACreTeam/ac-decomp
synced 2026-05-22 22:24:16 -04:00
Support basic custom TU injection for foresta for modding purposes
This commit is contained in:
@@ -4988,8 +4988,29 @@ config.libs = [
|
||||
Object(Matching, "data/model/int_yos_wheel.c",),
|
||||
],
|
||||
),
|
||||
# custom TUs to be injected into foresta.rel (for modding).
|
||||
# anything added here should also go into config.add_objects[1].
|
||||
# example:
|
||||
# under 'game_custom' lib: Object(Matching, "src/path/to/my/custom/c_file.c"),
|
||||
# under config.add_obejcts[1]: ""src/path/to/my/custom/c_file.c""
|
||||
{
|
||||
"lib": "game_custom",
|
||||
"cflags": cflags_foresta,
|
||||
"objects": [
|
||||
# Object(Matching, "src/path/to/my/custom/c_file.c"),
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
config.add_objects = {
|
||||
# module_id => object names
|
||||
# module_id 0 is DOL
|
||||
# module_id 1 is foresta.rel
|
||||
1: [
|
||||
# "src/path/to/my/custom/c_file.c",
|
||||
],
|
||||
}
|
||||
|
||||
# Define our custom asset processing scripts
|
||||
config.custom_build_rules = [
|
||||
{
|
||||
|
||||
@@ -1107,6 +1107,10 @@ def generate_build_ninja(
|
||||
},
|
||||
module_link_step,
|
||||
)
|
||||
# Add custom TUs into the REL
|
||||
if config.non_matching:
|
||||
for unit_name in config.add_objects.get(module["module_id"], []):
|
||||
add_unit({"object": None, "name": unit_name, "autogenerated": False}, module_link_step)
|
||||
link_steps.append(module_link_step)
|
||||
n.newline()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user