Add calculateFavorToRep and calculateRepToFavor to Formulas.exe

The favorToRep and repToFavor formulas are shown to the player in the factions pages but were not available in Formulas.exe. This change adds a FactionsFormulas interface with the calculateFavorToRep and calculateRepToFavor functions.
This commit is contained in:
PSEUDOSTAGE 2022-03-31 15:28:25 -04:00 committed by GitHub
parent a0333d36a5
commit ad9ff78533
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -3797,6 +3797,26 @@ interface SkillsFormulas {
calculateExp(skill: number, skillMult?: number): number;
}
/**
* Factions formulas
* @public
*/
interface FactionsFormulas {
/**
* Calculate the total required amount of faction reputation to reach a target favor.
* @param favor - target faction favor.
* @returns The calculated faction reputation required.
*/
calculateFavorToRep(favor: number): number;
/**
* Calculate the resulting faction favor of a total amount of reputation.
* (Faction favor is gained whenever you install an Augmentation.)
* @param rep - amount of reputation.
* @returns The calculated faction favor.
*/
calculateRepToFavor(rep: number): number;
}
/**
* Hacking formulas
* @public
@ -4039,6 +4059,8 @@ interface GangFormulas {
* @public
*/
export interface Formulas {
/** Factions formulas */
factions: FactionsFormulas;
/** Skills formulas */
skills: SkillsFormulas;
/** Hacking formulas */