____                _       __
    / __ )____  _____   | |     / /___ ___________
   / __  / __ \/ ___/   | | /| / / __ `/ ___/ ___/
  / /_/ / /_/ (__  )    | |/ |/ / /_/ / /  (__  )
 /_____/\____/____/     |__/|__/\__,_/_/  /____/

       A futuristic real-time strategy game.
          This file is part of Bos Wars.
(C) Copyright 2001-2007 by the Bos Wars and Stratagus Project. Distributed under the "GNU General Public License"

script_player.cpp File Reference

The player ccl functions. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "stratagus.h"
#include "unittype.h"
#include "unit_cache.h"
#include "player.h"
#include "script.h"
#include "ai.h"
#include "actions.h"
#include "commands.h"

Go to the source code of this file.

Functions

static int CclPlayer (lua_State *l)
static int CclChangeUnitsOwner (lua_State *l)
static int CclSetMaxSelectable (lua_State *l)
static int CclSetAllPlayersUnitLimit (lua_State *l)
static int CclSetAllPlayersBuildingLimit (lua_State *l)
static int CclSetAllPlayersTotalUnitLimit (lua_State *l)
static int CclSetDiplomacy (lua_State *l)
static int CclDiplomacy (lua_State *l)
static int CclSetSharedVision (lua_State *l)
static int CclSharedVision (lua_State *l)
static int CclDefinePlayerColors (lua_State *l)
static int CclNewPlayerColors (lua_State *l)
static int CclDefinePlayerColorIndex (lua_State *l)
void PlayerCclRegister (void)
 Allowed to select multiple units, maybe not mine.


Detailed Description

The player ccl functions.

Definition in file script_player.cpp.


Function Documentation

static int CclChangeUnitsOwner ( lua_State *  l  )  [static]

Change unit owner

Parameters:
l Lua state.

Definition at line 285 of file script_player.cpp.

References CUnit::ChangeOwner(), LuaCheckArgs, LuaError, LuaToNumber(), Players, CUnitCache::Select(), UnitCache, and UnitMax.

Referenced by PlayerCclRegister().

static int CclDefinePlayerColorIndex ( lua_State *  l  )  [static]

Define player color indexes

Parameters:
l Lua state.

Definition at line 543 of file script_player.cpp.

References LuaCheckArgs, LuaToNumber(), PlayerColorIndexCount, PlayerColorIndexStart, PlayerColors, PlayerColorsRGB, and PlayerMax.

Referenced by PlayerCclRegister().

static int CclDefinePlayerColors ( lua_State *  l  )  [static]

Define player colors

Parameters:
l Lua state.

Definition at line 481 of file script_player.cpp.

References _C_, LuaCheckArgs, LuaError, LuaToNumber(), LuaToString(), PlayerColorIndexCount, PlayerColorNames, and PlayerColorsRGB.

Referenced by PlayerCclRegister().

static int CclDiplomacy ( lua_State *  l  )  [static]

Change the diplomacy from ThisPlayer to another player.

Parameters:
l Lua state.

Definition at line 435 of file script_player.cpp.

References CclSetDiplomacy(), CPlayer::Index, and ThisPlayer.

Referenced by PlayerCclRegister().

static int CclNewPlayerColors ( lua_State *  l  )  [static]

Make new player colors

Parameters:
l Lua state.

Definition at line 530 of file script_player.cpp.

References LuaCheckArgs, and SetPlayersPalette().

Referenced by PlayerCclRegister().

static int CclPlayer ( lua_State *  l  )  [static]

static int CclSetAllPlayersBuildingLimit ( lua_State *  l  )  [static]

Set player unit limit.

Parameters:
l Lua state.

Definition at line 370 of file script_player.cpp.

References CPlayer::BuildingLimit, LuaCheckArgs, LuaToNumber(), PlayerMax, and Players.

Referenced by PlayerCclRegister().

static int CclSetAllPlayersTotalUnitLimit ( lua_State *  l  )  [static]

Set player unit limit.

Parameters:
l Lua state.

Definition at line 388 of file script_player.cpp.

References LuaCheckArgs, LuaToNumber(), PlayerMax, Players, and CPlayer::TotalUnitLimit.

Referenced by PlayerCclRegister().

static int CclSetAllPlayersUnitLimit ( lua_State *  l  )  [static]

Set player unit limit.

Parameters:
l Lua state.

Definition at line 352 of file script_player.cpp.

References LuaCheckArgs, LuaToNumber(), PlayerMax, Players, and CPlayer::UnitLimit.

Referenced by PlayerCclRegister().

static int CclSetDiplomacy ( lua_State *  l  )  [static]

Change the diplomacy from player to another player.

Parameters:
l Lua state.

Definition at line 406 of file script_player.cpp.

References DiplomacyAllied, DiplomacyCrazy, DiplomacyEnemy, DiplomacyNeutral, LuaCheckArgs, LuaToNumber(), LuaToString(), and SendCommandDiplomacy().

Referenced by CclDiplomacy(), and PlayerCclRegister().

static int CclSetMaxSelectable ( lua_State *  l  )  [static]

Set MaxSelectable

Parameters:
l Lua state.

Definition at line 338 of file script_player.cpp.

References LuaCheckArgs, LuaToNumber(), and MaxSelectable.

Referenced by PlayerCclRegister().

static int CclSetSharedVision ( lua_State *  l  )  [static]

Change the shared vision from player to another player.

Parameters:
l Lua state.

Definition at line 447 of file script_player.cpp.

References LuaCheckArgs, LuaToBoolean(), LuaToNumber(), and SendCommandSharedVision().

Referenced by CclSharedVision(), and PlayerCclRegister().

static int CclSharedVision ( lua_State *  l  )  [static]

Change the shared vision from ThisPlayer to another player.

Parameters:
l Lua state.

Definition at line 469 of file script_player.cpp.

References CclSetSharedVision(), CPlayer::Index, and ThisPlayer.

Referenced by PlayerCclRegister().

void PlayerCclRegister ( void   ) 


Generated on Sat Feb 21 00:28:18 2009 for Bos Wars by  doxygen 1.5.6