mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-22 15:43:49 +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,
|
moneyCost: 0,
|
||||||
info:
|
info:
|
||||||
"The next evolution is near, A coming together of man and machine. A synthesis greater than the birth of the human " +
|
"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.",
|
"your frame granting lesser penalty of 5% to all stats.",
|
||||||
prereqs: [AugmentationNames.StaneksGift1],
|
prereqs: [AugmentationNames.StaneksGift1],
|
||||||
isSpecial: true,
|
isSpecial: true,
|
||||||
|
@ -35,6 +35,7 @@ export function BuybackSharesModal(props: IProps): React.ReactElement {
|
|||||||
shares * buybackPrice > player.money;
|
shares * buybackPrice > player.money;
|
||||||
|
|
||||||
function buy(): void {
|
function buy(): void {
|
||||||
|
if (disabled) return;
|
||||||
if (shares === null) return;
|
if (shares === null) return;
|
||||||
corp.numShares += shares;
|
corp.numShares += shares;
|
||||||
if (isNaN(corp.issuedShares)) {
|
if (isNaN(corp.issuedShares)) {
|
||||||
|
@ -265,6 +265,7 @@ export const RamCosts: IMap<any> = {
|
|||||||
getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
getEquipmentStats: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||||
purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,
|
purchaseEquipment: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||||
ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,
|
ascendMember: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||||
|
getAscensionResult: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||||
setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
setTerritoryWarfare: RamCostConstants.ScriptGangApiBaseRamCost / 2,
|
||||||
getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,
|
getChanceToWinClash: RamCostConstants.ScriptGangApiBaseRamCost,
|
||||||
getBonusTime: 0,
|
getBonusTime: 0,
|
||||||
|
@ -94,6 +94,7 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
|||||||
territoryWarfareEngaged: gang.territoryWarfareEngaged,
|
territoryWarfareEngaged: gang.territoryWarfareEngaged,
|
||||||
wantedLevel: gang.wanted,
|
wantedLevel: gang.wanted,
|
||||||
wantedLevelGainRate: gang.wantedGainRate,
|
wantedLevelGainRate: gang.wantedGainRate,
|
||||||
|
wantedPenalty: gang.getWantedPenalty(),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
getOtherGangInformation: function (): GangOtherInfo {
|
getOtherGangInformation: function (): GangOtherInfo {
|
||||||
@ -109,6 +110,8 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
|||||||
getMemberInformation: function (name: any): GangMemberInfo {
|
getMemberInformation: function (name: any): GangMemberInfo {
|
||||||
helper.updateDynamicRam("getMemberInformation", getRamCost("gang", "getMemberInformation"));
|
helper.updateDynamicRam("getMemberInformation", getRamCost("gang", "getMemberInformation"));
|
||||||
checkGangApiAccess("getMemberInformation");
|
checkGangApiAccess("getMemberInformation");
|
||||||
|
const gang = player.gang;
|
||||||
|
if (gang === null) throw new Error("Should not be called without Gang");
|
||||||
const member = getGangMember("getMemberInformation", name);
|
const member = getGangMember("getMemberInformation", name);
|
||||||
return {
|
return {
|
||||||
name: member.name,
|
name: member.name,
|
||||||
@ -151,6 +154,10 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
|||||||
|
|
||||||
upgrades: member.upgrades.slice(),
|
upgrades: member.upgrades.slice(),
|
||||||
augmentations: member.augmentations.slice(),
|
augmentations: member.augmentations.slice(),
|
||||||
|
|
||||||
|
respectGain: member.calculateRespectGain(gang),
|
||||||
|
wantedLevelGain: member.calculateWantedLevelGain(gang),
|
||||||
|
moneyGain: member.calculateMoneyGain(gang),
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
canRecruitMember: function (): boolean {
|
canRecruitMember: function (): boolean {
|
||||||
@ -270,6 +277,18 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
|
|||||||
if (!member.canAscend()) return;
|
if (!member.canAscend()) return;
|
||||||
return gang.ascendMember(member, workerScript);
|
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 {
|
setTerritoryWarfare: function (engage: any): void {
|
||||||
helper.updateDynamicRam("setTerritoryWarfare", getRamCost("gang", "setTerritoryWarfare"));
|
helper.updateDynamicRam("setTerritoryWarfare", getRamCost("gang", "setTerritoryWarfare"));
|
||||||
checkGangApiAccess("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;
|
faction: string;
|
||||||
/** Boolean indicating whether or not its a hacking gang */
|
/** Boolean indicating whether or not its a hacking gang */
|
||||||
isHacking: boolean;
|
isHacking: boolean;
|
||||||
/** Money earned per second */
|
/** Money earned per game cycle */
|
||||||
moneyGainRate: number;
|
moneyGainRate: number;
|
||||||
/** Gang's power for territory warfare */
|
/** Gang's power for territory warfare */
|
||||||
power: number;
|
power: number;
|
||||||
/** Gang's respect */
|
/** Gang's respect */
|
||||||
respect: number;
|
respect: number;
|
||||||
/** Respect earned per second */
|
/** Respect earned per game cycle */
|
||||||
respectGainRate: number;
|
respectGainRate: number;
|
||||||
/** Amount of territory held. Returned in decimal form, not percentage */
|
/** Amount of territory held. */
|
||||||
territory: number;
|
territory: number;
|
||||||
/** Clash chance. Returned in decimal form, not percentage */
|
/** Clash chance. */
|
||||||
territoryClashChance: number;
|
territoryClashChance: number;
|
||||||
/** Gang's wanted level */
|
/** Gang's wanted level */
|
||||||
wantedLevel: number;
|
wantedLevel: number;
|
||||||
/** Wanted level gained/lost per second (negative for losses) */
|
/** Wanted level gained/lost per game cycle (negative for losses) */
|
||||||
wantedLevelGainRate: number;
|
wantedLevelGainRate: number;
|
||||||
/** Boolean indicating if territory warfare is enabled. */
|
/** Boolean indicating if territory warfare is enabled. */
|
||||||
territoryWarfareEngaged: boolean;
|
territoryWarfareEngaged: boolean;
|
||||||
|
/** Number indicating the current wanted penalty. */
|
||||||
|
wantedPenalty: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -829,6 +831,10 @@ export interface GangMemberInfo {
|
|||||||
|
|
||||||
upgrades: string[];
|
upgrades: string[];
|
||||||
augmentations: string[];
|
augmentations: string[];
|
||||||
|
|
||||||
|
respectGain: number;
|
||||||
|
wantedLevelGain: number;
|
||||||
|
moneyGain: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3051,6 +3057,18 @@ export interface Gang {
|
|||||||
*/
|
*/
|
||||||
ascendMember(memberName: string): GangMemberAscension | undefined;
|
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.
|
* Enable/Disable territory warfare.
|
||||||
* @remarks
|
* @remarks
|
||||||
|
@ -242,9 +242,9 @@ export function GameOptionsRoot(props: IProps): React.ReactElement {
|
|||||||
<Slider
|
<Slider
|
||||||
value={logSize}
|
value={logSize}
|
||||||
onChange={handleLogSizeChange}
|
onChange={handleLogSizeChange}
|
||||||
step={1}
|
step={20}
|
||||||
min={20}
|
min={20}
|
||||||
max={100}
|
max={500}
|
||||||
valueLabelDisplay="auto"
|
valueLabelDisplay="auto"
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
|
Loading…
Reference in New Issue
Block a user