From e1c2cadf5bca7383eee38eee5de69b523f5d6101 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:20:34 +0900 Subject: [PATCH 1/3] =?UTF-8?q?chore:=20=E3=83=9E=E3=83=8A=E5=A6=96?= =?UTF-8?q?=E7=B2=BE=E6=A9=9F=E8=83=BD=E3=82=92=E3=83=A1=E3=83=B3=E3=83=86?= =?UTF-8?q?=E3=83=8A=E3=83=B3=E3=82=B9=E4=B8=AD=E3=81=A8=E3=81=97=E3=81=A6?= =?UTF-8?q?=E4=BD=BF=E3=81=88=E3=81=AA=E3=81=8F=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../bukkit/BukkitFairySummonRequest.scala | 42 ++++++++++--------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala index 8d91c91211..7e1cd01f77 100644 --- a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala +++ b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala @@ -11,6 +11,7 @@ import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.domain.{ FairySpawnRequestErrorOrSpawn, FairySummonRequest } +import com.github.unchama.targetedeffect.commandsender.{MessageEffect, MessageEffectF} import org.bukkit.entity.Player class BukkitFairySummonRequest[F[_]: Sync, G[_]: ContextCoercion[*[_], F]]( @@ -20,28 +21,29 @@ class BukkitFairySummonRequest[F[_]: Sync, G[_]: ContextCoercion[*[_], F]]( summonFairy: SummonFairy[F, Player] ) extends FairySummonRequest[F, Player] { - import cats.implicits._ +// import cats.implicits._ override def summonRequest(player: Player): F[FairySpawnRequestErrorOrSpawn[F]] = { - val uuid = player.getUniqueId - for { - usingState <- fairyPersistence.isFairyUsing(uuid) - effectPoints <- voteAPI.effectPoints(player) - fairySummonCost <- fairyPersistence.fairySummonCost(uuid) - seichiAmountRepository <- ContextCoercion( - breakCountAPI.seichiAmountDataRepository(player).read - ) - seichiLevel = seichiAmountRepository.levelCorrespondingToExp.level - } yield { - if (seichiLevel < 10) - Left(FairySummonRequestError.NotEnoughSeichiLevel) - else if (usingState) - Left(FairySummonRequestError.AlreadyFairySummoned) - else if (effectPoints.value < fairySummonCost.value * 2) - Left(FairySummonRequestError.NotEnoughEffectPoint) - else - Right(summonFairy.summon(player)) - } +// val uuid = player.getUniqueId +// for { +// usingState <- fairyPersistence.isFairyUsing(uuid) +// effectPoints <- voteAPI.effectPoints(player) +// fairySummonCost <- fairyPersistence.fairySummonCost(uuid) +// seichiAmountRepository <- ContextCoercion( +// breakCountAPI.seichiAmountDataRepository(player).read +// ) +// seichiLevel = seichiAmountRepository.levelCorrespondingToExp.level +// } yield { +// if (seichiLevel < 10) +// Left(FairySummonRequestError.NotEnoughSeichiLevel) +// else if (usingState) +// Left(FairySummonRequestError.AlreadyFairySummoned) +// else if (effectPoints.value < fairySummonCost.value * 2) +// Left(FairySummonRequestError.NotEnoughEffectPoint) +// else +// Right(summonFairy.summon(player)) +// } + Sync[F].pure(Right(MessageEffectF[F]("マナ妖精機能は不具合のため一時停止中です。").apply(player))) } } From 363a45a51eee356f1f1d6da9cd92710bbcb04af3 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:24:31 +0900 Subject: [PATCH 2/3] =?UTF-8?q?chore:=20=E4=B8=8D=E8=A6=81=E3=81=AAimport?= =?UTF-8?q?=E3=81=AE=E5=89=8A=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala index 7e1cd01f77..2fafe8f583 100644 --- a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala +++ b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala @@ -11,7 +11,7 @@ import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.domain.{ FairySpawnRequestErrorOrSpawn, FairySummonRequest } -import com.github.unchama.targetedeffect.commandsender.{MessageEffect, MessageEffectF} +import com.github.unchama.targetedeffect.commandsender.MessageEffectF import org.bukkit.entity.Player class BukkitFairySummonRequest[F[_]: Sync, G[_]: ContextCoercion[*[_], F]]( From 1d4b2954e5e9d6a0ca60897274d096c15d5ff7b8 Mon Sep 17 00:00:00 2001 From: rito528 <39003544+rito528@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:37:12 +0900 Subject: [PATCH 3/3] style: apply scalafixAll --- .../vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala index 2fafe8f583..f99999ddbd 100644 --- a/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala +++ b/src/main/scala/com/github/unchama/seichiassist/subsystems/vote/subsystems/fairy/bukkit/BukkitFairySummonRequest.scala @@ -5,7 +5,6 @@ import com.github.unchama.generic.ContextCoercion import com.github.unchama.seichiassist.subsystems.breakcount.BreakCountAPI import com.github.unchama.seichiassist.subsystems.vote.VoteAPI import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.application.actions.SummonFairy -import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.domain.property.FairySummonRequestError import com.github.unchama.seichiassist.subsystems.vote.subsystems.fairy.domain.{ FairyPersistence, FairySpawnRequestErrorOrSpawn,