manage ActiveDojoColorResearch
This commit is contained in:
parent
2572b665a6
commit
0798eb2c56
@ -78,6 +78,9 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
|||||||
processFundedProject(guild, techProject, recipe);
|
processFundedProject(guild, techProject, recipe);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (data.RecipeType.substring(0, 39) == "/Lotus/Types/Items/Research/DojoColors/") {
|
||||||
|
guild.ActiveDojoColorResearch = data.RecipeType;
|
||||||
|
}
|
||||||
await guild.save();
|
await guild.save();
|
||||||
res.end();
|
res.end();
|
||||||
} else if (data.Action == "Contribute") {
|
} else if (data.Action == "Contribute") {
|
||||||
@ -192,12 +195,14 @@ export const guildTechController: RequestHandler = async (req, res) => {
|
|||||||
} else if (data.Action == "Pause") {
|
} else if (data.Action == "Pause") {
|
||||||
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
||||||
project.State = -2;
|
project.State = -2;
|
||||||
|
guild.ActiveDojoColorResearch = "";
|
||||||
await guild.save();
|
await guild.save();
|
||||||
await removePigmentsFromGuildMembers(guild._id);
|
await removePigmentsFromGuildMembers(guild._id);
|
||||||
res.end();
|
res.end();
|
||||||
} else if (data.Action == "Unpause") {
|
} else if (data.Action == "Unpause") {
|
||||||
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
const project = guild.TechProjects!.find(x => x.ItemType == data.RecipeType)!;
|
||||||
project.State = 0;
|
project.State = 0;
|
||||||
|
guild.ActiveDojoColorResearch = data.RecipeType;
|
||||||
await guild.save();
|
await guild.save();
|
||||||
res.end();
|
res.end();
|
||||||
} else {
|
} else {
|
||||||
|
@ -151,6 +151,7 @@ const guildSchema = new Schema<IGuildDatabase>(
|
|||||||
VaultShipDecorations: { type: [typeCountSchema], default: undefined },
|
VaultShipDecorations: { type: [typeCountSchema], default: undefined },
|
||||||
VaultFusionTreasures: { type: [fusionTreasuresSchema], default: undefined },
|
VaultFusionTreasures: { type: [fusionTreasuresSchema], default: undefined },
|
||||||
TechProjects: { type: [techProjectSchema], default: undefined },
|
TechProjects: { type: [techProjectSchema], default: undefined },
|
||||||
|
ActiveDojoColorResearch: { type: String, default: "" },
|
||||||
Class: { type: Number, default: 0 },
|
Class: { type: Number, default: 0 },
|
||||||
XP: { type: Number, default: 0 },
|
XP: { type: Number, default: 0 },
|
||||||
ClaimedXP: { type: [String], default: undefined },
|
ClaimedXP: { type: [String], default: undefined },
|
||||||
|
@ -92,6 +92,7 @@ export const getGuildClient = async (guild: TGuildDatabaseDocument, accountId: s
|
|||||||
Ranks: guild.Ranks,
|
Ranks: guild.Ranks,
|
||||||
Tier: 1,
|
Tier: 1,
|
||||||
Vault: getGuildVault(guild),
|
Vault: getGuildVault(guild),
|
||||||
|
ActiveDojoColorResearch: guild.ActiveDojoColorResearch,
|
||||||
Class: guild.Class,
|
Class: guild.Class,
|
||||||
XP: guild.XP,
|
XP: guild.XP,
|
||||||
IsContributor: !!guild.CeremonyContributors?.find(x => x.equals(accountId)),
|
IsContributor: !!guild.CeremonyContributors?.find(x => x.equals(accountId)),
|
||||||
|
@ -14,6 +14,7 @@ export interface IGuildClient {
|
|||||||
}[];
|
}[];
|
||||||
Tier: number;
|
Tier: number;
|
||||||
Vault: IGuildVault;
|
Vault: IGuildVault;
|
||||||
|
ActiveDojoColorResearch: string;
|
||||||
Class: number;
|
Class: number;
|
||||||
XP: number;
|
XP: number;
|
||||||
IsContributor: boolean;
|
IsContributor: boolean;
|
||||||
@ -39,6 +40,7 @@ export interface IGuildDatabase {
|
|||||||
VaultFusionTreasures?: IFusionTreasure[];
|
VaultFusionTreasures?: IFusionTreasure[];
|
||||||
|
|
||||||
TechProjects?: ITechProjectDatabase[];
|
TechProjects?: ITechProjectDatabase[];
|
||||||
|
ActiveDojoColorResearch: string;
|
||||||
|
|
||||||
Class: number;
|
Class: number;
|
||||||
XP: number;
|
XP: number;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user