MissionInventoryUpdate(not completed), Mod upgrade, Booster purchase #49

Merged
holmityd merged 40 commits from interface-names into main 2023-09-06 03:02:54 -07:00
holmityd commented 2023-09-02 03:01:28 -07:00 (Migrated from github.com)
No description provided.
OrdisPrime (Migrated from github.com) reviewed 2023-09-03 06:14:51 -07:00
@ -53,0 +59,4 @@
combineRewardAndLootInventory(InventoryChanges, lootInventory);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InventoryJson = JSON.stringify(await missionInventoryUpdate(combinedInventoryChanges, id));
OrdisPrime (Migrated from github.com) commented 2023-09-03 06:14:51 -07:00

can you seperate interfaces into seperate files? we got the /types folder, for example string dictionary could be in /types/commonTypes.ts

can you seperate interfaces into seperate files? we got the /types folder, for example string dictionary could be in /types/commonTypes.ts
OrdisPrime (Migrated from github.com) reviewed 2023-09-03 06:15:35 -07:00
@ -53,0 +59,4 @@
combineRewardAndLootInventory(InventoryChanges, lootInventory);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InventoryJson = JSON.stringify(await missionInventoryUpdate(combinedInventoryChanges, id));
OrdisPrime (Migrated from github.com) commented 2023-09-03 06:15:35 -07:00

is this the best way? looks a bit suspicious with the many else ifs

is this the best way? looks a bit suspicious with the many else ifs
holmityd (Migrated from github.com) reviewed 2023-09-03 10:36:13 -07:00
@ -53,0 +59,4 @@
combineRewardAndLootInventory(InventoryChanges, lootInventory);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InventoryJson = JSON.stringify(await missionInventoryUpdate(combinedInventoryChanges, id));
holmityd (Migrated from github.com) commented 2023-09-03 10:36:13 -07:00

need that like this for now

need that like this for now
7f8ddd commented 2023-09-03 11:52:16 -07:00 (Migrated from github.com)

If you could, add an "I" before your interface names to match the rest of the project. My push fixes all of the ones applied before this pull, among other things, to match the code elsewhere in the project, which is the preferred style.

If you could, add an "I" before your interface names to match the rest of the project. My push fixes all of the ones applied before this pull, among other things, to match the code elsewhere in the project, which is the preferred style.
OrdisPrime (Migrated from github.com) reviewed 2023-09-05 06:59:12 -07:00
@ -53,0 +52,4 @@
if (typeof lootInventory !== "object" || lootInventory === null) {
throw new Error("Invalid data format");
}
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:35:07 -07:00

what is the purpose of this?

what is the purpose of this?
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:43:03 -07:00

can you explain what the difference is between missioncredits and MissionCredits?

can you explain what the difference is between missioncredits and MissionCredits?
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:46:03 -07:00

can you please use brackets like:
if (something){
expression;
}

can you please use brackets like: if (something){ expression; }
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:46:25 -07:00

it makes it easier to read

it makes it easier to read
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:47:38 -07:00

where possible: instead of "i" or "j" use descriptive names such as rawUpgrade or so

where possible: instead of "i" or "j" use descriptive names such as rawUpgrade or so
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:49:43 -07:00

perhaps make a function for this logic.
A controller should only "control" the calling of functions, with as little logic as possible.
You could make a service/missionInventoryUpdateService and put all the logic there, while you call those functions from the controller. Some logic in the controller is totally fine.

perhaps make a function for this logic. A controller should only "control" the calling of functions, with as little logic as possible. You could make a service/missionInventoryUpdateService and put all the logic there, while you call those functions from the controller. Some logic in the controller is totally fine.
OrdisPrime (Migrated from github.com) commented 2023-09-05 05:50:28 -07:00

move types and interfaces into types/missionInventoryTypes

move types and interfaces into types/missionInventoryTypes
@ -53,0 +59,4 @@
combineRewardAndLootInventory(InventoryChanges, lootInventory);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const InventoryJson = JSON.stringify(await missionInventoryUpdate(combinedInventoryChanges, id));
OrdisPrime (Migrated from github.com) commented 2023-09-03 06:20:43 -07:00

and you could make a types/missionInventoryUpdatesTypes.ts as well

and you could make a types/missionInventoryUpdatesTypes.ts as well
OrdisPrime (Migrated from github.com) commented 2023-09-03 06:18:14 -07:00

instead of this use /types/commonTypes Oid type

instead of this use /types/commonTypes Oid type
OrdisPrime (Migrated from github.com) approved these changes 2023-09-05 14:09:26 -07:00
Sign in to join this conversation.
No description provided.