fix: lost item

This commit is contained in:
xtex 2023-07-03 15:47:02 +08:00
parent 94be2a823f
commit cb9ae35260
Signed by: xtex
GPG Key ID: B918086ED8045B91
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,9 @@ fun <E> LostItem(chance: Int): OneShot<E>
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
})
}

View File

@ -148,7 +148,7 @@ object ProjectedPersonAI {
private fun initWorkActivity(brain: Brain<ProjectedPersonEntity>) {
brain.addActivity(
Activity.WORK, ImmutableList.of(
7 weight ExchangeItem(),
5 weight ExchangeItem(),
10 weight createStrollBehavior(),
)
)