{
setAnchorContent();
- await GAME_MANAGER.setOutsideLobbyState();
- setAnchorContent();
+ if (await GAME_MANAGER.setOutsideLobbyState()) {
+ setAnchorContent();
+ } else {
+ setAnchorContent();
+ }
}}>
play_arrow {translate("menu.start.button.play")}
diff --git a/client/src/resources/lang/en_us.json b/client/src/resources/lang/en_us.json
index 10efbecc9..5f7eb1985 100644
--- a/client/src/resources/lang/en_us.json
+++ b/client/src/resources/lang/en_us.json
@@ -1283,7 +1283,7 @@
"wiki.article.standard.priority.title":"Priority",
"wiki.article.standard.priority.title:var.0":"Priorities",
- "wiki.article.standard.priority.text":"***Some information in this article may be old, or incorrect***\n\nAbilities are used in a specific order called priority order. If 2 players have abilities that go on the same priority, the player with the lower player number will go first. It is recommended that you read a role's manual page before this page. Some abilities go before night starts. Attacking someone doesn't kill them until the end of the night. Here are all the priorities and the abilities that happen in them.\n\n**Before Night (Not a priority)**\n\n- Jailor chooses who to jail\n- Reporter chooses who to interview\n- Spy finds if an apostle can convert\n- Create Visits\n - All visits are decided by who is selected by each players. During each priority, each associated ability is activated using who is being visited by who, which is not necessarily who the player selected (in the case of a transporter, witch, etc...).\n\n**1: Top Priority**\n\n- Ojo (Visit every player with certain role)\n- Doomsayer (Kill)\n- Revolutionary (Suicide)\n- Jester (Haunt)\n- Veteran (Decide to Rampage)\n- Vigilante (Suicide)\n\n**2: Transporter**\n\n- Transporter (Swap Visits)\n\n**3: Possess**\n\n- Syndicate Witch (Possess)\n\n**4: Necromancy**\n\n- Retributionist (Possess/Change Visits)\n- Necromancer (Possess/Change Visits)\n\n**5: roleblock**\n\n- Bouncer (roleblock)\n- Hypnotist (roleblock)\n- Escort (roleblock)\n- Jailor (Invisible roleblock)\n\n**6: Deception**\n\n- Hypnotist (Hypnotize)\n- Framer (Frame)\n- Blackmailer (Silence)\n- Mortician (Tag)\n- Arsonist (Douse)\n\n**7: Bodyguard**\n\n- Bodyguard (Change visits)\n\n**8: Heal**\n\n- Engineer (Intentionally dismantle, set, or use trap)\n- Bodyguard (Defend themselves)\n- Sentinel (Protect target)\n- Guardian (Defend)\n- Veteran (Defend themselves)\n\n**9: Kill**\n\n- Ojo (Kill)\n- Apostle (Kill)\n- Zealot (Kill)\n- Martyr (Kill)\n- Engineer (Indirect Kill)\n- Arsonist (Ignite)\n- Bodyguard (Attack attacker)\n- Sentinel (Attack Visitor)\n- Godfather (Attack or Make Backup Attack)\n- Jailor (Attack)\n- Mafioso (Attack)\n- Veteran (Rampage)\n- Vigilante (Attack)\n- Werewolf (Rampage and attacks)\n\n**10: Investigative**\n\n- Ojo (See)\n- Reporter (Add Report Message)\n- Psychic (Vision)\n- Engineer (Traps report info)\n- Engineer (Dismantle if triggered) \n- Arsonist (Find who is doused)\n- Bodyguard (Find if protected)\n- Informant (Investigate)\n- Sentinel (Find if protected)\n- Guardian (Find if protected)\n- Mortician (Find role and alibi)\n- Forger (Find role and alibi)\n- Lookout (Investigate)\n- Philosopher (Investigate)\n- Detective (Investigate)\n- Spy (Find who the Syndicate Visits)\n- Tracker (Investigate)\n- Werewolf (Track players scent)\n\n**11: Spy Bug**\n\n- Spy (Bug)\n\n**12: Steal Messages**\n\n- Syndicate Witch (Get target messages)\n- Necromancer (Get target messages)\n- Retributionist (Get target messages)\n\n**13: Convert**\n\n- Apostle (Convert)",
+ "wiki.article.standard.priority.text":"At the end of night many abilities happen at nearly the same time. They happen in a specific order called priority. Knowing the order of some things can help understanding of some game mechanics.\nThis is the general priority order, with some additional notes:\n- TopPriority\n- Ward\n - Bouncer, Scarecrow, Kidnapper, Jailor, and Warden all ward here\n- Transporter\n- Warper\n- Possess\n - Witch gets second visit deleted here\n- Roleblock\n - Hypnotist and Escort go here\n- Deception\n - Forger, Framer, Blackmailer go here\n - Framer gets the second visit deleted here\n - Syndicate backup visit is erased if the killing is blocked\n- Bodyguard\n - Bodyguard moves the attacking visit to be towards themself\n- Heal\n - Protective roles like Doctor and Armorsmith go here\n- Kill\n- Convert\n - Win condition changes go here\n- Poison\n- Investigative\n - Roles like Detective, Snoop, Lookout, and Spy go here\n- Cupid\n- SpyBug\n- StealMessages\n - Witch steals messages\n",
"wiki.article.standard.chat.title:var.0":"Chat Messages",
"wiki.article.standard.chat.title":"Chat",
diff --git a/client/src/routing.tsx b/client/src/routing.tsx
index 11f804189..5dddad800 100644
--- a/client/src/routing.tsx
+++ b/client/src/routing.tsx
@@ -32,7 +32,10 @@ async function routeWiki(anchorController: AnchorController, page: string) {
async function routeLobby(anchorController: AnchorController, roomCode: string) {
const reconnectData = loadReconnectData();
- await GAME_MANAGER.setOutsideLobbyState();
+ if (!await GAME_MANAGER.setOutsideLobbyState()) {
+ anchorController.setContent();
+ return;
+ }
window.history.replaceState({}, "", '/');
@@ -92,25 +95,28 @@ async function route404(anchorController: AnchorController, path: string) {
)
}
-async function routeMain(anchorController: AnchorController) {
+async function routeMainButFirstTryUsingReconnectData(anchorController: AnchorController) {
window.history.replaceState({}, "", "/");
const reconnectData = loadReconnectData();
- if (reconnectData) {
- await GAME_MANAGER.setOutsideLobbyState();
-
- const success = await GAME_MANAGER.sendRejoinPacket(reconnectData.roomCode, reconnectData.playerId);
- if (!success) {
- // Don't show an error message for an auto-rejoin. The user didn't prompt it - they will be confused.
- // Reconnect data is deleted in messageListener
- await GAME_MANAGER.setDisconnectedState();
- anchorController.clearCoverCard();
- anchorController.setContent();
- }
- } else {
+ if (!reconnectData) {
anchorController.setContent()
+ return;
+ }
+
+ if (!await GAME_MANAGER.setOutsideLobbyState()) {
+ anchorController.setContent();
+ return;
+ }
+
+ if (!await GAME_MANAGER.sendRejoinPacket(reconnectData.roomCode, reconnectData.playerId)) {
+ anchorController.setContent();
+ deleteReconnectData();
+ return;
}
+
+ // This is where we *should* handle joining the lobby, but it's handled in messageListener... grumble grumble
}
export default async function route(anchorController: AnchorController, url: Location) {
@@ -135,5 +141,5 @@ export default async function route(anchorController: AnchorController, url: Loc
return await route404(anchorController, url.pathname);
}
- return await routeMain(anchorController);
+ return await routeMainButFirstTryUsingReconnectData(anchorController);
}
\ No newline at end of file
diff --git a/server/src/game/player/player_helper_functions.rs b/server/src/game/player/player_helper_functions.rs
index 2b4ae811b..c074617fc 100644
--- a/server/src/game/player/player_helper_functions.rs
+++ b/server/src/game/player/player_helper_functions.rs
@@ -182,8 +182,6 @@ impl PlayerReference{
AbilitySelection::Integer { .. } => {},
AbilitySelection::Kira { .. } => {},
}
-
-
}
possessed_visit.target.set_night_visits(game,