mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-10 01:33:54 +01:00
few bugfix
This commit is contained in:
parent
133d80749d
commit
d01d75606a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -2416,7 +2416,7 @@ function initAugmentations(): void {
|
||||
moneyCost: 0,
|
||||
info:
|
||||
"The next evolution is near, A coming together of man and machine. A synthesis greater than the birth of the human " +
|
||||
"organism. Time spent with the gift has allowed for acclimitaztion of the invavise augment and the toll it takes upon " +
|
||||
"organism. Time spent with the gift has allowed for acclimatization of the invasive augment and the toll it takes upon " +
|
||||
"your frame granting lesser penalty of 5% to all stats.",
|
||||
prereqs: [AugmentationNames.StaneksGift1],
|
||||
isSpecial: true,
|
||||
|
@ -35,6 +35,7 @@ export function BuybackSharesModal(props: IProps): React.ReactElement {
|
||||
shares * buybackPrice > player.money;
|
||||
|
||||
function buy(): void {
|
||||
if (disabled) return;
|
||||
if (shares === null) return;
|
||||
corp.numShares += shares;
|
||||
if (isNaN(corp.issuedShares)) {
|
||||
|
@ -265,6 +265,7 @@ export const RamCosts: IMap<any> = {
|
||||
getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||
purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||
ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||
getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||
setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||
getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||
getBonusTime: 0,
|
||||
|
@ -94,6 +94,7 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
||||
territoryWarfareEngaged: gang.territoryWarfareEngaged,
|
||||
wantedLevel: gang.wanted,
|
||||
wantedLevelGainRate: gang.wantedGainRate,
|
||||
wantedPenalty: gang.getWantedPenalty(),
|
||||
};
|
||||
},
|
||||
getOtherGangInformation: function (): GangOtherInfo {
|
||||
@ -109,6 +110,8 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
||||
getMemberInformation: function (name: any): GangMemberInfo {
|
||||
helper.updateDynamicRam("getMemberInformation", getRamCost("gang", "getMemberInformation"));
|
||||
checkGangApiAccess("getMemberInformation");
|
||||
const gang = player.gang;
|
||||
if (gang === null) throw new Error("Should not be called without Gang");
|
||||
const member = getGangMember("getMemberInformation", name);
|
||||
return {
|
||||
name: member.name,
|
||||
@ -151,6 +154,10 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
||||
|
||||
upgrades: member.upgrades.slice(),
|
||||
augmentations: member.augmentations.slice(),
|
||||
|
||||
respectGain: member.calculateRespectGain(gang),
|
||||
wantedLevelGain: member.calculateWantedLevelGain(gang),
|
||||
moneyGain: member.calculateMoneyGain(gang),
|
||||
};
|
||||
},
|
||||
canRecruitMember: function (): boolean {
|
||||
@ -270,6 +277,18 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
||||
if (!member.canAscend()) return;
|
||||
return gang.ascendMember(member, workerScript);
|
||||
},
|
||||
getAscensionResult: function (name: any): GangMemberAscension | undefined {
|
||||
helper.updateDynamicRam("getAscensionResult", getRamCost("gang", "getAscensionResult"));
|
||||
checkGangApiAccess("getAscensionResult");
|
||||
const gang = player.gang;
|
||||
if (gang === null) throw new Error("Should not be called without Gang");
|
||||
const member = getGangMember("getAscensionResult", name);
|
||||
if (!member.canAscend()) return;
|
||||
return {
|
||||
respect: member.earnedRespect,
|
||||
...member.getAscensionResults(),
|
||||
};
|
||||
},
|
||||
setTerritoryWarfare: function (engage: any): void {
|
||||
helper.updateDynamicRam("setTerritoryWarfare", getRamCost("gang", "setTerritoryWarfare"));
|
||||
checkGangApiAccess("setTerritoryWarfare");
|
||||
|
28
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
28
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -674,24 +674,26 @@ export interface GangGenInfo {
|
||||
faction: string;
|
||||
/** Boolean indicating whether or not its a hacking gang */
|
||||
isHacking: boolean;
|
||||
/** Money earned per second */
|
||||
/** Money earned per game cycle */
|
||||
moneyGainRate: number;
|
||||
/** Gang's power for territory warfare */
|
||||
power: number;
|
||||
/** Gang's respect */
|
||||
respect: number;
|
||||
/** Respect earned per second */
|
||||
/** Respect earned per game cycle */
|
||||
respectGainRate: number;
|
||||
/** Amount of territory held. Returned in decimal form, not percentage */
|
||||
/** Amount of territory held. */
|
||||
territory: number;
|
||||
/** Clash chance. Returned in decimal form, not percentage */
|
||||
/** Clash chance. */
|
||||
territoryClashChance: number;
|
||||
/** Gang's wanted level */
|
||||
wantedLevel: number;
|
||||
/** Wanted level gained/lost per second (negative for losses) */
|
||||
/** Wanted level gained/lost per game cycle (negative for losses) */
|
||||
wantedLevelGainRate: number;
|
||||
/** Boolean indicating if territory warfare is enabled. */
|
||||
territoryWarfareEngaged: boolean;
|
||||
/** Number indicating the current wanted penalty. */
|
||||
wantedPenalty: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -829,6 +831,10 @@ export interface GangMemberInfo {
|
||||
|
||||
upgrades: string[];
|
||||
augmentations: string[];
|
||||
|
||||
respectGain: number;
|
||||
wantedLevelGain: number;
|
||||
moneyGain: number;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3051,6 +3057,18 @@ export interface Gang {
|
||||
*/
|
||||
ascendMember(memberName: string): GangMemberAscension | undefined;
|
||||
|
||||
/**
|
||||
* Get the result of an ascension without ascending.
|
||||
* @remarks
|
||||
* RAM cost: 2 GB
|
||||
*
|
||||
* Get the result of an ascension without ascending.
|
||||
*
|
||||
* @param memberName - Name of member.
|
||||
* @returns Object with info about the ascension results. undefined if ascension is impossible.
|
||||
*/
|
||||
getAscensionResult(memberName: string): GangMemberAscension | undefined;
|
||||
|
||||
/**
|
||||
* Enable/Disable territory warfare.
|
||||
* @remarks
|
||||
|
@ -242,9 +242,9 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
||||
<Slider
|
||||
value={logSize}
|
||||
onChange={handleLogSizeChange}
|
||||
step={1}
|
||||
step={20}
|
||||
min={20}
|
||||
max={100}
|
||||
max={500}
|
||||
valueLabelDisplay="auto"
|
||||
/>
|
||||
</ListItem>
|
||||
|
Loading…
Reference in New Issue
Block a user