Skip to content

Commit

Permalink
remove default claims page
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsSammyM committed Jan 14, 2025
1 parent afe13ad commit 602cfdd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
25 changes: 13 additions & 12 deletions client/src/game/messageListener.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -422,19 +422,20 @@ export default function messageListener(packet: ToClientPacket){
if(GAME_MANAGER.state.stateType === "game" && GAME_MANAGER.state.clientState.type === "player"){
GAME_MANAGER.state.clientState.notes = packet.notes;

if(GAME_MANAGER.state.clientState.notes.length === 0){
const myIndex = GAME_MANAGER.state.clientState.myIndex;
const myRoleKey = `role.${GAME_MANAGER.state.clientState.roleState.type}.name`;
// old default notes
// if(GAME_MANAGER.state.clientState.notes.length === 0){
// const myIndex = GAME_MANAGER.state.clientState.myIndex;
// const myRoleKey = `role.${GAME_MANAGER.state.clientState.roleState.type}.name`;

GAME_MANAGER.sendSaveNotesPacket([
"Claims\n" +
GAME_MANAGER.state.players
.map(player =>
`@${player.index + 1} - ${player.index === myIndex ? translate(myRoleKey) : ''}\n`
)
.join('')
]);
}
// GAME_MANAGER.sendSaveNotesPacket([
// "Claims\n" +
// GAME_MANAGER.state.players
// .map(player =>
// `@${player.index + 1} - ${player.index === myIndex ? translate(myRoleKey) : ''}\n`
// )
// .join('')
// ]);
// }
}
break;
case "yourCrossedOutOutlines":
Expand Down
2 changes: 1 addition & 1 deletion client/src/menu/game/gameScreenContent/WillMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export default function WillMenu(): ReactElement {
GAME_MANAGER.sendSaveWillPacket(text);
}}
/>
{notes.map((note, i) => {
{(notes.length === 0 ? [""] : notes).map((note, i) => {
const title = note.split('\n')[0] || translate("menu.will.notes");
return <TextDropdownArea
key={title + i}
Expand Down

0 comments on commit 602cfdd

Please sign in to comment.