Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
e18e8e6
Fix reload animation when reload stat is upgraded
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 21, 2025
7caef81
Add EntityManager pretick and posttick functions
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
aeaa4e1
Remove unused gamemode imports
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
27aff6c
fix: enforce types pre-build
abcxff Oct 22, 2025
50e76d1
docs: add addAccel deprecation notice
abcxff Oct 22, 2025
d09036e
feat: keepInArena sub method
abcxff Oct 22, 2025
d92dbe6
chore: code formatting
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
723d89e
Typo
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
b103290
Formatting
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
16887ee
Remove code from old version
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
6f56064
Let manageCountdown deal with this instead
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 22, 2025
b95da7f
Disable countdown for debug mode
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 23, 2025
3745219
Fix skimmer bullet angles
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 24, 2025
a97ad1d
Cleanup arena scaling
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Oct 24, 2025
d57639b
Mothership HP tiny fix
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Nov 1, 2025
8faed7b
Comment
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Nov 1, 2025
7fc81ec
Remove broken call
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Nov 2, 2025
549d4f3
Remove unused shape manager in 2 teams
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Nov 16, 2025
2146686
speedup maze walls slightly
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Nov 26, 2025
7cc7a3b
fix: ignore repeated keys to prevent client fps drop
abcxff Nov 27, 2025
f5c563d
Maze generator is now its own file
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
5e346fa
Maze cleanup
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
5d1aebd
comments
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
9fb08c1
init
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
8b2d4e3
remove this
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
69d8bad
restore default gamemodes
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
5f07e8d
fix O key spam
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 3, 2025
0f07d80
Rename "Systems" to "Misc"
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
06e1073
Add misc folder, moved shape manager there
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
b395e50
remove old shapemanager
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
c734d04
Style
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
66473e4
variable names
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
071483d
instanceof's last stand
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
c8b5539
necromancer square gives score
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
ac2b6ff
tweaks
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
71fe1d0
license
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
5b7e19f
Update Minion.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
e18a1f1
Fix commands crashing client when disconnected
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
e41a432
Fix
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 4, 2025
f399031
Spawning cleanup
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
f3f10f3
Boss spawner class
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
8ff66dd
Add files via upload
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
46305a6
fix
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
e975b58
remove testing code
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
3552b10
Update BossManager.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 6, 2025
282dc11
Update Live.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 7, 2025
8d2d290
Update Tag.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 8, 2025
0fa5bc9
Achievements data for future
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 8, 2025
67ac47e
Remove unusded imports
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 8, 2025
6065648
typo
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 8, 2025
50616f4
scoreboard update interval fix
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 8, 2025
32d5a87
util function tweaks
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 9, 2025
f9ca753
Use util.randomFrom function instead of doing this manually
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 9, 2025
6647dc6
Update TankBody.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 9, 2025
046296a
chore: cleanup
abcxff Dec 12, 2025
a3272f9
Merge branch 'instanceofs' of https://github.com/abcxff/diepcustom in…
abcxff Dec 12, 2025
1eabb82
chore: add typings
abcxff Dec 12, 2025
aaa7c27
fix: shuffle team colors on tag start
abcxff Dec 12, 2025
2a67dad
chore: npm audit fix
abcxff Dec 12, 2025
9f160d7
fix(maze): bring back countdown
abcxff Dec 12, 2025
3b0c9ba
fix: proper maze spawning
abcxff Dec 12, 2025
4dae6fd
chore: typo
abcxff Dec 12, 2025
03fc08f
space
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 12, 2025
e680c5e
fix: maze
abcxff Dec 12, 2025
0421d36
Merge branch 'instanceofs' of https://github.com/abcxff/diepcustom in…
abcxff Dec 12, 2025
81a5e0a
Update AbstractBoss.ts
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 13, 2025
7e7a6d3
Entity manager optimization
c86ec23b-fef1-4979-b2fa-b9adc351b8cc Dec 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions client/input.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ window.setupInput = () => {
}

window.onkeydown = e => {
if (e.repeat) return;
window.input.flushInputHooks();
if(e.keyCode >= 112 && e.keyCode <= 130 && e.keyCode !== 113) return;
window.input.keyDown(e.keyCode);
Expand Down
3 changes: 3 additions & 0 deletions client/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ Module.executeCommand = execCtx => {
if(!Module.commandDefinitions.find(({ id }) => id === tokens[0])) {
throw `${Module.executionCallbackMap[tokens]} for command ${cmd} is an invalid callback`;
}

if (Game.socket.readyState !== WebSocket.OPEN) return;

return Game.socket.send(new Uint8Array([
6,
...Encoder.encode(tokens[0]), 0,
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
],
"license": "AGPL-3.0-only",
"scripts": {
"build": "npx tsup",
"dev": "npx tsup --watch --onSuccess \"node lib/index.js\"",
"check": "npx tsc --noEmit",
"check": "tsc --noEmit",
"start": "node index",
"build": "npm run check && tsup",
"server": "npm run build && npm run start",
"dev": "tsup --watch --onSuccess \"npm run check && npm run start\"",
"docker:build": "docker build --tag diepcustom .",
"docker:start": "docker run --pull never --rm --publish ${PORT:-8080}:8080 --env PORT=8080 --env DEV_PASSWORD_HASH --env SERVER_INFO --env NODE_ENV --init --interactive --tty diepcustom",
"docker": "npm run docker:build && npm run docker:start"
Expand Down
17 changes: 7 additions & 10 deletions src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ export default class Client {
this.inputs.mouse.y = util.constrain(mouseY, minY, maxY);

const player = camera.cameraData.values.player;
if (!Entity.exists(player) || !(player instanceof TankBody)) return;

if (!Entity.exists(player) || !TankBody.isTank(player)) return;
// No AI
if (this.inputs.isPossessing && this.accessLevel !== config.AccessLevel.FullAccess) return;

Expand Down Expand Up @@ -346,7 +345,7 @@ export default class Client {
if (camera.cameraData.statsAvailable <= 0) return;

const player = camera.cameraData.values.player;
if (!Entity.exists(player) || !(player instanceof TankBody)) return;
if (!TankBody.isTank(player)) return;

const definition = getTankById(player.currentTank);
if (!definition || !definition.stats.length) return;
Expand All @@ -366,7 +365,7 @@ export default class Client {
}
case ServerBound.TankUpgrade: {
const player = camera.cameraData.values.player;
if (!Entity.exists(player) || !(player instanceof TankBody)) return;
if (!TankBody.isTank(player)) return;

const definition = getTankById(player.currentTank);
const tankId: Tank = r.vi() ^ TANK_XOR;
Expand Down Expand Up @@ -460,7 +459,7 @@ export default class Client {
ai.state = AIState.possessed;

// Silly workaround to change color of player when needed
if (this.camera?.cameraData.values.player instanceof ObjectEntity) {
if (ObjectEntity.isObject(this.camera?.cameraData.values.player)) {
const color = this.camera.cameraData.values.player.styleData.values.color;
this.camera.cameraData.values.player.styleData.values.color = -1 as Color;
this.camera.cameraData.values.player.styleData.color = color;
Expand All @@ -480,7 +479,7 @@ export default class Client {
this.camera.cameraData.player = ai.owner;
this.camera.cameraData.movementSpeed = ai.movementSpeed;

if (ai.owner instanceof TankBody) {
if (TankBody.isTank(ai.owner)) {
// If its a TankBody, set the stats, level, and tank to that of the TankBody
this.camera.cameraData.tank = ai.owner.cameraEntity.cameraData.values.tank;
this.camera.setLevel(ai.owner.cameraEntity.cameraData.values.level);
Expand All @@ -490,13 +489,13 @@ export default class Client {
for (let i = 0; i < StatCount; ++i) this.camera.cameraData.statNames[i as Stat] = ai.owner.cameraEntity.cameraData.statNames.values[i];

this.camera.cameraData.FOV = ai.owner.cameraEntity.cameraData.FOV;
} else if (ai.owner instanceof AbstractBoss) {
} else if (AbstractBoss.isBoss(ai.owner)) {
this.camera.setLevel(75);
this.camera.cameraData.FOV = 0.35;
} else {
this.camera.setLevel(30);
}

this.camera.cameraData.statsAvailable = 0;
this.camera.cameraData.score = 0;
this.camera.entityState = EntityStateFlags.needsCreate | EntityStateFlags.needsDelete;
Expand Down Expand Up @@ -553,8 +552,6 @@ export default class Client {
camera.spectatee = null;
this.inputs.isPossessing = false;
this.inputs.movement.magnitude = 0;

if (camera.cameraData.values.flags & CameraFlags.gameWaitingStart) camera.cameraData.values.flags &= ~CameraFlags.gameWaitingStart;
}

public tick(tick: number) {
Expand Down
Loading