Skip to content
Snippets Groups Projects
Forked from tome / Tales of MajEyal
Source project has a limited visibility.
  • Hachem_Muche's avatar
    b38399f3
    class.cloneFull and class.cloneCustom use table.merge to copy recursively · b38399f3
    Hachem_Muche authored
    table.merge correctly handles table.NIL_MERGE for subtables
    
    Added a new function engine.Actor:cloneActor that automatically handles copying and overwriting a number of default fields when cloning actors,  defined in:
    _M.clone_nodes and _M.clone_copy, corresponding to the alt_nodes and post_copy tables passed to class:cloneCustom
    
    This allows critical fields for cloning Actors to be specified in one place, so that only the relevant fields need to be specified in talent level calls.
    
    Relevant base fields are specified in engine.Actor and supplemented in mod.class.Actor to manage the usual fields related to Actor spawning/death, AI, and player-specific fields.
    
    Updated the Paradoxology quest, makeParadoxClone, the Rak'Shor Cultist, and a number of talents to use the new calls:
    Shadow Simulacrum (enabled for npc use), Paradox Clone, Temporal Fugue, Ambuscade, Elemental Split, Multiply, Projection, Inner Demons, Forgery of Haze, Dreamscape (effect)
    
    Added Actor:unlearnTalentsOnClone() function (similar to removeTimedEffectsOnClone()) to automatically unlearn talents tagged with .unlearn_on_clone.  This allows addons to prevent unwanted chain cloning more easily.
    
    Tagged a number of talents to not be copied for clones:
    Guardian Unity, Temporal Clone, Temporal Hounds, Warden's Call, Temporal Fugue, Ambuscade, Call Shadows, Elemental Split, Multiply (copies still get one less use), Projection, Inner Demons, Thought-Forms, Create Minions, Forgery of Haze
    
    Fixed a few typos
    b38399f3
    History
    class.cloneFull and class.cloneCustom use table.merge to copy recursively
    Hachem_Muche authored
    table.merge correctly handles table.NIL_MERGE for subtables
    
    Added a new function engine.Actor:cloneActor that automatically handles copying and overwriting a number of default fields when cloning actors,  defined in:
    _M.clone_nodes and _M.clone_copy, corresponding to the alt_nodes and post_copy tables passed to class:cloneCustom
    
    This allows critical fields for cloning Actors to be specified in one place, so that only the relevant fields need to be specified in talent level calls.
    
    Relevant base fields are specified in engine.Actor and supplemented in mod.class.Actor to manage the usual fields related to Actor spawning/death, AI, and player-specific fields.
    
    Updated the Paradoxology quest, makeParadoxClone, the Rak'Shor Cultist, and a number of talents to use the new calls:
    Shadow Simulacrum (enabled for npc use), Paradox Clone, Temporal Fugue, Ambuscade, Elemental Split, Multiply, Projection, Inner Demons, Forgery of Haze, Dreamscape (effect)
    
    Added Actor:unlearnTalentsOnClone() function (similar to removeTimedEffectsOnClone()) to automatically unlearn talents tagged with .unlearn_on_clone.  This allows addons to prevent unwanted chain cloning more easily.
    
    Tagged a number of talents to not be copied for clones:
    Guardian Unity, Temporal Clone, Temporal Hounds, Warden's Call, Temporal Fugue, Ambuscade, Call Shadows, Elemental Split, Multiply (copies still get one less use), Projection, Inner Demons, Thought-Forms, Create Minions, Forgery of Haze
    
    Fixed a few typos