Classes | |
class | Data |
Public Member Functions | |
virtual ConfigPage * | configuration (QWidget *parent) |
Engine's configuration widget. | |
virtual QList < CreateServerDialogPage * > | createServerDialogPages (CreateServerDialog *pDialog) |
Creates a list of custom Create Game dialog pages. | |
const Data * | data () const |
QString | defaultMasterAddress () const |
virtual QList< DMFlagsSection > | dmFlags () const |
Game settings flags. | |
GameExeFactory * | gameExe () |
virtual GameHost * | gameHost () |
Creates an instance of GameHost derivative class. | |
virtual QList< GameMode > | gameModes () const |
Game modes (cooperative, deathmatch, ctf). | |
virtual QList< GameCVar > | gameModifiers () const |
Modifier that apply to all game modes (ex. instagib). | |
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 extra settings (like fraglimit) supported by the passed-in GameMode. | |
void | masterHost (QString &host, unsigned short &port) const |
QString | nameCanonical () const |
Either specified explicitly by plugin or derived from the actual plugin name. | |
virtual ServerPtr | server (const QHostAddress &address, unsigned short port) const |
Creates an instance of server object from this plugin. | |
void | setConfig (IniSection &cfg) |
virtual void | start () |
Start services, init data structures. | |
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. | |
void | setGameExeFactory (QSharedPointer< GameExeFactory > factory) |
virtual void | setupConfig (IniSection &config) |
Reimplement if you want to perform some ini initialization manually. | |
Definition at line 76 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 that 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. |
EP_AboutProvider |
Provides a description to be shown in the "About" menu. |
EP_CanonicalName |
Plugin canonical name; should match filenames of the library and translation files. This setting is optional. If not specified, Doomseeker will try to derive the canonical name from the human-readable name. Recommendation for canonical names is to use text that is short, related to the human-readable name, reasonably unique, all lowercase, has no whitespace and is preferably one word or an abbreviation. Canonical name is used to match names of translation files. This means that names of the translation files must have the same prefix as the canonical name. For example, if canonical name is "spacewar", the Spanish translation file must be named "spacewar_es_ES.qm". While certain plugins may match their canonical name to their actual, human-readable name in a simple and derivable fashion, some other plugins may have a canonical name that is drastically different. The author of the plugin should choose the canonical name carefully as it may be used and remembered throughout the program to identify this particular plugin. Changing this name in a later release may lead to data or settings loss by users. |
EP_AllowsLogging |
enables logging info (like console output) into a file. This will show the Logging section in the general game setup panel. |
Definition at line 84 of file engineplugin.h.
|
virtual |
Engine's configuration widget.
Definition at line 96 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 392 of file engineplugin.h.
QString EnginePlugin::defaultMasterAddress | ( | ) | const |
Gets the default address of the master server.
Definition at line 101 of file engineplugin.cpp.
|
virtual |
Game settings flags.
Definition at line 106 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 116 of file engineplugin.cpp.
|
virtual |
Game modes (cooperative, deathmatch, ctf).
Definition at line 121 of file engineplugin.cpp.
|
virtual |
Modifier that apply to all game modes (ex. instagib).
Modifiers are used and displayed in Create Game dialog. If an empty list (or nullptr) is returned, Modifier combo box will be disabled.
Definition at line 126 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 131 of file engineplugin.cpp.
Returns a list of extra settings (like fraglimit) supported by the passed-in GameMode.
The name limits()
is legacy as this was its original purpose. A proper name should be extraSettings()
, as any setting can be returned here.
Doomseeker will render those in the "Create Game" box. Depending on the type of the default value of the GameCVar, it may render a different input widget for that setting. Booleans get checkboxes, ints get spin-boxes, other values get line-edits.
Definition at line 456 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 275 of file engineplugin.cpp.
|
protectedpure virtual |
Create an instance of local Server subclass and return a ServerPtr.
QString EnginePlugin::nameCanonical | ( | ) | const |
Either specified explicitly by plugin or derived from the actual plugin name.
If plugin specifies a canonical name, it's taken as-is.
If name is derived from the actual name, the following rules apply:
Doomseeker uses this name when loading translation files for plugins.
Definition at line 281 of file engineplugin.cpp.
|
virtual |
Creates an instance of server object from this plugin.
This might be useful for custom servers.
Definition at line 297 of file engineplugin.cpp.
|
protectedvirtual |
Reimplement if you want to perform some ini initialization manually.
Definition at line 315 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 351 of file engineplugin.cpp.