Skip to content

Commit 0853cbe

Browse files
authored
Merge branch 'development' into zip-save-files
2 parents bb24006 + 9dd15cc commit 0853cbe

File tree

491 files changed

+17358
-4982
lines changed

Some content is hidden

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

491 files changed

+17358
-4982
lines changed

CHANGELOG.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5858

5959
- New hotkey system for `Actor` and `HeldDevice`.
6060
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`.
61+
`Enum` binding for `HeldDevice.HeldDeviceHotkeyType`: `PRIMARYHOTKEY = 0, AUXILIARYHOTKEY = 1, HELDDEVICEHOTKEYTYPECOUNT = 2`.
62+
`Enum` binding for `Actor.ActorHotkeyType`: `PRIMARYHOTKEY = 0, AUXILIARYHOTKEY = 1, ACTORHOTKEYTYPECOUNT = 2`.
6363
Both `Actor` and `HeldDevice` have the following functions:
6464
`HotkeyActionIsActivated(hotkeyType)` returns whether a certain hotkey action is being activated or not.
6565
`ActivateHotkeyAction(hotkeyType)` activates a certain hotkey action.
6666
`DeactivateHotkeyAction(hotkeyType)` deactivates a certain hotkey action.
67+
68+
- New `Controller` state `WEAPON_RELOADHELD`, which is true every frame reload input is held (as opposed to `WEAPON_RELOAD` which is only true once when pressed).
6769

6870
- New `GAScripted` Lua script method `IsCompatibleScene(scene)` to allow Activities to generically decide which Scenes are eligible by returning a boolean value.
6971
New `GAScripted` INI enumerating property `AddRequiredArea`, replacing Lua file scanning, to allow Activities to explicitly state which areas are strictly required.
@@ -79,8 +81,28 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
7981

8082
- New `Attachable` INI and Lua (R/W) properties `InheritsVelWhenDetached` and `InheritsAngularVelWhenDetached`, which determine how much of these velocities an attachable inherits from its parent when detached. Defaults to 1.
8183

84+
- Added Lua-accessible bitmap manipulation functions to `MOSprite`s:
85+
```
86+
GetSpritePixelIndex(int x, int y, int whichFrame) - Returns the color index of the pixel at the given coordinate on the given frame of the sprite ((0, 0) is the upper left corner!)
87+
88+
SetSpritePixelIndex(int x, int y, int whichFrame, int colorIndex, int ignoreIndex, bool invert) - Sets the color of the pixel at the given coordinate on the given frame of the sprite, skipping if the pixel has same color index as given in "ignoreIndex". If "invert" is set to true, only pixels of that color index are set.
89+
90+
GetAllSpritePixelPositions(const Vector& origin, float angle, bool hflipped, int whichFrame, int ignoreIndex, bool invert, bool includeChildren) - Returns a list of vectors pointing to the absolute positions of all pixels in the given frame of the sprite, rotated to match "angle", flipped to match "hflipped" and positioned around "origin", providing a full silhouette of the MOSprite. "IgnoreIndex" and "invert" are like above, "includeChildren" denotes whether or not to include all children of the MOSprite (no effect if not at least an MOSRotating).
91+
92+
GetAllVisibleSpritePixelPositions(bool includeChildren) - Simplified version of the above, returning a list of absolute positions of the visible pixels of the current frame of the sprite as it is currently drawn.
93+
94+
SetAllSpritePixelIndexes(int whichFrame, int colorIndex, int ignoreIndex, bool invert) - Sets all pixels in the given frame of the sprite to the given color index, ignoring and inverting as above.
95+
96+
SetAllVisibleSpritePixelIndexes(int colorIndex) - Simplified version of the above, sets all visible pixels of the currently visible sprite to the given color index.
97+
```
98+
- Added `Material` Lua function `GetColorIndex()`, which returns the color index of the calling material.
99+
82100
- New `ACraft` INI and Lua (R/W) property `CanEnterOrbit`, which determines whether a craft can enter orbit (and refund gold appropriately) or not. If false, default out-of-bounds deletion logic applies.
83101

102+
- New `MovableMan` function `GetMOsAtPosition(posX, posY, ignoreTeam, getsHitByMOsOnly)` that will return an iterator with all the `MovableObject`s that intersect that exact position with their sprite.
103+
104+
- New `SceneMan` function `CastAllMOsRay(startVector, rayVector, table ignoreMOIDs, ignoreTeam, ignoreMaterial, bool ignoreAllTerrain, int skip)` which returns an iterator with pointers to all the non-ignored MOs met along the ray.
105+
84106
</details>
85107

86108
<details><summary><b>Changed</b></summary>
@@ -127,6 +149,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
127149

128150
- `MOSRotating` Lua function `AddWound` now additionally accepts the format `MOSRotating:AddWound(AEmitter* woundToAdd, const Vector& parentOffsetToSet, bool checkGibWoundLimit, bool isEntryWound, bool isExitWound)`, allowing modders to specify added wounds as entry- or exit wounds, for the purpose of not playing multiple burst sounds on the same frame. These new arguments are optional.
129151

152+
- `SceneMan` function `CastFindMORay` now has an extra bool parameter `findChildMOIDs` that denotes whether it also triggers on child MOIDs or not, which defaults to true for the same default behavior as before.
153+
154+
- `SceneMan` function `CastMORay` now can also accept a table of MOIDs instead of a single MOID, letting you ignore any arbitrary set of MOIDs.
155+
156+
- Techion Laser Rifle now has a constant range rather than being dependent on game resolution.
157+
130158
- Various performance improvements.
131159

132160
</details>
@@ -149,10 +177,18 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
149177

150178
- Fixed an issue where internal Lua functions OriginalDoFile, OriginalLoadFile, and OriginalRequire were polluting the global namespace. They have now been made inaccessible.
151179

180+
- Fixed `MOSprite:UnRotateOffset()` giving the wrong results on HFLipped sprites.
181+
182+
- Various fixes and improvements to inventory management when dual-wielding or carrying a shield, to stop situations where the actor unexpectedly puts their items away.
183+
152184
- Fixed issue where MOSR `Gib`s, `AEmitter` or `PEmitter` `Emission`s, and MetaMan `Player`s were not correctly accessible from script.
153185

154186
- Fixed a crash on launch when the `SupportedGameVersion` INI property was not set.
155187

188+
- Fixed several issues with the way pie menus and aiming interacts between players, such as opening the pie menu always resetting the M&KB player's aim and pie selection, as well as another issue where the pie menu would fail to appear entirely for some players.
189+
190+
- Fixed issue where scripts applied to `MovableObject`s could become disordered in certain circumstances.
191+
156192
</details>
157193

158194
<details><summary><b>Removed</b></summary>

Data/Base.rte/AI/SharedBehaviors.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ function SharedBehaviors.Patrol(AI, Owner, Abort)
259259

260260
if Dist:MagnitudeIsGreaterThan(20) then
261261
Owner:ClearAIWaypoints();
262-
Owner:AddAISceneWaypoint(Free);
262+
Owner:AddAISceneWaypoint(Free);
263263
Owner:UpdateMovePath();
264264

265265
-- wait until movepath is updated
@@ -434,7 +434,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
434434
local obstacleState = Actor.PROCEEDING;
435435
local Obst = {R_LOW = 1, R_FRONT = 2, R_HIGH = 3, R_UP = 5, L_UP = 6, L_HIGH = 8, L_FRONT = 9, L_LOW = 10};
436436
local Facings = {{aim=0, facing=0}, {aim=1.4, facing=1.4}, {aim=1.4, facing=math.pi-1.4}, {aim=0, facing=math.pi}};
437-
437+
438438
local NeedsNewPath, Waypoint, HasMovePath, Dist, CurrDist;
439439
NeedsNewPath = true;
440440

@@ -518,7 +518,7 @@ function SharedBehaviors.GoToWpt(AI, Owner, Abort)
518518
end
519519

520520
AverageVel = SharedBehaviors.UpdateAverageVel(Owner, AverageVel);
521-
521+
522522
local stuckThreshold = 2.5; -- pixels per second of movement we need to be considered not stuck
523523

524524
-- Cap AverageVel, so if we have a spike in velocity it doesn't take too long to come back down
@@ -1089,7 +1089,7 @@ function SharedBehaviors.GetProjectileData(Owner)
10891089
PrjDat.vqu = PrjDat.vsq^2; -- muzzle velocity quad
10901090
PrjDat.drg = 1 - Projectile.AirResistance * TimerMan.DeltaTimeSecs; -- AirResistance is stored as the ini-value times 60
10911091
PrjDat.thr = math.min(Projectile.AirThreshold, PrjDat.vel);
1092-
PrjDat.pen = (Projectile.Mass * Projectile.Sharpness * PrjDat.vel) * PrjDat.drg;
1092+
PrjDat.pen = Weapon:GetAIPenetration() * PrjDat.drg;
10931093

10941094
PrjDat.blast = Weapon:GetAIBlastRadius();
10951095
if PrjDat.blast > 0 or Weapon:IsInGroup("Weapons - Explosive") then

Data/Base.rte/Actors/Mecha/AADrone/Drone.ini

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,21 @@ AddDevice = HDFirearm
8585
Flash = Attachable
8686
CopyOf = Muzzle Flash SMG
8787
FireSound = SoundContainer
88-
AddSound = ContentFile
89-
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Fire1.flac
88+
AttenuationStartDistance = 165
89+
SoundSelectionCycleMode = All
90+
AddSoundSet = SoundSet
91+
AddSound = ContentFile
92+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot1.flac
93+
AddSound = ContentFile
94+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot2.flac
95+
AddSound = ContentFile
96+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot3.flac
97+
AddSound = ContentFile
98+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot4.flac
99+
AddSound = ContentFile
100+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot5.flac
101+
AddSound = ContentFile
102+
FilePath = Ronin.rte/Devices/Weapons/AK47/Sounds/Shot6.flac
90103
EmptySound = SoundContainer
91104
AddSound = ContentFile
92105
FilePath = Base.rte/Sounds/Devices/EmptyClick1.flac
232 Bytes
Loading
195 Bytes
Loading
195 Bytes
Loading
202 Bytes
Loading
212 Bytes
Loading
205 Bytes
Loading
197 Bytes
Loading

0 commit comments

Comments
 (0)