Skip to content

Conversation

@JoyfulShush
Copy link
Contributor

This PR introduces the ability to copy and paste whole triggers, trigger events and trigger actions, preserving most of their values.

The data is serialized and copied into the Clipboard, allowing users to copy them even across multiple instances of WAE, where they are deserialized and recreated there, allowing users to copy across maps.

This also introduces a new helpers file - StreamHelper. This helper streamlines common operations, such as reading and writing bools, strings, and numbers in multiple variations into one place for easy and simple reusability, which serves most of the code in the PR (and to lesser extend - pasting terrain).

Some caveats to note:

  • Triggers never copy their linked triggers. Each trigger regenerates a new ID from the map alongside with a new tag to accompany it.
  • Trigger events and actions can be copied and pasted together. However, the trigger is standalone, so copying a trigger will override copied events and actions.
  • In order to support pasting triggers in a more intuitive way, the triggers' List Box was changed to behave just like events and action List Boxes, where right clicking anywhere in them opens the context menu, not just when hovering over a valid trigger.

I've put a lot of effort into testing it - hopefully I didn't miss anything.

Copy link
Member

@Rampastring Rampastring left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good, but needs some work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants