Skip to content

Commit

Permalink
Enable export of "Auto Load" and "Local Only" page options.
Browse files Browse the repository at this point in the history
  • Loading branch information
Deledrius authored and Hoikas committed Oct 1, 2023
1 parent 234296c commit 01a6458
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion korman/exporter/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def _export_age_info(self):
for page in age_info.pages:
if page.enabled and ver in page.version:
external = page.page_type == "external"
mgr.create_page(age_name, page.name, page.seq_suffix, external=external)
mgr.create_page(age_name, page.name, page.seq_suffix, external=external, auto_load=page.auto_load, local_only=page.local_only)
mgr.create_builtins(age_name, age_info.use_texture_page)

def _export_actor(self, so, bo):
Expand Down
9 changes: 7 additions & 2 deletions korman/exporter/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ def create_builtins(self, age, textures):
"or the game may crash!"
)

def create_page(self, age, name, id, *, builtin=False, external=False):
def create_page(self, age, name, id, *, builtin=False, external=False, auto_load=True, local_only=False):
location = plLocation(self.mgr.getVer())
location.prefix = bpy.context.scene.world.plasma_age.seq_prefix
if builtin:
Expand All @@ -192,7 +192,12 @@ def create_page(self, age, name, id, *, builtin=False, external=False):
self.mgr.AddPage(info)

if not builtin:
self._age_info.addPage((name, id, 0))
flags = 0
if not auto_load:
flags |= plAgeInfo.kFlagPreventAutoLoad
if local_only:
flags |= plAgeInfo.kFlagIsLocalOnly
self._age_info.addPage((name, id, flags))
if not external:
if self.getVer() <= pvPots:
node = plSceneNode(f"{age}_District_{name}")
Expand Down

0 comments on commit 01a6458

Please sign in to comment.