improved texture naming options to eliminate duplicate textures

...removed duplicate textures
master
Izzy 2018-11-11 21:15:24 -07:00
parent 24775c1441
commit 31646d7f7e
18 changed files with 18 additions and 1 deletions

View File

@ -375,11 +375,12 @@ farming_super.register_plant = function(name, def)
local dropname = "p"..tierCount.."s"..tierStep.."t"..tier
local drops = def_drops[dropname] or def.default_drop
local tex = def.textures[dropname] or (mname.."_"..pname.."_"..tierCount.."_"..tierStep.."_"..tier..".png")
minetest.register_node(name, {
drawtype = "plantlike",
waving = false,
tiles = {mname .. "_" .. pname .. "_"..step.."_"..tier..".png"},
tiles = {tex},
paramtype = "light",
paramtype2 = def.paramtype2 or nil,
place_param2 = def.place_param2 or nil,

View File

@ -7,6 +7,7 @@ dofile(modpath.."/api.lua")
-- todo: pests
-- todo: nutrient depletion
@ -55,6 +56,21 @@ farming_super.register_plant("farming_super:corn", {
p4s2t2 = corndrop, -- phase 4, step 2, tier 2
p4s2t3 = corndrop,
},
textures = { -- overrides default texture naming, allowing reuse
p2s1t2 = "farming_super_corn_1_2_1.png",
p3s1t1 = "farming_super_corn_2_1_1.png",
p3s1t2 = "farming_super_corn_2_1_1.png",
p3s1t3 = "farming_super_corn_1_2_1.png",
p4s1t1 = "farming_super_corn_2_1_1.png",
p4s1t2 = "farming_super_corn_2_1_1.png",
p4s1t3 = "farming_super_corn_2_1_1.png",
p4s1t4 = "farming_super_corn_1_2_1.png",
p4s2t1 = "farming_super_corn_2_1_1.png",
p4s2t3 = "farming_super_corn_4_2_2.png",
},
minlight = 13,
maxlight = 15,
fertility = {"grassland"},

View File

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

View File

Before

Width:  |  Height:  |  Size: 377 B

After

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 421 B

After

Width:  |  Height:  |  Size: 421 B

View File

Before

Width:  |  Height:  |  Size: 395 B

After

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

View File

Before

Width:  |  Height:  |  Size: 355 B

After

Width:  |  Height:  |  Size: 355 B

View File

Before

Width:  |  Height:  |  Size: 440 B

After

Width:  |  Height:  |  Size: 440 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 377 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 395 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B