Opened 3 years ago
Last modified 3 years ago
#5985 closed defect
Improve mirage internals. — at Initial Version
Reported by: | Freagarach | Owned by: | |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 25 |
Component: | Simulation | Keywords: | |
Cc: | Patch: |
Description
Currently, mirages implement the functions they mirage "bare metal", i.e. cmpMirage.GetCurrentAmount() returns the saved amount of resources for the miraged entity. That will give problems when multiple components implement the same function name.
The calling function QueryMiragedInterface
in the Player.js-helper, could just as well return an object belonging to the miraged component.
So:
- Save the functions and values in an object, per component, in Mirage.js.
- Change the function call to return the object instead of calling functions on cmpMirage.
While at it, I suggest more stuff:
- Don't initialise null values (refs #5979).
- Make the components responsible for what needs to be miraged? (Not sure about this one.)
Note:
See TracTickets
for help on using tickets.