made use of function addUpdObjectToItem()
This commit is contained in:
parent
15348cec35
commit
995d50dba4
@ -127,10 +127,8 @@ export class HealthController
|
|||||||
const consumedItemMaxResource = this.itemHelper.getItem(itemToConsume._tpl)[1]._props.MaxResource;
|
const consumedItemMaxResource = this.itemHelper.getItem(itemToConsume._tpl)[1]._props.MaxResource;
|
||||||
if (consumedItemMaxResource > 1)
|
if (consumedItemMaxResource > 1)
|
||||||
{
|
{
|
||||||
if (!itemToConsume.upd)
|
// Ensure item has a upd object
|
||||||
{
|
this.itemHelper.addUpdObjectToItem(itemToConsume);
|
||||||
itemToConsume.upd = {};
|
|
||||||
}
|
|
||||||
|
|
||||||
if (itemToConsume.upd.FoodDrink === undefined)
|
if (itemToConsume.upd.FoodDrink === undefined)
|
||||||
{
|
{
|
||||||
|
@ -1667,7 +1667,7 @@ export class ItemHelper
|
|||||||
|
|
||||||
if (warningMessageWhenMissing)
|
if (warningMessageWhenMissing)
|
||||||
{
|
{
|
||||||
this.logger.warning(warningMessageWhenMissing);
|
this.logger.debug(warningMessageWhenMissing);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user