mirror of
https://github.com/blitzkit/blitzkit.git
synced 2026-10-24 03:59:50 +02:00
Merge pull request #189 from Hitjack007/main
Fix Turret chnage not affecting DPM
This commit is contained in:
2 files changed
+11
-5
No files matched your search
@@ -21,7 +21,7 @@ export abstract class AbstractVFS {
|
|||||||
const normalized = normalize(path);
|
const normalized = normalize(path);
|
||||||
if (this.has(normalized)) return normalized;
|
if (this.has(normalized)) return normalized;
|
||||||
|
|
||||||
const dvplPath = `${path}.dvpl`;
|
const dvplPath = `${normalized}.dvpl`;
|
||||||
if (this.has(dvplPath)) return dvplPath;
|
if (this.has(dvplPath)) return dvplPath;
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+10
-4
@@ -176,11 +176,17 @@ export function Modules() {
|
|||||||
(turret) => turret.id === unlock.id
|
(turret) => turret.id === unlock.id
|
||||||
)!;
|
)!;
|
||||||
|
|
||||||
if (
|
// Check if current gun exists in new turret
|
||||||
!draft.protagonist.turret.guns.some(
|
const gunInNewTurret = draft.protagonist.turret.guns.find(
|
||||||
(gun) => gun.id === draft.protagonist.gun.id
|
(gun) => gun.id === draft.protagonist.gun.id
|
||||||
)
|
);
|
||||||
) {
|
|
||||||
|
if (gunInNewTurret) {
|
||||||
|
// Gun exists - get it FROM this turret
|
||||||
|
draft.protagonist.gun = gunInNewTurret;
|
||||||
|
draft.protagonist.shell = gunInNewTurret.shells[0];
|
||||||
|
} else {
|
||||||
|
// Gun doesn't exist - select top gun from new turret
|
||||||
draft.protagonist.gun = draft.protagonist.turret.guns.at(-1)!;
|
draft.protagonist.gun = draft.protagonist.turret.guns.at(-1)!;
|
||||||
draft.protagonist.shell = draft.protagonist.gun.shells[0];
|
draft.protagonist.shell = draft.protagonist.gun.shells[0];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user