Open riperiperi opened 8 years ago
PaperChasePlugin has been implemented by @ddfczm - #35
The (UI)EODLobby and StateMachine look like useful classes for the remaining group money objects and war game.
Also implemented by @ddfczm - #37
[x] ScoreboardPlugin: 0949E698 [x] PermissionDoorPlugin: 0A69F29F
Thanks to The Architect: [x] TrunkPlugin: AA5E36DC [x] SlotsPlugin: CB2819CB
Plugins, or EODs, are TSO's way of adding extra functionality to objects that the normal gameplay of The Sims doesn't allow. They're a large part of what made TSO what it is, and made it easier for people to manage their lots, have fun and make money with others.
Our implementation works in a "Client/Server" kind of fashion, where the EOD acts as a standalone server within the simulation. This server is started upon the first call of the SimAntics "Invoke Plugin" primitive, and closed when everyone disconnects. Here's a textdump from VMEODServer:
The primitive "Invoke Plugin", as well as providing events allows SimAntics to send events to the plugin server, contained in the specified local. Special event "-2" initiates a connection, while special event "-1" closes one. See VMInvokePlugin.cs for more details.
Plugins need two different handlers, one for UI and one for the "server".
UI handlers are in FSO.Client.UI,Panels.EODs and are managed by UIEODController. They subclass UIEOD, which provides the messaging functionality.
Server handlers are in FSO.SimAntics.NetPlay.EODs.Handlers, and are managed by VMEODServer. They subclass VMEODHandler, which provides some functionality, but most of it (outgoing messages) is through a back reference to the VMEODServer that owns it. Save data for plugin servers is currently accessed via the GlobalLink, and generally tied to the persist id of the object in question. See SignsPlugin for an example.
Have a look at the existing classes to get a feel of how this all works. To implement additional plugins, you will need to watch videos of how they worked, and look at their scripts within Volcanic or Edith.
Plugins to be implemented: