From 1e538c0fadf0b31e61147e24b6f8e643f7dfdb0d Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 23 Dec 2022 15:11:26 -0800 Subject: [PATCH] up --- README.md | 1 + changelog.txt | 1 + data-util.lua | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/README.md b/README.md index c4b398f..7952c02 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,4 @@ Thanks to - [S3BA](https://github.com/S3BA-pl) (pl) - [x2605](https://github.com/x2605) (ko) - [Pergamum663](https://github.com/Pergamum663) (ru) +- [NathanU](https://github.com/NathanU) (de) diff --git a/changelog.txt b/changelog.txt index 1392285..d1f0634 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 0.11.5 Date: 2022-12-24 Localization: - ja locale updates from Sakuro + - de locale updates from NathanU --------------------------------------------------------------------------------------------------- Version: 0.11.4 Date: 2022-08-23 diff --git a/data-util.lua b/data-util.lua index cd2148a..3373bb2 100644 --- a/data-util.lua +++ b/data-util.lua @@ -235,6 +235,18 @@ function util.se_matter(params) end end +-- Get the normal prototype for a recipe -- either .normal or the recipe itself +function util.get_normal(recipe_name) + if data.raw.recipe[recipe_name] then + recipe = data.raw.recipe[recipe_name] + if recipe.normal and recipe.normal.ingredients then + return recipe.normal + elseif recipe.ingredients then + return recipe + end + end +end + -- Set/override a technology's prerequisites function util.set_prerequisite(technology_name, prerequisites) local technology = data.raw.technology[technology_name]