mirror of
https://github.com/prosolis/gogobee.git
synced 2026-07-18 01:42:42 +00:00
adventure: tell Pete when a story-grade treasure is found
A treasure that earns a public room announce now also files a treasure_found fact, so Pete can count it on the finder's trophy case. The emit rides inside announceTreasureToRoom, reusing the RoomAnnounce != "" gate as the newsworthiness filter — a copper-piece pickup never becomes news, and a reversed auto-swap never emits, because the announce it shares is cancelled on undo. The realm's first finder of a given treasure is a priority hoard; a later finder of the same item is a bulletin, keyed on the treasure across the realm via claimRealmFirst, the same first/repeat split zone_first uses. The item name rides in stakes and the tier-derived rarity in outcome. treasure_found is a new event_type, so Pete's ingest must deploy first or the first finds park on the retry ladder forever.
This commit is contained in:
@@ -1383,6 +1383,10 @@ func (p *AdventurePlugin) announceTreasureToRoom(char *AdventureCharacter, def *
|
||||
if def == nil || def.RoomAnnounce == "" {
|
||||
return
|
||||
}
|
||||
// The same story-grade gate feeds Pete's trophy case. Emit before the
|
||||
// games-room check so a find is still recorded as news even when no room is
|
||||
// configured to announce it in.
|
||||
emitTreasureFound(char.UserID, def, loc)
|
||||
gr := gamesRoom()
|
||||
if gr == "" {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user