Skip to content

Commit 698e7bc

Browse files
committed
currentAmmoType, velocityX and velocityY
1 parent d7eec98 commit 698e7bc

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

compiler/lib/globals.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,7 @@ declare namespace LAccess {
229229
const powerNetOut: unique symbol;
230230
const ammo: unique symbol;
231231
const ammoCapacity: unique symbol;
232+
const currentAmmoType: unique symbol;
232233
const health: unique symbol;
233234
const maxHealth: unique symbol;
234235
const heat: unique symbol;
@@ -240,6 +241,8 @@ declare namespace LAccess {
240241
const rotation: unique symbol;
241242
const x: unique symbol;
242243
const y: unique symbol;
244+
const velocityX: unique symbol;
245+
const velocityY: unique symbol;
243246
const shootX: unique symbol;
244247
const shootY: unique symbol;
245248
const cameraX: unique symbol;

compiler/lib/kinds.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ interface BasicUnit
1818
WithSpeed,
1919
WithColor,
2020
WithTeam,
21-
WithArmor {}
21+
WithArmor,
22+
WithVelocity {}
2223

2324
interface AnyUnit extends BasicUnit, Boosted, WithCamera {}
2425

compiler/lib/traits.d.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ declare global {
5757
readonly shootY: number;
5858
readonly ammo: number;
5959
readonly ammoCapacity: number;
60+
readonly currentAmmoType?: ItemSymbol | LiquidSymbol;
6061
}> {}
6162

6263
interface WithHealth
@@ -262,4 +263,10 @@ declare global {
262263
extends WithSymbols<{
263264
readonly solid: boolean;
264265
}> {}
266+
267+
interface WithVelocity
268+
extends WithSymbols<{
269+
readonly velocityX: number;
270+
readonly velocityY: number;
271+
}> {}
265272
}

compiler/lib/util.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ declare module "mlogjs:types" {
8585
speed: number;
8686
shield: number;
8787
armor: number;
88+
velocityX: number;
89+
velocityY: number;
8890
}
8991
> {}
9092

0 commit comments

Comments
 (0)