From ebac6dc18b82f3c7d1d0ec0ac071be89d80f4230 Mon Sep 17 00:00:00 2001 From: Luna Luna Date: Mon, 24 Aug 2026 23:54:07 -0600 Subject: [PATCH] feat: implement localization system, shop data, and game tools service --- public/data/shop.json | 149 +++++++++++++++++++----------- public/lang/texts.en.lang | 6 ++ public/lang/texts.es.lang | 6 ++ src/app/services/tools.service.ts | 5 +- ver | 2 +- 5 files changed, 110 insertions(+), 58 deletions(-) diff --git a/public/data/shop.json b/public/data/shop.json index e727ae2..a23e3aa 100644 --- a/public/data/shop.json +++ b/public/data/shop.json @@ -120,7 +120,7 @@ "multiplier": 1, "durationMin": 0, "icon": "img/dogecoin.png", - "dailyLimit": "${daily_price_4} / 10 + 1" + "dailyLimit": 0 }, { "id": "dogecoin_5", @@ -133,7 +133,7 @@ "multiplier": 1, "durationMin": 0, "icon": "img/dogecoin.png", - "dailyLimit": "${daily_price_2} / 10 + 1" + "dailyLimit": 0 }, { "id": "dogecoin_6", @@ -146,7 +146,46 @@ "multiplier": 1, "durationMin": 0, "icon": "img/dogecoin.png", - "dailyLimit": "${daily_price_3} / 10 + 1" + "dailyLimit": 0 + }, + { + "id": "dogecoin_7", + "type": "dogecoin", + "nameKey": "shop_dogecoin_50_name", + "descKey": "shop_dogecoin_50_desc", + "cost": "${daily_price} * 50 - ${daily_price} - ${daily_price_4} * 2", + "costCoins": 0, + "coinsGiven": 50, + "multiplier": 1, + "durationMin": 0, + "icon": "img/dogecoin.png", + "dailyLimit": 0 + }, + { + "id": "dogecoin_8", + "type": "dogecoin", + "nameKey": "shop_dogecoin_100_name", + "descKey": "shop_dogecoin_100_desc", + "cost": "${daily_price} * 100 - ${daily_price} - ${daily_price_1} * 2", + "costCoins": 0, + "coinsGiven": 100, + "multiplier": 1, + "durationMin": 0, + "icon": "img/dogecoin.png", + "dailyLimit": 0 + }, + { + "id": "dogecoin_9", + "type": "dogecoin", + "nameKey": "shop_dogecoin_200_name", + "descKey": "shop_dogecoin_200_desc", + "cost": "${daily_price} * 200 - ${daily_price} - ${daily_price_2} * 2", + "costCoins": 0, + "coinsGiven": 200, + "multiplier": 1, + "durationMin": 0, + "icon": "img/dogecoin.png", + "dailyLimit": 0 }, { "id": "curr_dgc_to_mg", @@ -289,7 +328,7 @@ "type": "cheems", "nameKey": "cheems_little", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/cheems/little.webp", "oneTimePurchase": true @@ -299,7 +338,7 @@ "type": "cheems", "nameKey": "cheems_adult", "cost": 0, - "costCoins": 450, + "costCoins": 900, "costMinigames": 0, "icon": "img/cheems/adult.webp", "oneTimePurchase": true @@ -309,7 +348,7 @@ "type": "cheems", "nameKey": "cheems_kid", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/cheems/kid.webp", "oneTimePurchase": true @@ -319,7 +358,7 @@ "type": "cheems", "nameKey": "cheems_mamado", "cost": 0, - "costCoins": 1200, + "costCoins": 2400, "costMinigames": 0, "icon": "img/cheems/mamado.webp", "oneTimePurchase": true @@ -329,7 +368,7 @@ "type": "cheems", "nameKey": "cheems_pixelart", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 0, "icon": "img/cheems/pixelart.webp", "oneTimePurchase": true @@ -339,7 +378,7 @@ "type": "cheems", "nameKey": "cheems_elegant", "cost": 0, - "costCoins": 1500, + "costCoins": 3000, "costMinigames": 0, "icon": "img/cheems/elegant.webp", "oneTimePurchase": true @@ -349,7 +388,7 @@ "type": "cheems", "nameKey": "cheems_3d", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 0, "icon": "img/cheems/3d.webp", "oneTimePurchase": true @@ -359,7 +398,7 @@ "type": "cheems", "nameKey": "cheems_black", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 0, "icon": "img/cheems/black.webp", "oneTimePurchase": true @@ -369,7 +408,7 @@ "type": "cheems", "nameKey": "cheems_not_ai", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 0, "icon": "img/cheems/not_ai.webp", "oneTimePurchase": true @@ -379,7 +418,7 @@ "type": "cheems", "nameKey": "cheems_realistic", "cost": 0, - "costCoins": 1500, + "costCoins": 3000, "costMinigames": 0, "icon": "img/cheems/realistic.webp", "oneTimePurchase": true @@ -389,7 +428,7 @@ "type": "cheems", "nameKey": "cheems_not_a_dog", "cost": 0, - "costCoins": 1200, + "costCoins": 2400, "costMinigames": 0, "icon": "img/cheems/not_a_dog.webp", "oneTimePurchase": true @@ -399,7 +438,7 @@ "type": "cheems", "nameKey": "cheems_not_a_plumber", "cost": 0, - "costCoins": 1200, + "costCoins": 2400, "costMinigames": 1500, "icon": "img/cheems/not_a_plumber.webp", "oneTimePurchase": true @@ -409,7 +448,7 @@ "type": "cheems", "nameKey": "cheems_minecraft", "cost": 0, - "costCoins": 1200, + "costCoins": 2400, "costMinigames": 1200, "icon": "img/cheems/cubes.webp", "oneTimePurchase": true @@ -422,7 +461,7 @@ "type": "sound", "nameKey": "sfx_2", "cost": 0, - "costCoins": 450, + "costCoins": 900, "costMinigames": 450, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -432,7 +471,7 @@ "type": "sound", "nameKey": "sfx_3", "cost": 0, - "costCoins": 450, + "costCoins": 900, "costMinigames": 450, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -442,7 +481,7 @@ "type": "sound", "nameKey": "sfx_4", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 800, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -452,7 +491,7 @@ "type": "sound", "nameKey": "sfx_5", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 800, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -462,7 +501,7 @@ "type": "sound", "nameKey": "sfx_6", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 300, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -472,7 +511,7 @@ "type": "sound", "nameKey": "sfx_7", "cost": 0, - "costCoins": 450, + "costCoins": 900, "costMinigames": 450, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -482,7 +521,7 @@ "type": "sound", "nameKey": "sfx_8", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -492,7 +531,7 @@ "type": "sound", "nameKey": "sfx_9", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -502,7 +541,7 @@ "type": "sound", "nameKey": "sfx_10", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -512,7 +551,7 @@ "type": "sound", "nameKey": "sfx_11", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -522,7 +561,7 @@ "type": "sound", "nameKey": "sfx_12", "cost": 0, - "costCoins": 800, + "costCoins": 1600, "costMinigames": 0, "icon": "img/icons/sound-svgrepo-com.svg", "oneTimePurchase": true @@ -535,7 +574,7 @@ "type": "music", "nameKey": "music_2", "cost": 0, - "costCoins": 1500, + "costCoins": 3000, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -545,7 +584,7 @@ "type": "music", "nameKey": "music_3", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -555,7 +594,7 @@ "type": "music", "nameKey": "music_4", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -565,7 +604,7 @@ "type": "music", "nameKey": "music_5", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -575,7 +614,7 @@ "type": "music", "nameKey": "music_6", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -585,7 +624,7 @@ "type": "music", "nameKey": "music_7", "cost": 0, - "costCoins": 1500, + "costCoins": 3000, "costMinigames": 1500, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -595,7 +634,7 @@ "type": "music", "nameKey": "music_8", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -605,7 +644,7 @@ "type": "music", "nameKey": "music_9", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -615,7 +654,7 @@ "type": "music", "nameKey": "music_10", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -625,7 +664,7 @@ "type": "music", "nameKey": "music_11", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -635,7 +674,7 @@ "type": "music", "nameKey": "music_12", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -645,7 +684,7 @@ "type": "music", "nameKey": "music_13", "cost": 0, - "costCoins": 300, + "costCoins": 600, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -655,7 +694,7 @@ "type": "music", "nameKey": "music_14", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -665,7 +704,7 @@ "type": "music", "nameKey": "music_15", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -675,7 +714,7 @@ "type": "music", "nameKey": "music_16", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -685,7 +724,7 @@ "type": "music", "nameKey": "music_17", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -695,7 +734,7 @@ "type": "music", "nameKey": "music_18", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -705,7 +744,7 @@ "type": "music", "nameKey": "music_19", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -715,7 +754,7 @@ "type": "music", "nameKey": "music_20", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -725,7 +764,7 @@ "type": "music", "nameKey": "music_21", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -735,7 +774,7 @@ "type": "music", "nameKey": "music_22", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -745,7 +784,7 @@ "type": "music", "nameKey": "music_23", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -755,7 +794,7 @@ "type": "music", "nameKey": "music_24", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 550, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -765,7 +804,7 @@ "type": "music", "nameKey": "music_25", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -775,7 +814,7 @@ "type": "music", "nameKey": "music_26", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -785,7 +824,7 @@ "type": "music", "nameKey": "music_27", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -795,7 +834,7 @@ "type": "music", "nameKey": "music_28", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true @@ -805,7 +844,7 @@ "type": "music", "nameKey": "music_29", "cost": 0, - "costCoins": 550, + "costCoins": 1100, "costMinigames": 0, "icon": "img/icons/music-svgrepo-com.svg", "oneTimePurchase": true diff --git a/public/lang/texts.en.lang b/public/lang/texts.en.lang index 36173f2..8b0a1c5 100644 --- a/public/lang/texts.en.lang +++ b/public/lang/texts.en.lang @@ -225,6 +225,12 @@ "shop_dogecoin_10_desc": "You get 10 Dogecoins. The price changes everyday!", "shop_dogecoin_20_name": "DogeCoin x20", "shop_dogecoin_20_desc": "You get 20 Dogecoins. The price changes everyday!", + "shop_dogecoin_50_name": "DogeCoin x50", + "shop_dogecoin_50_desc": "You get 50 Dogecoins. The price changes everyday!", + "shop_dogecoin_100_name": "DogeCoin x100", + "shop_dogecoin_100_desc": "You get 100 Dogecoins. The price changes everyday!", + "shop_dogecoin_200_name": "DogeCoin x200", + "shop_dogecoin_200_desc": "You get 200 Dogecoins. The price changes everyday!", "shop_boost_2x_5m_name": "Booster x2 (5 min)", "shop_boost_2x_5m_desc": "Double your points per click for 5 minutes.", "shop_boost_3x_5m_name": "Booster x3 (5 min)", diff --git a/public/lang/texts.es.lang b/public/lang/texts.es.lang index a47beda..0d3c35f 100644 --- a/public/lang/texts.es.lang +++ b/public/lang/texts.es.lang @@ -225,6 +225,12 @@ "shop_dogecoin_10_desc": "Obtienes 10 Dogecoin. ¡El precio cambia cada día!", "shop_dogecoin_20_name": "DogeCoin x20", "shop_dogecoin_20_desc": "Obtienes 20 Dogecoin. ¡El precio cambia cada día!", + "shop_dogecoin_50_name": "DogeCoin x50", + "shop_dogecoin_50_desc": "Obtienes 50 Dogecoin. ¡El precio cambia cada día!", + "shop_dogecoin_100_name": "DogeCoin x100", + "shop_dogecoin_100_desc": "Obtienes 100 Dogecoin. ¡El precio cambia cada día!", + "shop_dogecoin_200_name": "DogeCoin x200", + "shop_dogecoin_200_desc": "Obtienes 200 Dogecoin. ¡El precio cambia cada día!", "shop_boost_2x_5m_name": "Potenciador x2 (5 min)", "shop_boost_2x_5m_desc": "Duplica tus puntos por clic durante 5 minutos.", "shop_boost_3x_5m_name": "Potenciador x3 (5 min)", diff --git a/src/app/services/tools.service.ts b/src/app/services/tools.service.ts index ebe83b0..e1e4449 100644 --- a/src/app/services/tools.service.ts +++ b/src/app/services/tools.service.ts @@ -920,7 +920,6 @@ export class ToolsService { this.loadSettings(); this.loadLanguageFile(this.lang); this.loadClosetPrices(); - this.loadShopItems(); this.loadMinigamesConfig(); this.loadBoosterState(); this.setupWindowFocusListeners(); @@ -929,7 +928,9 @@ export class ToolsService { this.loadMusic(); this.loadScore(); this.loadUnlocks(); - this.initIdlePoints(); + this.loadShopItems().then(() => { + this.initIdlePoints(); + }); this.loadRedeemedCodes(); } diff --git a/ver b/ver index 9f8e9b6..b123147 100644 --- a/ver +++ b/ver @@ -1 +1 @@ -1.0 \ No newline at end of file +1.1 \ No newline at end of file