Skip to content

Commit

Permalink
fix: Add missing calls to NPC update function.
Browse files Browse the repository at this point in the history
  • Loading branch information
elondaits committed Jul 2, 2024
1 parent cfa59bb commit a7396a2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 3 deletions.
1 change: 0 additions & 1 deletion assets/map.1149f43f94574738da24.js.map

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -39738,6 +39738,7 @@ class MapApp {
this.addScenery(new Scenery(id, props));
});
this.updateScenery();
mapApp.updateNpcs();
Object.entries(storyline.npcs).forEach(([id, props]) => {
this.addNpc(new Character(id, props));
});
Expand All @@ -39747,10 +39748,12 @@ class MapApp {
this.questTracker.events.on('questActive', () => {
this.updateQuestMarkers();
this.updateScenery();
mapApp.updateNpcs();
});
this.questTracker.events.on('questDone', () => {
this.updateQuestMarkers();
this.updateScenery();
mapApp.updateNpcs();
});

this.pcs = {};
Expand Down Expand Up @@ -39835,6 +39838,7 @@ class MapApp {
}

this.updateScenery();
mapApp.updateNpcs();
});

// Game loop
Expand Down Expand Up @@ -43662,4 +43666,4 @@ const MapApp = __webpack_require__(/*! ./lib/app/map-app */ "./src/js/lib/app/ma

/******/ })()
;
//# sourceMappingURL=map.1149f43f94574738da24.js.map
//# sourceMappingURL=map.f95f6b35d1422c84e653.js.map
1 change: 1 addition & 0 deletions assets/map.f95f6b35d1422c84e653.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion map.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<!doctype html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><meta name="apple-mobile-web-app-title" content="CQ Map"/><title>Map | Citizen Quest</title><link rel="icon" type="image/png" href="static/ui/favicon.png"><link rel="stylesheet" href="vendor/bootstrap-v5.2.3/bootstrap.min.css"><script src="vendor/jquery-v3.6.4/jquery-3.6.4.min.js"></script><script src="vendor/bootstrap-v5.2.3/bootstrap.bundle.min.js"></script><script src="vendor/pixi-v7.2.4/pixi-legacy.min.js"></script><script src="vendor/tween.js-v20.0.0/tween.umd.js"></script><meta name="title" content="Map | Citizen Quest"><meta name="description" content="A game about the future of democracy"><script defer="defer" src="assets/map.1149f43f94574738da24.js"></script><link href="assets/map.8490b0dcb785b8f4be5a.css" rel="stylesheet"></head><body><div data-component="MapApp"></div></body>
<!doctype html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/><meta name="apple-mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><meta name="apple-mobile-web-app-title" content="CQ Map"/><title>Map | Citizen Quest</title><link rel="icon" type="image/png" href="static/ui/favicon.png"><link rel="stylesheet" href="vendor/bootstrap-v5.2.3/bootstrap.min.css"><script src="vendor/jquery-v3.6.4/jquery-3.6.4.min.js"></script><script src="vendor/bootstrap-v5.2.3/bootstrap.bundle.min.js"></script><script src="vendor/pixi-v7.2.4/pixi-legacy.min.js"></script><script src="vendor/tween.js-v20.0.0/tween.umd.js"></script><meta name="title" content="Map | Citizen Quest"><meta name="description" content="A game about the future of democracy"><script defer="defer" src="assets/map.f95f6b35d1422c84e653.js"></script><link href="assets/map.8490b0dcb785b8f4be5a.css" rel="stylesheet"></head><body><div data-component="MapApp"></div></body>
4 changes: 4 additions & 0 deletions src/js/lib/app/map-app.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class MapApp {
this.addScenery(new Scenery(id, props));
});
this.updateScenery();
mapApp.updateNpcs();
Object.entries(storyline.npcs).forEach(([id, props]) => {
this.addNpc(new Character(id, props));
});
Expand All @@ -52,10 +53,12 @@ class MapApp {
this.questTracker.events.on('questActive', () => {
this.updateQuestMarkers();
this.updateScenery();
mapApp.updateNpcs();
});
this.questTracker.events.on('questDone', () => {
this.updateQuestMarkers();
this.updateScenery();
mapApp.updateNpcs();
});

this.pcs = {};
Expand Down Expand Up @@ -140,6 +143,7 @@ class MapApp {
}

this.updateScenery();
mapApp.updateNpcs();
});

// Game loop
Expand Down

0 comments on commit a7396a2

Please sign in to comment.