Add images and descriptions to obscure items
parent
506da6941b
commit
dc822fa3e0
|
@ -95,6 +95,8 @@ end
|
|||
-- nodes from being placed in the top half of the door.
|
||||
minetest.register_node("doors:hidden", {
|
||||
description = S("Hidden Door Segment"),
|
||||
inventory_image = "doors_hidden_inv.png",
|
||||
wield_image = "doors_hidden_inv.png",
|
||||
-- can't use airlike otherwise falling nodes will turn to entities
|
||||
-- and will be forever stuck until door is removed.
|
||||
drawtype = "nodebox",
|
||||
|
@ -241,9 +243,10 @@ function doors.register(name, def)
|
|||
if def.protected then
|
||||
tt = S("Owned by placer")
|
||||
end
|
||||
local description = def.description
|
||||
|
||||
minetest.register_craftitem(":" .. name, {
|
||||
description = def.description,
|
||||
description = description,
|
||||
_tt_help = tt,
|
||||
inventory_image = def.inventory_image,
|
||||
groups = table.copy(def.groups),
|
||||
|
@ -426,9 +429,11 @@ function doors.register(name, def)
|
|||
def.collision_box = {type = "fixed", fixed = {-1/2,-1/2,-1/2,1/2,3/2,-6/16}}
|
||||
|
||||
def.mesh = "door_a.obj"
|
||||
def.description = S("@1 (left hinge)", description)
|
||||
minetest.register_node(":" .. name .. "_a", table.copy(def))
|
||||
|
||||
def.mesh = "door_b.obj"
|
||||
def.description = S("@1 (right hinge)", description)
|
||||
minetest.register_node(":" .. name .. "_b", table.copy(def))
|
||||
|
||||
_doors.registered_doors[name .. "_a"] = true
|
||||
|
@ -579,6 +584,9 @@ function doors.register_trapdoor(name, def)
|
|||
def.tile_side, def.tile_side}
|
||||
def_closed.use_texture_alpha = "clip"
|
||||
|
||||
def_opened.description = S("@1 (open)", def.description)
|
||||
def_opened.inventory_image = nil
|
||||
def_opened.wield_image = nil
|
||||
def_opened.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-0.5, -0.5, 6/16, 0.5, 0.5, 0.5}
|
||||
|
@ -651,6 +659,7 @@ function doors.register_fencegate(name, def)
|
|||
}
|
||||
|
||||
local fence_open = table.copy(fence)
|
||||
fence_open.description = S("@1 (open)", def.description)
|
||||
fence_open.mesh = "doors_fencegate_open.obj"
|
||||
fence_open.gate = name .. "_closed"
|
||||
fence_open.sound = "doors_fencegate_close"
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 302 B |
|
@ -165,8 +165,8 @@ hades_farming.register_plant = function(name, def)
|
|||
local pname = name:split(":")[2]
|
||||
|
||||
-- Check def table
|
||||
if not def.description then
|
||||
def.description = "Seed"
|
||||
if not def.description_seed then
|
||||
def.description_seed = "Seed"
|
||||
end
|
||||
if not def.inventory_image then
|
||||
def.inventory_image = "unknown_item.png"
|
||||
|
@ -190,7 +190,7 @@ hades_farming.register_plant = function(name, def)
|
|||
g[v] = 1
|
||||
end
|
||||
minetest.register_node(":" .. mname .. ":seed_" .. pname, {
|
||||
description = def.description,
|
||||
description = def.description_seed,
|
||||
_tt_help = def._tt_help,
|
||||
tiles = {def.inventory_image, def.inventory_image, "blank.png"},
|
||||
use_texture_alpha = "clip",
|
||||
|
@ -237,10 +237,18 @@ hades_farming.register_plant = function(name, def)
|
|||
}
|
||||
}
|
||||
local nodegroups = {snappy = 3, flammable = 2, plant = 1, not_in_creative_inventory = 1, attached_node = 1}
|
||||
local texture = mname .. "_" .. pname .. "_" .. i .. ".png"
|
||||
nodegroups[pname] = i
|
||||
local description_plant
|
||||
if def.description_plant then
|
||||
description_plant = S(def.description_plant, S("Stage @1", i))
|
||||
end
|
||||
minetest.register_node(mname .. ":" .. pname .. "_" .. i, {
|
||||
drawtype = "plantlike",
|
||||
tiles = {mname .. "_" .. pname .. "_" .. i .. ".png"},
|
||||
description = description_plant,
|
||||
inventory_image = texture,
|
||||
wield_image = texture,
|
||||
tiles = {texture},
|
||||
use_texture_alpha = "clip",
|
||||
paramtype = "light",
|
||||
walkable = false,
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
hades_farming = {}
|
||||
hades_farming.path = minetest.get_modpath("hades_farming")
|
||||
local S = minetest.get_translator("hades_farming")
|
||||
local N = function(s) return s end
|
||||
|
||||
-- Load files
|
||||
dofile(hades_farming.path .. "/api.lua")
|
||||
|
@ -10,7 +11,8 @@ dofile(hades_farming.path .. "/hoes.lua")
|
|||
|
||||
-- WHEAT
|
||||
hades_farming.register_plant("hades_farming:wheat", {
|
||||
description = S("Wheat Seed"),
|
||||
description_seed = S("Wheat Seed"),
|
||||
description_plant = N("Wheat Plant (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
inventory_image = "hades_farming_wheat_seed.png",
|
||||
steps = 3,
|
||||
|
@ -53,7 +55,8 @@ minetest.register_craft({
|
|||
|
||||
-- Cotton
|
||||
hades_farming.register_plant("hades_farming:cotton", {
|
||||
description = S("Cotton Seed"),
|
||||
description_seed = S("Cotton Seed"),
|
||||
description_plant = N("Cotton Plant (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
description_harvest = S("String"),
|
||||
inventory_image = "hades_farming_cotton_seed.png",
|
||||
|
@ -95,7 +98,8 @@ minetest.register_craft({
|
|||
|
||||
|
||||
hades_farming.register_plant("hades_farming:tomato", {
|
||||
description = S("Tomato Seed"),
|
||||
description_seed = S("Tomato Seed"),
|
||||
description_plant = N("Tomato Plant (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
inventory_image = "hades_farming_tomato_seed.png",
|
||||
steps = 3,
|
||||
|
@ -109,7 +113,8 @@ minetest.register_craftitem("hades_farming:tomato", {
|
|||
})
|
||||
|
||||
hades_farming.register_plant("hades_farming:potato", {
|
||||
description = S("Potato Seed"),
|
||||
description_seed = S("Potato Seed"),
|
||||
description_plant = N("Potato Plant (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
inventory_image = "hades_farming_potato_seed.png",
|
||||
steps = 3,
|
||||
|
@ -123,7 +128,8 @@ minetest.register_craftitem("hades_farming:potato", {
|
|||
})
|
||||
|
||||
hades_farming.register_plant("hades_farming:strawberry", {
|
||||
description = S("Strawberry Seed"),
|
||||
description_seed = S("Strawberry Seed"),
|
||||
description_plant = N("Strawberry Bush (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
inventory_image = "hades_farming_strawberry_seed.png",
|
||||
steps = 3,
|
||||
|
@ -137,7 +143,8 @@ minetest.register_craftitem("hades_farming:strawberry", {
|
|||
})
|
||||
|
||||
hades_farming.register_plant("hades_farming:spice", {
|
||||
description = S("Spice Seed"),
|
||||
description_seed = S("Spice Seed"),
|
||||
description_plant = N("Spice Shrub (@1)"),
|
||||
_tt_help = S("Grows on Wet Soil in light"),
|
||||
inventory_image = "hades_farming_spice_seed.png",
|
||||
steps = 3,
|
||||
|
|
|
@ -322,7 +322,7 @@ for id, finfo in pairs(furnace_types) do
|
|||
})
|
||||
|
||||
minetest.register_node(id.."_active", {
|
||||
description = desc,
|
||||
description = S("@1 (active)", desc),
|
||||
tiles = {
|
||||
tex.."_top.png", tex.."_bottom.png",
|
||||
tex.."_side.png", tex.."_side.png",
|
||||
|
|
|
@ -170,14 +170,18 @@ local S = minetest.get_translator("hades_furniture")
|
|||
{ "max", "hi", minetest.LIGHT_MAX },
|
||||
}
|
||||
for l=1, #lamps do
|
||||
local drop, not_in_creative_inventory
|
||||
local drop, not_in_creative_inventory, tt, desc
|
||||
if l ~= 1 then
|
||||
drop = "hades_furniture:table_lamp_off"
|
||||
not_in_creative_inventory = 1
|
||||
desc = S("Table Lamp (level @1)", l)
|
||||
else
|
||||
tt = S("4 different luminance levels")
|
||||
desc = S("Table Lamp")
|
||||
end
|
||||
minetest.register_node("hades_furniture:table_lamp_"..lamps[l][1], {
|
||||
description = S("Table Lamp"),
|
||||
_tt_help = S("4 different luminance levels"),
|
||||
description = desc,
|
||||
_tt_help = tt,
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"hades_furniture_table_lamp_s.png",
|
||||
|
|
|
@ -138,8 +138,8 @@ for i in ipairs(lilies_list) do
|
|||
"blank.png",
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
inventory_image = "flowers_waterlily.png",
|
||||
wield_image = "flowers_waterlily.png",
|
||||
inventory_image = "flowers_waterlily"..deg2..".png",
|
||||
wield_image = "flowers_waterlily"..deg2..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
@ -180,7 +180,6 @@ for i in ipairs(seaweed_list) do
|
|||
seaweed_groups = { snappy = 3,flammable=2,seaweed=1, not_in_creative_inventory=1,falling_node=1,float=1 }
|
||||
end
|
||||
|
||||
|
||||
minetest.register_node("hades_waterplants:seaweed"..num, {
|
||||
description = S("Seaweed"),
|
||||
drawtype = "nodebox",
|
||||
|
@ -190,8 +189,8 @@ for i in ipairs(seaweed_list) do
|
|||
"blank.png",
|
||||
},
|
||||
use_texture_alpha = "clip",
|
||||
inventory_image = "flowers_seaweed_2.png",
|
||||
wield_image = "flowers_seaweed_2.png",
|
||||
inventory_image = "flowers_seaweed"..num..".png",
|
||||
wield_image = "flowers_seaweed"..num..".png",
|
||||
sunlight_propagates = true,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
|
Loading…
Reference in New Issue