Skip to content

Commit 9723fc0

Browse files
committed
changelog, buydoor and capturable code cleanup, dropship ai fix
1 parent 309e0dd commit 9723fc0

File tree

5 files changed

+65
-52
lines changed

5 files changed

+65
-52
lines changed

CHANGELOG.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,33 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6060
New `SoundContainer` INI and Lua (R/W) property `BusRouting`, which denotes which bus the SoundContainer routes to. Available busses: `SFX, UI, Music`. Defaults to `SFX`.
6161
`Enum` binding for `SoundContainer.BusRouting`: `SFX = 0, UI = 1, MUSIC = 2`.
6262
New `SoundContainer` INI and Lua (R/W) property `PanningStrengthMultiplier`, which will multiply the strength of 3D panning. This can be used to achieve for example a psuedo-Immobile effect where attenuation effects are still applied but the sound does not move from the center. Recommended to keep between 0.0 and 1.0.
63-
New `SoundContainer` INI and Lua (R/W) property `CustomPanValue`, which hard-overrides the panning of a sound. Clamped between -1 and 1 for left and right panning. 0 disables the override and will re-enable default behavior. This should probably only be used on Immobile sounds, but it can be used on any sound. No guarantees.
63+
New `SoundContainer` INI and Lua (R/W) property `CustomPanValue`, which hard-overrides the panning of a sound. Clamped between -1 and 1 for left and right panning. 0 disables the override and will re-enable default behavior. This should probably only be used on Immobile sounds, but it can be used on any sound.
64+
65+
- Many new sounds added to the game.
66+
Browncoats have gotten a full sound revamp for everything except their actors. Every item now has its own custom sounds.
67+
Most base explosions and Riot Shield sounds have been redone.
68+
69+
- New delivery system, Buy Doors:
70+
Buy doors are customizable inert background objects that can take orders either via Lua messages or by using the pie menu near them.
71+
Using them via the pie menu will order your current buy menu catalogue.
72+
73+
- Capturable Framework, which is a very customizable object that can be captured by teams and send out Lua messages as it does so. Should be extremely useful to make new forms of activities.
74+
75+
- Item Dispenser object which dispenses items via the pie menu in a customizable way.
76+
77+
- Timed capturing docks for rockets and dropships, which are nifty on their own but shine when used with the DockingHandler to have AI use them.
78+
79+
- A whole suite of Lua frameworks for activities:
80+
BuyDoorHandler, which has a few utility functions to use buy doors at the activity-level easier.
81+
DeliveryCreationHandler, which standardizes creating squads of actors and their equipment.
82+
DockingHandler, which handles craft docking using the new docks.
83+
HUDHandler, which provides functions for displaying listed objectives, panning the camera, and other camera-related utilities.
84+
SaveLoadHandler, which can serialize tables and also handle saving and loading tricky things like MOs.
85+
TacticsHandler, which is a framework to add tasks and squads and have those squads go around doing tasks without further input.
86+
87+
- Two minor utility scripts:
88+
MOUtility, which currently has functions to smartly set MOs to be unhittable or to freeze actor HP.
89+
ParticleUtility, which currently has a directional smoke FX creation function.
6490

6591
- Tracy profiler integration.
6692
You can now attach Tracy to builds of the game and see profiling information about various zones and how long they take.
@@ -82,7 +108,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
82108

83109
- New `HDFirearm` INI and Lua (R/W) property `ReloadEndOffset`, to define how many milliseconds prior to the reload being complete that the `ReloadEndSound` should play. Defaults to -1, which means the game will automatically calculate so that the middle of the sound is aligned with the reload completing.
84110

85-
- New `Actor` INI and Lua (R/W) property `PainThreshold`, which determines how much damage this actor must take in a frame to play their `PainSound`. This can be set to 0 to never manually play the sound. Defaults to 15.
111+
- New `Actor` INI and Lua (R/W) property `PainThreshold`, which determines how much damage this actor must take in a frame to play their `PainSound`. This can be set to 0 to never play the sound. Defaults to 15.
86112

87113
- New `AHuman` INI and Lua (R/W) property `MaxWalkPathCrouchShift`, which determines how much the actor will automatically duck down to avoid low ceilings above them. This can be set to 0 to never duck. Defaults to 6.
88114

@@ -134,6 +160,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
134160

135161
- New `SceneMan` Lua function `CastTerrainPenetrationRay(Vector start, Vector ray, Vector endPos, int strengthLimit, int skip)`, which adds up the material strength of the terrain pixels encountered along the way, and stops when the accumulated value meets or exceeds `strengthLimit`. `endPos` is filled out with the ending position of the ray, returns `true` or `false` depending on whether the ray was stopped early or not.
136162

163+
- Two new stronger doors to use in bunkers, the Blast Door and the Vault Door.
164+
165+
- Three new Browncoat items have been added: a shield with reactive explosive armor, a revolver, and a close-range incendiary battle rifle.
166+
167+
- AI idle aim timer (the time the AI stops after aiming fully up or fully down in sentry mode) is now customizable using a custom number value for ACrabs. Use it to make your turrets less spastic.
168+
137169
</details>
138170

139171
<details><summary><b>Changed</b></summary>
@@ -178,6 +210,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
178210

179211
- `SceneMan` Lua function `DislodgePixel()` now optionally accepts a third boolean argument to delete the found pixel immediately. Format is `DislodgePixel(int posX, int posY, bool deletePixel)`. `DislodgePixel()` now also automatically accounts for scene wrapping.
180212

213+
- MuzzleSmoke.lua now uses the new ParticleUtility directional smoke function for a more interesting effect.
214+
181215
</details>
182216

183217
<details><summary><b>Fixed</b></summary>
@@ -198,6 +232,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
198232

199233
- Fixed a crash that could occur when scripted objects were deleted, particularly when switching scene.
200234

235+
- Fixed underperforming fire weaponry. It wasn't sticking to Attachables and as such would only very rarely do damage-over-time.
236+
237+
- Fixed dropships using absolute positions to calculate their delivery waypoint, resulting in them moving weirdly.
238+
201239
</details>
202240

203241
<details><summary><b>Removed</b></summary>

Data/Base.rte/AI/NativeDropShipAI.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ function NativeDropShipAI:Update(Owner)
113113
else
114114
startingHeight = Owner.Pos.Y;
115115
end
116-
local WptL = SceneMan:MovePointToGround(Vector(-Owner.Radius, startingHeight), self.hoverAlt, 12);
117-
local WptC = SceneMan:MovePointToGround(Vector(0, startingHeight), self.hoverAlt, 12);
118-
local WptR = SceneMan:MovePointToGround(Vector(Owner.Radius, startingHeight), self.hoverAlt, 12);
116+
local WptL = SceneMan:MovePointToGround(Vector(Owner.Pos.X - Owner.Radius, startingHeight), self.hoverAlt, 12);
117+
local WptC = SceneMan:MovePointToGround(Vector(Owner.Pos.X, startingHeight), self.hoverAlt, 12);
118+
local WptR = SceneMan:MovePointToGround(Vector(Owner.Pos.X + Owner.Radius, startingHeight), self.hoverAlt, 12);
119119
self.Waypoint = Vector(Owner.Pos.X, math.min(WptL.Y, WptC.Y, WptR.Y));
120120

121121
self.DeliveryState = ACraft.FALL;
@@ -152,9 +152,9 @@ function NativeDropShipAI:Update(Owner)
152152
self.Waypoint.Y = -500;
153153
else
154154
local startingHeight = math.max(Owner.Radius * 1.25, Owner.Pos.Y);
155-
local WptL = SceneMan:MovePointToGround(Vector(-Owner.Radius, startingHeight), self.hoverAlt, 12);
156-
local WptC = SceneMan:MovePointToGround(Vector(0, startingHeight), self.hoverAlt, 12);
157-
local WptR = SceneMan:MovePointToGround(Vector(Owner.Radius, startingHeight), self.hoverAlt, 12);
155+
local WptL = SceneMan:MovePointToGround(Vector(Owner.Pos.X - Owner.Radius, startingHeight), self.hoverAlt, 12);
156+
local WptC = SceneMan:MovePointToGround(Vector(Owner.Pos.X, startingHeight), self.hoverAlt, 12);
157+
local WptR = SceneMan:MovePointToGround(Vector(Owner.Pos.X + Owner.Radius, startingHeight), self.hoverAlt, 12);
158158
self.Waypoint = Vector(Owner.Pos.X, math.min(WptL.Y, WptC.Y, WptR.Y));
159159
end
160160
end

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/BuyDoor/BuyDoor.lua

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
function OnMessage(self, message, context)
2-
--print("message gotten?")
3-
--if self:IsInventoryEmpty() then
4-
if message == "BuyDoor_CustomTableOrder" then
5-
self.Unusable = true;
6-
local finalOrder = BuyDoorSetupOrder(self, context, true);
7-
8-
--print("WE HAVE GOTTEN AN ORDER")
9-
10-
if finalOrder then
11-
self.orderTimer:Reset();
12-
self.orderDelivering = true;
13-
else
14-
print("Buy Door was given a custom table order, but it had no items!");
15-
end
2+
3+
if message == "BuyDoor_CustomTableOrder" then
4+
self.Unusable = true;
5+
local finalOrder = BuyDoorSetupOrder(self, context, true);
6+
7+
if finalOrder then
8+
self.orderTimer:Reset();
9+
self.orderDelivering = true;
10+
else
11+
print("Buy Door was given a custom table order, but it had no items!");
1612
end
17-
--end
18-
13+
end
14+
1915
if message == "BuyDoor_ChangeCooldownTime" then
2016
self.cooldownTime = context;
2117
self:SetNumberValue("CooldownTime", context);
@@ -58,7 +54,6 @@ function BuyDoorSetupOrder(self, orderList, isCustomOrder, team)
5854
local clonedItem = _G[typeCast](item):Clone();
5955
if IsActor(clonedItem) and team then
6056
clonedItem.Team = team;
61-
--print(clonedItem)
6257
end
6358
if IsAHuman(item) then
6459
lastActor = clonedItem;
@@ -105,7 +100,6 @@ function BuyDoorSetupOrder(self, orderList, isCustomOrder, team)
105100
-- Finally, add the order to our inventory
106101

107102
for k, item in pairs(finalOrder) do
108-
--print(item)
109103
self:AddInventoryItem(item);
110104
end
111105

@@ -142,8 +136,6 @@ function Create(self)
142136
if self.Frame == 0 then
143137
self.Frame = 1;
144138
end
145-
146-
--print("buydoor" .. self.Frame)
147139

148140
self.isStayingOpen = false;
149141
if self:GetNumberValue("isStayingOpen") == 1 then
@@ -215,7 +207,6 @@ function ThreadedUpdate(self)
215207
-- Spawn the next object
216208
if self.spawnTimer:IsPastSimMS(self.spawnDelay) then
217209
self:RequestSyncedUpdate();
218-
--print("GIVE ME SYNCED UPDATE NOW")
219210
end
220211
elseif self.isStayingOpen and not self.isClosing and self.stayOpenTimer:IsPastSimTimeLimit() then
221212
self.SpriteAnimMode = MOSprite.ALWAYSPINGPONG;
@@ -230,7 +221,6 @@ function ThreadedUpdate(self)
230221
if self.cooldownTimer:IsPastSimMS(self.cooldownTime) then
231222
self.Unusable = false;
232223
if self.orderDelivering then
233-
--print("trying to deliver....")
234224
self.Unusable = true;
235225
if self.orderTimer:IsPastSimMS(self.orderDelay) then
236226
self.SpriteAnimMode = MOSprite.ALWAYSPINGPONG;
@@ -315,25 +305,13 @@ function SyncedUpdate(self)
315305
if self:IsInventoryEmpty() and not self.Unusable then
316306
-- Set up order here
317307

318-
-- We have to rebuild this table each time, because teams can change
319-
320-
-- self.playerTeamTable = {};
321-
-- for player = Activity.PLAYER_1, Activity.MAXPLAYERCOUNT - 1 do
322-
-- if self.Activity:PlayerActive(player) and self.Activity:PlayerHuman(player) then
323-
-- self.playerTeamTable[self.Activity:GetTeamOfPlayer(player)] = player;
324-
-- end
325-
-- end
326-
327308
local team = actor.Team;
328309
local player = actor:GetController().Player;
329310
local buyGUI = self.Activity:GetBuyGUI(player);
330311
local orderCost = buyGUI:GetTotalCartCost();
331312

332313
local funds = self.Activity:GetTeamFunds(team);
333314

334-
--print("cost: "..orderCost)
335-
--print("funds: "..funds)
336-
337315
if funds < orderCost then
338316
self.Message = "Insufficient funds!"
339317
self.messageTime = 4000;

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/GenericCapturable/GenericCapturable.lua

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,9 @@ function Create(self)
4040

4141
self.Activity = ToGameActivity(ActivityMan:GetActivity());
4242
self.Scene = SceneMan.Scene;
43-
--print(self:GetStringValue("SceneCaptureArea"))
4443
if self:StringValueExists("SceneCaptureArea") then
4544
if self.Scene:HasArea(self:GetStringValue("SceneCaptureArea")) then
4645
self.captureArea = self.Scene:GetArea(self:GetStringValue("SceneCaptureArea"));
47-
--print("foundarea")
4846
end
4947
end
5048

@@ -191,19 +189,18 @@ function ThreadedUpdate(self)
191189
end
192190

193191
PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -20), tostring("Team: " .. self.Team), true, 1);
194-
PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -30), tostring("Capturing Team: " .. self.capturingTeam), true, 1);
195-
PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -40), tostring("Dominant Team: " .. self.dominantTeam), true, 1);
192+
--PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -30), tostring("Capturing Team: " .. self.capturingTeam), true, 1);
193+
--PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -40), tostring("Dominant Team: " .. self.dominantTeam), true, 1);
196194

197-
PrimitiveMan:DrawTextPrimitive(self.Pos, tostring(self.captureProgress * 100), true, 1);
195+
--PrimitiveMan:DrawTextPrimitive(self.Pos, tostring(self.captureProgress * 100), true, 1);
198196

199-
if self.Deactivated then
200-
PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -60), "DEACTIVATED" , true, 1);
201-
end
197+
-- if self.Deactivated then
198+
-- PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, -60), "DEACTIVATED" , true, 1);
199+
-- end
202200
end
203201

204202
function SyncedUpdate(self)
205203
if self.shouldSendCaptureMessage then
206-
print("shouldhavesentmessage: " .. self.messageOnCapture)
207204
if self.useGlobalMessaging then
208205
MovableMan:SendGlobalMessage(self.messageOnCapture, self.dominantTeam);
209206
else

Data/Base.rte/Scenes/Objects/Bunkers/BunkerSystems/ItemDispenser/ItemDispenser.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function ThreadedUpdate(self)
8484
PrimitiveMan:DrawTextPrimitive(self.Pos, self.Message, true, 1);
8585
end
8686

87-
PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, 20), "Team: " .. self.Team, true, 1);
87+
--PrimitiveMan:DrawTextPrimitive(self.Pos + Vector(0, 20), "Team: " .. self.Team, true, 1);
8888

8989
end
9090

0 commit comments

Comments
 (0)