Add campfire cooking placeholder

This commit is contained in:
2026-05-17 18:50:59 -07:00
parent c61b226f47
commit 0ac4bec3cf
7 changed files with 135 additions and 3 deletions
+17 -1
View File
@@ -207,6 +207,22 @@ def make_stack(data):
return stack
def set_default_property(cdo, property_name, value):
property_names = [property_name]
if isinstance(value, bool):
property_names.append(f"b_{property_name}")
property_names.append("b" + "".join(part.capitalize() for part in property_name.split("_")))
for reflected_name in property_names:
try:
cdo.set_editor_property(reflected_name, value)
return
except Exception:
continue
raise RuntimeError(f"Could not set default property {property_name}")
def apply_defaults(blueprint, config):
blueprint_path = f"{config['folder']}/{config['asset']}"
unreal.BlueprintEditorLibrary.compile_blueprint(blueprint)
@@ -222,7 +238,7 @@ def apply_defaults(blueprint, config):
elif property_name == "harvest_yields":
value = [make_stack(stack_data) for stack_data in value]
cdo.set_editor_property(property_name, value)
set_default_property(cdo, property_name, value)
mesh_path = config.get("mesh")
if mesh_path: