Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

Commit

Permalink
Give effect variants same effects as base
Browse files Browse the repository at this point in the history
  • Loading branch information
ShamblesSM committed Feb 4, 2023
1 parent 7afc778 commit a9dea16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ConfigManager.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ function ConfigManager:loadStuffAfterResources()
price = data.price or food.price,
}
local instance = FoodItem(foodVariant, food._path)
instance.variantBase = food._name
instance.variantBase = food._name
instance:syncVariantEffects()
self.foodItems[internalName] = instance
end
end
Expand Down
8 changes: 8 additions & 0 deletions src/Configs/FoodItem.lua
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,12 @@ end



function FoodItem:syncVariantEffects()
if self.variantBase then
self.effects = _Game.configManager.foodItems[self.variantBase].effects
end
end



return FoodItem

0 comments on commit a9dea16

Please sign in to comment.