|
Galactic Bloodshed
|
#include <optional>#include <string>#include "gb/races.h"#include "gb/ships.h"#include "gb/vars.h"Go to the source code of this file.
Functions | |
| std::optional< shipnum_t > | string_to_shipnum (std::string_view) |
| Convert input string to a shipnum_t. More... | |
| bool | authorized (governor_t, const Ship &) |
| shipnum_t | start_shiplist (GameObj &, const std::string_view) |
| Get start of ship lists from either a ship number or ScopeLevel. More... | |
| shipnum_t | do_shiplist (Ship **, shipnum_t *) |
| bool | in_list (const player_t, std::string_view, const Ship &, shipnum_t *) |
| Check is the ship is in the given input string. More... | |
| void | DontOwnErr (int, int, shipnum_t) |
| int | enufAP (int, int, unsigned short, int) |
| std::tuple< player_t, governor_t > | getracenum (const std::string &, const std::string &) |
| Find the player/governor that matches passwords. More... | |
| player_t | get_player (const std::string &) |
| void | allocateAPs (const command_t &, GameObj &) |
| void | deductAPs (const player_t, const governor_t, unsigned int, starnum_t, int) |
| double | morale_factor (double) |
Definition at line 175 of file shlmisc.cc.
References getsdata(), getstar(), putsdata(), and putstar().
| bool authorized | ( | governor_t | , |
| const Ship & | |||
| ) |
Definition at line 46 of file shlmisc.cc.
| void deductAPs | ( | const player_t | , |
| const governor_t | , | ||
| unsigned | int, | ||
| starnum_t | , | ||
| int | |||
| ) |
Definition at line 214 of file shlmisc.cc.
References getsdata(), getstar(), putsdata(), and putstar().
Referenced by bombard(), capital(), capture(), declare(), defend(), dump(), examine(), fire(), insurgency(), land(), launch(), mobilize(), move_popn(), name(), page(), scrap(), sell(), send_message(), tax(), technology(), toxicity(), transfer(), and walk().
Definition at line 94 of file shlmisc.cc.
Referenced by bombard(), capture(), detonate(), fire(), grant(), jettison(), land(), launch(), load(), mount(), order(), and scrap().
| void DontOwnErr | ( | int | , |
| int | , | ||
| shipnum_t | |||
| ) |
Definition at line 126 of file shlmisc.cc.
Referenced by testship().
| int enufAP | ( | int | , |
| int | , | ||
| unsigned | short, | ||
| int | |||
| ) |
Definition at line 131 of file shlmisc.cc.
Referenced by bombard(), capital(), capture(), declare(), defend(), dump(), fire(), insurgency(), jettison(), land(), launch(), load(), mobilize(), move_popn(), page(), scrap(), sell(), send_message(), tax(), technology(), toxicity(), transfer(), and walk().
| player_t get_player | ( | const std::string & | ) |
Definition at line 163 of file shlmisc.cc.
| std::tuple<player_t, governor_t> getracenum | ( | const std::string & | racepass, |
| const std::string & | govpass | ||
| ) |
Find the player/governor that matches passwords.
| racepass | Password for the race |
| govpass | Password for the governor |
Definition at line 147 of file shlmisc.cc.
| bool in_list | ( | const player_t | playernum, |
| const std::string_view | list, | ||
| const Ship & | s, | ||
| shipnum_t * | nextshipno | ||
| ) |
Check is the ship is in the given input string.
See start_shiplist's comment for more details.
Definition at line 109 of file shlmisc.cc.
| double morale_factor | ( | double | ) |
Definition at line 239 of file shlmisc.cc.
Referenced by capture(), ground_attack(), insurgency(), mech_attack_people(), and people_attack_mech().
Get start of ship lists from either a ship number or ScopeLevel.
start_shiplist and in_list work together so that a user can enter one of:
When a letter or asterisk is given, the shiplist is taken from the current scope.
| g | Game object for scope |
| p | String that might contain ship number |
Definition at line 68 of file shlmisc.cc.
References getplanet(), getsdata(), and getstar().
| std::optional<shipnum_t> string_to_shipnum | ( | std::string_view | s | ) |
Convert input string to a shipnum_t.
| s | User-provided input string |
Definition at line 34 of file shlmisc.cc.
1.8.13