Browse Source

Fix card rendering

main
Stephanie Gredell 4 months ago
parent
commit
a8583c1093
  1. 8
      src/main.js
  2. 8
      src/ui/render.js

8
src/main.js

@ -193,6 +193,11 @@ const root = { @@ -193,6 +193,11 @@ const root = {
clearSave() {
localStorage.removeItem('birthday-spire-save');
},
// Clear any old saves with outdated card IDs
clearOldSaves() {
localStorage.removeItem('birthday-spire-save');
}
};
@ -298,6 +303,9 @@ function setupMockData() { @@ -298,6 +303,9 @@ function setupMockData() {
}
function loadNormalGame() {
// Clear old saves to prevent card ID conflicts after refactoring
root.clearOldSaves();
const hasLoadedData = root.load();
if (hasLoadedData) {
renderMap(root);

8
src/ui/render.js

@ -1158,16 +1158,16 @@ function getCardArt(cardId) { @@ -1158,16 +1158,16 @@ function getCardArt(cardId) {
skill_issue: 'Monk_9.png', // Protection
"404": 'Monk_10.png', // Ban/restriction
segfault: 'Monk_11.png', // Powerful attack
dark_mode: 'Monk_11.png', // Powerful attack
task_failed_successfully: 'Monk_12.png', // Precise strike
recursion: 'Monk_13.png', // Repetition
merge_conflict: 'Monk_14.png', // Dual attack
hotfix: 'Monk_15.png', // Emergency fix
production_deploy: 'Monk_16.png', // High risk/reward
gc: 'Monk_17.png', // Cleanup
async_await: 'Monk_18.png', // Time manipulation
stack_overflow: 'Monk_19.png', // Knowledge overflow
object_object: 'Monk_17.png', // Cleanup
just_one_game: 'Monk_18.png', // Time manipulation
colon_q: 'Monk_19.png', // Knowledge overflow
vibe_code: 'Monk_20.png', // Infinite power
raw_dog: 'Monk_21.png', // Information
git_commit: 'Monk_22.png', // Recording

Loading…
Cancel
Save