Skip to content

Commit 453c108

Browse files
authored
Merge pull request #155 from cortex-command-community/browncoat-mission
Browncoat Mission Progress
2 parents 9d040b9 + 168307f commit 453c108

File tree

225 files changed

+140961
-79614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

225 files changed

+140961
-79614
lines changed

CHANGELOG.md

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5050

5151
- New `AEmitter` and `PEmitter` INI and Lua (R/W) property `PlayBurstSound` which denotes whether the BurstSound should play when appropriate. This should not be confused for a trigger - it's just a enable/disable toggle to avoid having to remove and add BurstSound altogether.
5252

53+
- New `MOSprite` INI and Lua (R/W) integer property `ForcedHFlip` which forces a certain flippedness and disallows anything else from ever changing it without clearing the forced value first. 0 is forced not flipped, 1 forced flipped, and -1 is no force.
54+
55+
- New hotkey bindings.
56+
On Mouse+KB PC the defaults are: Weapon Primary Hotkey on V, Weapon Auxiliary Hotkey on H, Actor Primary Hotkey on X, Actor Auxiliary Hotkey on O.
57+
Added new `Controller` states `WEAPON_PRIMARY_HOTKEYSTART`, `WEAPON_AUXILIARY_HOTKEYSTART`, `ACTOR_PRIMARY_HOTKEYSTART`, `ACTOR_AUXILIARY_HOTKEYSTART`, `WEAPON_PRIMARY_HOTKEY`, `WEAPON_AUXILIARY_HOTKEY`, `ACTOR_PRIMARY_HOTKEY`, `ACTOR_AUXILIARY_HOTKEY`
58+
59+
- New hotkey system for `Actor` and `HeldDevice`.
60+
Pressing a certain new hotkey will mark it as activated on `Actor` and `HeldDevice`, letting scripts make use of the new bindings easily.
61+
`Enum` binding for `HeldDevice.HeldDeviceHotkeyType`: `PRIMARY = 0, AUXILIARY = 1, HELDDEVICEHOTKEYTYPECOUNT = 2`.
62+
`Enum` binding for `Actor.ActorHotkeyType`: `PRIMARY = 0, AUXILIARY = 1, ACTORHOTKEYTYPECOUNT = 2`.
63+
Both `Actor` and `HeldDevice` have the following functions:
64+
`HotkeyActionIsActivated(hotkeyType)` returns whether a certain hotkey action is being activated or not.
65+
`ActivateHotkeyAction(hotkeyType)` activates a certain hotkey action.
66+
`DeactivateHotkeyAction(hotkeyType)` deactivates a certain hotkey action.
67+
5368
- New `GAScripted` Lua script method `IsCompatibleScene(scene)` to allow Activities to generically decide which Scenes are eligible by returning a boolean value.
5469
New `GAScripted` INI enumerating property `AddRequiredArea`, replacing Lua file scanning, to allow Activities to explicitly state which areas are strictly required.
5570
As before, these work in tandem. Both the required areas, if defined, and script conditional method, if defined, must pass for the scene to qualify.
@@ -65,7 +80,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6580
- Improved navigation, making running and fast walkpaths much more consistent.
6681

6782
- Increased fog-of-war resolution in all vanilla activities, and conquest, from 20x20 to 4x4.
68-
The Ronin Scrambler, the basic scanner, and `SceneMan:CastUnseenRay` have been changed to accomodate fog-of-war resolutions as fine as 1x1 and as course as 20x20.
83+
The Ronin Scrambler, the basic scanner, and `SceneMan:CastUnseenRay` have been changed to accomodate fog-of-war resolutions as fine as 1x1 and as coarse as 20x20.
6984
The fog-of-war revealing code is now multithreaded to increase performance.
7085

7186
- All vanilla scenario activities have had their settings polished, respecting settings which make sense and disabling settings which don't.
@@ -112,6 +127,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
112127

113128
- Fixed an issue where an `Actor`'s MovementState wasn't correctly accessible from script.
114129

130+
- Fixed mounted HeldDevices not respecting InheritedRotAngleOffset.
131+
115132
- Fixed an issue where internal Lua functions OriginalDoFile, OriginalLoadFile, and OriginalRequire were polluting the global namespace. They have now been made inaccessible.
116133

117134
</details>

Data/Base.rte/Activities/Utility/DeliveryCreationHandler.lua

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1026,6 +1026,23 @@ function DeliveryCreationHandler:CreateEliteSquad(team, squadCountOrTypeTable, s
10261026

10271027
end
10281028

1029+
function DeliveryCreationHandler:CreateCraft(team, forceRocketUsage)
1030+
1031+
local craftGroup = "Craft - Dropships";
1032+
if forceRocketUsage then
1033+
craftGroup = "Craft - Rockets";
1034+
end
1035+
presetName, createFunc, techName = self:SelectPresetByGroupPair(team, craftGroup, craftGroup, craftGroup, craftGroup);
1036+
1037+
local craft = _G[createFunc](presetName, techName);
1038+
craft.Team = team;
1039+
--print(craft)
1040+
1041+
local goldCost = ToSceneObject(craft):GetTotalValue(self.teamTechIDTable[team], 1);
1042+
1043+
return craft, goldCost
1044+
end
1045+
10291046
function DeliveryCreationHandler:CreateSquadWithCraft(team, forceRocketUsage, squadCountOrTypeTable, squadType)
10301047

10311048
local craftGroup = "Craft - Dropships";

Data/Base.rte/Activities/Utility/DockingHandler.lua

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,9 @@ function DockingHandler:SpawnUndersideDockingCraft(craft, specificDock)
232232
SceneMan:ForceBounds(pos);
233233
craft:AddAISceneWaypoint(pos);
234234
craft:AddAISceneWaypoint(dockTable.dockPosition);
235-
local direction = dockToDockAt % 2 == 0 and 1 or -1;
236-
craft:AddAISceneWaypoint(dockTable.dockPosition + Vector(275 * direction, 0))
235+
local direction = dockToDockAt % 2 == 0 and 1 or -1;
236+
print("direction: " .. direction);
237+
craft:AddAISceneWaypoint(dockTable.dockPosition + Vector(-275 * direction, 0))
237238

238239
dockTable.activeCraft = craft;
239240
dockTable.dockingStage = 1;
@@ -341,7 +342,7 @@ function DockingHandler:UpdateUndersideDockingCraft()
341342
craft:AddAISceneWaypoint(pos);
342343
craft:AddAISceneWaypoint(dockTable.dockPosition);
343344
local direction = i % 2 == 0 and 1 or -1;
344-
craft:AddAISceneWaypoint(dockTable.dockPosition + Vector(275 * direction, 0))
345+
craft:AddAISceneWaypoint(dockTable.dockPosition + Vector(-275 * direction, 0))
345346

346347
dockTable.activeCraft = craft;
347348
dockTable.dockingStage = 1;
@@ -443,7 +444,7 @@ function DockingHandler:UpdateUndersideDockingCraft()
443444

444445
--print(SceneMan:ShortestDistance(craft.Pos, dockTable.dockPosition + Vector(200 * direction, 0), true))
445446

446-
local distFromDockArea = SceneMan:ShortestDistance(craft.Pos, dockTable.dockPosition + Vector(275 * direction, 0), true).Magnitude
447+
local distFromDockArea = SceneMan:ShortestDistance(craft.Pos, dockTable.dockPosition + Vector(-275 * direction, 0), true).Magnitude
447448
--print(distFromDockArea)
448449
if distFromDockArea < 20 then
449450
craft:OpenHatch();

Data/Base.rte/Activities/Utility/SaveLoadHandler.lua

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function SaveLoadHandler:SerializeTable(val, name, skipnewlines, depth)
6666
if type(name) == "number" then
6767
tmp = tmp .. "[" .. name .. "]" .. " = "
6868
else
69-
tmp = tmp .. name .. " = "
69+
tmp = tmp .. "['" .. name .. "']" .. " = "
7070
end
7171
end
7272

@@ -92,6 +92,8 @@ function SaveLoadHandler:SerializeTable(val, name, skipnewlines, depth)
9292
print("ERROR: SaveLoadHandler tried to save a function. This cannot currently be done and the table will not be as expected when loaded.");
9393
elseif val.Magnitude then -- ghetto vector check
9494
tmp = tmp .. string.format("%q", "Vector(" .. val.X .. "," .. val.Y .. ")")
95+
elseif val.Area then -- ghetto box check
96+
tmp = tmp .. string.format("%q", "Box(" .. val.Corner.X .. "," .. val.Corner.Y .. "," .. val.Corner.X + val.Width .. "," .. val.Corner.Y + val.Height .. ")")
9597
elseif val.PresetName and IsMOSRotating(val) then -- IsMOSRotating freaks out if we give it something that isn't a preset at all... ghetto here too
9698
val:SetNumberValue("saveLoadHandlerUniqueID", val.UniqueID);
9799
tmp = tmp .. string.format("%q", "SAVELOADHANDLERUNIQUEID_" .. tostring(val.UniqueID))
@@ -243,6 +245,18 @@ function SaveLoadHandler:ParseTableForVectors(tab)
243245

244246
end
245247

248+
function SaveLoadHandler:ParseTableForBoxes(tab)
249+
for k, v in pairs(tab) do
250+
if type(v) == "string" and string.find(v, "Box%(") then
251+
local vector = loadstring("return " .. v)();
252+
tab[k] = vector;
253+
elseif type(v) == "table" then
254+
self:ParseTableForBoxes(v);
255+
end
256+
end
257+
258+
end
259+
246260
function SaveLoadHandler:ParseTableForAreas(tab)
247261
for k, v in pairs(tab) do
248262
if type(v) == "string" and string.find(v, "SAVELOADHANDLERAREA_") then
@@ -289,6 +303,10 @@ function SaveLoadHandler:DeserializeTable(serializedTable, name)
289303
print("INFO: SaveLoadHandler is parsing this table for Vectors: " .. name);
290304
end
291305
self:ParseTableForVectors(tab);
306+
if name and SaveLoadHandler.verboseLogging then
307+
print("INFO: SaveLoadHandler is parsing this table for Boxes: " .. name);
308+
end
309+
self:ParseTableForBoxes(tab);
292310
if name and SaveLoadHandler.verboseLogging then
293311
print("INFO: SaveLoadHandler is parsing this table for Areas: " .. name);
294312
end

Data/Base.rte/GUIs/SettingsGUI.ini

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2522,6 +2522,126 @@ Anchor = Left, Top
25222522
ToolTip = None
25232523
Text = [InputKey]
25242524

2525+
[LabelInputName31]
2526+
ControlType = LABEL
2527+
Parent = CollectionBoxScrollingMappingBox
2528+
X = 215
2529+
Y = 380
2530+
Width = 110
2531+
Height = 20
2532+
Visible = True
2533+
Enabled = True
2534+
Name = LabelInputName31
2535+
Anchor = Left, Top
2536+
ToolTip = None
2537+
Text = InputName
2538+
HAlignment = right
2539+
VAlignment = middle
2540+
2541+
[ButtonInputKey31]
2542+
ControlType = BUTTON
2543+
Parent = CollectionBoxScrollingMappingBox
2544+
X = 330
2545+
Y = 380
2546+
Width = 95
2547+
Height = 20
2548+
Visible = True
2549+
Enabled = True
2550+
Name = ButtonInputKey31
2551+
Anchor = Left, Top
2552+
ToolTip = None
2553+
Text = [InputKey]
2554+
2555+
[LabelInputName32]
2556+
ControlType = LABEL
2557+
Parent = CollectionBoxScrollingMappingBox
2558+
X = 215
2559+
Y = 380
2560+
Width = 110
2561+
Height = 20
2562+
Visible = True
2563+
Enabled = True
2564+
Name = LabelInputName32
2565+
Anchor = Left, Top
2566+
ToolTip = None
2567+
Text = InputName
2568+
HAlignment = right
2569+
VAlignment = middle
2570+
2571+
[ButtonInputKey32]
2572+
ControlType = BUTTON
2573+
Parent = CollectionBoxScrollingMappingBox
2574+
X = 330
2575+
Y = 380
2576+
Width = 95
2577+
Height = 20
2578+
Visible = True
2579+
Enabled = True
2580+
Name = ButtonInputKey32
2581+
Anchor = Left, Top
2582+
ToolTip = None
2583+
Text = [InputKey]
2584+
2585+
[LabelInputName33]
2586+
ControlType = LABEL
2587+
Parent = CollectionBoxScrollingMappingBox
2588+
X = 215
2589+
Y = 380
2590+
Width = 110
2591+
Height = 20
2592+
Visible = True
2593+
Enabled = True
2594+
Name = LabelInputName33
2595+
Anchor = Left, Top
2596+
ToolTip = None
2597+
Text = InputName
2598+
HAlignment = right
2599+
VAlignment = middle
2600+
2601+
[ButtonInputKey33]
2602+
ControlType = BUTTON
2603+
Parent = CollectionBoxScrollingMappingBox
2604+
X = 330
2605+
Y = 380
2606+
Width = 95
2607+
Height = 20
2608+
Visible = True
2609+
Enabled = True
2610+
Name = ButtonInputKey33
2611+
Anchor = Left, Top
2612+
ToolTip = None
2613+
Text = [InputKey]
2614+
2615+
[LabelInputName34]
2616+
ControlType = LABEL
2617+
Parent = CollectionBoxScrollingMappingBox
2618+
X = 215
2619+
Y = 380
2620+
Width = 110
2621+
Height = 20
2622+
Visible = True
2623+
Enabled = True
2624+
Name = LabelInputName34
2625+
Anchor = Left, Top
2626+
ToolTip = None
2627+
Text = InputName
2628+
HAlignment = right
2629+
VAlignment = middle
2630+
2631+
[ButtonInputKey34]
2632+
ControlType = BUTTON
2633+
Parent = CollectionBoxScrollingMappingBox
2634+
X = 330
2635+
Y = 380
2636+
Width = 95
2637+
Height = 20
2638+
Visible = True
2639+
Enabled = True
2640+
Name = ButtonInputKey34
2641+
Anchor = Left, Top
2642+
ToolTip = None
2643+
Text = [InputKey]
2644+
25252645
[CollectionBoxInputCapture]
25262646
ControlType = COLLECTIONBOX
25272647
Parent = root

Data/Base.rte/GUIs/SettingsPauseGUI.ini

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2523,6 +2523,126 @@ Anchor = Left, Top
25232523
ToolTip = None
25242524
Text = [InputKey]
25252525

2526+
[LabelInputName31]
2527+
ControlType = LABEL
2528+
Parent = CollectionBoxScrollingMappingBox
2529+
X = 215
2530+
Y = 380
2531+
Width = 110
2532+
Height = 20
2533+
Visible = True
2534+
Enabled = True
2535+
Name = LabelInputName31
2536+
Anchor = Left, Top
2537+
ToolTip = None
2538+
Text = InputName
2539+
HAlignment = right
2540+
VAlignment = middle
2541+
2542+
[ButtonInputKey31]
2543+
ControlType = BUTTON
2544+
Parent = CollectionBoxScrollingMappingBox
2545+
X = 330
2546+
Y = 380
2547+
Width = 95
2548+
Height = 20
2549+
Visible = True
2550+
Enabled = True
2551+
Name = ButtonInputKey31
2552+
Anchor = Left, Top
2553+
ToolTip = None
2554+
Text = [InputKey]
2555+
2556+
[LabelInputName32]
2557+
ControlType = LABEL
2558+
Parent = CollectionBoxScrollingMappingBox
2559+
X = 215
2560+
Y = 380
2561+
Width = 110
2562+
Height = 20
2563+
Visible = True
2564+
Enabled = True
2565+
Name = LabelInputName32
2566+
Anchor = Left, Top
2567+
ToolTip = None
2568+
Text = InputName
2569+
HAlignment = right
2570+
VAlignment = middle
2571+
2572+
[ButtonInputKey32]
2573+
ControlType = BUTTON
2574+
Parent = CollectionBoxScrollingMappingBox
2575+
X = 330
2576+
Y = 380
2577+
Width = 95
2578+
Height = 20
2579+
Visible = True
2580+
Enabled = True
2581+
Name = ButtonInputKey32
2582+
Anchor = Left, Top
2583+
ToolTip = None
2584+
Text = [InputKey]
2585+
2586+
[LabelInputName33]
2587+
ControlType = LABEL
2588+
Parent = CollectionBoxScrollingMappingBox
2589+
X = 215
2590+
Y = 380
2591+
Width = 110
2592+
Height = 20
2593+
Visible = True
2594+
Enabled = True
2595+
Name = LabelInputName33
2596+
Anchor = Left, Top
2597+
ToolTip = None
2598+
Text = InputName
2599+
HAlignment = right
2600+
VAlignment = middle
2601+
2602+
[ButtonInputKey33]
2603+
ControlType = BUTTON
2604+
Parent = CollectionBoxScrollingMappingBox
2605+
X = 330
2606+
Y = 380
2607+
Width = 95
2608+
Height = 20
2609+
Visible = True
2610+
Enabled = True
2611+
Name = ButtonInputKey33
2612+
Anchor = Left, Top
2613+
ToolTip = None
2614+
Text = [InputKey]
2615+
2616+
[LabelInputName34]
2617+
ControlType = LABEL
2618+
Parent = CollectionBoxScrollingMappingBox
2619+
X = 215
2620+
Y = 380
2621+
Width = 110
2622+
Height = 20
2623+
Visible = True
2624+
Enabled = True
2625+
Name = LabelInputName34
2626+
Anchor = Left, Top
2627+
ToolTip = None
2628+
Text = InputName
2629+
HAlignment = right
2630+
VAlignment = middle
2631+
2632+
[ButtonInputKey34]
2633+
ControlType = BUTTON
2634+
Parent = CollectionBoxScrollingMappingBox
2635+
X = 330
2636+
Y = 380
2637+
Width = 95
2638+
Height = 20
2639+
Visible = True
2640+
Enabled = True
2641+
Name = ButtonInputKey34
2642+
Anchor = Left, Top
2643+
ToolTip = None
2644+
Text = [InputKey]
2645+
25262646
[CollectionBoxInputCapture]
25272647
ControlType = COLLECTIONBOX
25282648
Parent = root
1.25 KB
Loading

0 commit comments

Comments
 (0)