From cb9ae35260e4ac674ec41d3e8f706342baa04cc0 Mon Sep 17 00:00:00 2001 From: xtex Date: Mon, 3 Jul 2023 15:47:02 +0800 Subject: [PATCH] fix: lost item --- .../src/main/kotlin/quaedam/projection/swarm/ai/LostItem.kt | 4 +++- .../kotlin/quaedam/projection/swarm/ai/ProjectedPersonAI.kt | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ai/LostItem.kt b/common/src/main/kotlin/quaedam/projection/swarm/ai/LostItem.kt index 5aebe7c..cacccdb 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ai/LostItem.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ai/LostItem.kt @@ -21,7 +21,9 @@ fun LostItem(chance: Int): OneShot item.shrink(count) inventory.setChanged() level.addFreshEntity(ItemEntity(level, entity.x, entity.y + 0.25, entity.z, item.copyWithCount(count))) + return@Trigger true + } else { + return@Trigger false } - return@Trigger true }) } \ No newline at end of file diff --git a/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonAI.kt b/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonAI.kt index 5336ae1..84e64aa 100644 --- a/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonAI.kt +++ b/common/src/main/kotlin/quaedam/projection/swarm/ai/ProjectedPersonAI.kt @@ -148,7 +148,7 @@ object ProjectedPersonAI { private fun initWorkActivity(brain: Brain) { brain.addActivity( Activity.WORK, ImmutableList.of( - 7 weight ExchangeItem(), + 5 weight ExchangeItem(), 10 weight createStrollBehavior(), ) )