Skip to content

Commit

Permalink
Devtest: Remove testnodes_show_fallback_image
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuzzy2 committed Apr 5, 2021
1 parent 8878367 commit 3e1904f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
20 changes: 0 additions & 20 deletions games/devtest/mods/testnodes/drawtypes.lua
Expand Up @@ -15,22 +15,6 @@ testing this node easier and more convenient.

local S = minetest.get_translator("testnodes")

-- If set to true, will show an inventory image for nodes that have no inventory image as of Minetest 5.1.0.
-- This is due to <https://github.com/minetest/minetest/issues/9209>.
-- This is only added to make the items more visible to avoid confusion, but you will no longer see
-- the default inventory images for these items. When you want to test the default inventory image of drawtypes,
-- this should be turned off.
-- TODO: Remove support for fallback inventory image as soon #9209 is fixed.
local SHOW_FALLBACK_IMAGE = minetest.settings:get_bool("testnodes_show_fallback_image", false)

local fallback_image = function(img)
if SHOW_FALLBACK_IMAGE then
return img
else
return nil
end
end

-- A regular cube
minetest.register_node("testnodes:normal", {
description = S("Normal Drawtype Test Node"),
Expand Down Expand Up @@ -158,7 +142,6 @@ minetest.register_node("testnodes:torchlike", {
walkable = false,
sunlight_propagates = true,
groups = { dig_immediate = 3 },
inventory_image = fallback_image("testnodes_torchlike_floor.png"),
})

minetest.register_node("testnodes:torchlike_wallmounted", {
Expand All @@ -176,7 +159,6 @@ minetest.register_node("testnodes:torchlike_wallmounted", {
walkable = false,
sunlight_propagates = true,
groups = { dig_immediate = 3 },
inventory_image = fallback_image("testnodes_torchlike_floor.png"),
})


Expand All @@ -192,7 +174,6 @@ minetest.register_node("testnodes:signlike", {
walkable = false,
groups = { dig_immediate = 3 },
sunlight_propagates = true,
inventory_image = fallback_image("testnodes_signlike.png"),
})

minetest.register_node("testnodes:plantlike", {
Expand Down Expand Up @@ -510,7 +491,6 @@ minetest.register_node("testnodes:airlike", {
walkable = false,
groups = { dig_immediate = 3 },
sunlight_propagates = true,
inventory_image = fallback_image("testnodes_airlike.png"),
})

-- param2 changes liquid height
Expand Down
4 changes: 0 additions & 4 deletions games/devtest/mods/testnodes/settingtypes.txt

This file was deleted.

5 changes: 0 additions & 5 deletions games/devtest/settingtypes.txt
Expand Up @@ -30,8 +30,3 @@ devtest_dungeon_mossycobble (Generate mossy cobblestone) bool false

# If enabled, some very basic biomes will be registered.
devtest_register_biomes (Register biomes) bool true

# If set to true, will show an inventory image for nodes that have no inventory image as of Minetest 5.1.0.
# This is due to <https://github.com/minetest/minetest/issues/9209>.
# This is only added to make the items more visible to avoid confusion, but you will no longer see the default inventory images for these items. When you want to test the default inventory image of drawtypes, this should be turned off.
testnodes_show_fallback_image (Use fallback inventory images) bool false

0 comments on commit 3e1904f

Please sign in to comment.