zen-mod / ZEN

Zeus enhancement mod for Arma 3
https://zen-mod.github.io/ZEN
GNU General Public License v3.0
111 stars 49 forks source link

Add events for deep copy and paste #665

Open Drofseh opened 2 years ago

Drofseh commented 2 years ago

As discussed with @mharis001 on ace slack. Add events when deep copying and pasting objects. Params should be at least _copiedObject for deep copy event and _copiedObject, _newObject for deep paste.

This could also possibly close #645, as mission makers could use event handlers to copy the variables themselves.

Drofseh commented 2 years ago

Maybe an event at the start and end of each would be good.

My use case is that I want to reapply scripted unit loadouts that have randomization in them. This would allow me to reroll the randomization, instead of having units be a carbon copy of the original.

An event at the start could set flags for what information is to be copied, or pasted. This would avoid, for example, having to network sync the loadout twice if it gets updated by a paste event handler