From 4dbc5b6cd581e0745a548493e76454fef699c05c Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Thu, 6 Feb 2020 23:27:24 +0100 Subject: [PATCH] Remove dead code --- API.md | 1 - init.lua | 53 ----------------------------------------------------- 2 files changed, 54 deletions(-) diff --git a/API.md b/API.md index eaf2308..0f24e47 100644 --- a/API.md +++ b/API.md @@ -9,7 +9,6 @@ Add these to the item definition. * `_tt_help`: Custom help text * `_tt_food`: If `true`, item is a food item that can be consumed by the player * `_tt_food_hp`: Health increase (in HP) for player when consuming food item -* `_tt_food_satiation`: Satiation increase for player when consuming food item (note: the meaning of satiation is depending on the game being used; some games might not have a satiation mechanic at all, in which case you can skip this field) Once this mod had overwritten the `description` field of an item was overwritten, it will save the original (unaltered) `description` in the `_tt_original_description` field. diff --git a/init.lua b/init.lua index 46611e1..34368c2 100644 --- a/init.lua +++ b/init.lua @@ -6,50 +6,6 @@ local COLOR_GOOD = "#00ff00" tt = {} tt.registered_snippets = {} -local function descriptive_dig_speed(time, group) - if time <= 0 then - return S("Digs @1 instantly", group) - elseif time <= 0.35 then - return S("Digs @1 insanely fast", group) - elseif time <= 0.5 then - return S("Digs @1 very fast", group) - elseif time <= 0.7 then - return S("Digs @1 fast", group) - elseif time <= 1.0 then - return S("Digs @1 at medium speed", group) - elseif time <= 1.5 then - return S("Digs @1 slowly", group) - elseif time <= 2.0 then - return S("Digs @1 very slowly", group) - elseif time <= 10.0 then - return S("Digs @1 painfully slowly", group) - else - return S("Digs @1 sluggishly", group) - end -end - -local function descriptive_punch_interval(time) - if time <= 0 then - return S("Instantanous punching") - elseif time < 0.5 then - return S("Insanely fast punching") - elseif time < 0.7 then - return S("Very fast punching") - elseif time < 0.9 then - return S("Fast punching") - elseif time < 1.1 then - return S("Medium speed punching") - elseif time < 1.5 then - return S("Slow punching") - elseif time < 2.0 then - return S("Very slow punching") - elseif time < 3.0 then - return S("Painfully slow punching") - else - return S("Sluggish punching") - end -end - local function get_min_digtime(caps) local mintime local unique = true @@ -156,15 +112,6 @@ tt.register_snippet(function(itemstring) local msg = S("+@1 food points", def._tt_food_hp) desc = desc .. "\n" .. minetest.colorize(COLOR_DEFAULT, msg) end - -- NOTE: This is unused atm - --[[if def._tt_food_satiation then - if def._tt_food_satiation >= 0 then - msg = S("+@1 satiation", def._tt_food_satiation) - else - msg = S("@1 satiation", def._tt_food_satiation) - end - desc = desc .. "\n" .. minetest.colorize(COLOR_DEFAULT, msg) - end]] end return desc, false end) -- 2.11.4.GIT