Faction Donation does not appear on special or gang factions, passive rep doesnt work on gang or special factions

This commit is contained in:
Olivier Gagnon 2021-05-05 21:32:06 -04:00
parent 5bb6a72c90
commit c7c86240db
3 changed files with 13 additions and 1 deletions

@ -238,6 +238,11 @@ export function processPassiveFactionRepGain(numCycles) {
if (!Factions.hasOwnProperty(name)) continue;
const faction = Factions[name];
if (!faction.isMember) continue;
// No passive rep for special factions
const info = faction.getInfo();
if(!info.offersWork()) continue;
// No passive rep for gangs.
if(Player.getGangName() === name) continue;
// 0 favor = 1%/s
// 50 favor = 6%/s
// 100 favor = 11%/s

@ -57,6 +57,13 @@ export class FactionInfo {
this.augmentationPriceMult = 1;
this.augmentationRepRequirementMult = 1;
}
offersWork(): boolean {
return this.offerFieldWork ||
this.offerHackingMission ||
this.offerHackingWork ||
this.offerSecurityWork;
}
}
/**

@ -264,7 +264,7 @@ export class FactionRoot extends React.Component<IProps, IState> {
/>
}
{
!isPlayersGang &&
!isPlayersGang && factionInfo.offersWork() &&
<DonateOption
faction={this.props.faction}
p={this.props.p}