From 056f0213dd69fe6b9104423b4e04e412fd806b7d Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Sun, 15 Aug 2021 14:31:38 -0400 Subject: [PATCH] Fixed an issue where a faction could be joined twice. --- css/buttons.scss | 8 +++----- css/popupboxes.scss | 2 ++ src/Faction/FactionHelpers.jsx | 1 + src/Infiltration/ui/WireCuttingGame.tsx | 2 +- src/Locations/ui/City.tsx | 2 +- src/Locations/ui/GenericLocation.tsx | 2 +- src/Locations/ui/Root.tsx | 4 ++-- src/Locations/ui/TravelAgencyLocation.tsx | 2 +- 8 files changed, 12 insertions(+), 11 deletions(-) diff --git a/css/buttons.scss b/css/buttons.scss index a22844a87..8a5918d5b 100644 --- a/css/buttons.scss +++ b/css/buttons.scss @@ -1,5 +1,6 @@ @import "mixins"; @import "theme"; +@import "styles"; /** * Styling for all buttons @@ -16,6 +17,7 @@ button { .a-link-button, .std-button { + @extend .noselect; text-decoration: none; background-color: #555; color: #fff; @@ -23,11 +25,6 @@ button { margin: 5px; border: 1px solid #333; - -moz-user-select: none; - -ms-user-select: none; - -khtml-user-select: none; - -webkit-user-select: none; - &:hover { background-color: #666; } @@ -68,6 +65,7 @@ button { .a-link-button-bought, .std-button-bought { + @extend .noselect; text-decoration: none; background-color: #0a0; color: #fff; diff --git a/css/popupboxes.scss b/css/popupboxes.scss index 7c8f8fe3d..a0cf65158 100644 --- a/css/popupboxes.scss +++ b/css/popupboxes.scss @@ -1,5 +1,6 @@ @import "mixins"; @import "theme"; +@import "styles"; /* Pop-up boxes */ .popup-box-container { @@ -88,6 +89,7 @@ .dialog-box-close-button { @include borderRadius(12px); @include boxShadow(1px 1px 3px #000); + @extend .noselect; float: right; color: #aaa; diff --git a/src/Faction/FactionHelpers.jsx b/src/Faction/FactionHelpers.jsx index 0119fe3d1..c8778f44b 100644 --- a/src/Faction/FactionHelpers.jsx +++ b/src/Faction/FactionHelpers.jsx @@ -46,6 +46,7 @@ export function inviteToFaction(faction) { } export function joinFaction(faction) { + if(faction.isMember) return; faction.isMember = true; Player.factions.push(faction.name); const factionInfo = faction.getInfo(); diff --git a/src/Infiltration/ui/WireCuttingGame.tsx b/src/Infiltration/ui/WireCuttingGame.tsx index 4994a5fab..c6816dadc 100644 --- a/src/Infiltration/ui/WireCuttingGame.tsx +++ b/src/Infiltration/ui/WireCuttingGame.tsx @@ -100,7 +100,7 @@ export function WireCuttingGame(props: IMinigameProps): React.ReactElement { return ( -

Cut the wires with the following properties!

+

Cut the wires with the following properties! (keyboard 1 to 9)

{questions.map((question, i) =>

{question.toString()}

)}
{(new Array(wires.length)).fill(0).map((_, i) =>  {i+1}    )}
{(new Array(8)).fill(0).map((_, i) =>
diff --git a/src/Locations/ui/City.tsx b/src/Locations/ui/City.tsx index 8810ab470..382cd0ef3 100644 --- a/src/Locations/ui/City.tsx +++ b/src/Locations/ui/City.tsx @@ -65,7 +65,7 @@ export class LocationCity extends React.Component { elems.push(
{lineElems(lines[i])}
) } - return elems; + return
{elems}
; } listCity(): React.ReactNode { diff --git a/src/Locations/ui/GenericLocation.tsx b/src/Locations/ui/GenericLocation.tsx index ad162ef04..3cdd6b849 100644 --- a/src/Locations/ui/GenericLocation.tsx +++ b/src/Locations/ui/GenericLocation.tsx @@ -158,7 +158,7 @@ export class GenericLocation extends React.Component { return (
-

+

{backdoorInstalled && !Settings.DisableTextEffects ? : this.props.loc.name diff --git a/src/Locations/ui/Root.tsx b/src/Locations/ui/Root.tsx index 1314425db..62045e7bf 100644 --- a/src/Locations/ui/Root.tsx +++ b/src/Locations/ui/Root.tsx @@ -74,7 +74,7 @@ export class LocationRoot extends React.Component { } return ( -
+

{this.state.city}

@@ -120,7 +120,7 @@ export class LocationRoot extends React.Component { p.loseMoney(cost); p.travel(to); - dialogBoxCreate(`You are now in ${to}!`); + dialogBoxCreate(You are now in {to}!); // Dynamically update main menu if (p.firstTimeTraveled === false) { diff --git a/src/Locations/ui/TravelAgencyLocation.tsx b/src/Locations/ui/TravelAgencyLocation.tsx index b0931bd17..bac3abc54 100644 --- a/src/Locations/ui/TravelAgencyLocation.tsx +++ b/src/Locations/ui/TravelAgencyLocation.tsx @@ -44,7 +44,7 @@ export class TravelAgencyLocation extends React.Component { } return ( -
+

From here, you can travel to any other city! A ticket costs {Money(CONSTANTS.TravelCost)}.