Enhanced Plugin System

出自gamedev
跳至導覽 跳至搜尋



This article describes a future concept. It may still have some open issues and it was not decided, yet, whether to implement it in this way.

Proposal[編輯]

  • Move the plugin system from Stendhal into Marauroa core.
  • Provide hook system for the plugins to interact with Marauroa life cycle

Identified hook points[編輯]

  • Object added to Zone
    • Query the extension to plug in any action when an object is added to a zone
  • Object removed from Zone
    • Query the extension to plug in any action when an object is removed from a zone
  • Perception Generation
    • Query the extension to plug in any changes to the perception of an object
  • Client Object definition
    • Plug into the definition of the client class
  • After RPWorld is initialized
    • Action to perform after the world is initialized (all classes are defined)
  • Database Update/Creation
    • Update the database. Register/Update DAO's here as well

Note: I'm sure there are more hook points...

Proposed Interface[編輯]

Of course the names of the Interface and class needs to be updated. Proposed Interface

This interfaced has been already ported in git branch server_extenstions for further testing/evaluation.

See related thread at: https://sourceforge.net/projects/arianne/forums/forum/3192/topic/4453500

Notes[編輯]

  • Most of the plugin hook points happen a lot earlier than the plugins are initialized right now (in Stendhal). part of the change is also initialize/registering them earlier so they can hook into early parts of the life cycle like Database update.

{{#breadcrumbs: Marauroa | Internals | Roadmap }}