Freeciv-3.2
Loading...
Searching...
No Matches
Functions
cma_core.h File Reference
#include "cm.h"
#include "attribute.h"

Go to the source code of this file.

Functions

void cma_init (void)
 
bool cma_apply_result (struct city *pcity, const struct cm_result *result)
 
void cma_put_city_under_agent (struct city *pcity, const struct cm_parameter *const parameter)
 
void cma_release_city (struct city *pcity)
 
bool cma_is_city_under_agent (const struct city *pcity, struct cm_parameter *parameter)
 
bool cma_get_parameter (enum attr_city attr, int city_id, struct cm_parameter *parameter)
 
void cma_set_parameter (enum attr_city attr, int city_id, const struct cm_parameter *parameter)
 

Function Documentation

◆ cma_apply_result()

bool cma_apply_result ( struct city pcity,
const struct cm_result result 
)

Apply result on server if it's valid

Definition at line 510 of file cma_core.c.

Referenced by run_cma_once_callback().

◆ cma_get_parameter()

bool cma_get_parameter ( enum attr_city  attr,
int  city_id,
struct cm_parameter parameter 
)

Get the parameter.

Don't bother to cm_init_parameter(), since we set all the fields anyway. But leave the comment here so we can find this place when searching for all the creators of a parameter.

Definition at line 575 of file cma_core.c.

Referenced by check_city(), cma_is_city_under_agent(), and cmafec_get_fe_parameter().

◆ cma_init()

void cma_init ( void  )

Initialize city governor code

Definition at line 478 of file cma_core.c.

Referenced by agents_init().

◆ cma_is_city_under_agent()

bool cma_is_city_under_agent ( const struct city pcity,
struct cm_parameter parameter 
)

◆ cma_put_city_under_agent()

void cma_put_city_under_agent ( struct city pcity,
const struct cm_parameter *const  parameter 
)

◆ cma_release_city()

void cma_release_city ( struct city pcity)

◆ cma_set_parameter()

void cma_set_parameter ( enum attr_city  attr,
int  city_id,
const struct cm_parameter parameter 
)

Set attribute block for city from parameter.

Definition at line 624 of file cma_core.c.

Referenced by cma_put_city_under_agent(), and cmafec_set_fe_parameter().