mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
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:
@@ -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");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user