Skip to content

Commit

Permalink
Fix completed tech display for forking techs (#1226)
Browse files Browse the repository at this point in the history
  • Loading branch information
yarukishi authored Oct 12, 2024
1 parent f233d1f commit 9d0cef6
Showing 1 changed file with 23 additions and 14 deletions.
37 changes: 23 additions & 14 deletions src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -5232,20 +5232,29 @@ export function checkTechQualifications(c_action,type){
function checkOldTech(tech){
let tch = actions.tech[tech].grant[0];
if (global.tech[tch] && global.tech[tch] >= actions.tech[tech].grant[1]){
if (tech !== 'fanaticism' && tech !== 'anthropology' && tech !== 'deify' && tech !== 'study'){
return true;
}
else if (tech === 'fanaticism' && global.tech['fanaticism']){
return true;
}
else if (tech === 'anthropology' && global.tech['anthropology']){
return true;
}
else if (tech === 'deify' && global.tech['ancient_deify']){
return true;
}
else if (tech === 'study' && global.tech['ancient_study']){
return true;
switch (tech) {
case 'fanaticism':
return Boolean(global.tech['fanaticism']);
case 'anthropology':
return Boolean(global.tech['anthropology']);
case 'deify':
return Boolean(global.tech['ancient_deify']);
case 'study':
return Boolean(global.tech['ancient_study']);
case 'isolation_protocol':
return Boolean(global.tech['isolation']);
case 'focus_cure':
return Boolean(global.tech['focus_cure']);
case 'vax_strat1':
return Boolean(global.tech['vax_p']);
case 'vax_strat2':
return Boolean(global.tech['vax_f']);
case 'vax_strat3':
return Boolean(global.tech['vax_s']);
case 'vax_strat4':
return Boolean(global.tech['vax_c']);
default:
return true;
}
}
return false;
Expand Down

0 comments on commit 9d0cef6

Please sign in to comment.