Freeciv-3.2
Loading...
Searching...
No Matches
api_server_counters.c
Go to the documentation of this file.
1/*****************************************************************************
2 Freeciv - Copyright (C) 2023 - The Freeciv Project
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12*****************************************************************************/
13
14#ifdef HAVE_CONFIG_H
15#include <fc_config.h>
16#endif
17
18/* utility */
19#include "fciconv.h"
20
21/* common */
22#include "city.h"
23#include "counters.h"
24#include "name_translation.h"
25
26/* common/scriptcore */
27#include "luascript.h"
28
29/* server */
30#include "cityturn.h"
31
32#include "api_server_counters.h"
33
34
35/**********************************************************************/
39{
41
42 if (CB_USER != c->type) {
43 fc_printf("%s\n", "[CB_USER == c->type] Lua: cannot change non-user counter");
44 return;
45 }
46
48
50}
51
52/**********************************************************************/
56{
58
59 if (CB_USER != c->type) {
60 fc_printf("%s\n", "[CB_USER == c->type] Lua: cannot change non-user counter");
61 return;
62 }
63
65
67}
void api_counter_increase(lua_State *L, Counter *c, City *city)
void api_counter_zero(lua_State *L, Counter *c, City *city)
void city_counters_refresh(struct city *pcity)
Definition cityturn.c:4583
char * incite_cost
Definition comments.c:75
int counter_index(const struct counter *pcount)
Definition counters.c:174
#define fc_printf(...)
Definition fciconv.h:109
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type,...)
Definition luascript.h:138
Definition city.h:320
int * counter_values
Definition city.h:408
enum counter_behaviour type
Definition counters.h:31