Add rotatable apple. Remove cylinder world

master
paramat 2015-03-28 05:42:06 +00:00
parent a26c006ebb
commit 3af6b663b9
3 changed files with 19 additions and 19 deletions

View File

@ -1,4 +1,4 @@
flexrealm 0.4.6 by paramat
flexrealm 0.4.7 by paramat
For Minetest 0.4.12 and later
Depends default
Licenses: code WTFPL, textures CC BY-SA

View File

@ -5,7 +5,6 @@ local vertical = false -- Vertical flat realm facing south
local invert = false -- Inverted flat realm
local planet = false -- Planet sphere
local dysonsphere = false -- Dyson sphere
local rod = false -- Cylinder world
local tube = true -- East-West tube world / O'Neill space colony
local cube = false -- Planet cube
local dysoncube = false -- Dyson cube
@ -29,7 +28,7 @@ local SPHEX = 0 -- Centre x
local SPHEZ = 0 -- ..z
local SPHEY = 0 -- ..y
local SPHER = 128 -- Surface radius
-- Cylinder world and tube world
-- Tube world
local TUBEZ = 0 -- Axis z
local TUBEY = 0 -- ..y
local TUBER = 128 -- Surface radius
@ -278,15 +277,11 @@ minetest.register_on_generated(function(minp, maxp, seed)
else
grad = (SPHER - nodrad) / TERRS
end
elseif rod or tube then
elseif tube then
tubeyr = y - TUBEY
tubezr = z - TUBEZ
local nodrad = math.sqrt(tubeyr ^ 2 + tubezr ^ 2)
if tube then
grad = (nodrad - TUBER) / TERRS
else
grad = (TUBER - nodrad) / TERRS
end
grad = (nodrad - TUBER) / TERRS
elseif cube or dysoncube then
cubexr = x - CUBEX
cubeyr = y - CUBEY
@ -401,16 +396,6 @@ minetest.register_on_generated(function(minp, maxp, seed)
and sphezr < -math.abs(spheyr) then
nodrot = 4
end
elseif rod then
if tubeyr > math.abs(tubezr) then
nodrot = 0
elseif tubeyr < -math.abs(tubezr) then
nodrot = 20
elseif tubezr > math.abs(tubeyr) then
nodrot = 4
elseif tubezr < -math.abs(tubeyr) then
nodrot = 8
end
elseif tube then
if tubeyr > math.abs(tubezr) then
nodrot = 20

View File

@ -80,6 +80,21 @@ minetest.register_node("flexrealm:leaves", {
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("flexrealm:apple", {
description = "Flexrealm Apple",
drawtype = "plantlike",
visual_scale = 1.0,
tiles = {"default_apple.png"},
inventory_image = "default_apple.png",
paramtype = "light",
paramtype2 = "facedir",
sunlight_propagates = true,
walkable = false,
groups = {fleshy=3,dig_immediate=3,flammable=2},
drop = "default:apple",
sounds = default.node_sound_leaves_defaults(),
})
minetest.register_node("flexrealm:jungleleaves", {
description = "Flexrealm Jungle Leaves",
drawtype = "allfaces_optional",