Classes | |
class | Data |
Public Member Functions | |
virtual ConfigPage * | configuration (QWidget *parent) |
Engine's configuration widget. More... | |
virtual QList< CreateServerDialogPage * > | createServerDialogPages (CreateServerDialog *pDialog) |
Creates a list of custom Create Game dialog pages. More... | |
const Data * | data () const |
virtual QList< DMFlagsSection > | dmFlags () const |
Game settings flags. More... | |
GameExeFactory * | gameExe () |
virtual GameHost * | gameHost () |
Creates an instance of GameHost derivative class. More... | |
virtual QList< GameMode > | gameModes () const |
Game modes (cooperative, deathmatch, ctf). More... | |
virtual QList< GameCVar > | gameModifiers () const |
Modifier that apply to all game modes (ex. instagib). More... | |
const QPixmap & | icon () const |
void | init (const char *name, const char *const icon[],...) |
virtual QList< GameCVar > | limits (const GameMode &mode) const |
Returns a list of limits (like fraglimit) supported by passed gamemode. More... | |
void | masterHost (QString &host, unsigned short &port) const |
QString | nameCanonical () const |
Derived from actual plugin name. More... | |
virtual ServerPtr | server (const QHostAddress &address, unsigned short port) const |
Creates an instance of server object from this plugin. More... | |
void | setConfig (IniSection &cfg) |
virtual void | start () |
Start services, init data structures. More... | |
Protected Member Functions | |
void | initDefaultGameFiles () |
virtual ServerPtr | mkServer (const QHostAddress &address, unsigned short port) const =0 |
Create an instance of local Server subclass and return a ServerPtr. More... | |
void | setGameExeFactory (QSharedPointer< GameExeFactory > factory) |
virtual void | setupConfig (IniSection &config) |
Reimplement if you want to perform some ini initialization manually. More... | |
Definition at line 74 of file engineplugin.h.
|
protected |
We will use this to tell Init what features we have, new features can be added to this list, but the position of any feature must not change.
Enumerator | |
---|---|
EP_Done |
Signals the end of init parameters. |
EP_Author |
(const char*) Author of the plugin. |
EP_Version |
(unsigned int) Single version number for plugin. |
EP_AllowsConnectPassword |
Signifies that servers can be created with a connection password. |
EP_AllowsEmail |
Signifies that servers can have an administrative contact email attached. |
EP_AllowsURL |
Signifies that servers can provide a URL for potential wad downloads. |
EP_AllowsJoinPassword |
Signifies that servers can be created with a join password. |
EP_AllowsRConPassword |
Signifies that servers can be created for remote console access. |
EP_AllowsMOTD |
Signifies that servers can have a message of the day. |
EP_DefaultMaster |
(const char*) Default ip address and port ("address:port") for master server. Requires EP_HasMasterServer. |
EP_DefaultServerPort |
(quint16) Default port for custom server creation. |
EP_InGameFileDownloads |
Allows the player to join a server without downloading files through Wadseeker. |
EP_IRCChannel |
(const char*)server, (const char*)channel - Can be repeated. Default IRC channels. |
EP_SupportsRandomMapRotation |
Signifies that a server can be created with a random map rotation. |
EP_RefreshThreshold |
(quint8) The amount of time (in seconds) that must pass before a server can be requeried. |
EP_URLScheme |
(const char*) Overrides the URL scheme which Doomseeker sets for this plugin. By default it is the port's name without spaces. |
EP_DemoExtension |
(bool)auto, (const char*)extension Sets the extension taht will be used for demos (default is true and lmp). |
EP_DontCreateDMFlagsPagesAutomatic |
(bool) If specified then "Create Game" dialog won't build flags pages out of the EnginePlugin::dmFlags() list. Plugin either doesn't want to have the flags pages created or will provide the pages on its own through EnginePlugin::createServerDialogPages(). |
EP_ClientOnly |
Indicates that client binary serves the purpose of the client and server. |
EP_Broadcast |
LAN Broadcast object. |
EP_MasterClient |
MasterClient object. |
EP_ClientExeName |
File name for game's client (main) executable. If defined it will be used to generate default list of GameExeFactory::gameFiles(). Platform specific file extension doesn't need to be specified. |
EP_ServerExeName |
File name for game's server executable if game has any. If defined it will be used to generate default list of GameExeFactory::gameFiles(). If EP_ClientOnly is set to true this setting has no effect. Platform specific file extension doesn't need to be specified. |
EP_GameFileSearchSuffixes |
Default search suffixes used to automatically find game files. Doomseeker may help user in finding necessary game files, such as executables, by appending these suffixes to certain default search paths (such as Program Files directory or /usr/share/games). These paths may differ per platform. This is a const char* string where multiple suffixes can be separated with a semicolon ';'. Example for Windows platform: a "MyGame" suffix will prompt Doomseeker to search for game files in "C:/Program Files (x86)/MyGame" and "C:/Program Files/MyGame". |
EP_DifficultyProvider |
GameCVarProvider that returns difficulty levels ordered from easiest to hardest. The context param may be a QVariantMap with "iwad" field or may be empty in which case a default list should be returned. |
EP_NoMapList |
Disables map list in create game box. |
EP_NoIwad |
Informs that the game has no notion of an IWAD. Either IWAD is not used in this game at all or only one IWAD is supported and it is hardcoded. |
EP_NoClientSlots |
Disables specifying amount of client slots in create game box. Player slots, unless disabled with EP_NoPlayerSlots, can still be set. This is useful for games that don't allow to specify spectator-only slots. |
EP_NoPlayerSlots |
Disables specifying amount of player slots in create game box. Combined with EP_NoClientSlots this allows to disable maximum player controls in create game window for games that have a hardcoded amount of maximum players. |
EP_AllowsUpnp |
Tells the create game box that this game allows UPnP. By default, UPnP control is hidden. |
EP_AllowsUpnpPort |
Tells the create game box that this game allows to modify UPnP port. What is meant by "UPnP port" is "a network port that can be used by the game in some relation to UPnP however the game sees fit." This setting works in conjuction with EP_AllowsUpnp. If the plugin specifies this one, it also must specify the EP_AllowsUpnp. By default this is disabled. |
Definition at line 82 of file engineplugin.h.
|
virtual |
Engine's configuration widget.
Definition at line 92 of file engineplugin.cpp.
|
inlinevirtual |
Creates a list of custom Create Game dialog pages.
These pages need to be instantiated with the passed pointer as a parent. Once instantiated, Doomseeker will take care of the deletion of their objects. Pages are valid only as long as the dialog box itself is valid.
Pages are always inserted before the "Custom parameters" page in the Create Game dialog.
Default behavior assumes that the plugin doesn't define any custom pages and returns an empty list.
Definition at line 346 of file engineplugin.h.
|
virtual |
Game settings flags.
Definition at line 97 of file engineplugin.cpp.
|
virtual |
Creates an instance of GameHost derivative class.
Gets a pointer to a new instance of GameHost's descendant (defined by a plugin). Created instance should be deleted manually by the programmer.
Definition at line 107 of file engineplugin.cpp.
|
virtual |
Game modes (cooperative, deathmatch, ctf).
Modifiers are used and displayed in Create Game dialog. If an empty list (or NULL) is returned, Modifier combo box will be disabled.
Definition at line 112 of file engineplugin.cpp.
|
virtual |
Modifier that apply to all game modes (ex. instagib).
Definition at line 117 of file engineplugin.cpp.
void EnginePlugin::init | ( | const char * | name, |
const char *const | icon[], | ||
... | |||
) |
Initializes a plugin based on a feature set passed in. A name for the plugin and its icon (in XPM format) must be provided. The list of features must be terminated with EP_Done.
name | Name of the plugin which will be presented to the user. |
icon | XPM icon used to represent this plugin. |
Definition at line 122 of file engineplugin.cpp.
Returns a list of limits (like fraglimit) supported by passed gamemode.
Definition at line 389 of file engineplugin.h.
void EnginePlugin::masterHost | ( | QString & | host, |
unsigned short & | port | ||
) | const |
Fills the variables with information about the master's address.
Definition at line 257 of file engineplugin.cpp.
|
protectedpure virtual |
Create an instance of local Server subclass and return a ServerPtr.
QString EnginePlugin::nameCanonical | ( | ) | const |
Derived from actual plugin name.
This name is derived from plugin's actual name with following rules:
Doomseeker uses this name when loading translation files for plugins.
Definition at line 263 of file engineplugin.cpp.
|
virtual |
Creates an instance of server object from this plugin.
This might be useful for custom servers.
Definition at line 271 of file engineplugin.cpp.
|
protectedvirtual |
Reimplement if you want to perform some ini initialization manually.
Definition at line 288 of file engineplugin.cpp.
|
virtual |
Start services, init data structures.
This is a good place to initialize whatever cannot be initialized in the constructor. As constructor is called during DLL init, it might be a bad place to call certain functions. For example, calling QObject::tr() may lead to Access Violation exception and failure to load the plugin in some compiler/OS environment setups (Visual Studio 2013 in Debug mode). start() is a safer place to do this. It's also a good place to start LAN broadcast capture.
Default implementation does nothing but reimplementations should still call the original implementation for future compatibility.
Definition at line 323 of file engineplugin.cpp.