openvibers/openvibe.games Commits

Scraplandia: an empty node says so ('Loose Stones — picked clean, back within 2 mins', a felled oak grows back) in place of 'E — gather' that did nothing; a production play-test hit an emptied gate pile (#123)

OP OpenVibers committed 24 days ago · 66197d21dc · 2 files, +11 −0

Changes

ddiff --git a/CHANGELOG.md b/CHANGELOG.md
iindex e656fcf..94f276f 100644
---- a/CHANGELOG.md
++++ b/CHANGELOG.md
@@@ -8,6 +8,10 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
### Fixed
++- **An empty pile kept saying "E — gather".** When a node had nothing left (the gate piles empty fast when several new
++ scrappers arrive together), its prompt still offered to gather and E did nothing. It now says so, for example
++ "Loose Stones — picked clean, back within 2 mins" or "Oak Tree — felled, grows back within … mins". A production
++ play-test found it: a new guest walked to the north gate, and the branch pile had been emptied a minute earlier.
- **"City Warden — LMB attack".** Looking at a friendly warden or townsperson now shows just their name, so the prompt
no longer invites you to hit them; a swing still lands. Wildlife says "LMB hunt", and Rustjaw thugs keep "⚠ — LMB
attack".
ddiff --git a/apps/client/src/main.ts b/apps/client/src/main.ts
iindex f9ac631..7d46933 100644
---- a/apps/client/src/main.ts
++++ b/apps/client/src/main.ts
@@@ -780,6 +780,13 @@ function promptFor(
const nodeType = content.nodeType(target.def ?? '')
if (!nodeType) return null
const itemName = content.item(nodeType.item)?.name ?? nodeType.item
++ // An empty node used to keep saying "E — gather …" while E did nothing (the gate piles empty fast when several
++ // new scrappers arrive at once).
++ if ((state.entities.get(target.entityId)?.remaining ?? 1) <= 0) {
++ const back = Math.max(1, Math.round(nodeType.respawnSeconds / 60))
++ const gone = nodeType.visual === 'tree' ? 'felled, grows back' : 'picked clean, back'
++ return `${nodeType.name} — ${gone} within ${back} min${back === 1 ? '' : 's'}`
++ }
if (nodeType.requiredTool && tool !== nodeType.requiredTool) {
return `LMB — hit for ${itemName} (much faster with ${nodeType.requiredTool})`
}