mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-25 19:02:26 +01:00
change the code
This commit is contained in:
parent
b11d65cc82
commit
78d45d23c2
@ -66,32 +66,19 @@ end
|
||||
|
||||
-- Cocoa definition
|
||||
-- 1st stage
|
||||
|
||||
--[[ TODO: Use a mesh for cocoas for perfect texture compability. ]]
|
||||
local crop_def = {
|
||||
description = S("Premature Cocoa Pod"),
|
||||
_doc_items_create_entry = true,
|
||||
_doc_items_longdesc = S("Cocoa pods grow on the side of jungle trees in 3 stages."),
|
||||
drawtype = "nodebox",
|
||||
tiles = {
|
||||
"[combine:16x16:6,1=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:6,11=mcl_cocoas_cocoa_stage_0.png",
|
||||
"mcl_cocoas_cocoa_stage_0.png", "mcl_cocoas_cocoa_stage_0.png^[transformFX",
|
||||
"[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png", "[combine:16x16:-5,0=mcl_cocoas_cocoa_stage_0.png",
|
||||
},
|
||||
drawtype = "mesh",
|
||||
mesh = "mcl_cocoas_cocoa_stage_0.obj",
|
||||
tiles = {"mcl_cocoas_cocoa_stage_0.png"},
|
||||
use_texture_alpha = minetest.features.use_texture_alpha_string_modes and "clip" or true,
|
||||
paramtype = "light",
|
||||
sunlight_propagates = true,
|
||||
paramtype2 = "facedir",
|
||||
walkable = true,
|
||||
drop = "mcl_dye:brown",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.125, -0.0625, 0.1875, 0.125, 0.25, 0.4375}, -- Pod
|
||||
-- FIXME: This has a thickness of 0. Is this OK in Minetest?
|
||||
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
|
||||
},
|
||||
},
|
||||
collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -119,18 +106,8 @@ minetest.register_node("mcl_cocoas:cocoa_1", table.copy(crop_def))
|
||||
crop_def.description = S("Medium Cocoa Pod")
|
||||
crop_def._doc_items_create_entry = false
|
||||
crop_def.groups.cocoa = 2
|
||||
crop_def.tiles = {
|
||||
"[combine:16x16:5,1=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:5,9=mcl_cocoas_cocoa_stage_1.png",
|
||||
"mcl_cocoas_cocoa_stage_1.png", "mcl_cocoas_cocoa_stage_1.png^[transformFX",
|
||||
"[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png", "[combine:16x16:-4,0=mcl_cocoas_cocoa_stage_1.png",
|
||||
}
|
||||
crop_def.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.1875, -0.1875, 0.0625, 0.1875, 0.25, 0.4375}, -- Pod
|
||||
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
|
||||
},
|
||||
}
|
||||
crop_def.mesh = "mcl_cocoas_cocoa_stage_1.obj"
|
||||
crop_def.tiles = {"mcl_cocoas_cocoa_stage_1.png"}
|
||||
crop_def.collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -151,20 +128,8 @@ crop_def.description = S("Mature Cocoa Pod")
|
||||
crop_def._doc_items_longdesc = S("A mature cocoa pod grew on a jungle tree to its full size and it is ready to be harvested for cocoa beans. It won't grow any further.")
|
||||
crop_def._doc_items_create_entry = true
|
||||
crop_def.groups.cocoa = 3
|
||||
crop_def.tiles = {
|
||||
-- The following 2 textures were derived from the original because the size of the top/bottom is slightly different :-(
|
||||
-- TODO: Find a way to *only* use the base texture
|
||||
"mcl_cocoas_cocoa_top_stage_2.png", "mcl_cocoas_cocoa_top_stage_2.png^[transformFY",
|
||||
"mcl_cocoas_cocoa_stage_2.png", "mcl_cocoas_cocoa_stage_2.png^[transformFX",
|
||||
"[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png", "[combine:16x16:-3,0=mcl_cocoas_cocoa_stage_2.png",
|
||||
}
|
||||
crop_def.node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25, -0.3125, -0.0625, 0.25, 0.25, 0.4375}, -- Pod
|
||||
{0, 0.25, 0.25, 0, 0.5, 0.5}, -- Stem
|
||||
},
|
||||
}
|
||||
crop_def.mesh = "mcl_cocoas_cocoa_stage_2.obj"
|
||||
crop_def.tiles = {"mcl_cocoas_cocoa_stage_2.png"}
|
||||
crop_def.collision_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
@ -197,4 +162,3 @@ minetest.register_abm({
|
||||
if minetest.get_modpath("doc") then
|
||||
doc.add_entry_alias("nodes", "mcl_cocoas:cocoa_1", "nodes", "mcl_cocoas:cocoa_2")
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user