mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-29 17:37:34 +01:00
Refactored pop up boxes
This commit is contained in:
parent
d1c4ce74df
commit
519e2ced66
@ -1,10 +1,8 @@
|
|||||||
/* Pop-up boxes */
|
/* Pop-up boxes */
|
||||||
|
.popup-box-container {
|
||||||
/* Pop-up Dialog Box */
|
|
||||||
#dialog-box-container {
|
|
||||||
display: none; /* Hidden by default */
|
display: none; /* Hidden by default */
|
||||||
position: fixed; /* Stay in place */
|
position: fixed; /* Stay in place */
|
||||||
z-index: 2; /* Sit on top */
|
z-index: 1; /* Sit on top */
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 100%; /* Full width */
|
width: 100%; /* Full width */
|
||||||
@ -15,7 +13,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#dialog-box-content {
|
#dialog-box-content {
|
||||||
z-index: 2;
|
z-index: 1;
|
||||||
background-color: black;
|
background-color: black;
|
||||||
margin: 20% auto; /* 20% from the top and centered */
|
margin: 20% auto; /* 20% from the top and centered */
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@ -49,18 +47,6 @@
|
|||||||
|
|
||||||
/* Purchase server box */
|
/* Purchase server box */
|
||||||
#purchase-server-box-container {
|
#purchase-server-box-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,18 +90,6 @@
|
|||||||
|
|
||||||
/* Purchase RAM for Home computer pop-up box */
|
/* Purchase RAM for Home computer pop-up box */
|
||||||
#purchase-ram-for-home-box-container {
|
#purchase-ram-for-home-box-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -155,18 +129,6 @@
|
|||||||
|
|
||||||
/* Purchase Invitation Box */
|
/* Purchase Invitation Box */
|
||||||
#purchase-augmentation-box-container {
|
#purchase-augmentation-box-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,18 +168,6 @@
|
|||||||
|
|
||||||
/* Faction invitation box */
|
/* Faction invitation box */
|
||||||
#faction-invitation-box-container {
|
#faction-invitation-box-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -262,18 +212,6 @@
|
|||||||
|
|
||||||
/* Travel Pop-up Box */
|
/* Travel Pop-up Box */
|
||||||
#travel-box-container {
|
#travel-box-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -317,18 +255,6 @@
|
|||||||
|
|
||||||
/* Game Options */
|
/* Game Options */
|
||||||
#game-options-container {
|
#game-options-container {
|
||||||
display: none; /* Hidden by default */
|
|
||||||
position: fixed; /* Stay in place */
|
|
||||||
z-index: 1; /* Sit on top */
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
top: 0;
|
|
||||||
width: 100%; /* Full width */
|
|
||||||
height: 100%; /* Full height */
|
|
||||||
overflow: auto; /* Enable scroll if needed */
|
|
||||||
background-color: black; /* Fallback color */
|
|
||||||
background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
|
|
||||||
transition: opacity 400ms ease-in;
|
transition: opacity 400ms ease-in;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
14
index.html
14
index.html
@ -632,7 +632,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Dialog Box, displays status text only -->
|
<!-- Dialog Box, displays status text only -->
|
||||||
<div id="dialog-box-container">
|
<div id="dialog-box-container" class="popup-box-container">
|
||||||
<div id="dialog-box-content" class="dialog-box">
|
<div id="dialog-box-content" class="dialog-box">
|
||||||
<span id="dialog-box-close-button">×</span>
|
<span id="dialog-box-close-button">×</span>
|
||||||
<p id="dialog-box-text-1" class="dialog-box-text"> </p>
|
<p id="dialog-box-text-1" class="dialog-box-text"> </p>
|
||||||
@ -646,7 +646,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Purchase Server Pop-up Box -->
|
<!-- Purchase Server Pop-up Box -->
|
||||||
<div id="purchase-server-box-container">
|
<div id="purchase-server-box-container" class="popup-box-container">
|
||||||
<div id="purchase-server-box-content">
|
<div id="purchase-server-box-content">
|
||||||
<p id="purchase-server-box-text"> </p>
|
<p id="purchase-server-box-text"> </p>
|
||||||
<p id="purchase-server-box-enter-name"> Enter new server hostname: </p>
|
<p id="purchase-server-box-enter-name"> Enter new server hostname: </p>
|
||||||
@ -657,7 +657,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Purchase RAM for Home Computer Pop-up Box -->
|
<!-- Purchase RAM for Home Computer Pop-up Box -->
|
||||||
<div id="purchase-ram-for-home-box-container">
|
<div id="purchase-ram-for-home-box-container" class="popup-box-container">
|
||||||
<div id="purchase-ram-for-home-box-content">
|
<div id="purchase-ram-for-home-box-content">
|
||||||
<p id="purchase-ram-for-home-box-text"> </p>
|
<p id="purchase-ram-for-home-box-text"> </p>
|
||||||
<span id="purchase-ram-for-home-box-confirm"> Purchase </span>
|
<span id="purchase-ram-for-home-box-confirm"> Purchase </span>
|
||||||
@ -666,7 +666,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Travel Pop-up Box -->
|
<!-- Travel Pop-up Box -->
|
||||||
<div id="travel-box-container">
|
<div id="travel-box-container" class="popup-box-container">
|
||||||
<div id="travel-box-content">
|
<div id="travel-box-content">
|
||||||
<p id="travel-box-text"> </p>
|
<p id="travel-box-text"> </p>
|
||||||
<span id="travel-box-confirm"> Yes </span>
|
<span id="travel-box-confirm"> Yes </span>
|
||||||
@ -675,7 +675,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Purchase Augmentation Pop-up Box -->
|
<!-- Purchase Augmentation Pop-up Box -->
|
||||||
<div id="purchase-augmentation-box-container">
|
<div id="purchase-augmentation-box-container" class="popup-box-container">
|
||||||
<div id="purchase-augmentation-box-content">
|
<div id="purchase-augmentation-box-content">
|
||||||
<h2 id="purchase-augmentation-box-aug-name"> </h2>
|
<h2 id="purchase-augmentation-box-aug-name"> </h2>
|
||||||
<p id="purchase-augmentation-box-aug-info"> </p>
|
<p id="purchase-augmentation-box-aug-info"> </p>
|
||||||
@ -697,7 +697,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Faction Invitation Pop-up Box -->
|
<!-- Faction Invitation Pop-up Box -->
|
||||||
<div id="faction-invitation-box-container">
|
<div id="faction-invitation-box-container" class="popup-box-container">
|
||||||
<div id="faction-invitation-box-content">
|
<div id="faction-invitation-box-content">
|
||||||
<p id="faction-invitation-box-text"> </p>
|
<p id="faction-invitation-box-text"> </p>
|
||||||
<p id="faction-invitation-box-message"> </p>
|
<p id="faction-invitation-box-message"> </p>
|
||||||
@ -741,7 +741,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Game Options -->
|
<!-- Game Options -->
|
||||||
<div id="game-options-container">
|
<div id="game-options-container" class="popup-box-container">
|
||||||
<div id="game-options-content" class="game-options-box">
|
<div id="game-options-content" class="game-options-box">
|
||||||
<span id="game-options-close-button">×</span>
|
<span id="game-options-close-button">×</span>
|
||||||
<h1> Game Options </h1>
|
<h1> Game Options </h1>
|
||||||
|
24
src/Perk.js
24
src/Perk.js
@ -111,24 +111,24 @@ applyPerk = function(perk) {
|
|||||||
switch (perk.name) {
|
switch (perk.name) {
|
||||||
case PerkNames.FreeCoffeeCompanyPerk:
|
case PerkNames.FreeCoffeeCompanyPerk:
|
||||||
//Increase money and hacking exp gain
|
//Increase money and hacking exp gain
|
||||||
Player.hacking_money_mult += 1.1;
|
Player.hacking_money_mult *= 1.25;
|
||||||
Player.hacking_exp_mult += 1.1;
|
Player.hacking_exp_mult *= 1.25;
|
||||||
break;
|
break;
|
||||||
case PerkNames.FreeFoodCompanyPerk:
|
case PerkNames.FreeFoodCompanyPerk:
|
||||||
Player.strength_exp_mult += 1.05;
|
Player.strength_exp_mult *= 1.2;
|
||||||
Player.defense_exp_mult += 1.05;
|
Player.defense_exp_mult *= 1.2;
|
||||||
Player.dexterity_exp_mult += 1.05;
|
Player.dexterity_exp_mult *= 1.2;
|
||||||
Player.agility_exp_mult += 1.05;
|
Player.agility_exp_mult *= 1.2;
|
||||||
break;
|
break;
|
||||||
case PerkNames.NetworkingCompanyPerk:
|
case PerkNames.NetworkingCompanyPerk:
|
||||||
Player.company_rep_mult += 1.1;
|
Player.company_rep_mult *= 1.1;
|
||||||
Player.charisma_exp_mult += 1.2;
|
Player.charisma_exp_mult *= 1.2;
|
||||||
break;
|
break;
|
||||||
case PerkNames.PersonalTrainerCompanyPerk:
|
case PerkNames.PersonalTrainerCompanyPerk:
|
||||||
Player.strength_exp_mult += 1.15;
|
Player.strength_exp_mult *= 1.15;
|
||||||
Player.defense_exp_mult += 1.15;
|
Player.defense_exp_mult *= 1.15;
|
||||||
Player.dexterity_exp_mult += 1.15;
|
Player.dexterity_exp_mult *= 1.15;
|
||||||
Player.agility_exp_mult += 1.15;
|
Player.agility_exp_mult *= 1.15;
|
||||||
break;
|
break;
|
||||||
case PerkNames.KnowledgeBaseCompanyPerk:
|
case PerkNames.KnowledgeBaseCompanyPerk:
|
||||||
break;
|
break;
|
||||||
|
@ -1095,7 +1095,7 @@ PlayerObject.prototype.finishCrime = function(cancelled) {
|
|||||||
++this.numTimesShoplifted;
|
++this.numTimesShoplifted;
|
||||||
break;
|
break;
|
||||||
case CONSTANTS.CrimeMug:
|
case CONSTANTS.CrimeMug:
|
||||||
this.karma -= 0.2;
|
this.karma -= 0.25;
|
||||||
++this.numPeopleMugged;
|
++this.numPeopleMugged;
|
||||||
break;
|
break;
|
||||||
case CONSTANTS.CrimeDrugs:
|
case CONSTANTS.CrimeDrugs:
|
||||||
|
Loading…
Reference in New Issue
Block a user