Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
hacky thingy for halloween nades :)
Browse files Browse the repository at this point in the history
  • Loading branch information
leia-uwu committed Oct 24, 2024
1 parent 4b57f19 commit 791d4e4
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion client/src/objects/projectile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ import type { Obstacle } from "./obstacle";
import type { ParticleBarn } from "./particles";
import type { AbstractObject, Player } from "./player";

const halloweenSpriteMap: Record<string, string> = {
"proj-frag-nopin-01.img": "proj-frag-nopin-02.img",
"proj-frag-nopin-nolever-01.img": "proj-frag-nopin-nolever-02.img",
"proj-frag-pin-01.img": "proj-frag-pin-02.img",
"proj-mirv-mini-01.img": "proj-mirv-mini-02.img",
};

class Projectile implements AbstractObject {
__id!: number;
__type!: ObjectType.Projectile;
Expand Down Expand Up @@ -125,7 +132,12 @@ class Projectile implements AbstractObject {
}

// Setup sprite
this.sprite.texture = PIXI.Texture.from(imgDef.sprite);
let sprite = imgDef.sprite;
// @HACK: halloween sprites
if (ctx.map.mapDef.gameMode.spookyKillSounds) {
sprite = halloweenSpriteMap[sprite] || sprite;
}
this.sprite.texture = PIXI.Texture.from(sprite);
this.sprite.tint = imgDef.tint;
this.sprite.alpha = 1;

Expand Down

0 comments on commit 791d4e4

Please sign in to comment.