From b9edfa0fdebb600a5bd4c5945c23ce3c4c6cc9a9 Mon Sep 17 00:00:00 2001
From: yukineko <27853966+hideki0403@users.noreply.github.com>
Date: Sun, 21 May 2023 15:51:51 +0900
Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=E3=83=9F=E3=83=8B=E3=82=B2=E3=83=BC?=
=?UTF-8?q?=E3=83=A0=E3=81=AB=E9=96=A2=E3=81=99=E3=82=8B=E3=83=91=E3=83=83?=
=?UTF-8?q?=E3=83=81=E3=81=8C=E9=81=A9=E7=94=A8=E3=81=95=E3=82=8C=E3=81=AA?=
=?UTF-8?q?=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE=E6=AD=A3=20(#96)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/main.js | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/src/common/main.js b/src/common/main.js
index 182d015..dd86ecd 100644
--- a/src/common/main.js
+++ b/src/common/main.js
@@ -61,7 +61,7 @@ const betterJapanese = {
if (App) send({ id: 'init bridge' })
- if (!this.isRegisteredHook) this.initAfterLoad()
+ this.initAfterLoad()
// Web版で既にDOMが構築されていた場合はDOMを再構成するスクリプトを読み込む (一部の翻訳が適用されないため)
if (!App && Game.ready) Game.LoadMod(`https://pages.yukineko.me/better-japanese/rebuild.js?nocache=${Date.now()}`)
@@ -492,9 +492,6 @@ const betterJapanese = {
if (!betterJapanese.origins.reincarnate) betterJapanese.origins.reincarnate = Game.Reincarnate
Function('Game.Reincarnate = ' + Game.Reincarnate.toString().replace(/(Game\.Notify\()'Reincarnated'(,loc\("Hello, cookies!"\),\[10,0\],4\);)/, '$1loc("Reincarnated")$2'))()
}
-
- // hookを削除
- Game.removeHook('create', betterJapanese.initAfterLoad)
},
overrideBeautify: function() {
@@ -553,14 +550,6 @@ const betterJapanese = {
}
},
- register: function() {
- Game.registerMod(this.name, this)
- if (!Game.ready) {
- Game.registerHook('create', betterJapanese.initAfterLoad)
- this.isRegisteredHook = true
- }
- },
-
save: function() {
localStorage.setItem('BJPConfig', JSON.stringify(this.config))
},
@@ -1164,6 +1153,6 @@ if (App) {
// 言語設定が日本語であれば登録
if (localStorage.getItem('CookieClickerLang') === 'JA') {
- betterJapanese.register()
+ Game.registerMod(betterJapanese.name, betterJapanese)
betterJapanese.overrideBeautify()
}
From d17249c8c0ece75f8eb6f15165056b70221f3a51 Mon Sep 17 00:00:00 2001
From: yukineko <27853966+hideki0403@users.noreply.github.com>
Date: Fri, 9 Jun 2023 15:49:20 +0900
Subject: [PATCH 2/3] =?UTF-8?q?feat:=20=E5=8D=98=E4=BD=8D=E5=A4=89?=
=?UTF-8?q?=E6=9B=B4=E6=99=82=E3=81=AB=E3=83=A1=E3=83=83=E3=82=BB=E3=83=BC?=
=?UTF-8?q?=E3=82=B8=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88?=
=?UTF-8?q?=E3=81=86=E3=81=AB=20(#94)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/common/main.js | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/common/main.js b/src/common/main.js
index dd86ecd..3f8abbb 100644
--- a/src/common/main.js
+++ b/src/common/main.js
@@ -47,6 +47,7 @@ const betterJapanese = {
currentIgnoreList: [],
isRegisteredHook: false,
isLoadedConfig: false,
+ isShowedUnitChangeNotify: false,
init: function() {
let versionPath = App ? `file:///${App.mods['BetterJapanese'].dir.replace(/\\/g, '/')}/version.json` : 'https://pages.yukineko.me/better-japanese/version.json'
@@ -571,6 +572,11 @@ const betterJapanese = {
BeautifyAll()
Game.RefreshStore()
Game.upgradesToRebuild = 1
+
+ if (!betterJapanese.isShowedUnitChangeNotify) {
+ Game.Notify('日本語訳改善Mod', '単位の変更を検知しました。
変更後の単位を全ての要素に適用するには、再読み込みをしてください
セーブデータを保存して再読み込み')
+ betterJapanese.isShowedUnitChangeNotify = true
+ }
}
let openSettings = () => {
From f171600214bbea9999adcde0db838df1a803dfaa Mon Sep 17 00:00:00 2001
From: yukineko <27853966+hideki0403@users.noreply.github.com>
Date: Fri, 9 Jun 2023 15:51:11 +0900
Subject: [PATCH 3/3] release: v1.5.7
---
package-lock.json | 4 ++--
package.json | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/package-lock.json b/package-lock.json
index 9b9b6e0..ca6b7cc 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "better-japanese",
- "version": "1.5.5",
+ "version": "1.5.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "better-japanese",
- "version": "1.5.5",
+ "version": "1.5.7",
"license": "ISC",
"devDependencies": {
"chalk": "^4.1.2",
diff --git a/package.json b/package.json
index d7afab5..d61e5d4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "better-japanese",
- "version": "1.5.6",
+ "version": "1.5.7",
"description": "",
"main": "index.js",
"scripts": {