You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updated changelog, added Materal::GetColorIndex(), updated MOSprite bitmap manipulation functions sorry i can't remember all the the changes but they're good i promise
Copy file name to clipboardExpand all lines: CHANGELOG.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,6 +79,22 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
79
79
80
80
- 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.
81
81
82
+
- Added Lua-accessible bitmap manipulation functions to `MOSprite`s:
83
+
```
84
+
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!)
85
+
86
+
SetSpritePixelIndex(int x, int y, int whichFrame, int colorIndex, int ignoreIndex, bool invert) - Sets the color of the pixel at the given coordinate on thegiven 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.
87
+
88
+
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, include children denotes whether or not to include all children of the MOSprite (no effect if not at least an MOSRotating).
89
+
90
+
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.
91
+
92
+
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.
93
+
94
+
SetAllVisibleSpritePixelIndexes(int colorIndex) - Simplified version of the above, sets all visible pixels of the currently visible sprite to the given color index.
95
+
```
96
+
- Added `Material` Lua function `GetColorIndex()`, which returns the color index of the calling material.
97
+
82
98
- 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.
83
99
84
100
</details>
@@ -149,6 +165,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
149
165
150
166
- Fixed an issue where internal Lua functions OriginalDoFile, OriginalLoadFile, and OriginalRequire were polluting the global namespace. They have now been made inaccessible.
151
167
168
+
- Fixed `MOSprite:UnRotateOffset()` giving the wrong results on HFLipped sprites.
169
+
152
170
- 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.
153
171
154
172
- Fixed issue where MOSR `Gib`s, `AEmitter` or `PEmitter``Emission`s, and MetaMan `Player`s were not correctly accessible from script.
0 commit comments