mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-18 12:15:44 +01:00
Fix gaining too much asc pts, reduce reputation gain in gangs.
This commit is contained in:
parent
8a78ee4cf6
commit
99263309ba
4
dist/engine.bundle.js
vendored
4
dist/engine.bundle.js
vendored
File diff suppressed because one or more lines are too long
@ -233,12 +233,13 @@ export class GangMember {
|
||||
|
||||
ascend(): IAscensionResult {
|
||||
const res = this.getAscensionResults();
|
||||
this.hack_asc_points += this.hack_exp;
|
||||
this.str_asc_points += this.str_exp;
|
||||
this.def_asc_points += this.def_exp;
|
||||
this.dex_asc_points += this.dex_exp;
|
||||
this.agi_asc_points += this.agi_exp;
|
||||
this.cha_asc_points += this.cha_exp;
|
||||
const points = this.getGainedAscensionPoints();
|
||||
this.hack_asc_points += points.hack;
|
||||
this.str_asc_points += points.str;
|
||||
this.def_asc_points += points.def;
|
||||
this.dex_asc_points += points.dex;
|
||||
this.agi_asc_points += points.agi;
|
||||
this.cha_asc_points += points.cha;
|
||||
|
||||
// Remove upgrades. Then re-calculate multipliers and stats
|
||||
this.upgrades.length = 0;
|
||||
|
@ -6,7 +6,7 @@ export const GangConstants: {
|
||||
Names: string[];
|
||||
} = {
|
||||
// Respect is divided by this to get rep gain
|
||||
GangRespectToReputationRatio: 5,
|
||||
GangRespectToReputationRatio: 25,
|
||||
MaximumGangMembers: 30,
|
||||
CyclesPerTerritoryAndPowerUpdate: 100,
|
||||
// Portion of upgrade multiplier that is kept after ascending
|
||||
|
@ -3785,6 +3785,7 @@ function NetscriptFunctions(workerScript) {
|
||||
updateDynamicRam("ascendMember", getRamCost("gang", "ascendMember"));
|
||||
checkGangApiAccess("ascendMember");
|
||||
const member = getGangMember("ascendMember", name);
|
||||
if(!member.canAscend()) return;
|
||||
return Player.gang.ascendMember(member, workerScript);
|
||||
},
|
||||
setTerritoryWarfare: function(engage) {
|
||||
|
@ -32,13 +32,18 @@ document.addEventListener("DOMContentLoaded", getGameContainer);
|
||||
export function createPopup<T>(id: string, rootComponent: (props: T) => React.ReactElement, props: T): HTMLElement | null {
|
||||
let container = document.getElementById(id);
|
||||
if (container == null) {
|
||||
function onClick(this: HTMLElement, event: MouseEvent): any {
|
||||
//console.log(this.id);
|
||||
}
|
||||
container = createElement("div", {
|
||||
class: "popup-box-container",
|
||||
display: "flex",
|
||||
id: id,
|
||||
clickListener: onClick,
|
||||
});
|
||||
|
||||
gameContainer.appendChild(container);
|
||||
|
||||
}
|
||||
|
||||
ReactDOM.render(<Popup content={rootComponent} id={id} props={props} />, container);
|
||||
@ -51,9 +56,10 @@ export function createPopup<T>(id: string, rootComponent: (props: T) => React.Re
|
||||
*/
|
||||
export function removePopup(id: string): void {
|
||||
const content = document.getElementById(`${id}`);
|
||||
if (content == null) { return; }
|
||||
if (content == null) return;
|
||||
|
||||
ReactDOM.unmountComponentAtNode(content);
|
||||
|
||||
removeElementById(id);
|
||||
removeElementById(`${id}-close`);
|
||||
}
|
||||
|
@ -62,6 +62,9 @@ interface ICreateElementStyleOptions {
|
||||
visibility?: string;
|
||||
whiteSpace?: string;
|
||||
width?: string;
|
||||
height?: string;
|
||||
top?: string;
|
||||
left?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,6 +213,15 @@ function setElementStyle(el: HTMLElement, params: ICreateElementStyleOptions): v
|
||||
if (params.width !== undefined) {
|
||||
el.style.width = params.width;
|
||||
}
|
||||
if (params.height !== undefined) {
|
||||
el.style.height = params.height;
|
||||
}
|
||||
if (params.top !== undefined) {
|
||||
el.style.top = params.top;
|
||||
}
|
||||
if (params.left !== undefined) {
|
||||
el.style.left = params.left;
|
||||
}
|
||||
if (params.backgroundColor !== undefined) {
|
||||
el.style.backgroundColor = params.backgroundColor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user