Repository navigation
Add Traveler mode for non-guild Traveler and Veteran players - #56
Merged
Merged
Conversation
…r and travelerChat
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
Mod support for the new Traveler access level. A Traveler is a linked player with the Discord Traveler or Veteran role who is not in the guild. The bot decides the standing and reports it in
authOk; the mod only reacts to it.It is the same jar for everyone. The jar holds no tier.
Needs the matching bot change. Against an older bot, nothing changes: the bot never sends
traveler, so the mod behaves as before.mod_versionis not bumped, so merging this does not publish a release.How the mod knows what you are
authOkwithlinked,memberand (new)traveler.SUPPORTED_FEATURESnow declarestravelerandtravelerChat. Only mods that declare them are offered the tier.If a player links mid-session, the bot closes the socket; the mod reconnects by itself and picks up the new standing. No mod change was needed for that.
Outbound policy
New
OutboundPolicydecides which message types may leave the client for each standing:authOk, not linked, not a member: onlyauthResponseauthResponse,presence,mailSend,mailAck,tccMapPos,tccGolemDefeated,tccExitReached,witnessKill,partyOpen,partyJoin,partyLeave,partyList,partyManage,travelerChat,travelerPrefs,coinflip,diceroll,attestationFailureIt is enforced at the single send choke point (
enqueueSend), which now takes the message and returns whether it was sent, so the booleansend*methods report correctly.Two effects:
authOkany more. That window existed before this change.Inbound, a Traveler client also drops
warBoard,discordMessage,loginNotice,logoutNoticeandonlineListif one ever arrives. The bot never sends them to a traveler; this is a second layer.What a Traveler sees
Hidden:
online,wars,event,aspects,emeralds,warpay,rewards,gift,deduct,dump,logscan,ally,reply. They are removed from the command tree and from the help list.Kept: every local feature (own attack timers, beacon, war overlay, territory loss sound and blacklist, outlines, raid safety, emotes, HUD layout, and so on), mail, the party finder, the TCC map,
/eden anni,/eden cf,/eden diceroll.All hiding is cosmetic. The bot is the enforcement point.
New for everyone
/eden tc <message>and the short alias/e <message>. Incoming lines show with their own aqua pill. Config toggle "Traveler chat", on by default.Both preferences are sent to the bot as
travelerPrefson connect and on change.Territory presets
The four
territoryMenuSuitechecks now go throughpresetsEnabled(), which is true only for a guild member. It uses a persistedwasMemberflag so presets keep working for members during a bot outage. The flag is saved on the game thread.Testing
gradlew test: build successful, formatting clean.OutboundPolicyTestclassifies every send type for every standing.BridgeConfigTestcovers the new fields.Not tested: the menus and commands in game with a real traveler account, and the mod against a live bot.