Added s to Improvement

Updated hideout area enum
This commit is contained in:
Dev 2024-08-20 21:19:00 +01:00
parent 8e4c4e4a0f
commit c45f4c5f4b
5 changed files with 10 additions and 7 deletions

View File

@ -1193,7 +1193,7 @@ export class HideoutController {
improveCompleteTimestamp: timestamp + improvement.improvementTime,
};
output.profileChanges[sessionId].improvements[improvement.id] = improvementDetails;
pmcData.Hideout.Improvement[improvement.id] = improvementDetails;
pmcData.Hideout.Improvements[improvement.id] = improvementDetails;
}
return output;

View File

@ -1145,8 +1145,8 @@ export class HideoutHelper {
* @param pmcProfile Profile to adjust
*/
public setHideoutImprovementsToCompleted(pmcProfile: IPmcData): void {
for (const improvementId in pmcProfile.Hideout.Improvement) {
const improvementDetails = pmcProfile.Hideout.Improvement[improvementId];
for (const improvementId in pmcProfile.Hideout.Improvements) {
const improvementDetails = pmcProfile.Hideout.Improvements[improvementId];
if (
improvementDetails.completed === false &&
improvementDetails.improveCompleteTimestamp < this.timeUtil.getTimestamp()

View File

@ -69,6 +69,7 @@ export interface Info {
Side: string;
SquadInviteRestriction: boolean;
HasCoopExtension: boolean;
HasPveGame: boolean;
Voice: string;
Level: number;
Experience: number;
@ -337,7 +338,7 @@ export interface IInsuredItem {
export interface Hideout {
Production: Record<string, Productive>;
Areas: HideoutArea[];
Improvement: Record<string, IHideoutImprovement>;
Improvements: Record<string, IHideoutImprovement>;
Seed: number;
sptUpdateLastRunTimestamp: number;
}

View File

@ -26,4 +26,6 @@ export enum HideoutAreas {
GYM = 23,
WEAPON_STAND = 24,
WEAPON_STAND_SECONDARY = 25,
EQUIPMENT_PRESETS_STAND = 26,
CIRCLE_OF_CULTISTS = 27,
}

View File

@ -111,8 +111,8 @@ export class EventOutputHolder {
* @returns dictionary of hideout improvements
*/
protected getImprovementsFromProfileAndFlagComplete(pmcData: IPmcData): Record<string, IHideoutImprovement> {
for (const improvementKey in pmcData.Hideout.Improvement) {
const improvement = pmcData.Hideout.Improvement[improvementKey];
for (const improvementKey in pmcData.Hideout.Improvements) {
const improvement = pmcData.Hideout.Improvements[improvementKey];
// Skip completed
if (improvement.completed) {
@ -124,7 +124,7 @@ export class EventOutputHolder {
}
}
return pmcData.Hideout.Improvement;
return pmcData.Hideout.Improvements;
}
/**