____ _ __
/ __ )____ _____ | | / /___ ___________
/ __ / __ \/ ___/ | | /| / / __ `/ ___/ ___/
/ /_/ / /_/ (__ ) | |/ |/ / /_/ / / (__ )
/_____/\____/____/ |__/|__/\__,_/_/ /____/
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"
#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. | |
Definition in file script_player.cpp.
| static int CclChangeUnitsOwner | ( | lua_State * | l | ) | [static] |
Change unit owner
| 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
| 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
| 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.
| 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
| 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] |
Parse the player configuration.
| l | Lua state. |
Definition at line 61 of file script_player.cpp.
References _C_, CPlayer::AiEnabled, CPlayer::AiName, CPlayer::Allied, CPlayer::BuildingLimit, CPlayer::Color, DefaultResourceNames, CPlayer::Enemy, CPlayer::Index, LuaError, LuaToNumber(), LuaToString(), CVideo::MapRGB(), MaxCosts, NumPlayers, PlayerComputer, PlayerMax, PlayerNeutral, PlayerNobody, PlayerPerson, PlayerRescueActive, PlayerRescuePassive, Players, CPlayer::ProductionRate, CPlayer::Score, CPlayer::SetName(), CPlayer::SharedVision, CPlayer::StartX, CPlayer::StartY, CPlayer::StorageCapacity, CPlayer::StoredResources, CPlayer::Team, TheScreen, CPlayer::TotalBuildings, CPlayer::TotalKills, CPlayer::TotalRazings, CPlayer::TotalResources, CPlayer::TotalUnitLimit, CPlayer::TotalUnits, CPlayer::Type, CPlayer::UnitLimit, CPlayer::Units, and Video.
Referenced by PlayerCclRegister().
| static int CclSetAllPlayersBuildingLimit | ( | lua_State * | l | ) | [static] |
Set player unit limit.
| 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.
| 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.
| 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.
| 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
| 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.
| 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.
| l | Lua state. |
Definition at line 469 of file script_player.cpp.
References CclSetSharedVision(), CPlayer::Index, and ThisPlayer.
Referenced by PlayerCclRegister().
| void PlayerCclRegister | ( | void | ) |
Allowed to select multiple units, maybe not mine.
Register CCL features for players.
Definition at line 567 of file script_player.cpp.
References CclChangeUnitsOwner(), CclDefinePlayerColorIndex(), CclDefinePlayerColors(), CclDiplomacy(), CclNewPlayerColors(), CclPlayer(), CclSetAllPlayersBuildingLimit(), CclSetAllPlayersTotalUnitLimit(), CclSetAllPlayersUnitLimit(), CclSetDiplomacy(), CclSetMaxSelectable(), CclSetSharedVision(), CclSharedVision(), and Lua.
Referenced by InitCcl().
1.5.6