Date: Fri, 22 Mar 2024 03:39:35 +0900
Subject: [PATCH 3/6] =?UTF-8?q?feat:=20=E8=AD=9C=E9=9D=A2=E5=AE=9A?=
=?UTF-8?q?=E6=95=B0=E3=82=82=E6=9C=AA=E7=A2=BA=E5=AE=9A=E3=81=AA=E3=82=89?=
=?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=82=92=E5=A4=89=E3=81=88=E3=82=8B=E3=82=88?=
=?UTF-8?q?=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/Http/Controllers/ViewUserRatingController.php | 9 ++++++---
.../components/user_rating/rating_best_table.blade.php | 6 +++---
OngekiScoreLog/resources/views/user_rating.blade.php | 2 +-
3 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php b/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
index 196ae19c..bbbab826 100644
--- a/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
+++ b/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
@@ -39,6 +39,7 @@ private function editMusicStdClass(\stdClass $stdClass, int $totalMusicCount){
// レート値が理論値 / 推定値なら文字装飾
if (OngekiUtility::IsEstimatedRateValueFromTitle($stdClass->title, $stdClass->difficulty, $stdClass->genre, $stdClass->artist)) {
+ $stdClass->extraLevelStr = "" . $stdClass->extraLevelStr . "?";
$stdClass->ratingValue = "" . $stdClass->ratingValue . "";
}else if($stdClass->technical_high_score >= 1007500){
$stdClass->ratingValue = "" . $stdClass->ratingValue . "";
@@ -191,14 +192,16 @@ function getIndex($id){
try {
$recentScore[$i]['ratingValue'] = sprintf("%.2f", OngekiUtility::RateValueFromTitle($recentScore[$i]['title'], $recentScore[$i]['difficulty'], $recentScore[$i]['technical_score'], $recentScore[$i]['genre'], $recentScore[$i]['artist']));
$recentScore[$i]['rawRatingValue'] = $recentScore[$i]['ratingValue'];
+ $recentScore[$i]['song_id'] = OngekiUtility::GetIDFromTitle($recentScore[$i]['title'], $recentScore[$i]['genre'], $recentScore[$i]['artist']);
+ $recentScore[$i]['difficulty_str'] = $this->difficultyToStr[$recentScore[$i]['difficulty']];
+ $recentScore[$i]['level_str'] = sprintf("%.1f", OngekiUtility::ExtraLevelFromTitle($recentScore[$i]['title'], $recentScore[$i]['difficulty'], $recentScore[$i]['genre'], $recentScore[$i]['artist']));
+
if (OngekiUtility::IsEstimatedRateValueFromTitle($recentScore[$i]['title'], $recentScore[$i]['difficulty'], $recentScore[$i]['genre'], $recentScore[$i]['artist'])) {
$recentScore[$i]['ratingValue'] = "" . $recentScore[$i]['ratingValue'] . "";
+ $recentScore[$i]['level_str'] = "" . $recentScore[$i]['level_str'] . "?";
}else if($recentScore[$i]['technical_score'] >= 1007500){
$recentScore[$i]['ratingValue'] = "" . $recentScore[$i]['ratingValue'] . "";
}
- $recentScore[$i]['song_id'] = OngekiUtility::GetIDFromTitle($recentScore[$i]['title'], $recentScore[$i]['genre'], $recentScore[$i]['artist']);
- $recentScore[$i]['difficulty_str'] = $this->difficultyToStr[$recentScore[$i]['difficulty']];
- $recentScore[$i]['level_str'] = sprintf("%.1f", OngekiUtility::ExtraLevelFromTitle($recentScore[$i]['title'], $recentScore[$i]['difficulty'], $recentScore[$i]['genre'], $recentScore[$i]['artist']));
$statistics->recentRatingTotal += $recentScore[$i]['rawRatingValue'];
if($statistics->recentRatingTop < $recentScore[$i]['rawRatingValue']){
diff --git a/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php b/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
index 0fe6595f..766c2138 100644
--- a/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
+++ b/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
@@ -32,7 +32,7 @@
{{$array[$i]->title}} |
@endif
{{substr($array[$i]->difficulty_str, 0, 3)}} |
- {{$array[$i]->extraLevelStr}} |
+ {!!$array[$i]->extraLevelStr!!} |
{{number_format($array[$i]->technical_high_score)}} |
{!!$array[$i]->ratingValue!!} |
{{$array[$i]->targetMusicRateMusic}} |
@@ -78,7 +78,7 @@
{{$array[$i]->title}} |
@endif
{{substr($array[$i]->difficulty_str, 0, 3)}} |
- {{$array[$i]->extraLevelStr}} |
+ {!!$array[$i]->extraLevelStr!!} |
{{number_format($array[$i]->technical_high_score)}} |
{!!$array[$i]->ratingValue!!} |
{{sprintf("%.2f", $array[$i]->minDifferenceRate)}} |
@@ -88,4 +88,4 @@
@endfor
-
\ No newline at end of file
+
diff --git a/OngekiScoreLog/resources/views/user_rating.blade.php b/OngekiScoreLog/resources/views/user_rating.blade.php
index 9293a380..bcdafdc3 100644
--- a/OngekiScoreLog/resources/views/user_rating.blade.php
+++ b/OngekiScoreLog/resources/views/user_rating.blade.php
@@ -143,7 +143,7 @@
{{$recentScore[$i]['title']}} |
@endif
{{substr($recentScore[$i]['difficulty_str'], 0, 3)}} |
- {{$recentScore[$i]['level_str']}} |
+ {!!$recentScore[$i]['level_str']!!} |
{{number_format($recentScore[$i]['technical_score'])}} |
{!!$recentScore[$i]['ratingValue']!!} |
{{sprintf("%.2f", $recentScore[$i]['rawRatingValue'] - $statistics->totalRatingTop)}} |
From 0aa4229f25326461d2a13e703d9fe3709ba91767 Mon Sep 17 00:00:00 2001
From: Slime-hatena
Date: Fri, 22 Mar 2024 03:51:15 +0900
Subject: [PATCH 4/6] =?UTF-8?q?feat:=20=E3=83=AC=E3=83=BC=E3=83=88?=
=?UTF-8?q?=E5=80=A4=E3=81=8C0.x=E3=81=AE=E3=81=97=E3=81=8D=E3=81=84?=
=?UTF-8?q?=E5=80=A4=E3=81=AB=E3=81=AA=E3=82=8B=E3=81=9F=E3=82=81=E3=81=AB?=
=?UTF-8?q?=E5=BF=85=E8=A6=81=E3=81=AA=E3=82=B9=E3=82=B3=E3=82=A2=E3=82=92?=
=?UTF-8?q?=E8=A1=A8=E7=A4=BA=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/Http/Controllers/ViewUserRatingController.php | 10 ++++++++++
.../components/user_rating/rating_best_table.blade.php | 3 +++
2 files changed, 13 insertions(+)
diff --git a/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php b/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
index bbbab826..ddd16498 100644
--- a/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
+++ b/OngekiScoreLog/app/Http/Controllers/ViewUserRatingController.php
@@ -28,10 +28,19 @@ private function editMusicStdClass(\stdClass $stdClass, int $totalMusicCount){
// レート値上昇推定スコア計算
$stdClass->extraLevel = OngekiUtility::ExtraLevelFromTitle($stdClass->title, $stdClass->difficulty, $stdClass->genre, $stdClass->artist);
$stdClass->extraLevelStr = sprintf("%.1f", $stdClass->extraLevel);
+
$stdClass->targetMusicRateMusic = OngekiUtility::ExpectedScoreFromExtraLevel($stdClass->extraLevel, $stdClass->rawRatingValue + 0.01);
if($stdClass->targetMusicRateMusic !== false){
$stdClass->targetMusicRateMusic = number_format($stdClass->technical_high_score - $stdClass->targetMusicRateMusic);
}
+
+ // この曲のレート値が0.xのしきい値になるために必要なスコア 例) 15.25→15.30
+ $targetRating = ceil(($stdClass->rawRatingValue + 0.01) * 10) / 10;
+ $stdClass->targetMusicRateBorder = OngekiUtility::ExpectedScoreFromExtraLevel($stdClass->extraLevel, $targetRating);
+ if($stdClass->targetMusicRateBorder !== false){
+ $stdClass->targetMusicRateBorder = number_format($stdClass->technical_high_score - $stdClass->targetMusicRateBorder);
+ }
+
$stdClass->targetMusicRateUser = OngekiUtility::ExpectedScoreFromExtraLevel($stdClass->extraLevel, $stdClass->rawRatingValue + sprintf("%.2f", $totalMusicCount / 100));
if($stdClass->targetMusicRateUser !== false){
$stdClass->targetMusicRateUser = number_format($stdClass->technical_high_score - $stdClass->targetMusicRateUser);
@@ -103,6 +112,7 @@ function getIndex($id){
$notExistMusic->ratingValue = "-";
$notExistMusic->rawRatingValue = 0;
$notExistMusic->targetMusicRateMusic = "";
+ $notExistMusic->targetMusicRateBorder = "";
$notExistMusic->targetMusicRateUser = "";
$notExistMusic->updated_at = date("Y/m/d");
diff --git a/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php b/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
index 766c2138..16df3172 100644
--- a/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
+++ b/OngekiScoreLog/resources/views/layouts/components/user_rating/rating_best_table.blade.php
@@ -9,6 +9,7 @@
TS |
Rate |
+0.01 |
+ →0.x0 |
+{{sprintf("%.2f", $statistics->totalRatingCount / 100)}} |
@@ -20,6 +21,7 @@
TS |
Rate |
+0.01 |
+ →0.x0 |
+{{sprintf("%.2f", $statistics->totalRatingCount / 100)}} |
@@ -36,6 +38,7 @@
{{number_format($array[$i]->technical_high_score)}} |
{!!$array[$i]->ratingValue!!} |
{{$array[$i]->targetMusicRateMusic}} |
+ {{$array[$i]->targetMusicRateBorder}} |
{{$array[$i]->targetMusicRateUser}} |
@endfor
From 2f92e2bd805cdac10813bce16f45aa4650da4ade Mon Sep 17 00:00:00 2001
From: Slime-hatena
Date: Fri, 22 Mar 2024 04:08:52 +0900
Subject: [PATCH 5/6] =?UTF-8?q?fix:=20=E5=AD=98=E5=9C=A8=E3=81=97=E3=81=AA?=
=?UTF-8?q?=E3=81=84=E9=9B=A3=E6=98=93=E5=BA=A6=E3=81=8B=E3=82=89=E3=83=AC?=
=?UTF-8?q?=E3=83=BC=E3=83=88=E5=80=A4=E3=82=92=E5=8F=96=E5=BE=97=E3=81=99?=
=?UTF-8?q?=E3=82=8B=E3=81=A8=E3=82=A8=E3=83=A9=E3=83=BC=E3=81=8C=E7=99=BA?=
=?UTF-8?q?=E7=94=9F=E3=81=99=E3=82=8B=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?=
=?UTF-8?q?=E6=AD=A3?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
OngekiScoreLog/app/Services/OngekiUtility.php | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/OngekiScoreLog/app/Services/OngekiUtility.php b/OngekiScoreLog/app/Services/OngekiUtility.php
index a21f4632..fe3af997 100644
--- a/OngekiScoreLog/app/Services/OngekiUtility.php
+++ b/OngekiScoreLog/app/Services/OngekiUtility.php
@@ -105,6 +105,14 @@ public function RateValueFromTitle(string $title, $difficulty, int $technicalSco
if(!array_key_exists($title, $this::$MusicList)){
throw new \OutOfBoundsException("title: " . $title . " / artist:" . $artist . " / difficulty:" . $difficulty);
}
+
+ $difficulty = "lunatic_extra_level";
+ if(!array_key_exists($difficulty, $this::$MusicList[$title])){
+ // なんか存在しない難易度の定数値取ろうとしてる
+ // 既に入ってる曲に後からlunatic追加されると起きがち
+ return 0;
+ }
+
return $this->RateValue($this::$MusicList[$title][$difficulty], $technicalScore);
}
From a8b5553f3f7080b7167650f530ab66087eba0159 Mon Sep 17 00:00:00 2001
From: Slime-hatena
Date: Fri, 22 Mar 2024 04:27:53 +0900
Subject: [PATCH 6/6] =?UTF-8?q?feat:=20=E6=A5=BD=E6=9B=B2=E8=A9=B3?=
=?UTF-8?q?=E7=B4=B0=E3=81=A7=E3=82=B9=E3=82=B3=E3=82=A20=E3=81=AE?=
=?UTF-8?q?=E8=A8=98=E9=8C=B2=E3=82=92=E8=A1=A8=E7=A4=BA=E3=81=97=E3=81=AA?=
=?UTF-8?q?=E3=81=84=E3=82=88=E3=81=86=E3=81=AB?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../app/Http/Controllers/ViewUserMusicController.php | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/OngekiScoreLog/app/Http/Controllers/ViewUserMusicController.php b/OngekiScoreLog/app/Http/Controllers/ViewUserMusicController.php
index 1b9eafde..9e26a0ab 100644
--- a/OngekiScoreLog/app/Http/Controllers/ViewUserMusicController.php
+++ b/OngekiScoreLog/app/Http/Controllers/ViewUserMusicController.php
@@ -61,6 +61,11 @@ function getIndex(int $id, int $music, string $difficulty){
$prev->damage = 0;
foreach ($score as $key => $value) {
+ if($value->technical_high_score === 0 && $value->battle_high_score === 0 && (float)$value->over_damage_high_score === (float)0){
+ unset($score[$key]);
+ continue;
+ }
+
$technical[] = (int)($value->technical_high_score);
$battle[] = (int)($value->battle_high_score);
$damage[] = (float)$value->over_damage_high_score;