Freeciv-3.1
Loading...
Searching...
No Matches
Data Structures | Macros | Enumerations | Functions | Variables
taicity.c File Reference
#include "log.h"
#include "city.h"
#include "game.h"
#include "map.h"
#include "movement.h"
#include "tile.h"
#include "unit.h"
#include "workertask.h"
#include "citytools.h"
#include "autosettlers.h"
#include "infracache.h"
#include "taimsg.h"
#include "taicity.h"

Go to the source code of this file.

Data Structures

struct  tai_worker_task_req
 
struct  tai_tile_state
 

Macros

#define TWMP   100
 

Enumerations

enum  tai_worker_task_limitation { TWTL_CURRENT_UNITS , TWTL_BUILDABLE_UNITS }
 

Functions

static bool tai_city_worker_task_select (struct ai_type *ait, struct player *pplayer, struct city *pcity, struct worker_task *task, enum tai_worker_task_limitation limit)
 
void tai_city_worker_requests_create (struct ai_type *ait, struct player *pplayer, struct city *pcity)
 
static void tai_tile_worker_task_select (struct player *pplayer, struct city *pcity, struct tile *ptile, int cindex, struct unit_list *units, struct worker_task *worked, struct worker_task *unworked, struct tai_tile_state *state, enum tai_worker_task_limitation limit)
 
void tai_req_worker_task_rcv (struct tai_req *req)
 

Variables

static int dummy_wants [U_LAST]
 

Macro Definition Documentation

◆ TWMP

#define TWMP   100

Definition at line 43 of file taicity.c.

Enumeration Type Documentation

◆ tai_worker_task_limitation

Enumerator
TWTL_CURRENT_UNITS 
TWTL_BUILDABLE_UNITS 

Definition at line 51 of file taicity.c.

Function Documentation

◆ tai_city_worker_requests_create()

void tai_city_worker_requests_create ( struct ai_type ait,
struct player pplayer,
struct city pcity 
)

Create worker request for the city. Only tasks that existing units can do are created.

Definition at line 65 of file taicity.c.

Referenced by tai_check_messages().

◆ tai_city_worker_task_select()

static bool tai_city_worker_task_select ( struct ai_type ait,
struct player pplayer,
struct city pcity,
struct worker_task task,
enum tai_worker_task_limitation  limit 
)
static

Select worker task suitable for the city.

Definition at line 391 of file taicity.c.

Referenced by tai_city_worker_requests_create().

◆ tai_req_worker_task_rcv()

void tai_req_worker_task_rcv ( struct tai_req req)

Receive message from thread to main thread.

Definition at line 478 of file taicity.c.

Referenced by tai_refresh().

◆ tai_tile_worker_task_select()

static void tai_tile_worker_task_select ( struct player pplayer,
struct city pcity,
struct tile ptile,
int  cindex,
struct unit_list *  units,
struct worker_task worked,
struct worker_task unworked,
struct tai_tile_state state,
enum tai_worker_task_limitation  limit 
)
static

Select worker task suitable for the tile.

Definition at line 98 of file taicity.c.

Referenced by tai_city_worker_task_select().

Variable Documentation

◆ dummy_wants

int dummy_wants[U_LAST]
static

Definition at line 93 of file taicity.c.

Referenced by tai_city_worker_task_select().