1
Fork 0

Compare commits

..

4 Commits

Author SHA1 Message Date
Bauke 0b6dc4b2e0
Separate prompts and add the remaining ones. 2023-02-20 13:21:36 +01:00
Bauke 4d7ba21ac1
Add Collectables prompts. 2023-02-20 13:09:55 +01:00
Bauke 6ac56ae1f2
Make everything required. 2023-02-20 13:09:07 +01:00
Bauke ff0bddf3e1
Rename Minerals to Collectables. 2023-02-20 13:08:33 +01:00
1 changed files with 274 additions and 15 deletions

View File

@ -16,7 +16,7 @@ const MissionTypes = [
"Salvage Operation",
] as const;
const Minerals = [
const Collectables = [
"Barley Bulb",
"Bismor",
"Croppa",
@ -48,7 +48,7 @@ type Mission = {
"Credits": number;
"Experience": number;
"Items Collected": Record<typeof Minerals[number], number>;
"Items Collected": Record<typeof Collectables[number], number>;
"Credit Breakdown": {
"Primary Objective": number;
@ -56,12 +56,12 @@ type Mission = {
"Survival Bonus": number;
"Gold Mined": number;
"Bittergem"?: number;
"Ebonite Mutation"?: number;
"Kursite Infection"?: number;
"OMEN Modular Exterminator"?: number;
"Tritilyte Shard"?: number;
"Tyrant Shard"?: number;
"Bittergem": number;
"Ebonite Mutation": number;
"Kursite Infection": number;
"OMEN Modular Exterminator": number;
"Tritilyte Shard": number;
"Tyrant Shard": number;
};
"Experience Breakdown": {
@ -70,13 +70,13 @@ type Mission = {
"Minerals Mined": number;
"Hostiles Killed": number;
"Double XP"?: number;
"Ebonite Mutation"?: number;
"Kursite Infection"?: number;
"OMEN Modular Exterminator"?: number;
"Plagueheart"?: number;
"Tritilyte Shard"?: number;
"Tyrant Shard"?: number;
"Double XP": number;
"Ebonite Mutation": number;
"Kursite Infection": number;
"OMEN Modular Exterminator": number;
"Plagueheart": number;
"Tritilyte Shard": number;
"Tyrant Shard": number;
};
};
@ -152,6 +152,7 @@ async function main(): Promise<void> {
name: `Hazard ${value}`,
value: value.toString(),
})),
default: "5",
},
{
type: prompt.Select,
@ -171,9 +172,218 @@ async function main(): Promise<void> {
value,
})),
},
{
type: prompt.Number,
name: "Credits",
message: "Credits",
},
{
type: prompt.Number,
name: "Experience",
message: "Experience",
},
],
);
const collectableResults = await prompt.prompt([
{
type: prompt.Number,
name: "Collectable:Barley Bulb",
message: "Barley Bulb",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Bismor",
message: "Bismor",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Croppa",
message: "Croppa",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Enor Pearl",
message: "Enor Pearl",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Jadiz",
message: "Jadiz",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Magnite",
message: "Magnite",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Malt Star",
message: "Malt Star",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Phazyonite",
message: "Phazyonite",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Plagueheart",
message: "Plagueheart",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Starch Nut",
message: "Starch Nut",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Umanite",
message: "Umanite",
default: 0,
},
{
type: prompt.Number,
name: "Collectable:Yeast Cone",
message: "Yeast Cone",
default: 0,
},
]);
const creditResults = await prompt.prompt([
{
type: prompt.Number,
name: "Credits:Primary Objective",
message: "Credits: Primary Objective",
},
{
type: prompt.Number,
name: "Credits:Secondary Objective",
message: "Credits: Secondary Objective",
},
{
type: prompt.Number,
name: "Credits:Survival Bonus",
message: "Credits: Survival Bonus",
},
{
type: prompt.Number,
name: "Credits:Gold Mined",
message: "Credits: Gold Mined",
},
{
type: prompt.Number,
name: "Credits:Bittergem",
message: "Credits: Bittergem",
default: 0,
},
{
type: prompt.Number,
name: "Credits:Ebonite Mutation",
message: "Credits: Ebonite Mutation",
default: 0,
},
{
type: prompt.Number,
name: "Credits:Kursite Infection",
message: "Credits: Kursite Infection",
default: 0,
},
{
type: prompt.Number,
name: "Credits:OMEN Modular Exterminator",
message: "Credits: OMEN Modular Exterminator",
default: 0,
},
{
type: prompt.Number,
name: "Credits:Tritilyte Shard",
message: "Credits: Tritilyte Shard",
default: 0,
},
{
type: prompt.Number,
name: "Credits:Tyrant Shard",
message: "Credits: Tyrant Shard",
default: 0,
},
]);
const experienceResults = await prompt.prompt([
{
type: prompt.Number,
name: "Experience:Primary Objective",
message: "Experience: Primary Objective",
},
{
type: prompt.Number,
name: "Experience:Secondary Objective",
message: "Experience: Secondary Objective",
},
{
type: prompt.Number,
name: "Experience:Minerals Mined",
message: "Experience: Minerals Mined",
},
{
type: prompt.Number,
name: "Experience:Hostiles Killed",
message: "Experience: Hostiles Killed",
},
{
type: prompt.Number,
name: "Experience:Double XP",
message: "Experience: Double XP",
default: 0,
},
{
type: prompt.Number,
name: "Experience:Ebonite Mutation",
message: "Experience: Ebonite Mutation",
default: 0,
},
{
type: prompt.Number,
name: "Experience:Kursite Infection",
message: "Experience: Kursite Infection",
default: 0,
},
{
type: prompt.Number,
name: "Experience:OMEN Modular Exterminator",
message: "Experience: OMEN Modular Exterminator",
default: 0,
},
{
type: prompt.Number,
name: "Experience:Plagueheart",
message: "Experience: Plagueheart",
default: 0,
},
{
type: prompt.Number,
name: "Experience:Tritilyte Shard",
message: "Experience: Tritilyte Shard",
default: 0,
},
{
type: prompt.Number,
name: "Experience:Tyrant Shard",
message: "Experience: Tyrant Shard",
default: 0,
},
]);
const newMission: Mission = {
"Date": promptResults["Date"]!,
"Index": (dataMissions[0]?.Index ?? 0) + 1,
@ -195,6 +405,55 @@ async function main(): Promise<void> {
"Mission Status":
promptResults["Mission Status"] as Mission["Mission Status"],
"Mission Type": promptResults["Mission Type"] as Mission["Mission Type"],
"Credits": promptResults["Credits"]!,
"Experience": promptResults["Experience"]!,
"Items Collected": {
"Barley Bulb": collectableResults["Collectable:Barley Bulb"]!,
"Bismor": collectableResults["Collectable:Bismor"]!,
"Croppa": collectableResults["Collectable:Croppa"]!,
"Enor Pearl": collectableResults["Collectable:Enor Pearl"]!,
"Jadiz": collectableResults["Collectable:Jadiz"]!,
"Magnite": collectableResults["Collectable:Magnite"]!,
"Malt Star": collectableResults["Collectable:Malt Star"]!,
"Phazyonite": collectableResults["Collectable:Phazyonite"]!,
"Plagueheart": collectableResults["Collectable:Plagueheart"]!,
"Starch Nut": collectableResults["Collectable:Starch Nut"]!,
"Umanite": collectableResults["Collectable:Umanite"]!,
"Yeast Cone": collectableResults["Collectable:Yeast Cone"]!,
},
"Credit Breakdown": {
"Primary Objective": creditResults["Credits:Primary Objective"]!,
"Secondary Objective": creditResults["Credits:Secondary Objective"]!,
"Survival Bonus": creditResults["Credits:Survival Bonus"]!,
"Gold Mined": creditResults["Credits:Gold Mined"]!,
"Bittergem": creditResults["Credits:Bittergem"]!,
"Ebonite Mutation": creditResults["Credits:Ebonite Mutation"]!,
"Kursite Infection": creditResults["Credits:Kursite Infection"]!,
"OMEN Modular Exterminator":
creditResults["Credits:OMEN Modular Exterminator"]!,
"Tritilyte Shard": creditResults["Credits:Tritilyte Shard"]!,
"Tyrant Shard": creditResults["Credits:Tyrant Shard"]!,
},
"Experience Breakdown": {
"Primary Objective": experienceResults["Experience:Primary Objective"]!,
"Secondary Objective":
experienceResults["Experience:Secondary Objective"]!,
"Minerals Mined": experienceResults["Experience:Minerals Mined"]!,
"Hostiles Killed": experienceResults["Experience:Hostiles Killed"]!,
"Double XP": experienceResults["Experience:Double XP"]!,
"Ebonite Mutation": experienceResults["Experience:Ebonite Mutation"]!,
"Kursite Infection": experienceResults["Experience:Kursite Infection"]!,
"OMEN Modular Exterminator":
experienceResults["Experience:OMEN Modular Exterminator"]!,
"Plagueheart": experienceResults["Experience:Plagueheart"]!,
"Tritilyte Shard": experienceResults["Experience:Tritilyte Shard"]!,
"Tyrant Shard": experienceResults["Experience:Tyrant Shard"]!,
},
};
if (options.testing) {