From 8f5d3e4a65124494ecfaa010c6a6d21e992ff3e4 Mon Sep 17 00:00:00 2001 From: PHIDIAS Date: Fri, 10 Jan 2025 00:01:16 +0900 Subject: [PATCH] . --- exp_legacy/module/modules/control/vlayer.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/exp_legacy/module/modules/control/vlayer.lua b/exp_legacy/module/modules/control/vlayer.lua index 1ed83cb0..9f4b7b18 100644 --- a/exp_legacy/module/modules/control/vlayer.lua +++ b/exp_legacy/module/modules/control/vlayer.lua @@ -372,13 +372,14 @@ local function handle_input_interfaces() local count_deduct local count_add - if v.quality.level == 1 then + if prototypes.quality[v.quality].level == 1 then count_deduct = v.count count_add = v.count elseif prototypes.quality[v.quality].level > 1 and v.count >= 10 then - count_deduct = math.floor(v.count / 10) - count_add = count_deduct * (7 + (prototypes.quality[v.quality].level * 3)) + local batch = math.floor(v.count / 10) + count_deduct = batch * 10 + count_add = batch * (7 + (prototypes.quality[v.quality].level * 3)) end if count_deduct and count_add then