API Documentation
Table of Contents
Namespaces
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
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>>course_plot_forward()
This function is called by "Conventional" and "Plot To Nearest" pages.
course_plot_forward(AbstractPlayer $player, Path $path) : never
Parameters
- $player : AbstractPlayer
- $path : Path
Return values
neverecho_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
stringreplaceMissionTemplate()
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
boolcreateNHA()
Create the Newbie Help Alliance and populate its Message Board
createNHA(int $gameID) : void
Parameters
- $gameID : int
hit_sector_mines()
hit_sector_mines(AbstractPlayer $player) : void
Parameters
- $player : AbstractPlayer