DELTA 19293 15993 3540
SVN  ¡r³yA© G  „g@€‚? J†7€‰C VŒr€†\ N’r€H L“@€‡8 [—2€ƒg Eš>€…& ~2€F Yž{€ƒi******/

#ifndef FC__API_GAME_METHODS_H
#define FC__API_GAME_METHODS_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

/* Building Type */
bool api_methods_building_type_is_wonder(lua_State *L,
                                         lua_State *L,
                                               Building_Type *pbuilding);
bool api_methods_building_type_is_small_wonder(lua_State *L,
                                               Building_Type *pbuilding);
bool api_methods_building_type_is_improvement(lua_State *L,
                                              Building_Type *pbuilding);
const char *api_methods_building_type_rule_name(lua_State *L,
                                                Building_Type *pbuilding);
const char
  *api_methods_building_type_name_translation(lua_State *L,
                                              Building_Type *pbuilding);

/* City */
bool api_methods_city_has_building(lua_State *L, City *pcity,
                                   Building_Type *building);
int api_methods_city_map_sq_radius(lua_State *L, City *pcity);
int api_methods_city_size_get(lua_State *L, City *pcity);
Tile *api_methods_city_tile_get(lua_State *L, City *pcity);

/* Government */
const char *api_methods_government_rule_name(lua_State *L,
                                             Government *pgovernment);
const char *api_methods_government_name_translation(lua_State *L,
                                                    lua_State *L,
                                              Nation_Type *pnation);
const char *api_methods_nation_type_name_translation(lua_State *L,
                                                     Nation_Type *pnation);
const char
  *api_methods_nation_type_plural_translation(lua_State *L,
                                              Nation_Type *pnation);

/* Player */
bool api_methods_player_has_wonder(lua_State *L, Player *pplayer,
                                   Building_Type *building);
int api_methods_player_number(lua_State *L, Player *pplayer);
int api_methods_player_num_cities(lua_State *L, Player *pplayer);
int api_methods_player_num_units(lua_State *L, Player *pplayer);
int api_methods_player_gold(lua_State *L, Player *pplayer);
bool api_methods_player_knows_tech(lua_State *L, Player *pplayer,
                                  lua_State *L,
                                                          lua_State *L,
                                                          Player *pplayer);

/* Tech Type */
const char *api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech);
const char *api_methods_tech_type_name_translation(lua_State *L,
                                                   Tech_Type *ptech);

/* Terrain */
const char *api_methods_terrain_rule_name(lua_State *L, Terrain *pterrain);
const char *api_methods_terrain_name_translation(lua_State *L,
                                                 Terrain *pterrain);

/* Tile */
int api_methods_tile_nat_x(lua_State *L, Tile *ptile);
int api_methods_tile_nat_y(lua_State *L, Tile *ptile);
int api_methods_tile_map_x(lua_State *L, Tile *ptile);
int api_methods_tile_map_y(lua_State *L, Tile *ptile);
City *api_methods_tile_city(lua_State *L, Tile *ptile);
bool api_methods_tile_city_exists_within_max_city_map(lua_State *L,
                                                      bool api_methods_tile_has_base(lua_State *L, Tile *ptile, const char *name);
int api_methods_tile_num_units(lua_State *L, Tile *ptile);
int api_methods_tile_sq_distance(lua_State *L, Tile *ptile1, Tile *ptile2);
int api_methods_private_tile_next_outward_index(lua_State *L, Tile *pstart,
                                                int index, int max_dist);
Tile *api_methods_private_tile_for_outward_index(lua_State *L, Tile *pstart,
                                                lua_State *L,
                                                        Tile *ptile);

/* Unit */
bool api_methods_unit_city_can_be_built_here(lua_State *L, Unit *punit);
Tile *api_methods_unit_tile_get(lua_State *L, Unit * punit);
Direction api_methods_unit_orientation_get(lua_State *L, Unit *punit);

/* Unit Type */
bool api_methods_unit_type_has_flag(lua_State *L, Unit_Type *punit_type,
                                    const char *flag);
bool api_methods_unit_type_has_role(lua_State *L, Unit_Type *punit_type,
                                    const char *role);
bool api_methods_unit_type_can_exist_at_tile(lua_State *L,
                                             lua_State *L,
                                            Unit_Type *punit_type);
const char *api_methods_unit_type_name_translation(lua_State *L,
                                                   lua_State *L, Unit_List_Link *link);
Unit_List_Link *api_methods_unit_list_next_link(lua_State *L,
                                                Unit_List_Link *link);

/* City_List_Link Type */
City *api_methods_city_list_link_data(lua_State *L, City_List_Link *link);
City_List_Link *api_methods_city_list_next_link(lua_State *L,
                                                City_List_Link *link);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__API_GAME_METHODS_H */
ENDREP
DELTA 20274 184 407
SVN  ŒŽ'ƒb G  „g@€ …\ †i€+ ˆj s‰€# D‹W******/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif

/* common */
#include "featured_text.h"

/* common/scriptcore */
#include "luascript.h"***/
void api_notify_embassies_msg(lua_State *L, Player *pplayer, Tile *ptile,
                              int event, const char *message)
{
  LUASCRIPT_CHECK_STATE(L);
***/
void api_notify_event_msg(lua_State *L, Player *pplayer, Tile *ptile,
                          int event, const char *message)
{
  LUASCRIPT_CHECK_STATE(L);
ENDREP
DELTA 20274 619 1269
SVN  Œ#ŒM
 „ œ ˆ!„base.c	\
	api_server_base.h	ENDREP
DELTA 20274 1917 217
SVN  ‡Oˆl
ƒ> G  „g@€ƒ>******/

#ifndef FC__API_SERVER_NOTIFY_H
#define FC__API_SERVER_NOTIFY_H

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

void api_notify_embassies_msg(lua_State *L, Player *pplayer, Tile *ptile,
                              int event, const char *message);
void api_notify_event_msg(lua_State *L, Player *pplayer, Tile *ptile,
                          int event, const char *message);

#endif /* API_SERVER_NOTIFY */

ENDREP
DELTA
SVN   ŸUƒf…A‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@M€HD„Z‚J…K„F…uŠT†D†K†ƒG†…E†4@P ™D‚.ƒD‡0‡G†@P„f…K†CF‡)›G†G„Eƒ2\ˆjLˆOH‡3Eˆa™D‚o™S‰:ŠG‡QFˆaD‚BD1‚`‰TM‰ƒKŠ‰J†‡E‰RR‰:D‰pDŠH“EDTD‰0DˆF‚FŠaP†H‡3„O‰rOŠ*ˆ@S†U†@
‡/EŒBˆ@@‚_‰„@Z‹iˆh‡0Eƒ F‹@Q‡X„Lˆ-G’@@ˆ@@M‰Jss‰Wg”XŠ*Js@`ŠEM”E‘RZ‹*I’n_‹E@]zE‚DˆbH`G‘}DƒQE‚‚DƒZ…@Q‡XLˆOLˆ.H–ƒE—BNˆ@`ˆgW“+M‰tƒF—Av“OD‹x”
G™Q@b•	Jša•vI˜8R‹EF™@m–?E—BS‡2V—%‚F—K‰t@h—GV˜8@G™@šN›!J›</*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif

/* common/scriptc*/"lua_signal.h"api_base Connects a callback func toertain void c(lua_State *L, const char *name)
{
  struct fc_lua *fcl;LUASCRIPT_CHECK_STATE(L);ARG_NIL(L,ng, 3
  fcl = get_fcl!= NULL, "Undefineds!"_(fclTRUE);
}RemoverFALSturns ifboolrgiindexby_int''
 ''ENDREP
DELTA 18976 10799 1133
SVN  Ž)’2…$ M  „fL„ M  ‚Q†€„w „=‰U©*/

*/

$#ifdef HAVE_CONFIG_H
$#include <fc_config.h>
$#endif

/* common/scriptcore */
$#include "luascript_types.h"

/* server/scripting */
$#include "api_fcdb_auth.h"
$#include "api_fcdb_base.h"
$#include "script_fcdb.h"

/* Authentication module. */
module auth {
  const char *api_auth_get_username
    @ get_username(lua_State *L, Connection *pconn);
  const char *api_auth_get_ipaddr
    @ get_ipaddr(lua_State *L, Connection *pconn);
  bool api_auth_set_password
    @ set_password(lua_State *L, Connection *pconn, const char *password);
  const char *api_auth_get_password
    @ get_password(lua_State *L, Connection *pconn);
}
    @ option(lua_State *L, int type);
}
ENDREP
DELTA
SVN   ‹P_„E‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@M¨W…>D…6D…;‡D…~—L…zD…3ŠD†)€AI†Y‘G†n„Eƒ2U‡&L‡ˆE‡‚Q†d††|\‡<„L†iF…V@\†|L‡L†jH‡IˆN†|Y‡#]ˆL‡…E‰`[‰9V‰]NŠ5S…t[†J†U…?D†)/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

#ifndef FC__API_SIGNAL_BASE_H
#define__cplus
extern "C" {
#endif /* /* utility#include "support.h"

struct lua_State;

void api_signal_connect( *L, const char *namecallback);removeboold
by_index int }ENDREP
DELTA 20274 8052 55
SVN  ‹3“/%‹ G  „g@ c…!€K G €‚2 G €‚4 G €‚4 G €ƒcommon/scriptcore */
#include "luascript.h"

#include "api_common_intl.h"

*******
  Translation helper function.
*****************************************************************************/
const char *api_intl__(lua_State *L, const char *untranslated)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");

  return _(untranslated);
}

*******
  Translation helper function.
*****************************************************************************/
const char *api_intl_N_(lua_State *L, const char *untranslated)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");

  return N_(untranslated);
}

*******
  Translation helper function.
*****************************************************************************/
const char *api_intl_Q_(lua_State *L, const char *untranslated)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, untranslated, 2, string, "");

  return Q_(untranslated);
}

*******
  Translation helper function.
*****************************************************************************/
const char *api_intl_PL_(lua_State *L, const char *singular,
                         const char *plural, int n)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, singular, 2, string, "");
  LUASCRIPT_CHECK_ARG_NIL(L, plural, 3, string, "");

  return PL_(singular, plural, n);
}
ENDREP
DELTA 20173 902 8604
SVN  Ú8ã"l«
 G  „g@ …!€C _†4€] ‡X± G  	Š,€B G  €ƒ0 { c <€o ;Ÿ c <€„ „!¤+€ƒ! ‚1ª rÑ!€c „dÒ[ h×<€ ZØ^ G  g­)€l T¯, e°}€‡" G  u·2€ ¹€E zºh€‚ ƒ&¾5¯ JÁ|¨ GÂ`™ F‘@€Z \Æ F‘@€\ P“r€s •+ e–8€‚ ƒ[˜b sÎb€ }Ð'“ F‘@€‚kcommon/scriptcore */
#include "api_game_find.h"
#include "luascriptconsole.h" /* enum rfc_status */
#include "maphand.h"
#include "movement.h"
#include "plrhandscript_server.h"

#include "api_server_edit.h"


***/
bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 2, Tile, FALSE);

  return unleash_barbarians(ptile);
}

***/
void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer,
                              int count, int sq_radius)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 2, Tile);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 3, Player);
  LUASCRIPT_CHECK_ARG(L, 0 <= sq_radius, 5, "radius must be positive");
  LUASCRIPT_CHECK(L, 0 < num_role_units(L_PARTISAN),
                  "no partisans in ruleset");
***/
Unit *api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile,
                           Unit_Type *ptype, int veteran_level,
                           City *homecity, int moves_left)
{
  return api_edit_create_unit_full(L, ***/
Unit *api_edit_create_unit_full(lua_State *L, Player *pplayer, Tile *ptile,
                                Unit_Type *ptype, int veteran_level,
                                City *homecity, int moves_left, int hp_left,
                                Unit *ptransport)
{
  struct fc_lua *fcl;

  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 3, Tile, NULL);

  fcl = luascript_get_fcl(L);

  LUASCRIPT_CHECK(L, fcl != NULL, "Undefined freeciv lua state!"uascript_log(fcl, LOG_ERROR, "create_unit_full: '%s' cannot transport "
                                    "'%s' here",
                    utype_rule_name(unit_type(ptransport)),
                    utype_rule_name(ptype));
      return NULL;
    }
  } else if (!can_exist_at_tile(ptype, ptile)) {
    luascript_log(fcl, LOG_ERROR, "create_unit_full: '%s' cannot exist at "
                                  "tile",***/
bool api_edit_unit_teleport(lua_State *L, Unit *punit, Tile *dest)
{
  bool alive;

  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, punit, 2, Unit, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, dest, 3, Tile, FALSE)***/
void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, punit, 2, Unit);
 
***/
void api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile,
                          const char *name)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 3***/
Player *api_edit_create_player(lua_State *L, const char *username,
                               Nation_Type *pnation)
{
  struct player *pplayer = NULL;
  enum rfc_status status;
  char buf[128] = "";
  struct fc_lua *fcl;

  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, username, 2, string, NULL);

  fcl = luascript_get_fcl(L);

  LUASCRIPT_CHECK(L, fcl != NULL, "Undefined freeciv lua state!", NULL);

  if (game_was_started()) {
    status = create_command_newcomer(username, FC_AI_DEFAULT_NAME,
                                     FALSE, pnation, &pplayer,
                                     buf, sizeof(buf));
  } else {
    status = create_command_pregame(username, FC_AI_DEFAULT_NAME,
                                    FALSE, &pplayer,
                                    buf, sizeof(buf));
  }

  if (strlen(buf) > 0) {
    luascript_log(fcl, LOG_NORMAL, "%s", buf);
  }

  return pplayer;
}

***/
void api_edit_change_gold(lua_State *L, Player *pplayer, int amount)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2***
  Give pplayer technology ptech. Quietly returns A_NONE (zero) if***/
Tech_Type *api_edit_give_technology(lua_State *L, Player *pplayer,
                                    Tech_Type *ptech, const char *reason)
{
  Tech_type_id id;
  Tech_Type *result;

  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2erver_signal_emit("tech_researched", 3,
              API_TYPE_PLAYER, pplayer,
       ***
  Create a new base.
*******/
void api_edit_create_base(lua_State *L, Tile *ptile, const char *name,
                          Player *pplayer)
{
  struct base_type *pbase;

  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 2***
  Global climate change.
*******/
void api_edit_climate_change(lua_State *L, enum climate_change_type type,
                             int effect)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG(L, type == CLIMATE_CHANGE_GLOBAL_WARMING
      2, "invalid climate change type");
  LUASCRIPT_CHECK_ARG(L, effect > 0, 3, "effect must be greater than zero");
***/
Player *api_edit_civil_war(lua_State *L, Player *pplayer, int probability)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player, NULL);
  LUASCRIPT_CHECK_ARG(L, probability >= 0 && probability <= 100,
                      3***/
void api_edit_player_victory(lua_State *L, Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_SELF(L, pplayer);
***
  Move a unit.
*******/
bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile,
                        int movecost)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, punit, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 3, Tile, FALSE);
  LUASCRIPT_CHECK_ARG(L, movecost >= 0, 4, "Negative move cost!", FALSE);

  return unit_move(punit, ptile, movecost);
}
ENDREP
DELTA 13553 364 240
SVN  ‡Y‰H
„ G  „g@€„******/

#ifndef FC__API_COMMON_INTL_H
#define FC__API_COMMON_INTL_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

struct lua_State;

const char *api_intl__(lua_State *L, const char *untranslated);
const char *api_intl_N_(lua_State *L, const char *untranslated);
const char *api_intl_Q_(lua_State *L, const char *untranslated);
const char *api_intl_PL_(lua_State *L, const char *singular,
                         const char *plural, int n);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__API_COMMON_INTL_H */
ENDREP
DELTA 20274 8352 631
SVN  “d•	 G  „g@€) `‡)€`******/

#ifndef FC__API_SERVER_EDIT_H
#define FC__API_SERVER_EDIT_H

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

/* type of clima change */
bool api_edit_unleash_barbarians(lua_State *L, Tile *ptile);
void api_edit_place_partisans(lua_State *L, Tile *ptile, Player *pplayer,
                              int count, int sq_radius);
Unit *api_edit_create_unit(lua_State *L, Player *pplayer, Tile *ptile,
                           Unit_Type *ptype, int veteran_level,
                           City *homecity, int moves_left);
Unit *api_edit_create_unit_full(lua_State *L, Player *pplayer, Tile *ptile,
                                Unit_Type *ptype, int veteran_level,
                                City *homecity, int moves_left, int hp_left,
                                Unit *ptransport);
bool api_edit_unit_teleport(lua_State *L, Unit *punit, Tile *dest);

void api_edit_unit_turn(lua_State *L, Unit *punit, Direction dir);

void api_edit_create_city(lua_State *L, Player *pplayer, Tile *ptile,
                          const char *name);
Player *api_edit_create_player(lua_State *L, const char *username,
                               Nation_Type *pnation);
void api_edit_change_gold(lua_State *L, Player *pplayer, int amount);
Tech_Type *api_edit_give_technology(lua_State *L, Player *pplayer,
                                    Tech_Type *ptech, const char *reason);

void api_edit_create_base(lua_State *L, Tile *ptile, const char *name,
                          struct player *pplayer);

void api_edit_climate_change(lua_State *L, enum climate_change_type type,
                             int effect);
Player *api_edit_civil_war(lua_State *L, Player *pplayer, int probability);


void api_edit_player_victory(lua_State *L, Player *pplayer);
bool api_edit_unit_move(lua_State *L, Unit *punit, Tile *ptile,
                        int movecost);

#endif /* API_SERVER_EDIT_H */
ENDREP
DELTA 20173 9718 2641
SVN  °!¸A«w M  „fL„ M  ‚Q†€† ƒyš€¥a*/

*/

$#ifdef HAVE_CONFIG_H
$#include <fc_config.h>
$#endif

/* common/scriptcore */
$#include "luascript_types.h"

/* server */
$#include "commands.h"
$#include "console.h"

/* server/scripting */
$#include "api_server_edit.h"
$#include "api_server_base.h"
$#include "api_server_notify.h"
$#include "script_server.h"

/* Server module. */
module server {
  int api_server_player_civilization_score
    @ civilization_score (lua_State *L, Player *pplayer);
}

/* Notify module. */
module notify {
  void api_notify_embassies_msg
    @ embassies_msg (lua_State *L, Player *pplayer, Tile *ptile, int event,
                     const char *message);
  void api_notify_event_msg
    @ event_msg (lua_State *L, Player *pplayer, Tile *ptile, int event,
                 const char *message);
}Edit module. */
module edit {
  Unit *api_edit_create_unit
    @ create_unit (lua_State *L, Player *pplayer, Tile *ptile,
                   Unit_Type *ptype, int veteran_level, City *homecity,
                   int moves_left);
  Unit *api_edit_create_unit_full
    @ create_unit_full (lua_State *L, Player *pplayer, Tile *ptile,
                        Unit_Type *ptype, int veteran_level, City *homecity,
                        int moves_left, int hp_left, Unit *ptransport);
  bool api_edit_unit_teleport
    @ unit_teleport(lua_State *L, Unit *self, Tile *dest);
  void api_edit_create_city
    @ create_city (lua_State *L, Player *pplayer, Tile *ptile,
                   const char *name);
  void api_edit_create_base
    @ create_base (lua_State *L, Tile *ptile, const char *name,
                   Player *pplayer);
  Player *api_edit_create_player
    @ create_player(lua_State *L, const char *username, Nation_Type *nation);
  void api_edit_change_gold
    @ change_gold (lua_State *L, Player *pplayer, int amount);
  Tech_Type *api_edit_give_technology
    @ give_technology (lua_State *L, Player *pplayer, Tech_Type *ptech,
                       const char *reason);
  bool api_edit_unleash_barbarians
    @ unleash_barbarians (lua_State *L, Tile *ptile);
  void api_edit_place_partisans
    @ place_partisans (lua_State *L, Tile *ptile, Player *pplayer, int count,
                       int sq_radius);
  enum climate_change_type {
    CLIMATE_CHANGE_GLOBAL_WARMING @ GLOBAL_WARMING,
    CLIMATE_CHANGE_NUCLEAR_WINTER @ NUCLEAR_WINTER
  };
  void api_edit_climate_change
    @ climate_change (lua_State *L, enum climate_change_type type,
                      int effect);
  Player *api_edit_civil_war
    @ civil_war(lua_State *L, Player *pplayer, int probability);
  void api_edit_unit_turn
    @ unit_turn(lua_State *L, Unit *punit, Direction dir);
  void api_edit_player_victory
    @ player_victory (lua_State *L, Player *self);
  bool *api_edit_unit_move
    @ unit_move(lua_State *L, Unit *self, Tile *moveto, int movecost);
}

$[
-- Compatibility functions (function names prior to freeciv 2.4)
function create_unit(player, tile, utype, veteran_level, homecity, moves_left)
  return edit.create_unit(player, tile, utype, veteran_level, homecity,
                          moves_left)
end

function create_unit_full(player, tile, utype, veteran_level, homecity,
                          moves_left, hp_left, transport)
  return edit.create_unit_full(player, tile, utype, veteran_level, homecity,
                               moves_left, hp_left, transport)
end

function create_city(player, tile, name)
  edit.create_city (player, tile, name)
end

function create_base(tile, name, player)
  edit.create_base(tile, name, player)
end

function create_player(username, nation)
  return edit.create_player(username, nation)
end

function change_gold(pplayer, amount)
  edit.change_gold(pplayer, amount)
end

function give_technology(player, tech, reason)
  return edit.give_technology(player, tech, reason)
end

function unleash_barbarians(tile)
  return edit.unleash_barbarians(tile)
end

function place_partisans(tile, player, count, sq_radius)
  edit.place_partisans(tile, player, count, sq_radius)
end

-- Server functions for Player module
function Player:create_unit(tile, utype, veteran_level, homecity, moves_left)
  return edit.create_unit(self, tile, utype, veteran_level, homecity,
                          moves_left)
end

function Player:create_unit_full(tile, utype, veteran_level, homecity,
                                 moves_left, hp_left, ptransport)
  return edit.create_unit_full(self, tile, utype, veteran_level, homecity,
                               moves_left, hp_left, ptransport)
end

function Player:civilization_score()
  return server.civilization_score(self)
end

function Player:create_city(tile, name)
  edit.create_city(self, tile, name)
end

function Player:change_gold(amount)
  edit.change_gold(self, amount)
end

function Player:give_technology(tech, reason)
  edit.give_technologychange_gold(self, tech, reason)
end

function Player:civil_war(probability)
  edit.civil_war(self, probability)
end

function Player:victory()
  edit.player_victory(self)
end

-- Server functions for Unit module
function Unit:teleport(dest)
  return edit.unit_teleport(self, dest)
end

function Unit:turn(direction)
  return edit.unit_turn(self, direction)
end

function Unit:move(moveto, movecost)
  return edit.unit_move(self, moveto, movecost)
end

-- Server functions for Tile module
function Tile:create_base(name, player)
  return edit.create_base(self, name, player)
end

function Tile:unleash_barbarians()
  return edit.unleash_barbarians(self)
end

function Tile:place_partisans(player, count, sq_radius)
  return edit.place_partisans(self, player, count, sq_radius)
end

$]
ENDREP
DELTA 20274 9782 123
SVN  ‹nŠF‚ G  „g@€k …\ ~†s€, iˆk******/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif

/* common/scriptcore */
#include "luascript.h"***/
const char *api_fcdb_option(lua_State *L, enum fcdb_option_type type)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG(L, fcdb_option_type_is_valid(type), 2,
ENDREP
DELTA 20087 107 691
SVN  ßÆ.Ÿq M  „fL ƒd…1€y &Š€‚1 M Ÿ H® ª M  †¥ €ƒ< R³ ± H® €†K a²q¦ H® €…S f–p (¼€ ‚+¿€U _Ái€„  -Æ‘ ÇD‘ ÈQ ZÉ` aË9€‚9 ÖV i×q OØY€l ?Û0 H® €w UÞ0#include "string_vector.h"

/* common/scriptcore */
#include "luascript.h"
#include "luascript_types.h"
#include "tolua_common_a_gen.h"
#include "tolua_common_z_gen.h"

/* server */
#include "console.h"
#include "stdinhand.h"

/* server/scripting */void script_fcdb_functions_define(void);
static bool script_fcdb_functions_check(const char *fcdb_luafile);

static void script_fcdb_cmd_reply(struct fc_lua *fcl, enum log_level level,
                                  const char *format, ...)
            fc__attribute((__format__ (__printf__, 3, 4)));

*
  Lua virtual machine state.
*****/
static struct fc_lua *fcl = NULL;

*/
static void script_fcdb_functions_define(void)
{
  luascript_func_add(fcl, "database_init", TRUE, 0);
  luascript_func_add(fcl, "database_free", TRUE, 0);

  luascript_func_add(fcl, "user_load", TRUE, 1,
                     API_TYPE_CONNECTION);
  luascript_func_add(fcl, "user_save", TRUE, 1,
                     API_TYPE_CONNECTION);
  luascript_func_add(fcl, "user_log", TRUE, 2,
                     API_TYPE_CONNECTION, API_TYPE_BOOL)*
  Check the existence of all needed functions.
*****/
static bool script_fcdb_functions_check(const char *fcdb_luafile)
{
  bool ret = TRUE;
  struct strvec *missing_func_required = strvec_new();
  struct strvec *missing_func_optional = strvec_new();

  if (!luascript_func_check(fcl, missing_func_required,
                            missing_func_optional)) {
    strvec_iterate(missing_func_required, func_name) {
      log_error("Database script '%s' does not define the required function "
                "'%s'.", fcdb_luafile, func_name);
      ret = FALSE;
    } strvec_iterate_end;
    strvec_iterate(missing_func_optional, func_name) {
      log_verbose("Database script '%s' does not define the optional "
                  "function '%s'.", fcdb_luafile, func_name);
    } strvec_iterate_end;
  }

  strvec_destroy(missing_func_required);
  strvec_destroy(missing_func_optional)*
  Send the message via cmd_reply().
*****/
static void script_fcdb_cmd_reply(struct fc_lua *fcl, enum log_level level,
                                  const char *format, ...)
{
  va_list args;
  enum rfc_status rfc_status = C_OK;
  char buf[1024];

  va_start(args, format);
  fc_vsnprintf(buf, sizeof(buf), format, args);
  va_end(args);

  switch (level) {
  case LOG_FATAL:
    /* Special case - will quit the server. */
    log_fatal("%s", buf);
    break;
  case LOG_ERROR:
    rfc_status = C_WARNING;
    break;
  case LOG_NORMAL:
    rfc_status = C_COMMENT;
    break;
  case LOG_VERBOSE:
    rfc_status = C_LOG_BASE;
    break;
  case LOG_DEBUG:
    rfc_status = C_DEBUG;
    break;
  }

  cmd_reply(CMD_FCDB, fcl->caller, rfc_status, "%s", buf);
}*/
bool script_fcdb_init(const char *fcdb_luafile)
{
#ifdef HAVE_FCDB
  if (fcl != NULL) {
    fc_assert_ret_val(fcl->state != NULL, FALSE);
fcl = luascript_new(NULL);
  if (!fcl) {
    luascript_destroy(fcl);
    fcl = NULL;
/* Set the logging output function. */
  fcl->output_fct = script_fcdb_cmd_reply;

  tolua_common_a_open(fcl->state);
  tolua_fcdb_open(fcl->state);
#ifdef HAVE_FCDB_MYSQL
  luaopen_luasql_mysql(fcl->state);
#endif
#ifdef HAVE_FCDB_POSTGRES
  luaopen_luasql_postgres(fcl->state);
#endif
#ifdef HAVE_FCDB_SQLITE3
  luaopen_luasql_sqlite3(fcl->state);
#endif
  tolua_common_z_open(fcl->state);

  luascript_func_init(fcl);

  /* Define the prototypes for the needed lua functions. */
  script_fcdb_functions_define();

  if (luascript_do_file(fclscript_fcdb_free(script_fcdb_free(enum fcdb_status status = FCDB_ERROR; /* Default return value. */
  bool success;
  int ret;

  va_list args;
  va_start(args, nargs);
  success = luascript_func_call_valist(fcl, func_name, &ret, nargs, args);
  va_end(args);

  if (success && fcdb_status_is_valid(ret)) {
    status = (enum fcdb_status) ret;
  }fcl) {
    /* luascript_func_free() is called by luascript_destroy(). */
    luascript_destroy(fcl);
    fcl
  database.
*****/
bool script_fcdb_do_string(const char *str)
{
#ifdef HAVE_FCDB
  int status;

  status = luascript_do_string(fclENDREP
DELTA 18976 4874 650
SVN  †z‡C
‚ G  „g@€‚******/

#ifndef FC__API_FCDB_BASE_H
#define FC__API_FCDB_BASE_H

/* common/scriptcore */
#include "luascript_types.h"

/* server */
#include "fcdb.h"

struct lua_State;

const char *api_fcdb_option(lua_State *L, enum fcdb_option_type type);

#endif /* FC__API_FCDB_BASE_H */

ENDREP
DELTA 18976 80 1641
SVN  œh‹[M M  „fL „(…1 3‹€Mbool script_fcdb_do_string(const char *str);

#endif /* FC__SCRIPT_FCDB_H */
ENDREP
DELTA 20230 222 287
SVN  žLŸ&=‹s M  „fL„ M  ‚Q†€p Tx€‚F z”d› „F–g ›, œJ± N›}€A O›|€†,*/

*/

$#ifdef HAVE_CONFIG_H
$#include <fc_config.h>
$#endif

/* common/scriptcore */
$#include "api_common_intl.h"
$#include "api_common_utilities.h"
$#include "luascript.h"
$#include "luascript_types.h"

/* Classes. */
struct Nonexistent {
}
/* Intl module. */
const char *api_intl__
  @ _ (lua_State *L, const char *untranslated);
const char *api_intl_N_
  @ N_ (lua_State *L, const char *untranslated);
const char *api_intl_Q_
  @ Q_ (lua_State *L, const char *untranslated);
const char *api_intl_PL_
  @ PL_ (lua_State *L, const char *singular, const char *plural,
    @ base (lua_State *L, 
  @ random (lua_State *L, int min, int max);

$[*
-- Dump the state of user scalar variables to a Lua code string*
function _freeciv_state_dump()
  local res = ''

  for k, v in pairs(_G) do
    if k == '_VERSION' then
      -- ignore _VERSION variable.
    elseif type(v) == 'boolean'
        or type(v) == 'number' then
      local rvalue = tostring(v)

      res = res .. k .. '=' .. rvalue .. '\n'
    elseif type(v) == 'string' then
      local rvalue = string.format('%q', v)

      res = res .. k .. '=' .. rvalue .. '\n'
    elseif type(v) == 'userdata' then
      local method = string.lower(tolua.type(v))

      res = res .. k .. '=find.' .. method
      if method == 'city' or method == 'unit' then
        res = res .. '(nil,' .. v.id .. ')'
      elseif v.id then
        res = res .. '(' .. v.id .. ')'
      else
        res = res .. '()'
      end
      res = res .. '\n'
    end
  end

  return res
end

$]
ENDREP
DELTA
SVN   Š(o„J‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@M€HD„Z‚J…K„F…uƒE…i†N…D…{D†K†(‡N†G…tƒP†$D…wF†E†J†ƒG†y„E†6@P †Fƒ‡E‚-E†2ˆE„T†@P„f„K‡FˆL‡E†2EˆƒFˆ¢T‰=ƒD‰UG‰3F‰W„F‡uƒD‰	G‰H‰3„/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif

/* common/scriptc*/"lua.h"serversrv_maining_api_bas
 Returciviliz  (total)playerint __(lua_State *L, P *p)
{
  LUASCRIPT_CHECK_STATE(L, 0);ELF
  rget;
}
ENDREP
DELTA 20286 4571 4498
SVN  Åcò2D´+ ˆb € f‰,› F™@ª …*Š?€‚( SŠ? @:€ƒm WÀ  I“;€ƒi WÀ © F™@€‚ WÀ  ‚&–A© WÀ ¦ F™@ „Ušu© `À ˜ V½=€o WÀ ‰ &ª  …<¨ ]®[ƒ …°=€„` SŠ? 
¹p€1 ˆ]¼?€J WÀ ¬ F™@€p WÀ €8 F™@€ WÀ • F™@€ƒG SŠ?¢ F™@€…Yluascript_func.h"
#include "tolua_common_a_gen.h"
#include "tolua_common_z_gen.h"
#include "tolua_game_gen.h"
#include "tolua_signalLua virtual machine state.
*******/
static struct fc_lua *fcl = NULL;static void script_server_signal_create(void);
static void script_server_functions_define(void);

static void script_server_cmd_reply(struct fc_lua *fcl, enum log_level level,
                                    const char *format, ...)
            fc__attribute((__format__ (__printf__, 3, 4)));int status;
  struct connection *save_caller;
  luascript_log_func_t save_output_fct;

  /* Set a log callback function which allows to send the results of the
   * command to the clients. */
  save_caller = fcl->caller;
  save_output_fct = fcl->output_fct;
  fcl->output_fct = script_server_cmd_reply;
  fcl->caller = caller;

  status = luascript_do_string(fcl, str, "cmd");

  /* Reset the changes. */
  fcl->caller = save_caller;
  fcl->output_fct = save_output_fct;

  return (status == 0int status;
  struct connection *save_caller;
  luascript_log_func_t save_output_fct;

  /* Set a log callback function which allows to send the results of the
   * command to the clients. */
  save_caller = fcl->caller;
  save_output_fct = fcl->output_fct;
  fcl->output_fct = script_server_cmd_reply;
  fcl->caller = caller;

  status = luascript_do_file(fcl, filename);

  /* Reset the changes. */
  fcl->caller = save_caller;
  fcl->output_fct = save_output_fct;

  return (status == 0Invoke the 'callback_name' Lua function.
*******/
bool script_server_callback_invoke(const char *callback_name, int nargs,
                                   enum api_types *parg_types, va_list args)
{
  return luascript_callback_invoke(fcl, callback_name, nargs, parg_types,
                                   argsscript_remove_exported_object(fcl, objectInitialize the game script variables.
script_vars_load(fcl, file, "script.vars"game script variables tostatic void script_server_vars_save(struct section_file *file)
{
  luascript_vars_save(fcl, file, "script.vars"Initializfclif (fcl != NULL) {
    fc_assert_ret_val(fcl->state != NULL, FALSE);

    return TRUE;
  }

  fcl = luascript_new(NULL);
  if (!fcl) {
    luascript_destroy(fcl);
    fcl = NULL;

    return FALSE;
  }

  tolua_common_a_open(fcl->state);
  api_specenum_open(fcl->state);
  tolua_game_open(fcl->state);
  tolua_signal_open(fcl->state);
  tolua_server_open(fcl->state);
  tolua_common_z_open(fcl->state);

  script_server_code_init();
  script_server_vars_init();

  luascript_signal_init(fcl);
  script_server_signal_create();

  luascript_func_init(fcl);
  script_server_functions_define();

  return TRUE;
}if (fcl) {
    script_server_code_free();
    script_server_vars_free();

    /* luascript_signal_free() is called by luascript_destroy(). */
    luascript_destroy(fcl);
    fclluascript_signal_emit_valist(fcl, signal_name, nargs, args);
  va_end(argsDeclare any new signal types you need here.
*******/
static void script_server_signal_create(void)
{
  luascript_signal_create(fcl, "turn_started", 2,
                          API_TYPE_INT, API_TYPE_INT);
  luascript_signal_create(fcl, "unit_moved", 3,
                          API_TYPE_UNIT, API_TYPE_TILE, API_TYPE_TILE);

  /* Includes all newly-built cities. */
  luascript_signal_create(fcl, "city_built", 1,
                          API_TYPE_CITY);

  luascript_signal_create(fcl, "city_growth", 2,
                          API_TYPE_CITY, API_TYPE_INT);

  /* Only includes units built in cities, for now. */
  luascript_signal_create(fcl, "unit_built", 2,
                          API_TYPE_UNIT, API_TYPE_CITY);
  luascript_signal_create(fcl, "building_built", 2,
                          API_TYPE_BUILDING_TYPE, API_TYPE_CITY);

  /* These can happen for various reasons; the third argument gives the
   * reason (a simple string identifier).  Example identifiers:
   * "pop_cost", "need_tech", "need_building", "need_special",
   * "need_terrain", "need_government", "need_nation", "never",
   * "unavailable". */
  luascript_signal_create(fcl, "unit_cant_be_built", 3,
                          API_TYPE_UNIT_TYPE, API_TYPE_CITY, API_TYPE_STRING);
  luascript_signal_create(fcl, "building_cant_be_built", 3,
                          API_TYPE_BUILDING_TYPE, API_TYPE_CITY,
                          API_TYPE_STRING);

  /* The third argument contains the source: "researched", "traded",
   * "stolen", "hut". */
  luascript_signal_create(fcl, "tech_researched", 3,
                          API_TYPE_TECH_TYPE, API_TYPE_PLAYER,
                          API_TYPE_STRING);

  /* First player is city owner, second is enemy. */
  luascript_signal_create(fcl, "city_destroyed", 3,
                          API_TYPE_CITY, API_TYPE_PLAYER, API_TYPE_PLAYER);
  luascript_signal_create(fcl, "city_lost", 3,
                          API_TYPE_CITY, API_TYPE_PLAYER, API_TYPE_PLAYER);

  luascript_signal_create(fcl, "hut_enter", 1,
                          API_TYPE_UNIT);

  luascript_signal_create(fcl, "unit_lost", 3,
                          API_TYPE_UNIT, API_TYPE_PLAYER, API_TYPE_STRINGAdd server callback functions; these must be defined in the lua script
  '<rulesetdir>/script.lua':

  respawn_callback (optional):
    - callback lua function for the respawn command
*******/
static void script_server_functions_define(void)
{
  luascript_func_add(fcl, "respawn_callback", FALSE, 1,
                     API_TYPE_PLAYERCall a lua function.
*******/
bool script_server_call(const char *func_name, int nargs, ...)
{
  bool success;
  int ret;

  va_list args;
  va_start(args, nargs);
  success = luascript_func_call_valist(fcl, func_name, &ret, nargs, args);
  va_end(args);

  if (!success) {
    log_error("Lua function '%s' not defined.", func_name);
    return FALSE;
  } else if (!ret) {
    log_error("Error executing lua function '%s'.", func_name);
    return FALSE;
  }

  return TRUE;
}Send the message via cmd_reply().
*******/
static void script_server_cmd_reply(struct fc_lua *fcl, enum log_level level,
                                    const char *format, ...)
{
  va_list args;
  enum rfc_status rfc_status = C_OK;
  char buf[1024];

  va_start(args, format);
  fc_vsnprintf(buf, sizeof(buf), format, args);
  va_end(args);

  switch (level) {
  case LOG_FATAL:
    /* Special case - will quit the server. */
    log_fatal("%s", buf);
    break;
  case LOG_ERROR:
    rfc_status = C_WARNING;
    break;
  case LOG_NORMAL:
    rfc_status = C_COMMENT;
    break;
  case LOG_VERBOSE:
    rfc_status = C_LOG_BASE;
    break;
  case LOG_DEBUG:
    rfc_status = C_DEBUG;
    break;
  }

  cmd_reply(CMD_LUA, fcl->caller, rfc_status, "%s", buf);
}
ENDREP
DELTA 20087 0 20
SVN  šJ›O ƒ2 M  „fL€z ƒ†g‚ „%‰i€w ‹1Žz¿š8*/
#ifndef FC__LUASCRIPT_TYPES_H
#define FC__LUASCRIPT_TYPES_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* utility */
#include "genlist.h"

/* common */
#include "city.h"
#include "connection.h"
#include "events.h"
#include "fc_type_a are not safe. They
 *       are only used by the API internally.
 *       Separate types makes use from lua type safe.ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__LUAENDREP
DELTA 17103 1386 852
SVN  Š”n/‹ G  „g@€" V†7³ Z‡4€‚K G µ Z‡4€ƒ9 G ³ e‡4€‚C?‰O******/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endif

/* common */
#include "effects.h"

/* common/scriptcore */
#include "luascript.h"

#include "api_game*****
  Returns the effect bonus in the world
*****world_bonus(lua_State *L, const char *effect_type)
{
  enum effect_type etype = EFT_LAST;

  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, effect_type, 2, string, 0);

  etype = effect_type_by_name(effect_type, fc_strcasecmp);
  if (!effect_type_is_valid(etype)) {
    return 0;
  }
  return get_world_bonus(etype);
}

*******
  Returns the effect bonus for a player
*****player_bonus(lua_State *L, Player *pplayer,
                             const char *effect_type)
{
  enum effect_type etype = EFT_LAST;

  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, effect_type, 3, string, 0);

  etype = effect_type_by_name(effect_type, fc_strcasecmp);
  if (!effect_type_is_valid(etype)) {
    return 0;
  }
  return get_player_bonus(pplayer, etype);
}

*******
  Returns the effect bonus at a city.
*****lua_State *L, City *pcity, const char *effect_type)
{
  enum effect_type etype = EFT_LAST;

  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, pcity, 2, City, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, effect_type, 3, string, 0);

  etype = effect_type_by_name(effect_type, fc_strcasecmp);
  if (!effect_type_is_valid(etype)ENDREP
DELTA 20274 11417 132
SVN  ¤!¤>vƒH G  „g@ a…!€ 4‡ ˆF ‚L‰^¸ fŒ`‡ K™ Žy O}¦ xp³ k’  ~“" O•;¢ |“r –‰ —-ˆ G  ™ †š  6° G  ¢8 h£9/lua */
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"

/* common */
#include "events.h"

/* utility */
#include "support*/
#define API_SPECENUM_DEFINE_INDEX(type_name, prefix)  \
  {  \
    const char *_key;  \
    _key = luaL_checkstring(L, 2);  \
    _value = type_name##_by_name(_buf, strcmp);  \
      /* T[_key] = _value */  \
      lua_rawset(L, 1);         \
    } else {  \
    }  \
  }

*/
API_SPECENUM_DEFINE_INDEX(event_type, "E_")

ENDREP
DELTA
SVN   ‡R„'‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@M¨W…>’D„ZF…~œE…r„D‚.ŒFƒ‡D†ˆF†ZE‚-‚D†I†1†E†uƒF†tV…>D†/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

#ifndef FC__API_SERVER_BASE_H
#define
/* common/scriptc*/
#include "lua_types.h"

struct lua_State;Addial methods oserver.int api__player_civiliz_s( *L, P *p);

#endif /*ENDREP
DELTA 19291 145688 3673
SVN  ¿8Év›2 G  „g@ v…!€I G  ~‡ € T¥@ }‰:€i IŠl }Œ2€i Id 	*€ƒ “” r”%© H•@€k ‚m— ™~€a z›, tœ#€| Qª} 
ž-€j }Ÿm  g€D h²| £U€ Yµ<œ e»8€B h²| ¨€ Yµ<¡ e»8€y h²| ®G€ Yµ< °v€. {²i ³a€g yµš e»8€> i²{ ¸{€a wº, }» €; h²|ž H•@€common/scriptcore */
#include "luascript.h"

#include "api_game_find.h"

***/
Player *api_find_player(lua_State *L, int player_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return player_by_number(player***/
City *api_find_city(lua_State *L, Player *pplayer, int city_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Unit *api_find_unit(lua_State *L, Player *pplayer, int unit_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Unit *api_find_transport_unit(lua_State *L, Player *pplayer, Unit_Type *ptype,
                              Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, pplayer, 2, Player, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, ptype, 3, Unit_Type, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 4, Tile, NULL);

  {
    struct unit *ptransport;
    struct unit *pvirt = unit_virtual_createunit_virtual_destroy***
  Return a unit type for given role.
*****/
Unit_Type *api_find_role_unit_type(lua_State *L, const char *role_name,
                                   Player *pplayer)
{
  enum unit_role_id role;

  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, role_name, 2***/
Tile *api_find_tile(lua_State *L, int nat_x, int nat_y)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Tile *api_find_tile_by_index(lua_State *L, int index)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return index_to_tile(index***/
Government *api_find_government(lua_State *L, int government_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Government *api_find_government_by_name(lua_State *L, const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);

  return government***/
Nation_Type *api_find_nation_type(lua_State *L, int nation_type_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return nation_by_number(nation***
  Return the nation type***/
Nation_Type *api_find_nation_type_by_name(lua_State *L, const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);

  return nation***/
Building_Type *api_find_building_type(lua_State *L, int building_type_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return improvement_by_number(building***
  Return the improvement type***/
Building_Type *api_find_building_type_by_name(lua_State *L,
                                              const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);

  return improvement***/
Unit_Type *api_find_unit_type(lua_State *L, int unit_type_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return utype_by_number(unit***/
Unit_Type *api_find_unit_type_by_name(lua_State *L, const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);
***/
Tech_Type *api_find_tech_type(lua_State *L, int tech_type_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***
  Return the tech type***/
Tech_Type *api_find_tech_type_by_name(lua_State *L, const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);

  return advanc***/
Terrain *api_find_terrain(lua_State *L, int terrain_id)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Terrain *api_find_terrain_by_name(lua_State *L, const char *name_orig)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_ARG_NIL(L, name_orig, 2, string, NULL);

  return terrain***
  Return a dummy pointer.
*****/
Nonexistent *api_find_nonexistent(lua_State *L)
{
  static char *p = "";

  LUASCRIPT_CHECK_STATE(L, NULL);

  return p;
}
ENDREP
DELTA 20286 10846 780
SVN  ‹$0r †s €: „†r¸;Ši/* Callback invocation function. */
bool script_server_callback_invoke(const char *callback_name, int nargs,
                                   enum api_types *parg_types, va_list args);/* Functions */
bool script_server_call(const char *funcENDREP
DELTA 20286 11653 385
SVN  Ö`èr‚°< G  „g@‡ M•@ž 1† ‚q‡E IŠ8€L ‹S nŒa€I ‚@Ž? j~€‚_ f“'¢ 4–x” MÆ@¤ ‚R™%€ƒK ^i€Y M•@ pœf ‚UŠ ^œx H T— N˜@ W¢† ¤^ _¥x ‚	¦V ¸€ƒz 0»|€p ¾€x a¿z ¸€H yÈ jÆ#€ƒ. GÃD€o `¿{ jÆ#€N yÈ É€†R <Ïl€A n¿m€C N˜@€„ M•@ yÒ9€b M•@ sÔu€o M•@¸ N˜@€m M•@€b N˜@€„<******/***
  Signals implementation.

  All Lua callback functions can return a value. Example:
    return false

/* common/scriptcore */
#include "luascript.h"
#include "luascript_types                                    \
  LIST_ITERATE_END

static struct signal_callback *signal_callback_new(const char *name);
static void signal_callback_destroy(struct signal_callback *pcallback);
static struct signal *signal_new(int nargs, enum api_types *parg_types);
static void signal_destroy(struct signal *psignal);

/* Signal datastructure. /* Signal callback datastructure. *
  Signal hash tabl***/
#define SPECHASH_TAG luascript_#define signal_hash_iterate(phash, key, data)                                \
  TYPED_HASH_ITERATE(char *, struct signal *, phash, key, data)
#define signal_hash_iterate_end                                              \
  HASH_ITERATE_END

/* get 'struct luascript_signal_name_list' and related functions: */
#define SPECLIST_TAG luascript_signal_name
#define SPECLIST_TYPE char
#include "speclist.h"

#define luascript_signal_name_list_iterate(list, pname)luascript_signal_name_list_iterate_end                               \
  LIST_ITERATE_END*
  Free a*
  Create a new signal
    =***/
void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name,
                                  int nargs, va_list args)
{
  struct signal *psignal;

  fc_assert_ret(fcl);
  fc_assert_ret(fcl->signals);

  if (luascript_signal_hash_lookup(fcl->signals, signal_name, &psignal)) {
    if (psignal->nargs != nargs) {
      luascript_log(fcl, LOG_ERROR, "Signal \"%s\" requires %d args but was "
                                    "passed %d on invoke.", signal_name,
                   luascript_callback_invoke(fcl, pcallback->name, nargs,
                                      psignal->arg_types,uascript_log(fcl, LOG_ERROR, "Signal \"%s\" does not exist, so cannot "
                                  "be invoked.",***/
void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name,
                           int nargs, ...)
{
  va_list args;

  va_start(args, nargs);
  luascript_signal_emit_valist(fcl, ***/
void luascript_signal_create_valist(struct fc_lua *fcl,
                                    const char *signal_name,
                                    int nargs, va_list args)
{
  struct signal *psignal;

  fc_assert_ret(fcl);
  fc_assert_ret(fcl->signals);

  if (luascript_signal_hash_lookup(fcl->signals, signal_name, &psignal)) {
    luascript_log(fcl, LOG_ERROR, "Signal \"%s\" was already created.",
                 luascript_signal_hash_insert(fcl->signals, signal_name,
                                 signal_new(nargs, parg_types));
    /* FIXME: cast of 'const char *' to 'char *'. */
    luascript_signal_name_list_append(fcl->signal_names, (char *)***/
void luascript_signal_create(struct fc_lua *fcl, const char *signal_name,
                             int nargs, ...)
{
  va_list args;

  va_start(args, nargs);
  luascript_signal_create_valist(fcl, ***/
void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name,
                               const char *callback_name, bool create)
{
  struct signal *psignal;
  struct signal_callback *pcallback_found = NULL;

  fc_assert_ret(fcl != NULL);
  fc_assert_ret(fcl->signals != NULL);

  if (luascript_signal_hash_lookup(fcl->signals, signal_name, &psignal)) {
    /* check for a duplicate callback */
    signal_callback_list_iterate(psignal->callbacks, pcallback) {
      if (!strcmp(pcallback->name, callback_name)) {
        pcallback_found = pcallback;
        break;
      }
    } signal_callback_list_iterate_end;

    if (create) {
      if (pcallback_found) {
        luascript_error(fcl->state, "Signal \"%s\" already has a callback "
                                    "called \"%s\".", signal_name,
                       if (pcallback_found) {
        signal_callback_list_remove(psignal->callbacks, pcallback_found);
      }
    }
  } else {
    luascript_error(fcl->state, "Signal \"%s\" does not exist.",
      ***
  Returns if a callback function to a certain signal is defined*/
bool luascript_signal_callback_defined(struct fc_lua *fcl,
                                       const char *signal_name,
                                       const char *callback_name)
{
  struct signal *psignal;

  fc_assert_ret_val(fcl != NULL, FALSE);
  fc_assert_ret_val(fcl->signals != NULL, FALSE);

  if (luascript_signal_hash_lookup(fcl->signals, signal_name, &psignal)) {
    /* check for a duplicate callback */
    signal_callback_list_iterate(psignal->callbacks, pcallback) {
      if (!strcmp(pcallback->name, callback_name)) {
        return TRUE;
      }
    } signal_callback_list_iterate_end;
  }

  return FALSE;
}***/
void luascript_signal_init(struct fc_lua *fcl)
{
  fc_assert_ret(fcl != NULL);

  if (NULL == fcl->signals) {
    fcl->signals = luascript_signal_hash_new();
    fcl->signal_names = luascript_signal_name_list_new();
  }
}***/
void luascript_signal_free(struct fc_lua *fcl)
{
  if (NULL != fcl && NULL != fcl->signals) {
    luascript_signal_hash_destroy(fcl->signals);

    luascript_signal_name_list_destroy(fcl->signal_names);

    fcl->signals = NULL;
  }
}***
  Return the name of the signal with the given index*/
const char *luascript_signal_by_index(struct fc_lua *fcl, int index)
{
  fc_assert_ret_val(fcl != NULL, NULL);
  fc_assert_ret_val(fcl->signal_names != NULL, NULL);

  return luascript_signal_name_list_get(fcl->signal_names, index);
}***
  Return the name of the 'index' callback function of the signal with the
  name 'signal_name'*/
const char *luascript_signal_callback_by_index(struct fc_lua *fcl,
                                               const char *signal_name,
                                               int index)
{
  struct signal *psignal;

  fc_assert_ret_val(fcl != NULL, NULL);
  fc_assert_ret_val(fcl->signals != NULL, NULL);

  if (luascript_signal_hash_lookup(fcl->signals, signal_name, &psignal)) {
    struct signal_callback *pcallback
      = signal_callback_list_get(psignal->callbacks, index);
    if (pcallback) {
      return pcallback->name;
    }
  }

  return NULL;
}
ENDREP
DELTA 17103 2251 619
SVN  †A‰i„: G  „g@€„:†@******/

#ifndef FC__API_GAME_EFFECTS_H
#define FC__API_GAME_EFFECTS_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

int api_effects_world_bonus(lua_State *L, const char *effect_type);
int api_effects_player_bonus(lua_State *L, Player *pplayer,
                             const char *effect_type);
int api_effects_city_bonus(lua_State *L, City *pcity,
                           const char *effect_type);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* API_GAME_EFFECTS */ENDREP
DELTA 18539 2365 595
SVN  †:‡>
‚ G  „g@€‚******/
#ifndef FC__API_GAME_SPECENUM_H
#define FC__API_GAME_SPECENUM_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

struct lua_State;

int api_specenum_open(lua_State *L);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__API_GAME_SPECENUM_H */
ENDREP
DELTA 18975 4493 5732
SVN  õ1¤Y‚{ÃS M  „fL¦ X…T€f OÛ@ \ˆ?€G OÛ@ …‹= ƒ? f“P ‚%•5€G ƒi—R d›:€  Š ˆž€d iÏ. §3 ƒ¨>­ @ˆ  T¬5 ® ƒ?¯£ @ˆ  ƒ³8£ @ˆ  b·$ ƒ&ég« @ˆ  ‚ív° @ˆ €S RÛ= YØœ ‚Ú  CÜ <ÝP¤ @ˆ €„t RÛ=± @ˆ €‚r RÛ= @ˆ €ƒ W² ³ @ˆ €c SÛ<³ @ˆ €ƒ
 W² § @ˆ €F ‚6»Š $½HŠ /¾mŠ VÀŠ Át€Q @ˆ €‚2 RÛ= ƒ:Æ	€†[ tÏ# Ð€‚I sÓ; zÔ-€‚Q OÛ@­ @ˆ €ˆ# RÛ= hß€d Já@© Iâ?€†W W²   @ˆ €„p X±¢ @ˆ €‚R*/

#ifdef HAVE_CONFIG_H
#include <fc_common/scriptcore */
#include "luascript_func.h"
#include "luascript_signal.h"

#include "luascript.h"*/
#define LUASCRIPT_MAX_EXECUTION_TIME_SEC 5.0
#define LUASCRIPT_CHECKINTERVAL 10000

/* The name used for the freeciv lua struct saved in the lua state. */
#define LUASCRIPT_GLOBAL_VAR_NAME "__fcl"int luascript_report(struct fc_lua *fcl, int status, const char *code);*/
static int luascript_report(struct fc_lua *fcl, int status, const char *code)
{
  fc_assert_ret_val(fcl, -1);
  fc_assert_ret_val(fcl->statefcl->stateuascript_log(fcl, LOG_ERROR, "%s", astr_str(&str));

    astr_free(&str);

    lua_pop(fcl->state, 1*
  Push the traceback function to the stack
*
  Setup function execution guard
*
  Clear function execution guard
*
  Remove global symbols from lua state L
*
  Internal api error function - varg version.
*************/
int luascript_error(lua_State *L, const char *format, ...)
{
  va_list vargs;
  int ret;

  va_start(vargs, format);
  ret = luascript_error_vargs(L, format, vargs);
  va_end(vargs);

  return ret*/
int luascript_error_vargs*
  Initialize the scripting state.
*************/
struct fc_lua *luascript_new(luascript_log_func_t output_fct)
{
  struct fc_lua *fcl = fc_calloc(1, sizeof(*fcl));

  fcl->state = lua_open();
  if (!fcl->state) {
    return NULL;
  }
  fcl->output_fct = output_fct;
  fcl->caller = NULL;

  luascript_openlibs(fcl->state, luascript_lualibs);
  luascript_traceback_func_save(fcl->state);
  luascript_blacklist(fcl->state, luascript_unsafe_symbols);

  /* Save the freeciv lua struct in the lua state. */
  lua_pushstring(fcl->state, LUASCRIPT_GLOBAL_VAR_NAME);
  lua_pushlightuserdata(fcl->state, fcl);
  lua_settable(fcl->state, LUA_REGISTRYINDEX);

  return fcl*
  Get the freeciv lua struct from a lua state.
*************/
struct fc_lua *luascript_get_fcl(lua_State *L)
{
  struct fc_lua *fcl;

  fc_assert_ret_val(L, NULL);

  /* Get the freeciv lua struct from the lua state. */
  lua_pushstring(L, LUASCRIPT_GLOBAL_VAR_NAME);
  lua_gettable(L, LUA_REGISTRYINDEX);
  fcl = lua_touserdata(L, -1);

  /* This is an error! */
  fc_assert_ret_val(fcl != NULL, NULL);

  return fcl*
  Free the scripting data.
*************/
void luascript_destroy(struct fc_lua *fcl)
{
  if (fcl) {
    fc_assert_ret(fcl->caller == NULL);

    /* Free function data. */
    luascript_func_free(fcl);

    /* Free signal data. */
    luascript_signal_free(fcl);

    /* Free lua state. */
    if (fcl->state) {
      lua_gc(fcl->state, LUA_GCCOLLECT, 0); /* Collected garbage */
      lua_close(fcl->state);
    }
    free(fcl*
  Print a message to the selected output handle.
*************/
void luascript_log(struct fc_lua *fcl, enum log_level level,
                   const char *format, ...)
{
  va_list args;

  va_start(args, format);
  luascript_log_vargs(fcl, level, format, args);
  va_end(args*
  Print a message to the selected output handle.
*************/
void luascript_log_vargs(struct fc_lua *fcl, enum log_level level,
                         const char *format, va_list args)
{
  char buf[1024];

  fc_assert_ret(fcl);
  fc_assert_ret(0 <= level && level <= LOG_DEBUG);

  fc_vsnprintf(buf, sizeof(buf), format, args);

  if (fcl->output_fct) {
    fcl->output_fct(fcl, level, "%s", buf);
  } else {
    log_base(level, "%s", buf*
  Push arguments into the Lua stack.
*************/
void luascript_push_args(struct fc_lua *fcl, int nargs,
                         enum api_types *parg_types, va_list args)
{
  int i;

  fc_assert_ret(fcl);
  fc_assert_ret(fcl->statefcl->statefcl->statefcl->statefcl->state***
  Return if the function 'funcname' is define in the lua state 'fcl->state'.
*************/
bool luascript_check_function(struct fc_lua *fcl, const char *funcname)
{
  bool defined;

  fc_assert_ret_val(fcl, FALSE);
  fc_assert_ret_val(fcl->state, FALSE);

  lua_getglobal(fcl->state, funcname);
  defined = lua_isfunction(fcl->state, -1);
  lua_pop(fcl->state, 1);

  return defined*/
int luascript_call(struct fc_lua *fcl, int narg, int nret, const char *code)
{
  int status;
  int base;          /* Index of function to call */
  int traceback = 0; /* Index of traceback function  */

  fc_assert_ret_val(fcl, -1);
  fc_assert_ret_val(fcl->state, -1);

  base = lua_gettop(fcl->state) - narg;

  /* Find the traceback function, if available */
  luascript_traceback_func_push(fcl->state);
  if (lua_isfunction(fcl->state, -1)) {
    lua_insert(fcl->state, base);  /* insert traceback before function */
    traceback = base;
  } else {
    lua_pop(fcl->state, 1);   /* pop non-function traceback */
  }

  luascript_hook_start(fcl->state);
  status = lua_pcall(fcl->state, narg, nret, traceback);
  luascript_hook_end(fcl->state);

  if (status) {
    luascript_report(fcl, status, code);
  }

  if (traceback) {
    lua_remove(fcl->state*/
int luascript_do_string(struct fc_lua *fcl, const char *str, const char *name)
{
  int status;

  fc_assert_ret_val(fcl, -1);
  fc_assert_ret_val(fcl->state, -1);

  status = luaL_loadbuffer(fcl->state, str, strlen(str), name);
  if (status) {
    luascript_report(fcl, status, str);
  } else {
    status = luascript_call(fcl*/
int luascript_do_file(struct fc_lua *fcl, const char *filename)
{
  int status;

  fc_assert_ret_val(fcl, -1);
  fc_assert_ret_val(fcl->state, -1);

  status = luaL_loadfile(fcl->state, filename);
  if (status) {
    luascript_report(fcl, status, NULL);
  } else {
    status = luascript_call(fcl, 0, 0, NULL);
  }
  return status;
}
*
  Invoke the 'callback_name' Lua function.
*************/
bool luascript_callback_invoke(struct fc_lua *fcl, const char *callback_name,
                               int nargs, enum api_types *parg_types,
                               va_list args)
{
  bool stop_emission = FALSE;

  fc_assert_ret_val(fcl, FALSE);
  fc_assert_ret_val(fcl->state, FALSE);

  /* The function name */
  lua_getglobal(fcl->state, callback_name);

  if (!lua_isfunction(fcl->state, -1)) {
    luascript_log(fcl, LOG_ERROR, "lua error: Unknown callback '%s'",
                  callback_name);
    lua_pop(fcl->state, 1);
    return FALSE;
  }

  luascript_log(fcl, LOG_DEBUG, "lua callback: '%s'", callback_name);

  luascript_push_args(fcl, nargs, parg_types, args);

  /* Call the function with nargs arguments, return 1 results */
  if (luascript_call(fcl, nargs, 1, NULL)) {
    return FALSE;
  }

  /* Shall we stop the emission of this signal? */
  if (lua_isboolean(fcl->state, -1)) {
    stop_emission = lua_toboolean(fcl->state, -1);
  }
  lua_pop(fcl->state, 1);   /* pop return value */

  return stop_emission*/
void luascript_remove_exported_object(struct fc_lua *fcl, void *object)
{
  if (fcl && fcl->state tolua_release(..) in src/lib/tolua_map.cfcl->state,"tolua_ubox");
    /* stack: ubox */
    lua_rawget(fcl->state, LUA_REGISTRYINDEX);
    /* stack: ubox u */
    lua_pushlightuserdata(fcl->state, object);
    /* stack: ubox ubox[u] */
    lua_rawget(fcl->state, -2);

    if (!lua_isnil(fcl->state, -1)) {
      fc_assert(object == tolua_tousertype(fcl->state, -1, NULL));
      /* Change API type to 'Nonexistent' */
      /* stack: ubox ubox[u] mt */
      tolua_getmetatable(fcl->state, "Nonexistent");
      lua_setmetatable(fcl->state, -2);
      /* Set the userdata payload to NULL */
      *((void **)lua_touserdata(fcl->state, -1)) = NULL;
      /* Remove from ubox */
      /* stack: ubox ubox[u] u */
      lua_pushlightuserdata(fcl->state, object);
      /* stack: ubox ubox[u] u nil */
      lua_pushnil(fcl->state);
      lua_rawset(fcl->state, -4);
    }
    lua_pop(fcl->state, 2*
  Save lua variables to file.
*************/
void luascript_vars_save(struct fc_lua *fcl, struct section_file *file,
                         const char *section)
{
  fc_assert_ret(file);
  fc_assert_ret(fcl);
  fc_assert_ret(fcl->state);

  lua_getglobal(fcl->state, "_freeciv_state_dump");
  if (luascript_call(fcl, 0, 1, NULL) == 0) {
    const char *vars;

    vars = lua_tostring(fcl->state, -1);
    lua_pop(fcl->state, 1);

    if (vars) {
      secfile_insert_str_noescape(file, vars, "%s", section);
    }
  } else {
    /* _freeciv_state_dump in tolua_game.pkg is busted */
    luascript_log(fcl, LOG_ERROR, "lua error: Failed to dump variables*
  Load lua variables from file.
*************/
void luascript_vars_load(struct fc_lua *fcl, struct section_file *file,
                         const char *section)
{
  const char *vars;

  fc_assert_ret(file);
  fc_assert_ret(fcl);
  fc_assert_ret(fcl->state);

  vars = secfile_lookup_str_default(file, "", "%s", section);
  luascript_do_string(fcl, vars, section);
}
ENDREP
DELTA 20274 12243 30
SVN  “yh G  „g@€ƒ[ c‡=€Š******/

#ifndef FC__API_GAME_FIND_H
#define FC__API_GAME_FIND_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* dependencies/lua */
#include "lua.h"

/* common/scriptcore */
#include "luascript_types.h"

/* Object find module. */
Player *api_find_player(lua_State *L, int player_id);

City *api_find_city(lua_State *L, Player *pplayer, int city_id);

Unit *api_find_unit(lua_State *L, Player *pplayer, int unit_id);
Unit *api_find_transport_unit(lua_State *L, lua_State *L, int nat_x, int nat_y);
Tile *api_find_tile_by_index(lua_State *L, int index);

Government *api_find_government(lua_State *L, int government_id);
Government *api_find_government_by_name(lua_State *L, const char *name_orig);

Nation_Type *api_find_nation_type(lua_State *L, int nation_type_id);
Nation_Type *api_find_nation_type_by_name(lua_State *L,
                                          const char *name_orig);
Building_Type *api_find_building_type(lua_State *L, int building_type_id);
Building_Type *api_find_building_type_by_name(lua_State *L,
                                              const char *name_orig);
Unit_Type *api_find_unit_type(lua_State *L, int unit_type_id);
Unit_Type *api_find_unit_type_by_name(lua_State *L, const char *name_orig);
Unit_Type *api_find_role_unit_type(lua_State *L, const char *role_name,
                                   Player *pplayer);
Tech_Type *api_find_tech_type(lua_State *L, int tech_type_id);
Tech_Type *api_find_tech_type_by_name(lua_State *L, const char *name_orig);

Terrain *api_find_terrain(lua_State *L, int terrain_id);
Terrain *api_find_terrain_by_name(lua_State *L, const char *name_orig);

Nonexistent *api_find_nonexistent(lua_State *L);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* API_GAME_FIND */

ENDREP
DELTA 20286 13216 520
SVN  ‰m‘!
‹s G  „g@€‹s******/
#ifndef FC__LUASCRIPT_SIGNAL_H
#define FC__LUASCRIPT_SIGNAL_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* utility */
#include "support.h"

struct fc_lua;

void luascript_signal_init(struct fc_lua *fcl);
void luascript_signal_free(struct fc_lua *fcl);

void luascript_signal_emit_valist(struct fc_lua *fcl, const char *signal_name,
                                  int nargs, va_list args);
void luascript_signal_emit(struct fc_lua *fcl, const char *signal_name,
                           int nargs, ...);
void luascript_signal_create_valist(struct fc_lua *fcl,
                                    const char *signal_name, int nargs,
                                    va_list args);
void luascript_signal_create(struct fc_lua *fcl, const char *signal_name,
                             int nargs, ...);
void luascript_signal_callback(struct fc_lua *fcl, const char *signal_name,
                               const char *callback_name, bool create);
bool luascript_signal_callback_defined(struct fc_lua *fcl,
                                       const char *signal_name,
                                       const char *callback_name);

const char *luascript_signal_by_index(struct fc_lua *fcl, int index);
const char *luascript_signal_callback_by_index(struct fc_lua *fcl,
                                               const char *signal_name,
                                               int index);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__LUASCRIPT_SIGNAL_H */
ENDREP
DELTA 20274 12302 34
SVN  ‘w”dI† G  „g@ …!¨ =†˜ AŠ@€ 1ˆš AŠ@€ Rˆ’ G œ AŠ@€9 =Ž2— AŠ@€ Rˆ“common/scriptcore */
#include "luascript***
  Get the username.
************/
const char *api_auth_get_username(lua_State *L, Connection *pconn)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ***
  Get the ip address.
************/
const char *api_auth_get_ipaddr(lua_State *L, Connection *pconn)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ipaddr(pconn);
}

*******
  Set the password.
************/
bool api_auth_set_password(lua_State *L, Connection *pconn,
                           const char *password)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ***
  Get the password
************/
const char *api_auth_get_password(lua_State *L, Connection *pconn)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, password(pconn);
}
ENDREP
DELTA 20274 12536 2505
SVN  ¡M¯B9£t M  „fL€‰T yŒl€Œ) m‘vŸ {–d€…/ w–h€{ m–r€} hŸ)€‚F nœ>€k*/
#ifndef FC__LUASCRIPT_H
#define FC__LUASCRIPT_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* dependencies/tolua */
#include "tolua.h"

/* utility */
#include "log.h"
#include "support.h"            /* fc__attribute() */

/* common/scriptcore */
#include "luascript_types.h"
#include "luascript_func.h"
#include "luascript_signal.h"

struct section_file;
struct luascript_func_hash;
struct luascript_signal_hash;
struct luascript_signal_name_list;
struct connection;
struct fc_lua;

typedef void (*luascript_log_func_t) (struct fc_lua *fcl,
                                      enum log_level level,
                                      const char *format, ...)
             fc__attribute((__format__ (__printf__, 3, 4)));

struct fc_lua {
  lua_State *state;

  luascript_log_func_t output_fct;
  /* This is needed for server 'lua' and 'luafile' commands. */
  struct connection *caller;

  struct luascript_func_hash *funcs;

  struct luascript_signal_hash *signals;
  struct luascript_signal_name_list *signal_names;
};

/* Error functions for lua scripts. */
int luascript_error(lua_State *L, const char *format, ...)
                    fc__attribute((__format__ (__printf__, 2, 3)));
int luascript_error_vargsCreate / destroy a freeciv lua instance. */
struct fc_lua *luascript_new(luascript_log_func_t outputfct);
struct fc_lua *luascript_get_fcl(lua_State *L);
void luascript_destroy(struct fc_lua *fcl);

void luascript_log(struct fc_lua *fcl, enum log_level level,
                   const char *format, ...)
                   fc__attribute((__format__ (__printf__, 3, 4)));
void luascript_log_vargs(struct fc_lua *fcl, enum log_level level,
                         const char *format, va_list args);

void luascript_push_args(struct fc_lua *fcl, int nargs,
                         enum api_types *parg_types, va_list args);
bool luascript_check_function(struct fc_lua *fcl, const char *funcname);

int luascript_call(struct fc_lua *fcl, int narg, int nret, const char *code);
int luascript_do_string(struct fc_lua *fcl, const char *str,
                        const char *name);
int luascript_do_file(struct fc_lua *fcl, const char *filename);

/* Callback invocation function. */
bool luascript_callback_invoke(struct fc_lua *fcl, const char *callback_name,
                               int nargs, enum api_types *parg_types,
                               va_list args);

void luascript_remove_exported_object(struct fc_lua *fcl, void *object);

/* Load / save variables. */
void luascript_vars_save(struct fc_lua *fcl, struct section_file *file,
                         const char *section);
void luascript_vars_load(struct fc_lua *fcl, struct section_file *file,
                         const char *section);


/* Returns additional arguments on failure. */
#define LUALUASCRIPT_ASSERT(L, check, ...)luascript_error(L, "in %s() [%s::%d]: the assertion '%s' failed.",       \
                    __FUNCTION__, __FILE__, __LINE__, #check);               \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }
#else
#define LUASCRIPT_ASSERT(check, ...)
#endif

#define LUASCRIPT_CHECK_STATE(L, ...)                                        \
  if (!L) {                                                                  \
    log_error("No lua state available");                                     \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }

/* script_error on failed check */
#define LUASCRIPT_CHECK(L, check, msg, ...)luascript_error(L, msg);                                                 \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }

/* script_arg_error on failed check */
#define LUASCRIPT_CHECK_ARG(L, check, narg, msg, ...)luascript_arg_error(L, narg, msg);                                       \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }

/* script_arg_error on nil value */
#define LUASCRIPT_CHECK_ARG_NIL(L, value, narg, type, ...)luascript_arg_error(L, narg, "got 'nil', '" #type "' expected");         \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }

/* script_arg_error on nil value. The first argument is the lua state and the
 * second is the pointer to self. */
#define LUASCRIPT_CHECK_SELF(L, value, ...)         luascript_arg_error(L, 2, "got 'nil' for self");                         \
    return LUASCRIPT_ASSERT_CAT(, __VA_ARGS__);                              \
  }

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__LUASCRIPT_H */
ENDREP
DELTA 20274 15071 9742
SVN  ëôF‚(¯k M  „fL„ M  ‚Q†€R ~‰€ˆf kŠ?€‚ RŒ}€b %ŽŽ e:€| [3€‚Z r’m€= ×T‚ g”n€‚+ l—:€f Q˜p€ B…@ ši oœ€6 ožnŽ Ÿ]€} ¡?€ g£(Ž ¤€z ^¥s€x Y§-€ mÃ2€s Z©g€ _«$€ aØ_ j¬~Ž _­hŽ y®GŽ [¯@Ž |°€q ±lŽ U²o€„8 L¶pŽ L¸<€L Zº*€‚& N¼rŽ b½@€ƒ' GÀ>€‚v ‚-Ù„ B…@ Å5 ˆ7ÆH wÎ~ ‡ÏtŒ B…@ äz …æ */

*/

$#ifdef HAVE_CONFIG_H
$#include <fc_config.h>
$#endif

/* common/scriptcore */$#include "luascript_types.h"

/* Classes. */
struct Player {
  const char *name;
  Nation_Type *nation;
  bool ai_controlled;
};

struct City {
  const char *name;
  Player *owner;
  Player *original;
  Tile *tile; /* Depreciated! Use city:tile() to access the city tile. */
  int size;   /* Depreciated! Use city:size() to access the city size. */

  const int id;
};

struct Connection {
  const int id;
};

struct Unit {
  Unit_Type *utype;
  Player *owner;

  /* This used to be @ homecity_id, but it does not work with toluaxx. */
  int homecity;
  Tile *tile; /* Depreciated! Use unit:tile() to access the unit tile. */

  const int id;
};

struct Tile {
  Terrain *terrain;

  const int index @ id;
};

struct Government {
  const int item_number @ id;
};

struct Nation_Type {
  const int item_number @ id;
};

struct Building_Type {
  int build_cost;

  const int item_number @ id;
};

struct Unit_Type {
  int build_cost;

  const int item_number @ id;
};

struct Tech_Type {
  const int item_number @ id;
};

struct Terrain {
  const int item_number @ id;
};

struct Unit_List_Link {
};

struct City_List_Link {
};lua_State *L, Player *self);
  }

  int api_methods_player_num_cities
    @ num_cities (lua_State *L, Player *self);
  int api_methods_player_num_units
    @ num_units (lua_State *L, Player *self);
  bool api_methods_player_has_wonder
    @ has_wonder (lua_State *L, lua_State *L, Player *self);
  bool api_methods_player_knows_tech
    @ knows_tech (lua_State *L, lua_State *L, lua_State *L, Player *self);
  }
}

$[

-- Player methods
function Player:is_human()
  return not self.ai_controlled
end

$]lua_State *L, City *self, Building_Type *building);
  int api_methods_city_map_sq_radius
    @ map_sq_radius(lua_State *L, City *self);
  int api_methods_city_size_get
    @ size(lua_State *L, City *self);
  Tile *api_methods_city_tile_get
    @ tile(lua_State *L, City *self);
}

$[

-- City methods.
function City:exists()
  return true
end

$]lua_State *L, Unit *self);
  Tile *api_methods_unit_tile_get
    @ tile(lua_State *L, Unit *self);
  Direction api_methods_unit_orientation_get
    @ facing(lua_State *L, Unit *self);
}

$[$]lua_State *L, Tile *self);
    int api_methods_tile_nat_y
      @ nat_y (lua_State *L, Tile *self);
    int api_methods_tile_map_x
      @ x (lua_State *L, Tile *self);
    int api_methods_tile_map_y
      @ y (lua_State *L, Tile *self);
  }

  City *api_methods_tile_city
    @ city (lua_State *L, lua_State *L, Tile *self, bool center);
  bool api_methods_tile_has_base
    @ has_base(lua_State *L, lua_State *L, Tile *self);
  int api_methods_tile_sq_distance
    @ sq_distance (lua_State *L, Tile *self, Tile *other);
}

$[

-- lua_State *L, Tile *pcenter, int index,
                            int max_dist);
    Tile *api_methods_private_tile_for_outward_index
      @ tile_for_outward_index (lua_State *L, lua_State *L, lua_State *L, Government *self);
  const char *api_methods_government_name_translation
    @ name_translation (lua_State *L, lua_State *L, Nation_Type *self);
  const char *api_methods_nation_type_name_translation
    @ name_translation (lua_State *L, lua_State *L, lua_State *L, Building_Type *self);
  bool api_methods_building_type_is_great_wonder
    @ is_great_wonder (lua_State *L, lua_State *L, Building_Type *self);
  bool api_methods_building_type_is_improvement
    @ is_improvement (lua_State *L, lua_State *L, Building_Type *self);
  const char *api_methods_building_type_name_translation
    @ name_translation (lua_State *L, Building_Type *self$]

/* Module Unit_Type. */
module Unit_Type {
  bool api_methods_unit_type_has_flag
    @ has_flag (lua_State *L, lua_State *L, Unit_Type *self, const char *role);
  const char *api_methods_unit_type_rule_name
    @ rule_name (lua_State *L, lua_State *L, Unit_Type *self);
  bool api_methods_unit_type_can_exist_at_tile
    @ can_exist_at_tile(lua_State *L, Unit_Type *self, Tile *ptile);
}

$[lua_State *L, lua_State *L, lua_State *L, lua_State *L, lua_State *L, Unit_List_Link *self);
  Unit_List_Link *api_methods_unit_list_next_link
    @ next (lua_State *L, lua_State *L, lua_State *L, City_List_Link *self);
}

/* Module find. */
module find {
  Player *api_find_player
    @ player (lua_State *L, int player_id);
  City *api_find_city
    @ city (lua_State *L, Player *pplayer, int city_id);
  Unit *api_find_unit
    @ unit (lua_State *L, Player *pplayer, int unit_id);
  Unit *api_find_transport_unit
    @ transport_unit (lua_State *L, Player *pplayer, Unit_Type *ptype,
                      Tile *ptile);
  Tile *api_find_tile
    @ tile (lua_State *L, int nat_x, int nat_y);
  Tile *api_find_tile_by_index
    @ tile (lua_State *L, lua_State *L, lua_State *L, int government_id);
  Nation_Type *api_find_nation_type_by_name
    @ nation_type (lua_State *L, const char *name_orig);
  Nation_Type *api_find_nation_type
    @ nation_type (lua_State *L, lua_State *L, const char *name_orig);
  Building_Type *api_find_building_type
    @ building_type (lua_State *L, int building_type_id);
  Unit_Type *api_find_unit_type_by_name
    @ unit_type (lua_State *L, const char *name_orig);
  Unit_Type *api_find_unit_type
    @ unit_type (lua_State *L, lua_State *L, lua_State *L, const char *name_orig);
  Tech_Type *api_find_tech_type
    @ tech_type (lua_State *L, int tech_type_id);
  Terrain *api_find_terrain_by_name
    @ terrain (lua_State *L, const char *name_orig);
  Terrain *api_find_terrain
    @ terrain (lua_State *L, int terrain_id);
  Nonexistent *api_find_nonexistent
    @ nonexistent (lua_State *L);
}

module E {
  /* Notify events module is exported by api_specenum */
    @ world_bonus (lua_State *L, const char *effect_type);
  int api_effects_player_bonus
    @ player_bonus (lua_State *L, Player *pplayer, const char *effect_type);
  int api_effects_city_bonus
    @ city_bonus (lua_State *L, City *pcity, const char *effect_type);
}

/* Direction module */
module direction {
 Direction api_utilities_str2dir
   @ str2dir (lua_State *L, 
-- 

$]

$[
-- ENDREP
DELTA 20274 24840 64
SVN  Ž0‘c#…O †% « o† €	 ‚=ˆ{€‚( G ¸ H‰@€;4|/* common/scriptcore */
#include "luascriptlua_State *L, int min, int max)
{
  double roll;

  LUASCRIPT_CHECK_STATE(L, 0);

  roll = ((double) (fc_rand(MAX_UINT32) % MAX_UINT32) /lua_State *L, int level, const char *message)
{
  struct fc_lua *fcl;

  LUASCRIPT_CHECK_STATE(L);
  LUASCRIPT_CHECK_ARG_NIL(L, message, 3, string);

  fcl = luascript_get_fcl(L);

  LUASCRIPT_CHECK(L, fcl != NULL, "Undefined freeciv lua state!");

  luascript_log(fcl, level, "%s", message);
}

****
  Convert text describing direction into direction
**/
Direction api_utilities_str2dir(lua_State *L, const char *dir)
{
  LUASCRIPT_CHECK_STATE(L, direction8_invalid());
  LUASCRIPT_CHECK_ARG_NIL(L, dir, 2, string, direction8_invalid());
ENDREP
DELTA 18977 1295 701
SVN  ˆˆwƒ= G  „g@€ƒ=ˆ ******/

#ifndef FC__API_FCDB_AUTH_H
#define FC__API_FCDB_AUTH_H

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

const char *api_auth_get_username(lua_State *L, Connection *pconn);

const char *api_auth_get_ipaddr(lua_State *L, Connection *pconn);

bool api_auth_set_password(lua_State *L, Connection *pconn, const char *pass);
const char *api_auth_get_password(lua_State *L, Connection *pconn);

#endif /* FC__API_FCDBENDREP
DELTA
SVN   ŽW‚m…;‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@Mƒ@P §E„1…H`ˆD‚.ƒD‰Dƒ(Gƒ[ƒD„	GQG‚;EƒPFƒ„D†5„J‚eƒE$‹K†%I†CE†3Dƒ(ƒD‡ŒE‚@R„e•DˆXœD…5D†_‹D„Z‚Kˆn“L‰'ƒF‰†D‰BD‰E‰8DC„D‰$F‰oF‰7ŠK‰3„GƒGŠŽDŠ)‚D†(ƒG‰7E‡WEŠ#JŠ\LŠ@ˆEŠR‚SŠ	…E„5ƒF‹@TŠ1„LŠ‡G‹GŒ@RŠ1E‰cF‰{„L‰uD EŠLŠ@L‰3‡G‹GŠOŠ1„E3E‹ WIŠsU0IygŠ1MT‚/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

 ADVERTISEMENT: do not attempt to chang nameAPI funcs.
ey *must*compatible betwemins
  smajo Ifreally likea,surto keep alsoold one running$#ifdef HAVE_CONFIG_Hnclude <fc_config.h>
$#endifmon/scriptc*/"api_signal_base.h"lua_typesSule.  {
  void conn @ (lua_State *L,str *callback);remov @ booldefined}Mfindy_indexint }
ENDREP
DELTA
SVN   ÊJŽ*Š(‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@MµD…5H…N…E…^—J…j‡N†ƒD†$D…‡N†D1‰H†8ŽD„ZP†F†qQ†$F†q†E†8T‡„E†8ŽN‡>‚D‡HEƒ2dˆˆF‡)†F‡)‚H‡P…E‡oˆW‡XD‡H‚D‡OT‡Z„M‡xNˆ„DbDƒD‚.DH‡}D†{JˆO‰6G‰A†D`‘F‰dPˆ9IˆJE‰CHŠGˆBšO‡^RŠ^RŠ^„F‹W‡XV‹“[Š}„M‹o„]‹‚OŒ‚[Š}„M‹oDWŠ}E‹5EŒzLˆbL†JƒD‹sF‡/GŠ`N‡>E‹sŽD‹s†Yˆ„D‹‚H‹ŠF‹‚K}iS„aˆDŽ!QŽ+„D†;@NJ‰OEŠ`D‚.@Q„e@‡QD‰%\ˆo”G‰D‰‚E‰‚I‰\J‰-J’=Eˆ‚G‰mJ’=IˆJƒJˆIE’;†F’?ƒ@S7E‚@loˆ]E‘~„P’vE‰$ER•#D’r‚L•:@V“$„D•ƒJ‰OD‚$FŠ`…DMD„a‚G“G„2‡I‰OE–OƒGƒG—FeH‡}D<‚O—$F‚Rƒ@Q„eE‡xO\…HˆnƒE†‚Fƒ1W˜[G‰ˆU—&x˜WH—QF•G‡xˆE’;D‹{D˜TG–vD’rU™q‚D‰PJš‚b[Lš$F‡oƒH•4D• J‡ E˜?E‡GD‚.FšJšhH•4^’Eš6E•8Q™rT\†Vš[iˆLœ?F‰Mš.HšuO’@J›&E˜q†D†V™K›D’rD5†fœxH—QU&Hœ\F™bE–wF2D•VeŽXL“ƒ@V“$…J‰[I‰PƒH‚:@Q„eEˆ]O\ƒD‹{ƒT˜D†G‹jœY‡x„D :DŠHc‘|R™lDš[RšKš[Fš5D• q›gHœKH•4J‡ ƒFšH‰Q’EƒT˜WN(M:Zˆ9F’F’&G¡I’,JˆJG1F‹DšmF’„D›O)DˆGœ[D„U‹H‰mƒJ›&‚K£P†D¡"„F¡ƒG1GžI’H‡pJ‡}G¡MˆIO¢JJf‚D™vMš[F¢:H‰D¥@kžW@hŸO@D >Z¡	ƒF•L¡#E¥>ˆG¤yEˆE¥wZ %N›K‡|G¡I¨Y‚DŽyE¤y@W•dE‚DWS@R„dT  E•<R˜EJ•‡K¡zQ¢HJfHˆgM¡zF›QHš&‡@Z¥xD$„FªF‰‹DŠƒJª@qªD#Y«Q¡l‚F«|J¢L«qG®/G•5„FŠaDW…F£UD„UDWG¬vD†I­F‰dO«oT«DD‡t@[¥wD–CM¯ „E¤.F–qE‰YD“ŽEnI­I“F¬f…I_‚DwH‚kˆD£`DŠDWL¯T«?D£`‚I±,‰E‹D…B@e—[ƒ@R 7E¤.F°G}¡F³7F™bƒD®X‚D‚‚D 8G°2E‰eE‡xH°mIž{™nD‡QušOšy@V¢M±D¢x‚D¬s‹IœzZ¶HƒD(D¶4‚D´‚E£Q'G“IžEž‚M°PE¥kF´'‹O´vL¤Kµ5ƒL›I´|‚I¢FK• RœoE·!W‰MD°O‚D–}‚D°8ˆI¯a¢M‡O±ƒS¶yF·9‚Gœ G´~I¥Y·K• F’eG’kyµvG‡}„E©f¶>Dƒ7D¢|DŠ ‚DºID‰VE¶r_£G¥pG¹xL¨VW·
J‡ „D¤uF¨{H¥,O’wI©F·E°MªDƒQF»zJŠD©
E“ˆGŠ#N¢
E±ML»v‚G®L„K®QF°nƒM±G‡H¯J´2I™hF¼D˜@E¼%L–jI½3G¢
ƒFŠ	X·wHž	D½w‚V½}L¹NW¹8F½NƒM½]F´'O»]M¢YŠF¼!Hº;G°>D¶2f¶>L–jM¶xE¼GJ·^F°GI®-G•5G³=E’OI·G¼IG°m@V“$m°@a±@E >X³9W¨/N´+^¨DJ´2[²SR¨|F³@^©@gÀCF¼J‚FbU¸4@d—[‚I—2j >t¡/@j´Sd£W·
L“J¸D“$/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/

#ifdef HAVE_CONFIG_H
#include <fc_config.h>
#endifstdar
/* dependencies/lua */"lua.h"libutilityng_vectorcommon/scriptc_typesfuncstatic struct  *_new(bool required, int nargsenum api *parg);void destroy(p);{
  ;/* iunc numberarguments to pass; /
};

#define SPECHASH_TAGKEY_TYPE char *DATAVAL genhash_str_valCOMPcompPYpyFREEpec_keys_iterate(p, key)\
  D_S_ITERATE(, _end_END Create a newi
 = fc_malloc(sizeof(  ->= = = return;
}aif () }
)Testalls. Iff (value FALSE),missingslis''
 al'checkfc_fcstrvec *t = TRUEfc_assert_ret(->s
 ame!lookup&vec_ap(} else}retAdd a(va)addist const va_logLOG_ERROR, "F'%s' was already cd."cstrdi(i = 0; i <i++*(+ i) =arg(intin...va_start,vafcl &&  = NULLIalizures neededsavs !/* Dproto.Ca; aned ('retval').succesopExample  'user_load()':("", 1, APINECTION, pconn);all*-1;-1indeLdoot exist, ""sobeok/*lua_getglob_is-1usisan errorUnknown%s'po1!s %dedpushs1 result1,== 0Sful_istopopVERBOSE, "o'%d' (-1 mean)tRifisENDREP
DELTA 10395 5793 584
SVN  †'‰ 
ƒr G  „g@€ƒr******/

#ifndef FC__API_COMMON_UTILITIES_H
#define FC__API_COMMON_UTILITIES_H

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

/* common/scriptcore */
#include "luascript_types.h"

struct lua_State;

int api_utilities_random(lua_State *L, int min, int max);

Direction api_utilities_str2dir(lua_State *L, const char *dir);

void api_utilities_log_base(lua_State *L, int level, const char *message);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* FC__API_COMMON_UTILITIES_H */
ENDREP
DELTA 20274 25798 85
SVN  žOž\+\ M  „fL„ M  ‚Q†€y B…@€J B…@ ‘O‹• B…@ 5*/

*/

$#ifdef HAVE_CONFIG_H
$#include <fc_config.h>
$#endif

/* common/scriptcore */
$#include "luascript_types.h"

$[

-- *********
-- API Types Special Methods
-- check also luascript_types.h
-- *
-- API Lockdown
-- ENDREP
DELTA 20274 25913 862
SVN  œ9Á4„tÙv G  „g@ ƒ7…! vˆU€Q nŠ8 |‹#€‚  QÎ@© Sˆx€] tr xc€} QÎ@ s“=€] z•# y–€‚ R’}§ K‰ €‚ |›` zœY€	 ‚ž%€~ \Î@“ Nˆ€ e¢} p£_€X {¥@ v¦8€f ¨&– [®€t RÎ? |«r€a ­` ~®\€‚ R’}§ K‰ €‚ |³jš K‰ €+ QÎ@­ Lˆ€ y¸Y¬ Lˆ€ x»œ K‰ €( P‚> {¾7€q 3À@ zÁp€} `»5¯ K‰ €f yÆ= oÇ3€> QÎ@ uÉt€ R’}¢ K‰ € uÎ¨ K‰ €W ‚Ðm€c ‚Ó3€c ‚Õ€ QÎ@­ Lˆ€1 QÎ@¥ K‰ €! QÎ@ Þ/€‚' à Pâ€ }ä¤ K‰ €# X»=­ K‰ €\ vê+ ;ë€‚ „Xî^ ó3€‚p ‚nö³ K‰ €q R’}© K‰ € ‚ý]€  QÎ@š K‰ €R X‚6¨ Lˆ€‚ ….“ †C¨ Lˆ€‚ ‰qº g†j¹ Lˆ€m U‹v€t ‘ ^‘ €S uw ui€a }’R‘ Y˜8€ s”u 	š@€- s—7 j˜'€; QÎ@ 	š@€T***/
bool api_methods_building_type_is_wonder(lua_State *L,
                                         Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pbuilding, FALSE);
***/
bool api_methods_building_type_is_great_wonder(lua_State *L,
                                               Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pbuilding, FALSE);

  return is_great_wonder(pbuilding***
  Return TRUE if pbuilding is a small***/
bool api_methods_building_type_is_small_wonder(lua_State *L,
                                               Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pbuilding, FALSE);
***/
bool api_methods_building_type_is_improvement(lua_State *L,
                                              Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pbuilding, FALSE);

  return is_improvement(pbuilding***/
const char *api_methods_building_type_rule_name(lua_State *L,
                                                Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pbuilding, NULL);
***/
const char
  *api_methods_building_type_name_translation(lua_State *L,
                                              Building_Type *pbuilding)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pbuilding, NULL);

  return improvement_name_translation(pbuilding***
  Return TRUE iff city has building***/
bool api_methods_city_has_building(lua_State *L, City *pcity,
                                   Building_Type *building)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pcity, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, building, 3, Building_Type, FALSE);
***/
int api_methods_city_map_sq_radius(lua_State *L, City *pcity)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, pcity, 0);
lua_State *L, City *pcity)
{
  LUASCRIPT_CHECK_STATE(L, 1);
  LUASCRIPT_CHECK_SELF(L, pcity, 1);

  return city_size_get(pcityhe tile of the cityTile *api_methods_city_tile_get(lua_State *L, City *pcity)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pcity, NULL);
***/
const char *api_methods_government_rule_name(lua_State *L,
                                             Government *pgovernment)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pgovernment, NULL);
***/
const char *api_methods_government_name_translation(lua_State *L,
                                                    Government *pgovernment)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pgovernment, NULL);
***
  Return rule name***/
const char *api_methods_nation_type_rule_name(lua_State *L,
                                              Nation_Type *pnation)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pnation, NULL);

  return nation_rule_name(pnatio***/
const char *api_methods_nation_type_name_translation(lua_State *L,
                                                     Nation_Type *pnation)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pnation, NULL);
***/
const char *api_methods_nation_type_plural_translation(lua_State *L,
                                                       Nation_Type *pnation)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pnation, NULL);

  return nation_plural_translation(pnation***
  Return TRUE iff player has wonder***/
bool api_methods_player_has_wonder(lua_State *L, Player *pplayer,
                                   Building_Type *building)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pplayer, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, building, 3, Building_Type, FALSE);
***
  Return player number***/
int api_methods_player_number(lua_State *L, Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, -1);
  LUASCRIPT_CHECK_SELF(L, pplayer, -1);

  return player_number(pplayer***
  Return the number of cities pplayer has***/
int api_methods_player_num_cities(lua_State *L, Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, pplayer, 0);
***
  Return the number of units pplayer has***/
int api_methods_player_num_units(lua_State *L, Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, pplayer, 0);
***
  Return gold for Player***/
int api_methods_player_gold(lua_State *L, Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, pplayer, 0);

  return pplayer->economic.gold***/
bool api_methods_player_knows_tech(lua_State *L, Player *pplayer,
                                   Tech_Type *ptech)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, pplayer, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, ptech, 3***/
Unit_List_Link *api_methods_private_player_unit_list_head(lua_State *L,
                                                          Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pplayer, NULL);
  return unit_list_head***
  Return list head for city list for Player***/
City_List_Link *api_methods_private_player_city_list_head(lua_State *L,
                                                          Player *pplayer)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pplayer, NULL);
***/
const char *api_methods_tech_type_rule_name(lua_State *L, Tech_Type *ptech)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ptech, NULL);

  return advance_rule_name(ptech***/
const char *api_methods_tech_type_name_translation(lua_State *L,
                                                   Tech_Type *ptech)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ptech, NULL);

  return advance_name_translation(ptech***
  Return rule name for Terrain***/
const char *api_methods_terrain_rule_name(lua_State *L, Terrain *pterrain)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pterrain, NULL);
***
  Return translated name for Terrain***/
const char *api_methods_terrain_name_translation(lua_State *L,
                                                 Terrain *pterrain)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pterrain, NULL);
lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, -1);
  LUASCRIPT_CHECK_SELF(L, ptile, -1);
lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, -1);
  LUASCRIPT_CHECK_SELF(L, ptile, -1);
lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, -1);
  LUASCRIPT_CHECK_SELF(L, ptile, -1);

  return index_to_map_pos_x(tile_index(ptile)***
  Return the map y coordinate of the tile***/
int api_methods_tile_map_y(lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, -1);
  LUASCRIPT_CHECK_SELF(L, ptile, -1);

  return index_to_map_pos_y(tile_index(ptile)***
  Return City on ptile, else NULL***/
City *api_methods_tile_city(lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ptile, NULL);

  return tile_city(ptile***/
bool api_methods_tile_city_exists_within_max_city_map(lua_State *L,
                                                      Tile *ptile,
                                                      bool may_be_on_center)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, ptile, FALSE);
***/
bool api_methods_tile_has_base(lua_State *L, Tile *ptile, const char *name)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, ptile, FALSE);
***
  Return number of units on tile***/
int api_methods_tile_num_units(lua_State *L, Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, ptile, 0);

  return unit_list_size(ptile***
  Return list head for unit list for Tile***/
Unit_List_Link *api_methods_private_tile_unit_list_head(lua_State *L,
                                                        Tile *ptile)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, ptile, NULL);
***/
int api_methods_private_tile_next_outward_index(lua_State *L, Tile *pstart,
                                                int index, int max_dist)
{
  int dx, dy;
  int newx, newy;
  int startx, starty;

  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, ***/
Tile *api_methods_private_tile_for_outward_index(lua_State *L, Tile *pstart,
                                                 int index)
{
  int newx, newy;

  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, pstart, NULL);
  LUASCRIPT_CHECK_ARG(L, index >= 0
                         && index < map.num_iterate_outwards_indices, 3,
                     ***
  Return squared distance between tiles 1 and 2***/
int api_methods_tile_sq_distance(lua_State *L, Tile *ptile1, Tile *ptile2)
{
  LUASCRIPT_CHECK_STATE(L, 0);
  LUASCRIPT_CHECK_SELF(L, ptile1, 0);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile2, 3, Tile, 0);

  return sq_map_distance(ptile1, ptile2***
  Can punit found a city on its tile?***/
bool api_methods_unit_city_can_be_built_here(lua_State *L, Unit *punit)
{
  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, punit, FALSE);
lua_State *L, Unit *punit)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, punit, NULL);

  return unit_tile(punit***
  Get unit orientation***/
Direction api_methods_unit_orientation_get(lua_State *L, Unit *punit)
{
  LUASCRIPT_CHECK_STATE(L, direction8_invalid());
  LUASCRIPT_CHECK_ARG_NIL(L, punit, 2, Unit, direction8_invalid());

  return punit***
  Return TRUE if punit_type has flag***/
bool api_methods_unit_type_has_flag(lua_State *L, Unit_Type *punit_type,
                                    const char *flag)
{
  enum unit_flag_id id;

  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, punit_type, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, flag, 3luascript_error(L, ***
  Return TRUE if punit_type has role***/
bool api_methods_unit_type_has_role(lua_State *L, Unit_Type *punit_type,
                                    const char *role)
{
  enum unit_role_id id;

  LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, punit_type, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, role, 3luascript_error(L, "Unit role \"%s\" does not exist", role***
  Return TRUE iff the unit type can exist on the tile***/
bool api_methods_unit_type_can_exist_at_tile(lua_State *L,
                                             LUASCRIPT_CHECK_STATE(L, FALSE);
  LUASCRIPT_CHECK_SELF(L, punit_type, FALSE);
  LUASCRIPT_CHECK_ARG_NIL(L, ptile, 3***
  Return rule***/
const char *api_methods_unit_type_rule_name(lua_State *L,
                                            Unit_Type *punit_type)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, punit_type, NULL);
***/
const char *api_methods_unit_type_name_translation(lua_State *L,
                                                   Unit_Type *punit_type)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
  LUASCRIPT_CHECK_SELF(L, punit_type, NULL);
***
  Return Unit***/
Unit *api_methods_unit_list_link_data(lua_State *L,
                                      Unit_List_Link *link)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
Unit_List_Link *api_methods_unit_list_next_link(lua_State *L,
                                                Unit_List_Link *link)
{
  LUASCRIPT_CHECK_STATE(L, NULL);
***/
City *api_methods_city_list_link_data(lua_State *L,
                                      City_List_Link *link)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return city_list_link_data(link***/
City_List_Link *api_methods_city_list_next_link(lua_State *L,
                                                City_List_Link *link)
{
  LUASCRIPT_CHECK_STATE(L, NULL);

  return city_list_link_next(link);
}
ENDREP
DELTA
SVN   Ž$‚„r‚@L¤IO€OD•EVŸDu†EIDWDP‚G¥D$„D‚.D‡J‚8‚TJ/„E‚‰DMD¥Fƒ“DD‚E¥DƒD[hEAŒ@M¦V…=D…5D…:‡D…{—L…wD†&¿M†O‡U†^DV†w…P†c…S†wEƒ2W‡lG†OF†mˆx‡hF‚RX‡	‰T†vŽE†n„\‡hE‰NE‡<Iˆ D‰D‰hZˆh@D‰	Z‰T…V‡;ƒ@R‰E‰b‡\‰aXŠx@E‰	X‹cFŠrUŒ	‚Iˆj‰	DS…q[†J†T…>D†&/*
 Freeciv - Copyright (C) 2005 - TheProject
   This program is free software; you can redistribute it and/or modifyit under the terms ofGNU General Public License as pshed b S Foundation; either version 2, or (atr op)any lat.
d inhope thatwill be useful,but WITHOUT ANY WARRANTY; without eveimplied warranty ofMERCHANTABILITYFITNESS FOR A PARTICULAR PURPOSE.  Seefre details.
/
#ifndef FC__LUASCRIPT_FUNC_H
#define__cplus
extern "C" {
#endif /* */

/* utility#include "support.h"

struct fc_lua;

void luascript_func_init( *fcl);
boolcheckstrvec *missingrequiredaadd_valis, const char *name int nargs, va_ ...);all*retvalis}ENDREP
DELTA 20276 0 764
SVN  ŽT‘~&ƒG „` €n I„|¦ R†?§ …>¦ „ˆ$€% ‚Œ5€Aapi_signal_base.c	\
	api_signal_base.h	\
	luascript.c		\
	luascript.h		\
	luascript_func.c	\
	luascript_func.h	\
	tolua_signal_gen.c	\
	tolua_signal		\
	tolua_signal.pkg

BUILT_SOURCES = 	\
	tolua_signal_gen.c	\
	tolua_signaltolua_signal_gen.c tolua_signal_gen.h: tolua_signal.pkg
	$(TOLUA) -n signal -o $(srcdir)/tolua_signal_gen.c \
	-H $(srcdir)/tolua_signal_gen.h $(srcdir)/tolua_signal \
	$(srcdir)/tolua_signal_gen.c \
	$(srcdir)/tolua_signal_gen.h
ENDREP
id: 75k.5ck.r20287/98822
type: file
count: 0
text: 20287 41949 721 978 2eed0e79be3603d68fbfc0121c9ca63a
cpath: /trunk/server/scripting/api_server_base.h
copyroot: 15280 /trunk

id: 329.5ih.r20287/98999
type: file
pred: 329.5ih.r20286/35920
count: 11
text: 20287 46479 270 1712 87f4f6e5e6299bcfb575a63fe00190cc
props: 10460 1480 110 0 2a94ed7a58fe1feebaea27ee0c48460d
cpath: /trunk/server/scripting/script_server.h
copyroot: 20274 /trunk/server/scripting/script_server.h

id: 6l9.5ck.r20287/99293
type: file
pred: 6l9.5ck.r20274/27576
count: 4
text: 20287 7730 713 2354 cbfb09df6ecbd7ac2523f4146612ab41
cpath: /trunk/server/scripting/tolua_fcdb.pkg
copyroot: 15280 /trunk

id: 32c.5ic.r20287/99494
type: file
pred: 32c.5ic.r20286/36214
count: 36
text: 20287 10788 5763 12706 994e04cbbc021933507289d3a4f6e7c7
props: 10755 32706 110 0 fdfdab56f53d2388a66f6a5ce0985f95
cpath: /trunk/server/scripting/api_server_edit.c
copyroot: 20274 /trunk/server/scripting/api_server_edit.c

id: 6la.5i8.r20287/99795
type: file
pred: 6la.5i8.r20274/29024
count: 3
text: 20287 66724 875 2660 a0b9aadc28ac643aa1f7904f8ef526af
cpath: /trunk/server/scripting/api_fcdb_auth.c
copyroot: 20274 /trunk/server/scripting/api_fcdb_auth.c

id: 32d.5id.r20287/100031
type: file
pred: 32d.5id.r20274/29711
count: 13
text: 20287 17166 1958 2711 9c7c145dd36520fc3cf74231f3925c09
props: 10395 6390 110 0 94a2a96823d3c54fff31bdd51de17982
cpath: /trunk/server/scripting/api_server_edit.h
copyroot: 20274 /trunk/server/scripting/api_server_edit.h

id: 74d.5ck.r20287/100331
type: file
pred: 74d.5ck.r20274/29509
count: 2
text: 20287 19152 5662 7233 8c3c91780fb726e37c781d5f66745f14
cpath: /trunk/server/scripting/tolua_server.pkg
copyroot: 15280 /trunk

id: 6lb.5i9.r20287/100537
type: file
pred: 6lb.5i9.r20274/30587
count: 2
text: 20287 79578 470 1143 4703909a09d37253d1905db94c4bf401
cpath: /trunk/server/scripting/api_fcdb_auth.h
copyroot: 20274 /trunk/server/scripting/api_fcdb_auth.h

id: 6l5.5ia.r20287/100774
type: file
pred: 6l5.5ia.r20274/27778
count: 3
text: 20287 24843 316 1350 64c495c53eda280e752cefa0d89f2c32
cpath: /trunk/server/scripting/api_fcdb_base.c
copyroot: 20274 /trunk/server/scripting/api_fcdb_base.c

id: 6l7.5ck.r20287/101011
type: file
pred: 6l7.5ck.r20274/28009
count: 6
text: 20287 25187 4248 9006 b9580ba2ff04e0291e10858598f7978a
cpath: /trunk/server/scripting/script_fcdb.c
copyroot: 15280 /trunk

id: 6l6.5ib.r20287/101214
type: file
pred: 6l6.5ib.r20274/28502
count: 2
text: 20287 29462 299 963 1504bfdb3688edeb52f967d07b16e108
cpath: /trunk/server/scripting/api_fcdb_base.h
copyroot: 20274 /trunk/server/scripting/api_fcdb_base.h

id: 325.5ie.r20287/101450
type: file
pred: 325.5ie.r20274/28731
count: 9
text: 20287 5381 533 1800 4389841926a144e2820095e666c870da
props: 10928 4110 110 0 dce24d5ac3f5e86568d59a55fa196991
cpath: /trunk/server/scripting/api_server_notify.c
copyroot: 20274 /trunk/server/scripting/api_server_notify.c

id: 6l8.5ck.r20287/101751
type: file
pred: 6l8.5ck.r19220/20598
count: 2
text: 20287 29789 107 1499 ed10851714552da5550e770f37177541
cpath: /trunk/server/scripting/script_fcdb.h
copyroot: 15280 /trunk

id: 31z.5ck.r20287/101953
type: file
pred: 31z.5ck.r20274/29255
count: 21
text: 20287 5941 49 1613 fad9e65fa109297a6f2fe075c2f2c2ea
props: 10655 62 110 0 fdfdab56f53d2388a66f6a5ce0985f95
cpath: /trunk/server/scripting/Makefile.am
copyroot: 15280 /trunk

id: 75j.5ck.r20287/102207
type: file
count: 0
text: 20287 31546 837 1320 8d00ecb2909d00cdbc836ae18cf14bd5
cpath: /trunk/server/scripting/api_server_base.c
copyroot: 15280 /trunk

id: 328.5ig.r20287/102386
type: file
pred: 328.5ig.r20286/36514
count: 41
text: 20287 32396 6908 14642 486ff72915db65731a60f5de7039c307
props: 10470 1475 110 0 7d181b70073f10d0c5a58c73a72d4f04
cpath: /trunk/server/scripting/script_server.c
copyroot: 20274 /trunk/server/scripting/script_server.c

id: 326.5if.r20287/102683
type: file
pred: 326.5if.r20274/30295
count: 5
text: 20287 6018 468 1132 63150da60ff61be7de581953a70f67bb
props: 10928 4473 110 0 fd27c383f48a4fbbd90a59fbcfc8b3be
cpath: /trunk/server/scripting/api_server_notify.h
copyroot: 20274 /trunk/server/scripting/api_server_notify.h

PLAIN
K 11
Makefile.am
V 26
file 31z.5ck.r20287/101953
K 15
api_fcdb_auth.c
V 25
file 6la.5i8.r20287/99795
K 15
api_fcdb_auth.h
V 26
file 6lb.5i9.r20287/100537
K 15
api_fcdb_base.c
V 26
file 6l5.5ia.r20287/100774
K 15
api_fcdb_base.h
V 26
file 6l6.5ib.r20287/101214
K 17
api_server_base.c
V 26
file 75j.5ck.r20287/102207
K 17
api_server_base.h
V 25
file 75k.5ck.r20287/98822
K 17
api_server_edit.c
V 25
file 32c.5ic.r20287/99494
K 17
api_server_edit.h
V 26
file 32d.5id.r20287/100031
K 19
api_server_notify.c
V 26
file 325.5ie.r20287/101450
K 19
api_server_notify.h
V 26
file 326.5if.r20287/102683
K 13
script_fcdb.c
V 26
file 6l7.5ck.r20287/101011
K 13
script_fcdb.h
V 26
file 6l8.5ck.r20287/101751
K 15
script_server.c
V 26
file 328.5ig.r20287/102386
K 15
script_server.h
V 25
file 329.5ih.r20287/98999
K 14
tolua_fcdb.pkg
V 25
file 6l9.5ck.r20287/99293
K 16
tolua_server.pkg
V 26
file 74d.5ck.r20287/100331
END
ENDREP
id: 31x.5ck.r20287/103905
type: dir
pred: 31x.5ck.r20286/37609
count: 196
text: 20287 102984 908 908 76e4e1bf26ab6d124bb6df855f5ae6b8
props: 19010 1268 221 0 f578ff6e8244176f37543d0b966b5b5e
cpath: /trunk/server/scripting
copyroot: 15280 /trunk

PLAIN
K 11
Makefile.am
V 23
file 5q.5ck.r20275/2606
K 8
advisors
V 24
dir 4n2.5ck.r20229/24771
K 9
aiiface.c
V 24
file 4gm.5ck.r20179/2093
K 9
aiiface.h
V 23
file 4gn.5ck.r19945/383
K 6
auth.c
V 25
file 39c.5ck.r20274/32101
K 6
auth.h
V 25
file 39d.5ck.r18977/19170
K 11
barbarian.c
V 24
file lw.5ck.r19677/17776
K 11
barbarian.h
V 24
file lx.5ck.r18054/18407
K 14
citizenshand.c
V 26
file 6mz.5ck.r19259/389611
K 14
citizenshand.h
V 25
file 6n0.5ck.r19127/18563
K 10
cityhand.c
V 24
file 10.5ck.r19573/66885
K 10
cityhand.h
V 23
file 4f.0.r13297/423686
K 11
citytools.c
V 24
file 4g.5ck.r20286/37853
K 11
citytools.h
V 24
file 4h.5ck.r18270/28958
K 10
cityturn.c
V 24
file 4i.5ck.r20286/38098
K 10
cityturn.h
V 24
file 4j.5ck.r20240/14848
K 11
civserver.c
V 24
file 4k.5ck.r19780/19389
K 11
civserver.h
V 21
file 4l.0.r2805/33121
K 10
commands.c
V 23
file 2ly.5ck.r20261/358
K 10
commands.h
V 25
file 2lz.5ck.r19153/55408
K 13
connecthand.c
V 25
file 2dw.5ck.r20227/21164
K 13
connecthand.h
V 25
file 2dx.5ck.r18942/25217
K 9
console.c
V 23
file dd.5ck.r19957/6473
K 9
console.h
V 23
file de.5ck.r19183/7918
K 10
diplhand.c
V 24
file 4m.5ck.r20286/38784
K 10
diplhand.h
V 21
file 4n.0.r13421/6826
K 11
diplomats.c
V 24
file vz.5ck.r19677/18507
K 11
diplomats.h
V 23
file w0.5ck.r19106/3619
K 10
edithand.c
V 24
file 3bk.5ck.r20259/5182
K 10
edithand.h
V 26
file 4ez.5ck.r18452/115476
K 6
fcdb.c
V 25
file 6l3.5ck.r19268/75876
K 6
fcdb.h
V 25
file 6l4.5ck.r18976/33384
K 10
gamehand.c
V 24
file 4o.5ck.r20229/25012
K 10
gamehand.h
V 24
file 4p.5ck.r15698/24111
K 9
generator
V 23
dir 2me.5ck.r20258/2473
K 11
ggzserver.c
V 25
file 39a.5ck.r20126/49744
K 11
ggzserver.h
V 23
file 39b.5ck.r20191/350
K 10
handchat.c
V 25
file 4q.5ck.r19259/373384
K 10
handchat.h
V 24
file dj.5ck.r18270/28229
K 9
maphand.c
V 23
file 13.5ck.r20259/4698
K 9
maphand.h
V 23
file 14.5ck.r20259/4941
K 6
meta.c
V 24
file 4s.5ck.r19780/20117
K 6
meta.h
V 24
file 4t.5ck.r18054/19078
K 8
notify.c
V 25
file 4i2.5ck.r20229/25959
K 8
notify.h
V 24
file 4i3.5ck.r18282/3660
K 9
plrhand.c
V 24
file 4u.5ck.r20286/40016
K 9
plrhand.h
V 23
file 4v.5ck.r19597/8317
K 8
report.c
V 24
file vi.5ck.r19268/76549
K 8
report.h
V 24
file vj.5ck.r18270/29203
K 9
ruleset.c
V 24
file 8w.5ck.r20286/38345
K 9
ruleset.h
V 22
file 8x.5ck.r17946/997
K 13
sanitycheck.c
V 23
file wi.5ck.r20250/3695
K 13
sanitycheck.h
V 24
file wj.5ck.r19132/20430
K 10
savegame.c
V 24
file vl.5ck.r20286/39774
K 10
savegame.h
V 24
file vm.5ck.r17289/22938
K 11
savegame2.c
V 25
file 4m0.5ck.r20286/38590
K 11
savegame2.h
V 25
file 4m1.5ck.r18078/67503
K 7
score.c
V 25
file 2eg.5ck.r19941/19796
K 7
score.h
V 25
file 2eh.5ck.r19156/21934
K 9
scripting
V 25
dir 31x.5ck.r20287/103905
K 8
sernet.c
V 23
file 15.5ck.r20184/2107
K 8
sernet.h
V 24
file 4y.5ck.r19197/31924
K 10
settings.c
V 24
file 2m0.5ck.r20244/5239
K 10
settings.h
V 24
file 2m1.5ck.r20244/5486
K 11
spacerace.c
V 24
file 9a.5ck.r19268/77290
K 11
spacerace.h
V 21
file 9b.0.r11338/1129
K 9
srv_log.c
V 25
file 15t.5el.r20229/25451
K 9
srv_log.h
V 24
file 15u.5em.r19478/3573
K 10
srv_main.c
V 24
file vg.5ck.r20286/35675
K 10
srv_main.h
V 24
file vh.5ck.r19780/19874
K 11
stdinhand.c
V 24
file 4z.5ck.r20286/39526
K 11
stdinhand.h
V 23
file 50.5ck.r18978/5769
K 11
techtools.c
V 25
file 33n.5ck.r20286/39278
K 11
techtools.h
V 24
file 33o.5ck.r18665/2277
K 10
unithand.c
V 23
file 18.5ck.r19996/3563
K 10
unithand.h
V 24
file 19.5ck.r18578/17031
K 11
unittools.c
V 24
file 1a.5ck.r20286/39030
K 11
unittools.h
V 24
file 1b.5ck.r19677/19003
K 8
voting.c
V 26
file 4ex.5ck.r19259/388741
K 8
voting.h
V 25
file 4ey.5ck.r18054/19315
END
ENDREP
id: z.5ck.r20287/107794
type: dir
pred: z.5ck.r20286/43904
count: 4639
text: 20287 104151 3630 3630 e9470c3cf359cfabb5218aa08efae7d8
props: 17175 659 139 0 d1c9699dde7f9d81e54426750008041d
cpath: /trunk/server
copyroot: 15280 /trunk

id: 327.5i4.r20287/108028
type: file
pred: 327.5i4.r20274/38615
count: 15
text: 20287 39333 478 3535 960311ad27b46d67c54b34979b9f92dc
props: 10702 16637 110 0 2297367bb62237eae251d6a189335c2c
cpath: /trunk/common/scriptcore/luascript_types.h
copyroot: 20274 /trunk/common/scriptcore/luascript_types.h

id: 75e.5ck.r20287/108330
type: file
count: 0
text: 20287 6514 1203 4053 d5f24435a5811b5504de2f09bf007582
cpath: /trunk/common/scriptcore/api_signal_base.c
copyroot: 15280 /trunk

id: 4jz.5hs.r20287/108510
type: file
pred: 4jz.5hs.r20274/38906
count: 8
text: 20287 39835 1471 2670 f3c342812108d404868e8aa4e4b9c930
cpath: /trunk/common/scriptcore/api_game_effects.c
copyroot: 20274 /trunk/common/scriptcore/api_game_effects.c

id: 6gu.5hy.r20287/108756
type: file
pred: 6gu.5hy.r20274/39143
count: 3
text: 20287 41334 586 4670 a25b4053fa075715b16ba633c82c6f53
cpath: /trunk/common/scriptcore/api_game_specenum.c
copyroot: 20274 /trunk/common/scriptcore/api_game_specenum.c

id: 321.5hu.r20287/109003
type: file
pred: 321.5hu.r20274/39384
count: 36
text: 20287 42683 3765 9375 277e13c4571685b625cebe303f7c7533
props: 10755 32341 110 0 a3ee73c7ed0bd397f9f2fedc7793a5b7
cpath: /trunk/common/scriptcore/api_game_find.c
copyroot: 20274 /trunk/common/scriptcore/api_game_find.c

id: 32a.5i2.r20287/109302
type: file
pred: 32a.5i2.r20286/44135
count: 29
text: 20287 46778 6492 13426 1d8e12b697241ba67343d74d99085079
props: 10485 11635 110 0 2297367bb62237eae251d6a189335c2c
cpath: /trunk/common/scriptcore/luascript_signal.c
copyroot: 20274 /trunk/common/scriptcore/luascript_signal.c

id: 75f.5ck.r20287/109608
type: file
count: 0
text: 20287 8473 816 1488 bf079ee91fa29bcbb89e6fa7e8b6ac66
cpath: /trunk/common/scriptcore/api_signal_base.h
copyroot: 15280 /trunk

id: 4k0.5ht.r20287/109787
type: file
pred: 4k0.5ht.r20274/39973
count: 4
text: 20287 53299 595 1257 a59823d401b06526de99e56443105056
cpath: /trunk/common/scriptcore/api_game_effects.h
copyroot: 20274 /trunk/common/scriptcore/api_game_effects.h

id: 6gv.5hz.r20287/110032
type: file
pred: 6gv.5hz.r20274/40209
count: 2
text: 20287 53922 294 958 ce7ef551053efe703ae7ddbb65ed8576
cpath: /trunk/common/scriptcore/api_game_specenum.h
copyroot: 20274 /trunk/common/scriptcore/api_game_specenum.h

id: 6ky.5i0.r20287/110278
type: file
pred: 6ky.5i0.r20274/40446
count: 4
text: 20287 54244 9052 21081 38a66462a7bec62e7d1525b92e448b1b
cpath: /trunk/common/scriptcore/luascript.c
copyroot: 20274 /trunk/common/scriptcore/luascript.c

id: 323.5ho.r20287/110511
type: file
pred: 323.5ho.r20274/40675
count: 7
text: 20287 9302 1459 2479 da6e3b7d6566a73b1df678a5c7c90705
props: 10369 19257 110 0 94a2a96823d3c54fff31bdd51de17982
cpath: /trunk/common/scriptcore/api_common_intl.c
copyroot: 20274 /trunk/common/scriptcore/api_common_intl.c

id: 322.5hv.r20287/110812
type: file
pred: 322.5hv.r20274/40964
count: 11
text: 20287 63325 1797 2553 ae3777cf371054b20a9cce4989e541ac
props: 10477 3103 110 0 7d181b70073f10d0c5a58c73a72d4f04
cpath: /trunk/common/scriptcore/api_game_find.h
copyroot: 20274 /trunk/common/scriptcore/api_game_find.h

id: 32b.5i3.r20287/111110
type: file
pred: 32b.5i3.r20286/44439
count: 9
text: 20287 65150 1545 2209 f2318ab9b366d7278910ceb3433e9380
props: 10477 2018 110 0 7d181b70073f10d0c5a58c73a72d4f04
cpath: /trunk/common/scriptcore/luascript_signal.h
copyroot: 20274 /trunk/common/scriptcore/luascript_signal.h

id: 6kz.5i1.r20287/111413
type: file
pred: 6kz.5i1.r20274/41549
count: 3
text: 20287 67627 4665 6082 cf441626dcc128f671c7b84a6ab79ca7
cpath: /trunk/common/scriptcore/luascript.h
copyroot: 20274 /trunk/common/scriptcore/luascript.h

id: 324.5hp.r20287/111645
type: file
pred: 324.5hp.r20274/42071
count: 3
text: 20287 16579 560 1224 79989b94d36dcc043af58445704e840f
props: 10369 20628 110 0 94a2a96823d3c54fff31bdd51de17982
cpath: /trunk/common/scriptcore/api_common_intl.h
copyroot: 20274 /trunk/common/scriptcore/api_common_intl.h

id: 32e.5hq.r20287/111946
type: file
pred: 32e.5hq.r20274/42357
count: 11
text: 20287 78784 766 2275 2001991b7a74644a568cf88f34f4aca4
props: 10404 2476 110 0 2a94ed7a58fe1feebaea27ee0c48460d
cpath: /trunk/common/scriptcore/api_common_utilities.c
copyroot: 20274 /trunk/common/scriptcore/api_common_utilities.c

id: 320.5i7.r20287/112257
type: file
pred: 320.5i7.r20274/41778
count: 97
text: 20287 72322 6432 14918 561cf7816df4c89a5356eacfb4c82fe0
props: 11091 295 111 0 4b4193808cb95e702a5e5065e4345324
cpath: /trunk/common/scriptcore/tolua_game.pkg
copyroot: 20274 /trunk/common/scriptcore/tolua_game.pkg

id: 75i.5ck.r20287/112553
type: file
count: 0
text: 20287 80076 1076 1879 c77b2b25efc0cfa3a29bd62c5014d25b
cpath: /trunk/common/scriptcore/tolua_signal.pkg
copyroot: 15280 /trunk

id: 32f.5hr.r20287/112733
type: file
pred: 32f.5hr.r20274/42658
count: 8
text: 20287 84344 520 1184 c1a1e8d616cf6c1309a6a55854840dd1
props: 10404 3199 110 0 2a94ed7a58fe1feebaea27ee0c48460d
cpath: /trunk/common/scriptcore/api_common_utilities.h
copyroot: 20274 /trunk/common/scriptcore/api_common_utilities.h

id: 75g.5ck.r20287/113043
type: file
count: 0
text: 20287 81165 3166 9546 aac9d4e45bd1bc0c7d2f51c0c131c9a7
cpath: /trunk/common/scriptcore/luascript_func.c
copyroot: 15280 /trunk

id: 6l1.5i6.r20287/113223
type: file
pred: 6l1.5i6.r20274/42957
count: 3
text: 20287 84892 275 3932 174a97bab3ebf3075364e39832834fcb
cpath: /trunk/common/scriptcore/tolua_common_z.pkg
copyroot: 20274 /trunk/common/scriptcore/tolua_common_z.pkg

id: 33d.5hw.r20287/113468
type: file
pred: 33d.5hw.r20274/43200
count: 43
text: 20287 85195 12153 24756 39227c185fbc226aeeae2c9025bdc6fb
props: 10755 33073 110 0 fd27c383f48a4fbbd90a59fbcfc8b3be
cpath: /trunk/common/scriptcore/api_game_methods.c
copyroot: 20274 /trunk/common/scriptcore/api_game_methods.c

id: 75h.5ck.r20287/113775
type: file
count: 0
text: 20287 97377 902 1828 38c2cbf4d5fe7ead72a26c1c5104e6d8
cpath: /trunk/common/scriptcore/luascript_func.h
copyroot: 15280 /trunk

id: 75b.5ck.r20287/113954
type: file
pred: 75b.5ck.r20276/777
count: 1
text: 20287 98292 505 2302 0d853ca4a07d39ad4893a7db4e957f93
cpath: /trunk/common/scriptcore/Makefile.am
copyroot: 15280 /trunk

id: 33e.5hx.r20287/114153
type: file
pred: 33e.5hx.r20274/43497
count: 24
text: 20287 0 5351 6649 c253ef5ece5c2ecb0346c73dd195ece2
props: 10481 3597 110 0 2a94ed7a58fe1feebaea27ee0c48460d
cpath: /trunk/common/scriptcore/api_game_methods.h
copyroot: 20274 /trunk/common/scriptcore/api_game_methods.h

id: 6l0.5i5.r20287/114453
type: file
pred: 6l0.5i5.r20274/43789
count: 10
text: 20287 29923 1596 4006 43c4928efd0f6e3b60bd4e7cb85b23f7
cpath: /trunk/common/scriptcore/tolua_common_a.pkg
copyroot: 20274 /trunk/common/scriptcore/tolua_common_a.pkg

PLAIN
K 11
Makefile.am
V 26
file 75b.5ck.r20287/113954
K 17
api_common_intl.c
V 26
file 323.5ho.r20287/110511
K 17
api_common_intl.h
V 26
file 324.5hp.r20287/111645
K 22
api_common_utilities.c
V 26
file 32e.5hq.r20287/111946
K 22
api_common_utilities.h
V 26
file 32f.5hr.r20287/112733
K 18
api_game_effects.c
V 26
file 4jz.5hs.r20287/108510
K 18
api_game_effects.h
V 26
file 4k0.5ht.r20287/109787
K 15
api_game_find.c
V 26
file 321.5hu.r20287/109003
K 15
api_game_find.h
V 26
file 322.5hv.r20287/110812
K 18
api_game_methods.c
V 26
file 33d.5hw.r20287/113468
K 18
api_game_methods.h
V 26
file 33e.5hx.r20287/114153
K 19
api_game_specenum.c
V 26
file 6gu.5hy.r20287/108756
K 19
api_game_specenum.h
V 26
file 6gv.5hz.r20287/110032
K 17
api_signal_base.c
V 26
file 75e.5ck.r20287/108330
K 17
api_signal_base.h
V 26
file 75f.5ck.r20287/109608
K 11
luascript.c
V 26
file 6ky.5i0.r20287/110278
K 11
luascript.h
V 26
file 6kz.5i1.r20287/111413
K 16
luascript_func.c
V 26
file 75g.5ck.r20287/113043
K 16
luascript_func.h
V 26
file 75h.5ck.r20287/113775
K 18
luascript_signal.c
V 26
file 32a.5i2.r20287/109302
K 18
luascript_signal.h
V 26
file 32b.5i3.r20287/111110
K 17
luascript_types.h
V 26
file 327.5i4.r20287/108028
K 18
tolua_common_a.pkg
V 26
file 6l0.5i5.r20287/114453
K 18
tolua_common_z.pkg
V 26
file 6l1.5i6.r20287/113223
K 14
tolua_game.pkg
V 26
file 320.5i7.r20287/112257
K 16
tolua_signal.pkg
V 26
file 75i.5ck.r20287/112553
END
ENDREP
id: 75a.5ck.r20287/116141
type: dir
pred: 75a.5ck.r20286/45886
count: 3
text: 20287 114700 1428 1428 18b2dfa3b59f1ccfae2f53b275a066fc
cpath: /trunk/common/scriptcore
copyroot: 15280 /trunk

PLAIN
K 11
Makefile.am
V 23
file 5h.5ck.r20275/7431
K 4
ai.c
V 24
file 4go.5ck.r19766/5856
K 4
ai.h
V 24
file 4gp.5ck.r19837/5392
K 6
aicore
V 24
dir 18t.5ck.r20227/28509
K 6
base.c
V 25
file 3jw.5ck.r19264/35940
K 6
base.h
V 25
file 3jx.5ck.r19264/36420
K 9
borders.c
V 26
file 4f0.5ck.r19259/404033
K 9
borders.h
V 25
file 4f1.5ck.r18858/99721
K 8
capstr.c
V 25
file dv.5ck.r19259/401812
K 8
capstr.h
V 24
file dw.5ck.r18858/97074
K 10
citizens.c
V 26
file 6mx.5ck.r19259/397143
K 10
citizens.h
V 25
file 6my.5ck.r19127/30702
K 6
city.c
V 22
file q.5ck.r20277/7560
K 6
city.h
V 23
file 3q.5ck.r20104/4081
K 8
combat.c
V 25
file wp.5ck.r19291/203500
K 8
combat.h
V 24
file wq.5ck.r18858/95678
K 12
connection.c
V 25
file un.5ck.r19259/403785
K 12
connection.h
V 24
file uo.5ck.r18976/42833
K 8
dataio.c
V 24
file 15r.5ck.r20184/6204
K 8
dataio.h
V 25
file 15s.5ck.r18858/95001
K 11
diptreaty.c
V 25
file 3r.5ck.r19259/398261
K 11
diptreaty.h
V 24
file 3s.5ck.r18858/95921
K 9
effects.c
V 25
file 2eo.5ck.r19457/24826
K 9
effects.h
V 25
file 2ep.5ck.r19264/37399
K 8
events.c
V 23
file 33h.5ck.r19541/980
K 8
events.h
V 24
file 3t.5ck.r18858/95439
K 14
fc_interface.c
V 26
file 4up.5ck.r19259/395547
K 14
fc_interface.h
V 24
file 4uq.5ck.r18890/8397
K 10
fc_types.h
V 24
file 2ll.5ck.r20106/1301
K 15
featured_text.c
V 26
file 4h3.5ck.r19259/397577
K 15
featured_text.h
V 24
file 4h4.5ck.r18873/5922
K 6
game.c
V 24
file 3u.5ck.r19295/98478
K 6
game.h
V 23
file 3v.5ck.r19846/5850
K 19
generate_packets.py
V 24
file 2f4.5ck.r19305/2073
K 12
government.c
V 25
file he.5ck.r19259/403289
K 12
government.h
V 24
file hf.5ck.r18858/98787
K 6
idex.c
V 25
file qo.5ck.r19259/406132
K 6
idex.h
V 24
file qp.5ck.r18858/92434
K 13
improvement.c
V 24
file vb.5ck.r19457/24097
K 13
improvement.h
V 23
file vc.5ck.r20239/7229
K 5
map.c
V 22
file r.5ck.r20235/4128
K 5
map.h
V 23
file 41.5ck.r20236/4263
K 8
mapimg.c
V 24
file 6n9.5ck.r20235/3232
K 8
mapimg.h
V 25
file 6na.5ck.r19153/60382
K 10
movement.c
V 23
file 2xv.5ck.r20260/271
K 10
movement.h
V 25
file 2xw.5ck.r18858/96827
K 18
name_translation.h
V 24
file 4k1.5ck.r19434/9186
K 8
nation.c
V 23
file il.5ck.r19823/8535
K 8
nation.h
V 25
file im.5ck.r18858/101381
K 9
packets.c
V 22
file 43.5ck.r19946/388
K 11
packets.def
V 24
file 2f5.5ck.r20109/7890
K 9
packets.h
V 24
file 44.5ck.r18858/92670
K 8
player.c
V 24
file 45.5ck.r20227/28749
K 8
player.h
V 24
file 46.5ck.r20227/28992
K 14
requirements.c
V 24
file 2wq.5ck.r20186/2336
K 14
requirements.h
V 25
file 2wr.5ck.r19264/38378
K 10
research.c
V 26
file 4ro.5ck.r19259/406619
K 10
research.h
V 23
file 4rp.5ck.r19352/728
K 10
rgbcolor.c
V 25
file 6i6.5ck.r19934/11086
K 10
rgbcolor.h
V 25
file 6i7.5ck.r19151/82590
K 6
road.c
V 23
file 6pq.5ck.r20158/486
K 6
road.h
V 23
file 6pr.5ck.r20158/663
K 10
scriptcore
V 25
dir 75a.5ck.r20287/116141
K 11
spaceship.c
V 25
file 98.5ck.r19259/405393
K 11
spaceship.h
V 25
file 99.5ck.r18858/100885
K 12
specialist.c
V 26
file 33f.5ck.r19259/395048
K 12
specialist.h
V 26
file 33g.5ck.r19113/124404
K 6
team.c
V 26
file 33i.5ck.r19259/396899
K 6
team.h
V 25
file 33j.5ck.r18858/94759
K 6
tech.c
V 24
file t.5ck.r19259/396657
K 6
tech.h
V 21
file u.5ck.r19352/910
K 9
terrain.c
V 24
file 2fp.5ck.r20180/1207
K 9
terrain.h
V 23
file qs.5ck.r19414/6005
K 6
tile.c
V 24
file 2ys.5ck.r20235/3654
K 6
tile.h
V 24
file 2yt.5ck.r20235/3892
K 6
unit.c
V 21
file v.5ck.r20158/255
K 6
unit.h
V 23
file 48.5ck.r19792/6257
K 10
unitlist.c
V 26
file 39m.5ck.r19291/206359
K 10
unitlist.h
V 26
file 39n.5ck.r18858/100396
K 10
unittype.c
V 25
file v9.5ck.r19259/396409
K 10
unittype.h
V 24
file va.5ck.r20033/15910
K 9
version.c
V 22
file oe.5ck.r19833/647
K 9
version.h
V 24
file e7.5ck.r18858/96407
K 8
vision.c
V 26
file 4dm.5ck.r19259/404222
K 8
vision.h
V 24
file 4dn.5ck.r19112/9796
K 10
worklist.c
V 25
file o8.5ck.r19259/402799
K 10
worklist.h
V 24
file o9.5ck.r18858/98299
END
ENDREP
id: p.5ck.r20287/120248
type: dir
pred: p.5ck.r20286/49989
count: 3085
text: 20287 116331 3904 3904 fef2a947a1d56cd840f3b78b57a09832
props: 12883 2571 96 0 2763e13ff5d021346ae24ff6c9ced232
cpath: /trunk/common
copyroot: 15280 /trunk

PLAIN
K 9
ABOUT-NLS
V 22
file fu.0.r13215/85704
K 7
AUTHORS
V 19
file 5u.0.r12982/94
K 7
COPYING
V 19
file 1h.0.r9643/400
K 9
ChangeLog
V 26
file 6l.5ck.r18394/4622094
K 7
INSTALL
V 21
file 6.5ck.r20081/429
K 11
Makefile.am
V 24
file 59.5ck.r20125/47223
K 4
NEWS
V 23
file 6m.5ck.r19980/4694
K 6
README
V 20
file 7.0.r4421/96382
K 2
ai
V 22
dir 8.5ck.r20239/14153
K 10
autogen.sh
V 23
file 12o.5ck.r20146/164
K 9
bootstrap
V 24
dir 2p5.5ck.r20125/46275
K 6
client
V 21
dir d.5ck.r20283/4198
K 6
common
V 23
dir p.5ck.r20287/120248
K 12
config.mac.h
V 20
file hb.0.r6045/5982
K 12
configure.ac
V 25
file 149.5ck.r20274/26801
K 4
data
V 22
dir w.5ck.r20267/29595
K 6
debian
V 23
dir 5w.5ck.r20125/39180
K 12
dependencies
V 23
dir 2yu.5ck.r19903/6753
K 11
diff_ignore
V 22
file qq.5ck.r19346/607
K 3
doc
V 22
dir k7.5ck.r20279/3477
K 10
fc_version
V 25
file 2lo.5en.r20055/12345
K 2
m4
V 23
dir 12p.5ck.r20285/2543
K 6
manual
V 24
dir 2m2.5ck.r20275/12177
K 7
modinst
V 23
dir 4pj.5ck.r20275/7200
K 2
po
V 24
dir fs.5ck.r20254/192609
K 7
scripts
V 22
dir 2yo.5ck.r20021/590
K 6
server
V 23
dir z.5ck.r20287/107794
K 10
stamp-h.in
V 19
file 80.0.r1125/241
K 5
tests
V 22
dir 2g9.5ck.r15661/767
K 7
utility
V 22
dir 1c.5ck.r20250/3466
K 3
vms
V 21
dir u9.0.r11105/70719
K 5
win32
V 23
dir 2eu.5ck.r19955/8209
END
ENDREP
id: 3.5ck.r20287/121797
type: dir
pred: 3.5ck.r20286/51534
count: 14905
text: 20287 120482 1302 1302 a04ab468d381d7be64a03f30e2b5bedb
props: 20140 3888 282 0 e4bb46e81629a60eef613b169b23a9ea
cpath: /trunk
copyroot: 15280 /trunk

PLAIN
K 8
branches
V 19
dir 1.0.r20284/6094
K 4
tags
V 19
dir 2.0.r20076/4100
K 5
trunk
V 23
dir 3.5ck.r20287/121797
K 7
website
V 18
dir 3ge.0.r12388/0
END
ENDREP
id: 0.0.r20287/122190
type: dir
pred: 0.0.r20286/51923
count: 20287
text: 20287 122026 151 151 12dad54d89bf97efe2e17007383bb9a0
cpath: /
copyroot: 0 /

322.5hv.t20286-1 modify true false /trunk/common/scriptcore/api_game_find.h

32b.5i3.t20286-1 modify true false /trunk/common/scriptcore/luascript_signal.h

6la.5i8.t20286-1 modify true false /trunk/server/scripting/api_fcdb_auth.c

6kz.5i1.t20286-1 modify true false /trunk/common/scriptcore/luascript.h

320.5i7.t20286-1 modify true false /trunk/common/scriptcore/tolua_game.pkg

32e.5hq.t20286-1 modify true false /trunk/common/scriptcore/api_common_utilities.c

_4.5ck.t20286-1 add true false /trunk/common/scriptcore/tolua_signal.pkg

6lb.5i9.t20286-1 modify true false /trunk/server/scripting/api_fcdb_auth.h

_2.5ck.t20286-1 add true false /trunk/common/scriptcore/luascript_func.c

32f.5hr.t20286-1 modify true false /trunk/common/scriptcore/api_common_utilities.h

6l1.5i6.t20286-1 modify true false /trunk/common/scriptcore/tolua_common_z.pkg

33d.5hw.t20286-1 modify true false /trunk/common/scriptcore/api_game_methods.c

_3.5ck.t20286-1 add true false /trunk/common/scriptcore/luascript_func.h

75b.5ck.t20286-1 modify true false /trunk/common/scriptcore/Makefile.am

33e.5hx.t20286-1 modify true false /trunk/common/scriptcore/api_game_methods.h

325.5ie.t20286-1 modify true false /trunk/server/scripting/api_server_notify.c

31z.5ck.t20286-1 modify true false /trunk/server/scripting/Makefile.am

326.5if.t20286-1 modify true false /trunk/server/scripting/api_server_notify.h

_0.5ck.t20286-1 add true false /trunk/common/scriptcore/api_signal_base.c

6l9.5ck.t20286-1 modify true false /trunk/server/scripting/tolua_fcdb.pkg

_1.5ck.t20286-1 add true false /trunk/common/scriptcore/api_signal_base.h

323.5ho.t20286-1 modify true false /trunk/common/scriptcore/api_common_intl.c

32c.5ic.t20286-1 modify true false /trunk/server/scripting/api_server_edit.c

74d.5ck.t20286-1 modify true false /trunk/server/scripting/tolua_server.pkg

324.5hp.t20286-1 modify true false /trunk/common/scriptcore/api_common_intl.h

32d.5id.t20286-1 modify true false /trunk/server/scripting/api_server_edit.h

6l5.5ia.t20286-1 modify true false /trunk/server/scripting/api_fcdb_base.c

6l7.5ck.t20286-1 modify true false /trunk/server/scripting/script_fcdb.c

6l6.5ib.t20286-1 modify true false /trunk/server/scripting/api_fcdb_base.h

6l8.5ck.t20286-1 modify true false /trunk/server/scripting/script_fcdb.h

6l0.5i5.t20286-1 modify true false /trunk/common/scriptcore/tolua_common_a.pkg

_5.5ck.t20286-1 add true false /trunk/server/scripting/api_server_base.c

328.5ig.t20286-1 modify true false /trunk/server/scripting/script_server.c

327.5i4.t20286-1 modify true false /trunk/common/scriptcore/luascript_types.h

6gu.5hy.t20286-1 modify true false /trunk/common/scriptcore/api_game_specenum.c

4jz.5hs.t20286-1 modify true false /trunk/common/scriptcore/api_game_effects.c

_6.5ck.t20286-1 add true false /trunk/server/scripting/api_server_base.h

329.5ih.t20286-1 modify true false /trunk/server/scripting/script_server.h

321.5hu.t20286-1 modify true false /trunk/common/scriptcore/api_game_find.c

32a.5i2.t20286-1 modify true false /trunk/common/scriptcore/luascript_signal.c

6ky.5i0.t20286-1 modify true false /trunk/common/scriptcore/luascript.c

6gv.5hz.t20286-1 modify true false /trunk/common/scriptcore/api_game_specenum.h

4k0.5ht.t20286-1 modify true false /trunk/common/scriptcore/api_game_effects.h


122190 122342
