-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to Linking Book Mod share function #335
base: master
Are you sure you want to change the base?
Conversation
korman/properties/modifiers/gui.py
Outdated
@@ -482,7 +482,7 @@ def pre_export(self, exporter, bo): | |||
else: | |||
rgn_obj = self.clickable_region | |||
|
|||
if self.shareable: | |||
if self.shareable and self.link_type == "kOriginalBook": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To reduce the amount of potentially duplicated logic, Korman usually has Python properties for this. Eg, in the class:
@property
def export_share_region(self) -> bool:
return self.shareable and self.link_type == "kOriginalBook"
Then this line becomes:
if self.shareable and self.link_type == "kOriginalBook": | |
if self.export_share_region: |
d8b2cdc
to
3fe6a23
Compare
# Odds and Ends | ||
stamped = nodes.new("PlasmaAttribBoolNode") | ||
stamped.link_output(linkingnode, "pfm", "IsDRCStamped") | ||
if not self.drc_stamp: | ||
stamped.value = False | ||
forcecam = nodes.new("PlasmaAttribBoolNode") | ||
forcecam.link_output(linkingnode, "pfm", "ForceThirdPerson") | ||
if self.third_person: | ||
forcecam.value = True | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking we should defer these changes to another PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree.
Sets the default of the share to false as the default along with an extra check before making a share region. This keeps extra, unneeded share regions from being added.
Adds bool values for the stamp and third person cam portions of the xLinkingBookGUIPopup.py parts of the script (MOUL only)
Make the new bool nodes actually work when selected
3fe6a23
to
357bd8c
Compare
Updated the stamped property to better reflect its purpose (it's for any stamp on the left page, not just the DRC)
Add new @Property per Hoikas' suggestion
Sets the default of the share function to false along with an extra check before creating a default share region. This ensures extra, unneeded share regions will not be added as is happening with the current setup (per Ehren's examination of the Chiso files).