Correctly handle when crafts are completed, null craft data instead of removing entire production key/value pair
This commit is contained in:
parent
cc86ecce2b
commit
6d30d86ea4
@ -733,8 +733,8 @@ export class HideoutController
|
|||||||
area.lastRecipe = request.recipeId;
|
area.lastRecipe = request.recipeId;
|
||||||
counterHoursCrafting.value = hoursCrafting;
|
counterHoursCrafting.value = hoursCrafting;
|
||||||
|
|
||||||
// Delete production now it's complete
|
// Null production data now it's complete - will be cleaned up later by update() process
|
||||||
delete pmcData.Hideout.Production[prodId];
|
pmcData.Hideout.Production[prodId] = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Remove the old production from output object before its sent to client
|
// Remove the old production from output object before its sent to client
|
||||||
@ -813,7 +813,9 @@ export class HideoutController
|
|||||||
|
|
||||||
const callback = () =>
|
const callback = () =>
|
||||||
{
|
{
|
||||||
delete pmcData.Hideout.Production[prodId];
|
|
||||||
|
// Null production data now it's complete - will be cleaned up later by update() process
|
||||||
|
pmcData.Hideout.Production[prodId] = null;
|
||||||
};
|
};
|
||||||
|
|
||||||
return this.inventoryHelper.addItem(pmcData, newReq, output, sessionID, callback, true);
|
return this.inventoryHelper.addItem(pmcData, newReq, output, sessionID, callback, true);
|
||||||
|
Loading…
Reference in New Issue
Block a user