Opened 10 years ago

Last modified 10 years ago

#2517 closed enhancement

Register all component classes as global — at Initial Version

Reported by: sanderd17 Owned by:
Priority: Should Have Milestone: Alpha 17
Component: Core engine Keywords: patch
Cc: Patch:

Description

When someone makes a mod now, they have to copy the entire component over to their mod (which can be quite hard to maintain).

By registering all components as a global, mods can just extend functionality from the existing prototype in the public mod by doing that in a different file that's loaded afterwards (f.e. by creating an Attack.MyMod.js file to extend the Attack prototype defined in Attack.js).

There's a separate Engine function now to register variables as global (Engine.RegisterGlobal(name, var)), but it would be better to put this functionality inside the Engine.RegisterComponentType() method, so the actual JS components don't have to be modified.

Change History (0)

Note: See TracTickets for help on using tickets.