Skip to content

Commit

Permalink
fix: bug where hackers were being overwritted by other upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
golota60 committed May 22, 2022
1 parent a2b7353 commit 9afcc5c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/helpers/initialValues.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const getDoubleDebian = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'debian-linux-instances': {
...gameState.infrastructure['debian-linux-instances'],
multiplier:
gameState.infrastructure['debian-linux-instances'].multiplier * 2,
Expand All @@ -61,7 +61,7 @@ const getDoubleBotnet = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
botnets: {
...gameState.infrastructure.botnets,
multiplier: gameState.infrastructure.botnets.multiplier * 2,
},
Expand All @@ -77,7 +77,7 @@ const getDoubleArch = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'arch-linux-instances': {
...gameState.infrastructure['arch-linux-instances'],
multiplier:
gameState.infrastructure['arch-linux-instances'].multiplier * 2,
Expand All @@ -94,7 +94,7 @@ const getDoubleJS = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'js-libraries': {
...gameState.infrastructure['js-libraries'],
multiplier: gameState.infrastructure['js-libraries'].multiplier * 2,
},
Expand All @@ -110,7 +110,7 @@ const getDoubleCourses = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'udemy-courses': {
...gameState.infrastructure['udemy-courses'],
multiplier: gameState.infrastructure['udemy-courses'].multiplier * 2,
},
Expand All @@ -126,7 +126,7 @@ const getDoubleAI = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'hacking-ais': {
...gameState.infrastructure['hacking-ais'],
multiplier: gameState.infrastructure['hacking-ais'].multiplier * 2,
},
Expand All @@ -142,7 +142,7 @@ const getDoubleStolenDB = (price: number, id: string): BaseUpgrade => ({
...gameState,
infrastructure: {
...gameState.infrastructure,
hackers: {
'stolen-databases': {
...gameState.infrastructure['stolen-databases'],
multiplier:
gameState.infrastructure['stolen-databases'].multiplier * 2,
Expand Down

0 comments on commit 9afcc5c

Please sign in to comment.