Documentation

Application

Table of Contents

Classes

AbstractPlayer
AbstractShip
Properties and methods for a ship instance.
Account
UniGenLocationCategories
Helper class for organizing Locations into categories.
AdminPermissions
Album
Alliance
AllianceInvite
Object interfacing with the alliance_invites_player table.
BarDrink
Provides details about bar drinks
Card
Classic playing card for blackjack.
Deck
Deck of Blackjack cards to be drawn from.
Hand
Hand of Blackjack cards.
Table
A game of blackjack between the dealer and a player.
Bounty
Changelog
Board
ChessGame
ChessPiece
AbstractWeapon
CombatDrones
Mines
ScoutDrones
Weapon
Defines a concrete realization of a weapon type for ships/planets.
DiContainer
A wrapper around the DI\Container functionality that will allow static usage of container methods.
ResettableCompiledContainer
ResettableContainer
Council
CouncilVoting
Collection of functions to help process council voting.
Database
Wraps an active connection to the database.
DatabaseProperties
Expects the following environment variables to be set by the OS:
DatabaseRecord
DatabaseResult
Holds the result of a Database query (e.g. read or write).
Command
Forces
Use for any discord commands that require a database connection.
Game
Use for any discord commands that require a database connection.
Invite
MagicEightBall
Money
Use for any discord commands that require a database connection.
Op
Use for any discord commands that require a database connection.
OpList
Use for any discord commands that require a database connection.
OpTurns
Use for any discord commands that require a database connection.
Seed
Use for any discord commands that require a database connection.
Seedlist
Use for any discord commands that require a database connection.
SeedlistAdd
Use for any discord commands that require a database connection.
SeedlistDel
Use for any discord commands that require a database connection.
Turns
Use for any discord commands that require a database connection.
DatabaseCommand
Use for any discord commands that require a database connection.
PlayerLink
Holds information linking the received message and the game data
DisplayNameValidator
Displayed names (player names, Hall of Fame names, etc.) must all follow a basic set of rules, which are defined here.
DummyPlayer
DummyShip
Properties and methods for a ship instance.
EnhancedWeaponEvent
Defines enhanced weapon sale events for weapon shops.
Epoch
Stores the current time as a fixed value.
AccountNotFound
Exception thrown when an account cannot be found in the database
AlbumNotFound
Exception thrown when an album entry cannot be found in the database
AllianceInvitationNotFound
Exception thrown when an alliance invitation cannot be found in the database
AllianceNotFound
Exception thrown when an alliance cannot be found in the database
CachedPortNotFound
Exception thrown when a CachedPort cannot be found in the database
GalaxyNotFound
Exception thrown when a galaxy cannot be found in the database
GameNotFound
Exception thrown when a game cannot be found in the database
PathNotFound
Exception thrown when Plotter cannot find a Path
PlayerNotFound
Exception thrown when a player cannot be found in the database
SectorNotFound
Exception thrown when a sector cannot be found in the database
SocialLoginInvalidType
Exception thrown when a SocialLogin type is not valid
UserError
This exception should be used to pass an error message to the user.
Force
Galaxy
Game
Globals
HallOfFame
Collection of functions to help display the Hall of Fame tables.
HardwareType
Location
Redirect
Collection of functions to help with login redirection.
Lotto
Collection of functions to help with Lotto processing.
Menu
Creates menu navigation bars.
Messages
Collection of functions to help display messages and message boxes.
News
Collection of functions to help with displaying news.
AccountPage
A container that holds data needed to create a new page.
AccountPageProcessor
A container that holds data needed to create a new page.
Page
A container that holds data needed to create a new page.
PlayerPage
A container that holds data needed to create a new page.
PlayerPageProcessor
A container that holds data needed to create a new page.
Path
Class used to keep track of paths between two sectors.
Planet
PlanetList
Collection of functions to help prepare Planet List pages.
PlanetStructureType
Defines intrinsic properties of planetary structure types.
AridPlanet
Defines intrinsic properties of planet types.
DefenseWorld
Defines intrinsic properties of planet types.
DwarfPlanet
Defines intrinsic properties of planet types.
PlanetType
Defines intrinsic properties of planet types.
ProtoPlanet
Defines intrinsic properties of planet types.
TerranPlanet
Defines intrinsic properties of planet types.
Player
PlayerLevel
Plotter
Port
Race
Provides methods to map race IDs to basic race properties.
RaceDetails
Detailed race information for the Game Join page.
Rankings
Request
Should be used for getting request data for processing pages.
MultiplePortRoute
OneWayRoute
Route
RouteGenerator
RouteIterator
Cyclically iterate over actions on a trade route
Sector
SectorLock
This class is responsible for ensuring that page processing occurs sequentially as requests come in, avoiding race conditions by using a blocking queue.
SectorsFile
Session
Ship
Adds a database layer to an AbstractShip instance.
ShipIllusion
Data storage for the Ship::illusionShip property.
ShipType
Defines the base ship types
Facebook
Defines the methods to be implemented by each social login platform.
Google
Defines the methods to be implemented by each social login platform.
SocialIdentity
SocialLogin
Defines the methods to be implemented by each social login platform.
Twitter
Defines the methods to be implemented by each social login platform.
StoredDestination
Data class for course plotting destinations stored by the player.
Template
TradeGood
TradeGoodTransaction
Data class for defining the good and transaction type of a TradeGood transaction.
Treaty
VoteLink
Site-independent handling of links to external game voting sites.
WeaponType
Defines the base weapon types for ships/planets.
WeightedRandom
Weighted random number generator used to make events achieve their expected rate of success faster than a pure random number generator.

Traits

ForcesTrait
Common interface used by the subset of AbstractWeapon classes that are used for forces (mines, combat drones, and scout drones).
ResettableContainerTrait
Extends a Di\Container to allow for introspection and resetting.
ReusableTrait
RaceID
Implements the interface for classes that need a $raceID property.

Enums

Result
Defines all the possible results of a Blackjack game from the perspective of the player.
BountyType
BuyerRestriction
Enumeration of buyer restrictions for ships and weapons.
Castling
Enum values are database types and must not be changed.
Colour
Enumeration of possible player colours in a chess game.
CombatLogType
Enumerates the types of combat log pages
MovementType
Enumerates the types of movements that players can take.
PlanetMenuOption
Enumerates menu options on planets. Backing value is the link display name.
PlotGroup
Enumerates the "Plot to Nearest" categories
PortPayoutType
Enumerates the actions that can trigger port payouts.
ScoutMessageGroupType
Enumeration of ways to group scout messages when viewing them.
ShipClass
Categorization of ship types.
TransactionType
Enumerates the types of trade transactions that players may have with ports.
TurnsLevel
Enumerates the warning levels that correspond to player turn thresholds
UserRanking
User ranking titles
VoteSite
Enumerates external game voting sites and their properties.

Constants

MISSION_ACTIONS  = ['LeaveSector', 'EnterSector', 'WalkSector', 'JoinAlliance', 'LeaveAlliance', 'DisbandAlliance', 'KickPlayer', 'PlayerKicked', 'BuyDrink']
MISSIONS  = [0 => ['Name' => 'Drunk Guy', 'Offerer' => 'Drunk', 'Time Limit' => 0, 'HasX' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Steps' => [['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => \RACE_SALVENE + \LOCATION_GROUP_RACIAL_HQS], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => '*Hiccup* Hey! I need you to...*Hiccup* do me a favor. All the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' in this bar is awful! Go to the Sal...*Hiccup*...the Salvene HQ, they\'ll know a good bar.', 'Task' => 'Go to the Salvene HQ at [sector=<Sector>]'], ['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => 'Here we are! The Salvene HQ! You ask around a bit and find that the bar in [sector=<Sector>] does the best ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' around!', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'BuyDrink', 'Detail' => ['SectorID' => '<Sector>', 'Drink' => \Smr\BarDrink::SALVENE_SWAMP_SODA], 'Text' => 'Here we are! Now let\'s get this ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . '.', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'EnterSector', 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'Finally! A true ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ', let\'s return to that drunk!', 'Task' => 'Return to [sector=<Starting Sector>] to claim your reward.'], ['Step' => 'Claim', 'Rewards' => ['Credits' => 500000, 'Experience' => 1000, 'Text' => '*Hiccup* For your...service *Hiccup* to me, take these *Hiccup* 500,000 credits and 1,000 experience *Hiccup*!'], 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'You hand the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' to the drunk!']]]]

Functions

get_draft_teams()  : array<int, array<string, mixed>>
Returns an array with all relevant information about draft teams, including their current size and if the leader can pick teammates.
course_plot_forward()  : never
This function is called by "Conventional" and "Plot To Nearest" pages.
echo_nav()  : void
echo_content()  : void
echo_subsection()  : void
echo_menu()  : void
get_numbering()  : string
replaceMissionTemplate()  : void
Callback for array_walk_recursive in Player::rebuildMission.
checkMissionRequirements()  : bool
createNHA()  : void
Create the Newbie Help Alliance and populate its Message Board
hit_sector_mines()  : void
create_sub_menu()  : void

Constants

MISSION_ACTIONS

public mixed MISSION_ACTIONS = ['LeaveSector', 'EnterSector', 'WalkSector', 'JoinAlliance', 'LeaveAlliance', 'DisbandAlliance', 'KickPlayer', 'PlayerKicked', 'BuyDrink']

MISSIONS

public mixed MISSIONS = [0 => ['Name' => 'Drunk Guy', 'Offerer' => 'Drunk', 'Time Limit' => 0, 'HasX' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Steps' => [['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => \RACE_SALVENE + \LOCATION_GROUP_RACIAL_HQS], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => '*Hiccup* Hey! I need you to...*Hiccup* do me a favor. All the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' in this bar is awful! Go to the Sal...*Hiccup*...the Salvene HQ, they\'ll know a good bar.', 'Task' => 'Go to the Salvene HQ at [sector=<Sector>]'], ['Step' => 'EnterSector', 'PickSector' => ['Type' => \Smr\PlotGroup::Locations, 'X' => 'Bar'], 'Detail' => ['SectorID' => '<Sector>'], 'Text' => 'Here we are! The Salvene HQ! You ask around a bit and find that the bar in [sector=<Sector>] does the best ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' around!', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'BuyDrink', 'Detail' => ['SectorID' => '<Sector>', 'Drink' => \Smr\BarDrink::SALVENE_SWAMP_SODA], 'Text' => 'Here we are! Now let\'s get this ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . '.', 'Task' => 'Go to the bar at [sector=<Sector>] and buy a ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' from the bartender. This may take many tries.'], ['Step' => 'EnterSector', 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'Finally! A true ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ', let\'s return to that drunk!', 'Task' => 'Return to [sector=<Starting Sector>] to claim your reward.'], ['Step' => 'Claim', 'Rewards' => ['Credits' => 500000, 'Experience' => 1000, 'Text' => '*Hiccup* For your...service *Hiccup* to me, take these *Hiccup* 500,000 credits and 1,000 experience *Hiccup*!'], 'Detail' => ['SectorID' => '<Starting Sector>'], 'Text' => 'You hand the ' . \Smr\BarDrink::SALVENE_SWAMP_SODA . ' to the drunk!']]]]

Functions

get_draft_teams()

Returns an array with all relevant information about draft teams, including their current size and if the leader can pick teammates.

get_draft_teams(int $gameId) : array<int, array<string, mixed>>
Parameters
$gameId : int
Return values
array<int, array<string, mixed>>

echo_nav()

echo_nav(int $topic_id) : void
Parameters
$topic_id : int

echo_content()

echo_content(int $topic_id) : void
Parameters
$topic_id : int

echo_subsection()

echo_subsection(int $topic_id) : void
Parameters
$topic_id : int

echo_menu()

echo_menu(int $topic_id) : void
Parameters
$topic_id : int

get_numbering()

get_numbering(int $topic_id) : string
Parameters
$topic_id : int
Return values
string

replaceMissionTemplate()

Callback for array_walk_recursive in Player::rebuildMission.

replaceMissionTemplate(string|int|PlotGroup &$template, string $key, array<string, int> $replacements) : void

Searches for placeholders in template and replaces them with values derived from the supplied data.

Parameters
$template : string|int|PlotGroup
$key : string
$replacements : array<string, int>

checkMissionRequirements()

checkMissionRequirements(array<string, mixed> $values, array<string, mixed> $requirements) : bool
Parameters
$values : array<string, mixed>
$requirements : array<string, mixed>
Return values
bool

createNHA()

Create the Newbie Help Alliance and populate its Message Board

createNHA(int $gameID) : void
Parameters
$gameID : int

create_sub_menu()

create_sub_menu(array<string|int, array{entry: string, submenu?: string[]}> $menu, int $active_level1, int $active_level2) : void
Parameters
$menu : array<string|int, array{entry: string, submenu?: string[]}>
$active_level1 : int
$active_level2 : int

        
On this page

Search results