From dd8bb345216501bac4735a7dee8189fe9c80f0b5 Mon Sep 17 00:00:00 2001 From: protocol_1903 <67478786+protocol-1903@users.noreply.github.com> Date: Sun, 4 Jan 2026 12:43:55 -0700 Subject: [PATCH] added py.spoilage_enabled() to check if the feature flag and mod setting are enabled --- lib/data-stage.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/data-stage.lua b/lib/data-stage.lua index 0d3a7ca..6cdfc14 100644 --- a/lib/data-stage.lua +++ b/lib/data-stage.lua @@ -17,6 +17,11 @@ py.empty_image = function() } end +---Returns if the feature flag spoilage and the mod setting for decay are enabled +py.spoilage_enabled = function() + return feature_flags.spoiling and mods.pyalternativeenergy and settings.startup["py-enable-decay"].value or false +end + ---Returns a localised name with the respective properties of this item/entity/recipe, generalized to make localisation easier ---@param base_name string ---@param tier string?