Skip to content

Commit

Permalink
dont generate coding contract offline because SF1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
hydroflame committed May 26, 2022
1 parent f29e546 commit ddf4ab2
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/engine.tsx
Expand Up @@ -272,18 +272,20 @@ const Engine: {
const numCyclesOffline = Math.floor(timeOffline / CONSTANTS._idleSpeed);

// Generate coding contracts
let numContracts = 0;
if (numCyclesOffline < 3000 * 100) {
// if we have less than 100 rolls, just roll them exactly.
for (let i = 0; i < numCyclesOffline / 3000; i++) {
if (Math.random() < 0.25) numContracts++;
if (Player.sourceFiles.length > 0) {
let numContracts = 0;
if (numCyclesOffline < 3000 * 100) {
// if we have less than 100 rolls, just roll them exactly.
for (let i = 0; i < numCyclesOffline / 3000; i++) {
if (Math.random() < 0.25) numContracts++;
}
} else {
// just average it.
numContracts = (numCyclesOffline / 3000) * 0.25;
}
for (let i = 0; i < numContracts; i++) {
generateRandomContract();
}
} else {
// just average it.
numContracts = (numCyclesOffline / 3000) * 0.25;
}
for (let i = 0; i < numContracts; i++) {
generateRandomContract();
}

let offlineReputation = 0;
Expand Down

0 comments on commit ddf4ab2

Please sign in to comment.