Skip to content
This repository was archived by the owner on Jan 5, 2024. It is now read-only.

Commit 57b6ecf

Browse files
committed
Moved the player to team 2 for wave defense to better handle deployments (i.e. defender is consistently team 2 now so they'll work properly)
Reveal the main bunker for the player, if there is one
1 parent b3de682 commit 57b6ecf

File tree

2 files changed

+15
-7
lines changed

2 files changed

+15
-7
lines changed

Data/Base.rte/Activities.ini

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,11 @@ AddActivity = GAScripted
4747
Description = Build a bunker and defend it against increasingly longer waves of AI-controlled enemies, with time to repair in between! Adjust the Difficulty to change wave difficulty.
4848
SceneName = Ketanot Hills
4949
ScriptPath = Base.rte/Activities/WaveDefense.lua
50-
TeamOfPlayer1 = 0
51-
TeamOfPlayer2 = 0
52-
TeamOfPlayer3 = 0
53-
TeamOfPlayer4 = 0
54-
CPUTeam = 1
50+
TeamOfPlayer1 = 1
51+
TeamOfPlayer2 = 1
52+
TeamOfPlayer3 = 1
53+
TeamOfPlayer4 = 1
54+
CPUTeam = 0
5555
MinTeamsRequired = 2
5656
DefaultGoldCakeDifficulty = 6000
5757
DefaultGoldEasyDifficulty = 5000
@@ -62,7 +62,7 @@ AddActivity = GAScripted
6262
LuaClassName = WaveDefense
6363
DefaultRequireClearPathToOrbit = 1
6464
DeployUnitsSwitchEnabled = 1
65-
DefaultDeployUnits = 0
65+
DefaultDeployUnits = 1
6666
6767
6868
AddActivity = GAScripted

Data/Base.rte/Activities/WaveDefense.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ end
2525

2626
function WaveDefense:StartActivity(isNewGame)
2727
-- Get player team
28-
self.playerTeam = Activity.TEAM_1;
28+
self.playerTeam = Activity.TEAM_2;
2929
for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
3030
if self:PlayerActive(player) and self:PlayerHuman(player) then
3131
self.playerTeam = self:GetTeamOfPlayer(player);
@@ -259,6 +259,14 @@ function WaveDefense:UpdateActivity()
259259
end
260260
end
261261

262+
-- Reveal the main bunker area for the defender.
263+
local mainBunkerArea = SceneMan.Scene:GetOptionalArea("Main Bunker");
264+
if mainBunkerArea ~= nil then
265+
for mainBunkerBox in mainBunkerArea.Boxes do
266+
SceneMan:RevealUnseenBox(mainBunkerBox.Corner.X, mainBunkerBox.Corner.Y, mainBunkerBox.Width, mainBunkerBox.Height, self.playerTeam);
267+
end
268+
end
269+
262270
for Act in MovableMan.AddedActors do
263271
if Act.ClassName ~= "ADoor" then
264272
for ang = 0, math.pi*2, 0.15 do

0 commit comments

Comments
 (0)