FireSale can be toggled via lua script, the AI in soviet 1 won't do a fire sale, and the allied radar dome is no longer a fake dome.

This commit is contained in:
Justin Marshall
2020-07-20 12:15:27 -07:00
parent 9fcc2d286d
commit a21baa6891
5 changed files with 33 additions and 2 deletions
+20
View File
@@ -5,6 +5,24 @@
* Red Alert Vanilla Actions *
*=============================================================================================*/
static int Script_ToggleFireSale(lua_State* L) {
int houseType = lua_tointeger(L, 1);
int fireSaleEnabled = lua_tointeger(L, 2);
if (houseType != HOUSE_NONE) {
HouseClass* this_house = HouseClass::As_Pointer((HousesType)houseType);
if (this_house != NULL) {
this_house->ToggleFireSaleAbility(fireSaleEnabled != 0);
}
}
return 1;
}
/***********************************************************************************************
* Script_Win - The specified player wins *
* *
@@ -7620,6 +7638,8 @@ bool MapScript::Init(const char* mapName) {
* Script Globals *
*=============================================================================================*/
lua_register(L, "ToggleFireSale", Script_ToggleFireSale);
lua_pushnumber(L, PlayerPtr->ID); // Local player (house) index
lua_setglobal(L, "_localPlayer");