9#include "space_fdecl.h"
13#define FACTION_PLAYER \
15#define FACTION_LOGO_SM 64
17typedef struct FactionGenerator_ {
61double faction_reputationOverride(
int f,
int *set );
62void faction_setReputationOverride(
int f,
int set,
double value );
65double faction_hit(
int f,
const StarSystem *sys,
double mod,
66 const char *source,
int single );
77int faction_isPlayerFriendSystem(
int f,
const StarSystem *sys );
78int faction_isPlayerEnemySystem(
int f,
const StarSystem *sys );
85const glColour *faction_reputationColourSystem(
int f,
const StarSystem *sys );
86char faction_reputationColourCharSystem(
int f,
const StarSystem *sys );
87void faction_applyLocalThreshold(
int f, StarSystem *sys );
88void faction_updateSingle(
int f );
95int areEnemiesSystem(
int a,
int b,
const StarSystem *sys );
96int areAlliesSystem(
int a,
int b,
const StarSystem *sys );
100void factions_loadPost(
void );
104void factions_cleanLocal(
void );
109int faction_dynAdd(
int base,
const char *name,
const char *display,
110 const char *ai,
const glColour *colour );
const char * faction_getStandingBroad(int f, int bribed, int override)
Gets the broad faction standing.
const char * faction_longname(int f)
Gets the faction's long name (formal, human-readable).
const glColour * faction_reputationColour(int f)
Gets the colour of the faction based on it's standing with the player.
int faction_isPlayerEnemy(int f)
Gets whether or not the player is an enemy of the faction.
int faction_exists(const char *name)
Checks to see if a faction exists by name.
const char * faction_default_ai(int f)
Gets the name of the default AI profile for the faction's pilots.
const int * faction_getEnemies(int f)
Gets the list of enemies of a faction.
int faction_dynAdd(int base, const char *name, const char *display, const char *ai, const glColour *colour)
Dynamically add a faction.
void faction_rmAlly(int f, int o)
Removes an ally from the faction's allies list.
int faction_isKnown(int id)
Is the faction known?
int faction_isFaction(int f)
Checks whether or not a faction is valid.
double faction_reputationDefault(int f)
Gets the player's default standing with a faction.
void faction_updateGlobal(void)
Computes the global faction standing for each of the factions.
const glTexture * faction_logo(int f)
Gets the faction's logo (ideally 256x256).
nlua_env faction_getEquipper(int f)
Gets the equipper state associated to the faction scheduler.
int factions_load(void)
Loads up all the factions from the data file.
void faction_clearEnemy(int f)
Clears all the enemies of a dynamic faction.
void factions_reset(void)
Resets player standing and flags of factions to default.
void faction_rmEnemy(int f, int o)
Removes an enemy from the faction's enemies list.
int faction_isPlayerFriend(int f)
Gets whether or not the player is a friend of the faction.
int areEnemies(int a, int b)
Checks whether two factions are enemies.
void factions_clearDynamic(void)
Clears dynamic factions.
int * faction_getGroup(int which)
Returns an array of faction ids.
const char *const * faction_tags(int f)
Gets the tags the faction has.
double faction_hit(int f, const StarSystem *sys, double mod, const char *source, int single)
Handles a faction hit against a faction and how to apply it.
double faction_hitTest(int f, const StarSystem *sys, double mod, const char *source)
Tests a faction hit to see how much it would apply. Does not actually modify standing.
const char * faction_name(int f)
Gets a factions "real" (internal) name.
const char * faction_shortname(int f)
Gets a factions short name (human-readable).
const char * faction_getStandingText(int f)
Gets the player's standing in human readable form.
int faction_isDynamic(int id)
Is faction dynamic.
void factions_free(void)
Frees the factions.
int areNeutral(int a, int b)
Checks whether two factions are true neutral.
void factions_resetLocal(void)
Reset local standing.
const int * faction_getAllies(int f)
Gets the list of allies of a faction.
void faction_modPlayerRaw(int f, double mod)
Modifies the player's standing without affecting others.
const FactionGenerator * faction_generators(int f)
Gets the faction's generators.
int faction_usesHiddenJumps(int f)
Checks to see if a faction uses hidden jumps.
int * faction_getKnown()
Gets all the known factions in an array (array.h).
int faction_isInvisible(int id)
Is the faction invisible?
const glColour * faction_colour(int f)
Gets the colour of the faction.
const char * faction_getStandingTextAtValue(int f, double value)
Gets the player's standing in human readable form.
void faction_clearAlly(int f)
Clears all the ally of a dynamic faction.
double faction_lane_base_cost(int f)
Gets the faction's weight for patrolled safe-lane construction;.
void faction_modPlayer(int f, double mod, const char *source)
Modifies the player's standing with a faction.
void faction_setReputation(int f, double value)
Sets the player's standing with a faction.
char faction_reputationColourChar(int f)
Gets the faction character associated to its standing with the player.
int * faction_getAll(void)
Returns all faction IDs in an array (array.h).
void faction_modPlayerSingle(int f, double mod, const char *source)
Modifies the player's standing without affecting others.
int faction_setInvisible(int id, int state)
Sets the faction's invisible state.
int faction_setKnown(int id, int state)
Sets the factions known state.
double faction_lane_length_per_presence(int f)
Gets the faction's weight for patrolled safe-lane construction (0 means they don't build lanes).
int * faction_getAllVisible(void)
Returns all non-invisible faction IDs in an array (array.h).
const char * faction_mapname(int f)
Gets the faction's map name (translated).
double faction_reputationMax(int f)
Gets the maximum reputation of a faction.
void faction_addAlly(int f, int o)
Adds an ally to the faction's allies list.
nlua_env faction_getScheduler(int f)
Gets the state associated to the faction scheduler.
double faction_reputation(int f)
Gets the player's standing with a faction.
const char * faction_description(int f)
Gets the faction's description (translated).
void faction_clearKnown()
Clears the known factions.
int faction_isStatic(int id)
Is the faction static?
void faction_addEnemy(int f, int o)
Adds an enemy to the faction's enemies list.
int faction_get(const char *name)
Gets a faction ID by name.
int areAllies(int a, int b)
Checks whether two factions are allies or not.
Abstraction for rendering sprite sheets.