merge upstream

master
Milan 2020-02-28 17:40:14 +01:00
commit 4eb2a3bee3
33 changed files with 2594 additions and 94 deletions

View File

@ -75,6 +75,9 @@ PilzAdam (WTFPL; default and beds mod):
cottages_beds_bed_top_bottom.png
cottages_beds_bed_top_top.png
Bas080 (CC; see https://forum.minetest.net/viewtopic.php?t=2344)
cottages_rope.png
Derived from Universal schema.jpg by Stefanie Lindener, which can be found here: http://de.wikipedia.org/w/index.php?title=Datei:Universal_schema.jpg&filetimestamp=20060510110309& The texture is CC-by-sa 2.0/de.
cottages_slate.png

View File

@ -1,5 +1,5 @@
default?
farming
farming?
stairs?
homedecor?
intllib?

42
functions.lua Normal file
View File

@ -0,0 +1,42 @@
local S = cottages.S
--- if no owner is set, all players may use the node; else only the owner
cottages.player_can_use = function( meta, player )
if( not( player) or not( meta )) then
return false;
end
local pname = player:get_player_name();
local owner = meta:get_string('owner' );
local public = meta:get_string('public')
if( not(owner) or owner=="" or owner==pname or public=="public") then
return true;
end
return false;
end
-- call this in on_receive_fields and add suitable buttons in order
-- to switch between public and private use
cottages.switch_public = function(pos, formname, fields, sender, name_of_the_thing)
-- switch between public and private
local meta = minetest.get_meta(pos)
local public = meta:get_string("public")
local owner = meta:get_string("owner")
if( sender and sender:get_player_name() == owner and fields.public) then
if( public ~= "public") then
meta:set_string("public", "public")
meta:set_string("infotext",
S("Public "..name_of_the_thing.." (owned by %s)"):format(owner))
minetest.chat_send_player(owner,
S("Your "..name_of_the_thing.." can now be used by other players as well."))
else
meta:set_string("public", "")
meta:set_string("infotext",
S("Private "..name_of_the_thing.." (owned by %s)"):format(owner))
minetest.chat_send_player(owner,
S("Your "..name_of_the_thing.." can only be used by yourself."))
end
return true
end
end

View File

@ -4,6 +4,8 @@
-- License: GPLv3
--
-- Modified:
-- 11.03.19 Adjustments for MT 5.x
-- cottages_feldweg_mode is now a setting in minetest.conf
-- 27.07.15 Moved into its own repository.
-- Made sure textures and craft receipe indigrents are available or can be replaced.
-- Took care of "unregistered globals" warnings.
@ -29,6 +31,31 @@ else
cottages.S = function(s) return s end
end
cottages.sounds = {}
-- MineClone2 needs special treatment; default is only needed for
-- crafting materials and sounds (less important)
if( not( minetest.get_modpath("default"))) then
default = {};
cottages.sounds.wood = nil
cottages.sounds.dirt = nil
cottages.sounds.leaves = nil
cottages.sounds.stone = nil
else
cottages.sounds.wood = default.node_sound_wood_defaults()
cottages.sounds.dirt = default.node_sound_dirt_defaults()
cottages.sounds.stone = default.node_sound_stone_defaults()
cottages.sounds.leaves = default.node_sound_leaves_defaults()
end
-- the straw from default comes with stairs as well and might replace
-- cottages:roof_connector_straw and cottages:roof_flat_straw
-- however, that does not look very good
if( false and minetest.registered_nodes["farming:straw"]) then
cottages.straw_texture = "farming_straw.png"
cottages.use_farming_straw_stairs = true
else
cottages.straw_texture = "cottages_darkage_straw.png"
end
--cottages.config_use_mesh_barrel = false;
--cottages.config_use_mesh_handmill = true;
@ -52,16 +79,23 @@ cottages.handmill_product[ 'default:coal_lump'] = 'dye:black 6';
cottages.handmill_max_per_turn = 20;
cottages.handmill_min_per_turn = 0;
dofile(minetest.get_modpath("cottages").."/functions.lua");
-- uncomment parts you do not want
dofile(minetest.get_modpath("cottages").."/nodes_furniture.lua");
dofile(minetest.get_modpath("cottages").."/nodes_historic.lua");
dofile(minetest.get_modpath("cottages").."/nodes_feldweg.lua");
-- allows to dig hay and straw fast
dofile(minetest.get_modpath("cottages").."/nodes_pitchfork.lua");
dofile(minetest.get_modpath("cottages").."/nodes_straw.lua");
dofile(minetest.get_modpath("cottages").."/nodes_hay.lua");
dofile(minetest.get_modpath("cottages").."/nodes_anvil.lua");
dofile(minetest.get_modpath("cottages").."/nodes_doorlike.lua");
dofile(minetest.get_modpath("cottages").."/nodes_fences.lua");
dofile(minetest.get_modpath("cottages").."/nodes_roof.lua");
dofile(minetest.get_modpath("cottages").."/nodes_barrel.lua");
dofile(minetest.get_modpath("cottages").."/nodes_mining.lua");
dofile(minetest.get_modpath("cottages").."/nodes_water.lua");
--dofile(minetest.get_modpath("cottages").."/nodes_chests.lua");
-- this is only required and useful if you run versions of the random_buildings mod where the nodes where defined inside that mod

View File

@ -109,6 +109,8 @@ straw = Stroh
threshing floor = Dreschboden
Threshing floor = Dreschboden
Threshing floor (owned by %s) = Dreschboden (gehoert %s)
Public threshing floor (owned by %s) = Öffentlicher Dreschboden (gehoert %s)
Private threshing floor (owned by %s) = Privater Dreschboden (gehoert %s)
Harvested wheat: = Geernteter Weizen
Straw: = Stroh
Seeds: = Koerner
@ -120,6 +122,8 @@ You have threshed the last %s wheat. = Du hast die letzten %s Weizenaehren gedr
mill, powered by punching = Muehle, durch Schlagen antreiben
Mill, powered by punching = Muehle, durch Schlagen antreiben
Mill, powered by punching (owned by %s) = Muehle, durch Schlagen antreiben (gehoert %s)
Public mill, powered by punching (owned by %s) = Öffentliche Muehle, durch Schlagen antreiben (gehoert %s)
Private mill, powered by punching (owned by %s) = Private Muehle, durch Schlagen antreiben (gehoert %s)
Wheat seeds: = Weizenkoerner
Flour: = Mehl
Mill = Muehle
@ -128,3 +132,26 @@ Punch this hand-driven mill = Schlage auf diese handbetriebene Muehle
to convert wheat seeds into flour. = um Weizenkoerner in Mehl umzuwandeln.
You have grinded %s wheat seeds (%s are left). = Du hast %s Weizenkoerner gemahlen (%s bleiben uebrig).
You have grinded the last %s wheat seeds. = Du hast die letzten %s Weizenkoerner gemahlen.
Your threshing floor can now be used by other players as well. = Dein Dreschboden kann jetzt auch von anderen Spielern benutzt werden.
Your mill, powered by punching can now be used by other players as well. = Deine Mühle kann jetzt auch von anderen Spielern benutzt werden.
Your threshing floor can only be used by yourself. = Dein Dreschboden kann jetzt nur noch von dir selbst benutzt werden.
Your mill, powered by punching can only be used by yourself. = Deine Mühle kann jetzt nur noch von dir selbst benutzt werden.
Public? = Oeffentlich?
Public tree trunk well = Oeffentlicher Baumstammbrunnen
Public tree trunk well (owned by %s) = Oeffentlicher Baumstammbrunnen (gehoert %s)
Private tree trunk well (owned by %s) = Privater Baumstammbrunnen (gehoert %s)
This tree trunk well is owned by %s. You can't use it. = Dieser Baumstammbrunnen gehoert %s. Du kannst ihn leider nicht benutzen.
Sorry. You have no room for the bucket. Please free some space in your inventory first! = Du hast leider keinen Platz mehr fuer den Eimer. Bitte schaffe erst ein wenig Platz!
Your tree trunk well can now be used by other players as well. = Dein Baumstammbrunnen kann jetzt auch von anderen Spielern benutzt werdn.
Your tree trunk well can only be used by yourself. = Dein Baumstammbrunnen kann jetzt nur noch von dir selbst benutzt werdn.
pitchfork (dig dirt with grass to get hay, place with right-click) = Heugabel (grabe Erde mit Grass um Heu zu bekommen; Rechts-Klick zum Platzieren)
pitchfork (for hay and straw) = Heugabel (fuer Heu und Stroh)
Some hay = Etwas Heu
Hay = Heu
Hay bale = Heuballen

View File

@ -105,9 +105,11 @@ Reet for thatching =
layer of straw =
straw bale =
straw =
threshing floor =
Threshing floor =
Threshing floor (owned by %s) =
threshing floor =
Threshing floor =
Threshing floor (owned by %s) =
Public threshing floor (owned by %s) =
Private threshing floor (owned by %s) =
Harvested wheat: =
Straw: =
Seeds: =
@ -117,8 +119,10 @@ to get straw and seeds from wheat. =
You have threshed %s wheat (%s are left). =
You have threshed the last %s wheat. =
mill, powered by punching =
Mill, powered by punching =
Mill, powered by punching (owned by %s) =
Mill, powered by punching =
Mill, powered by punching (owned by %s) =
Public mill, powered by punching (owned by %s) =
Private mill, powered by punching (owned by %s) =
Wheat seeds: =
Flour: =
Mill =
@ -127,3 +131,25 @@ Punch this hand-driven mill =
to convert wheat seeds into flour. =
You have grinded %s wheat seeds (%s are left). =
You have grinded the last %s wheat seeds. =
Your threshing floor can now be used by other players as well. =
Your mill, powered by punching can now be used by other players as well. =
Your threshing floor can only be used by yourself. =
Your mill, powered by punching can only be used by yourself. =
Public? =
Public tree trunk well =
Public tree trunk well (owned by %s) =
This tree trunk well is owned by %s. You can't use it. =
Sorry. You have no room for the bucket. Please free some space in your inventory first! =
Your tree trunk well can now be used by other players as well. =
Your tree trunk well can only be used by yourself. =
pitchfork (dig dirt with grass to get hay, place with right-click) =
pitchfork (for hay and straw) =
Some hay =
Hay =
Hay bale =

View File

@ -0,0 +1,203 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg-T-junction.blend'
# www.blender.org
o Cube.001
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.250000 0.413592 0.500000
v 0.375000 0.500000 0.500000
v 0.125000 0.375000 0.500000
v 0.500000 0.413592 0.250000
v 0.500000 0.500000 0.375000
v 0.500000 0.375000 0.125000
v -0.250000 0.413592 0.500000
v -0.125000 0.375000 0.500000
v -0.375000 0.500000 0.500000
v 0.500000 0.413592 -0.250000
v 0.500000 0.375000 -0.125000
v 0.500000 0.500000 -0.375000
v -0.250000 0.413592 -0.500000
v -0.375000 0.500000 -0.500000
v -0.125000 0.375000 -0.500000
v 0.250000 0.413592 -0.500000
v 0.125000 0.375000 -0.500000
v 0.375000 0.500000 -0.500000
v 0.147929 0.375000 0.384092
v 0.205019 0.375000 0.284810
v 0.284810 0.375000 0.205019
v 0.384092 0.375000 0.147929
v 0.264688 0.413592 0.428728
v 0.304057 0.413592 0.361075
v 0.361075 0.413592 0.304057
v 0.428728 0.413592 0.264688
v 0.473364 0.500000 0.381447
v 0.437341 0.500000 0.403095
v 0.403095 0.500000 0.437341
v 0.381447 0.500000 0.473364
v 0.473364 0.500000 -0.381447
v 0.437341 0.500000 -0.403095
v 0.403095 0.500000 -0.437341
v 0.381447 0.500000 -0.473364
v 0.428728 0.413592 -0.264688
v 0.361075 0.413592 -0.304057
v 0.304057 0.413592 -0.361075
v 0.264688 0.413592 -0.428728
v 0.147929 0.375000 -0.384092
v 0.205019 0.375000 -0.284810
v 0.284810 0.375000 -0.205019
v 0.384092 0.375000 -0.147929
v 0.000000 -0.005322 -0.500000
v 0.500000 -0.005322 0.000000
v -0.000000 -0.005322 0.500000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.500000 0.494678
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.973364 0.118553
vt 0.937341 0.096905
vt 0.903095 0.062659
vt 0.881447 0.026636
vt 0.875000 0.000000
vt 1.000000 0.125000
vt 0.026636 0.118553
vt 0.000000 0.125000
vt 0.125000 0.000000
vt 0.118553 0.026636
vt 0.096905 0.062659
vt 0.062659 0.096905
vt 0.000000 0.875000
vt 1.000000 0.875000
vt 0.352071 0.115908
vt 0.235312 0.071272
vt 0.250000 0.000000
vt 0.375000 0.000000
vt 0.294981 0.215190
vt 0.195943 0.138925
vt 0.215190 0.294981
vt 0.138925 0.195943
vt 0.071272 0.235312
vt 0.115908 0.352071
vt 0.000000 0.250000
vt 0.000000 0.375000
vt 0.928728 0.235312
vt 1.000000 0.250000
vt 1.000000 0.375000
vt 0.884092 0.352071
vt 0.861075 0.195943
vt 0.784810 0.294981
vt 0.804057 0.138925
vt 0.705019 0.215190
vt 0.647929 0.115908
vt 0.764688 0.071272
vt 0.625000 0.000000
vt 0.750000 0.000000
vt 0.000000 0.625000
vt 1.000000 0.625000
vt 1.000000 0.750000
vt 0.000000 0.750000
vt 0.312500 0.625000
vt 0.312500 0.500000
vt 0.375000 0.500000
vt 0.375000 0.625000
vt 0.250000 0.625000
vt 0.250000 0.500000
vt 0.187500 0.625000
vt 0.187500 0.500000
vt 0.125000 0.500000
vt 0.125000 0.625000
vt 0.062500 0.500000
vt 0.062500 0.625000
vt 0.750000 0.500000
vt 0.812500 0.500000
vt 0.812500 0.625000
vt 0.750000 0.625000
vt 0.687500 0.500000
vt 0.687500 0.625000
vt 0.625000 0.500000
vt 0.625000 0.625000
vt 0.562500 0.625000
vt 0.562500 0.500000
vt 0.500000 0.625000
vt 0.500000 0.500000
g Cube.001_Cube.001_road_ends
s off
f 7/1 8/2 53/3
f 5/2 1/4 52/3
f 5/1 6/2 51/3
f 6/2 2/4 51/3
f 2/4 22/5 51/3
f 22/5 21/6 51/3
f 21/6 23/7 51/3
f 23/7 25/8 51/3
f 25/8 24/9 51/3
f 24/9 26/10 51/3
f 26/10 1/11 51/3
f 1/11 5/1 51/3
f 1/4 20/5 52/3
f 20/5 18/6 52/3
f 18/6 19/7 52/3
f 19/7 14/8 52/3
f 14/8 12/9 52/3
f 12/9 13/10 52/3
f 13/10 4/11 52/3
f 4/11 8/1 52/3
f 8/1 5/2 52/3
f 8/2 4/4 53/3
f 4/4 10/5 53/3
f 10/5 9/6 53/3
f 9/6 11/7 53/3
f 11/7 16/8 53/3
f 16/8 15/9 53/3
f 15/9 17/10 53/3
f 17/10 3/11 53/3
f 3/11 7/1 53/3
g Cube.001_Cube.001_road_sides
f 7/2 3/4 2/11 6/1
g Cube.001_Cube.001_bottom
f 7/1 6/2 5/4 8/11
g Cube.001_Cube.001_top_grass
f 42/12 41/13 40/14 39/15 20/16 1/2 26/17
f 38/18 10/19 4/1 13/20 35/21 36/22 37/23
f 3/11 17/24 22/25 2/4
g Cube.001_Cube.001_road
f 30/26 34/27 12/28 14/29
f 29/30 33/31 34/27 30/26
f 28/32 32/33 33/31 29/30
f 31/34 32/33 28/32 27/35
f 9/36 31/34 27/35 11/37
f 46/38 24/39 25/40 47/41
f 45/42 46/38 47/41 48/43
f 44/44 45/42 48/43 49/45
f 50/46 43/47 44/44 49/45
f 19/48 18/49 43/47 50/46
f 16/50 23/51 21/52 15/53
f 23/51 16/50 11/37 25/40
f 27/35 47/41 25/40 11/37
f 28/32 48/43 47/41 27/35
f 29/30 49/45 48/43 28/32
f 30/26 50/46 49/45 29/30
f 30/26 14/29 19/48 50/46
g Cube.001_Cube.001_road-grass_blend
f 34/54 35/55 13/56 12/57
f 33/58 36/59 35/55 34/54
f 32/60 37/61 36/59 33/58
f 38/62 37/61 32/60 31/63
f 10/64 38/62 31/63 9/65
f 42/66 26/67 24/68 46/69
f 41/70 42/66 46/69 45/71
f 40/72 41/70 45/71 44/73
f 43/74 39/75 40/72 44/73
f 18/76 20/77 39/75 43/74
f 15/53 21/52 22/25 17/24

314
models/feldweg-crossing.obj Normal file
View File

@ -0,0 +1,314 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg-crossing.blend'
# www.blender.org
o Cube.003
v 0.500000 0.500000 0.500000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v -0.500000 0.413592 0.250000
v -0.500000 0.500000 0.375000
v -0.500000 0.375000 0.125000
v -0.250000 0.413592 0.500000
v -0.375000 0.500000 0.500000
v -0.125000 0.375000 0.500000
v -0.500000 0.413592 -0.250000
v -0.500000 0.375000 -0.125000
v -0.500000 0.500000 -0.375000
v 0.250000 0.413592 0.500000
v 0.125000 0.375000 0.500000
v 0.375000 0.500000 0.500000
v 0.500000 0.413592 -0.250000
v 0.500000 0.500000 -0.375000
v 0.500000 0.375000 -0.125000
v 0.500000 0.413592 0.250000
v 0.500000 0.375000 0.125000
v 0.500000 0.500000 0.375000
v 0.250000 0.413592 -0.500000
v 0.375000 0.500000 -0.500000
v 0.125000 0.375000 -0.500000
v -0.250000 0.413592 -0.500000
v -0.125000 0.375000 -0.500000
v -0.375000 0.500000 -0.500000
v -0.384092 0.375000 0.147929
v -0.284809 0.375000 0.205019
v -0.205019 0.375000 0.284810
v -0.147929 0.375000 0.384092
v -0.428728 0.413592 0.264688
v -0.361075 0.413592 0.304057
v -0.304057 0.413592 0.361075
v -0.264688 0.413592 0.428728
v -0.381447 0.500000 0.473364
v -0.403095 0.500000 0.437341
v -0.437341 0.500000 0.403095
v -0.473364 0.500000 0.381447
v -0.473364 0.500000 -0.381447
v -0.437341 0.500000 -0.403095
v -0.403095 0.500000 -0.437341
v -0.381447 0.500000 -0.473364
v -0.428728 0.413592 -0.264688
v -0.361075 0.413592 -0.304057
v -0.304057 0.413592 -0.361075
v -0.264688 0.413592 -0.428728
v -0.147929 0.375000 -0.384092
v -0.205019 0.375000 -0.284810
v -0.284810 0.375000 -0.205019
v -0.384092 0.375000 -0.147929
v 0.381447 0.500000 0.473364
v 0.403095 0.500000 0.437341
v 0.437341 0.500000 0.403095
v 0.473364 0.500000 0.381447
v 0.264688 0.413592 0.428728
v 0.304057 0.413592 0.361075
v 0.361075 0.413592 0.304057
v 0.428728 0.413592 0.264688
v 0.384091 0.375000 0.147929
v 0.284810 0.375000 0.205019
v 0.205019 0.375000 0.284810
v 0.147929 0.375000 0.384092
v 0.384091 0.375000 -0.147929
v 0.284809 0.375000 -0.205019
v 0.205018 0.375000 -0.284810
v 0.147929 0.375000 -0.384092
v 0.428728 0.413592 -0.264688
v 0.361075 0.413592 -0.304057
v 0.304057 0.413592 -0.361075
v 0.264688 0.413592 -0.428728
v 0.381447 0.500000 -0.473364
v 0.403095 0.500000 -0.437341
v 0.437341 0.500000 -0.403095
v 0.473364 0.500000 -0.381447
v 0.000000 -0.005322 0.500000
v 0.500000 -0.005322 0.000000
v 0.000000 -0.005322 -0.500000
v -0.500000 -0.005322 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.500000 0.494678
vt 0.000000 0.000000
vt 0.875000 1.000000
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.026636 0.118553
vt 0.000000 0.125000
vt 0.125000 0.000000
vt 0.118553 0.026636
vt 0.096905 0.062659
vt 0.062659 0.096905
vt 0.973364 0.118553
vt 0.937341 0.096905
vt 0.903095 0.062659
vt 0.881447 0.026636
vt 0.875000 0.000000
vt 1.000000 0.125000
vt 0.973364 0.881447
vt 1.000000 0.875000
vt 0.881447 0.973364
vt 0.903095 0.937341
vt 0.937341 0.903095
vt 0.118553 0.973364
vt 0.000000 0.875000
vt 0.026636 0.881447
vt 0.062659 0.903095
vt 0.096905 0.937341
vt 0.352071 0.115908
vt 0.235312 0.071272
vt 0.250000 0.000000
vt 0.375000 0.000000
vt 0.294981 0.215190
vt 0.195943 0.138925
vt 0.215191 0.294981
vt 0.138925 0.195943
vt 0.071272 0.235312
vt 0.115908 0.352071
vt 0.000000 0.250000
vt 0.000000 0.375000
vt 0.235312 0.928728
vt 0.352071 0.884092
vt 0.375000 1.000000
vt 0.250000 1.000000
vt 0.195943 0.861075
vt 0.294981 0.784810
vt 0.138925 0.804057
vt 0.215190 0.705019
vt 0.115908 0.647929
vt 0.071272 0.764688
vt 0.000000 0.625000
vt 0.000000 0.750000
vt 0.928728 0.235312
vt 1.000000 0.250000
vt 1.000000 0.375000
vt 0.884092 0.352071
vt 0.861075 0.195943
vt 0.784810 0.294981
vt 0.804057 0.138925
vt 0.705019 0.215190
vt 0.647929 0.115908
vt 0.764688 0.071272
vt 0.625000 0.000000
vt 0.750000 0.000000
vt 0.647929 0.884092
vt 0.764688 0.928728
vt 0.750000 1.000000
vt 0.625000 1.000000
vt 0.705018 0.784810
vt 0.804057 0.861075
vt 0.784809 0.705019
vt 0.861075 0.804057
vt 0.928728 0.764688
vt 0.884091 0.647929
vt 1.000000 0.750000
vt 1.000000 0.625000
vt 0.750000 0.625000
vt 0.750000 0.500000
vt 0.812500 0.500000
vt 0.812500 0.625000
vt 0.687500 0.625000
vt 0.687500 0.500000
vt 0.625000 0.625000
vt 0.625000 0.500000
vt 0.562500 0.500000
vt 0.562500 0.625000
vt 0.500000 0.500000
vt 0.500000 0.625000
vt 0.125000 0.500000
vt 0.125000 0.625000
vt 0.062500 0.625000
vt 0.062500 0.500000
vt 0.187500 0.500000
vt 0.187500 0.625000
vt 0.250000 0.500000
vt 0.250000 0.625000
vt 0.312500 0.625000
vt 0.312500 0.500000
vt 0.375000 0.625000
vt 0.375000 0.500000
vt 0.125000 0.875000
vt 0.062500 0.875000
vt 0.062500 0.750000
vt 0.125000 0.750000
vt 0.187500 0.875000
vt 0.187500 0.750000
vt 0.250000 0.875000
vt 0.250000 0.750000
vt 0.312500 0.750000
vt 0.312500 0.875000
vt 0.375000 0.750000
vt 0.562500 0.750000
vt 0.562500 0.875000
vt 0.500000 0.875000
vt 0.500000 0.750000
vt 0.625000 0.750000
vt 0.687500 0.750000
vt 0.687500 0.875000
vt 0.750000 0.875000
vt 0.750000 0.750000
vt 0.812500 0.875000
vt 0.812500 0.750000
g Cube.003_Cube.003_road_ends
s off
f 7/1 3/2 83/3
f 5/4 6/1 82/3
f 7/4 8/1 84/3
f 5/1 1/2 81/3
f 1/2 20/5 81/3
f 20/5 18/6 81/3
f 18/6 19/7 81/3
f 19/7 14/8 81/3
f 14/8 12/9 81/3
f 12/9 13/10 81/3
f 13/10 4/11 81/3
f 4/11 8/4 81/3
f 8/4 5/1 81/3
f 6/1 2/2 82/3
f 2/2 22/5 82/3
f 22/5 21/6 82/3
f 21/6 23/7 82/3
f 23/7 25/8 82/3
f 25/8 24/9 82/3
f 24/9 26/10 82/3
f 26/10 1/11 82/3
f 1/11 5/4 82/3
f 3/2 32/5 83/3
f 32/5 30/6 83/3
f 30/6 31/7 83/3
f 31/7 29/8 83/3
f 29/8 27/9 83/3
f 27/9 28/10 83/3
f 28/10 2/11 83/3
f 2/11 6/4 83/3
f 6/4 7/1 83/3
f 8/1 4/2 84/3
f 4/2 10/5 84/3
f 10/5 9/6 84/3
f 9/6 11/7 84/3
f 11/7 16/8 84/3
f 16/8 15/9 84/3
f 15/9 17/10 84/3
f 17/10 3/11 84/3
f 3/11 7/4 84/3
g Cube.003_Cube.003_bottom
f 7/4 6/1 5/2 8/11
g Cube.003_Cube.003_top_grass
f 44/12 10/13 4/4 13/14 41/15 42/16 43/17
f 60/18 59/19 58/20 57/21 20/22 1/1 26/23
f 80/24 22/25 2/2 28/5 77/26 78/27 79/28
f 48/29 32/10 3/11 17/30 45/31 46/32 47/33
g Cube.003_Cube.003_road
f 36/34 40/35 12/36 14/37
f 35/38 39/39 40/35 36/34
f 34/40 38/41 39/39 35/38
f 37/42 38/41 34/40 33/43
f 9/44 37/42 33/43 11/45
f 52/46 53/47 31/48 30/49
f 51/50 54/51 53/47 52/46
f 50/52 55/53 54/51 51/50
f 56/54 55/53 50/52 49/55
f 16/56 56/54 49/55 15/57
f 64/58 24/59 25/60 65/61
f 63/62 64/58 65/61 66/63
f 62/64 63/62 66/63 67/65
f 68/66 61/67 62/64 67/65
f 19/68 18/69 61/67 68/66
f 72/70 76/71 27/72 29/73
f 71/74 75/75 76/71 72/70
f 70/76 74/77 75/75 71/74
f 73/78 74/77 70/76 69/79
f 21/80 73/78 69/79 23/81
f 36/34 14/37 19/68 68/66
f 36/34 68/66 67/65 35/38
f 65/61 25/60 23/81 69/79
f 66/63 65/61 69/79 70/76
f 53/47 72/70 29/73 31/48
f 53/47 54/51 71/74 72/70
f 33/43 56/54 16/56 11/45
f 33/43 34/40 55/53 56/54
f 34/40 35/38 67/65 66/63 70/76 71/74 54/51 55/53
g Cube.003_Cube.003_road-grass_blend
f 40/82 41/83 13/84 12/85
f 39/86 42/87 41/83 40/82
f 38/88 43/89 42/87 39/86
f 44/90 43/89 38/88 37/91
f 10/92 44/90 37/91 9/93
f 48/94 52/95 30/96 32/97
f 47/98 51/99 52/95 48/94
f 46/100 50/101 51/99 47/98
f 49/102 50/101 46/100 45/103
f 15/104 49/102 45/103 17/105
f 60/106 26/107 24/108 64/109
f 59/110 60/106 64/109 63/111
f 58/112 59/110 63/111 62/113
f 61/114 57/115 58/112 62/113
f 18/116 20/8 57/115 61/114
f 76/117 77/118 28/119 27/120
f 75/121 78/7 77/118 76/117
f 74/122 79/123 78/7 75/121
f 80/124 79/123 74/122 73/125
f 22/126 80/124 73/125 21/127

207
models/feldweg-curve.obj Normal file
View File

@ -0,0 +1,207 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg-curve.blend'
# www.blender.org
o Cube.002
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.250000 0.413592 0.500000
v 0.375000 0.500000 0.500000
v 0.125000 0.375000 0.500000
v 0.500000 0.413592 0.250000
v 0.500000 0.500000 0.375000
v 0.500000 0.375000 0.125000
v -0.250000 0.413592 0.500000
v -0.125000 0.375000 0.500000
v -0.375000 0.500000 0.500000
v 0.500000 0.413592 -0.250000
v 0.500000 0.375000 -0.125000
v 0.500000 0.500000 -0.375000
v 0.147929 0.375000 0.384092
v 0.205019 0.375000 0.284809
v 0.284810 0.375000 0.205019
v 0.384092 0.375000 0.147929
v 0.264688 0.413592 0.428728
v 0.304057 0.413592 0.361075
v 0.361075 0.413592 0.304057
v 0.428728 0.413592 0.264688
v 0.473364 0.500000 0.381447
v 0.437341 0.500000 0.403095
v 0.403095 0.500000 0.437341
v 0.381447 0.500000 0.473364
v -0.347302 0.500000 0.313164
v -0.272666 0.500000 0.136438
v -0.162122 0.500000 -0.023675
v -0.023675 0.500000 -0.162122
v 0.136438 0.500000 -0.272666
v 0.313164 0.500000 -0.347302
v -0.227010 0.413592 0.347148
v -0.163160 0.413592 0.196715
v -0.066130 0.413592 0.056392
v 0.056392 0.413592 -0.066130
v 0.196715 0.413592 -0.163160
v 0.347148 0.413592 -0.227010
v 0.381132 0.375000 -0.106719
v 0.256993 0.375000 -0.053654
v 0.136458 0.375000 0.029861
v 0.029861 0.375000 0.136458
v -0.053654 0.375000 0.256993
v -0.106719 0.375000 0.381132
v -0.000000 -0.005322 0.500000
v 0.500000 -0.005322 0.000000
vt 1.000000 0.000000
vt 1.000000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 0.026636 0.118553
vt 0.000000 0.125000
vt 0.125000 0.000000
vt 0.118553 0.026636
vt 0.096905 0.062659
vt 0.062659 0.096905
vt 0.875000 0.000000
vt 0.847302 0.186836
vt 0.000000 0.875000
vt 0.186836 0.847302
vt 0.363562 0.772666
vt 0.772666 0.363562
vt 0.523674 0.662122
vt 0.662122 0.523675
vt 0.500000 0.494678
vt 0.875000 1.000000
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.352071 0.115908
vt 0.235312 0.071272
vt 0.250000 0.000000
vt 0.375000 0.000000
vt 0.294981 0.215190
vt 0.195943 0.138925
vt 0.215191 0.294981
vt 0.138925 0.195943
vt 0.071272 0.235312
vt 0.115908 0.352071
vt 0.000000 0.250000
vt 0.000000 0.375000
vt 0.727010 0.152852
vt 0.606719 0.118868
vt 0.625000 0.000000
vt 0.750000 0.000000
vt 0.663160 0.303285
vt 0.553654 0.243007
vt 0.566130 0.443608
vt 0.470139 0.363542
vt 0.443608 0.566130
vt 0.363542 0.470138
vt 0.303285 0.663160
vt 0.243007 0.553654
vt 0.118868 0.606719
vt 0.152852 0.727010
vt 0.000000 0.625000
vt 0.000000 0.750000
vt 0.625000 0.625000
vt 0.625000 0.500000
vt 0.687500 0.500000
vt 0.687500 0.625000
vt 0.562500 0.625000
vt 0.562500 0.500000
vt 0.500000 0.625000
vt 0.500000 0.500000
vt 0.437500 0.500000
vt 0.437500 0.625000
vt 0.375000 0.500000
vt 0.375000 0.625000
vt 0.812500 0.875000
vt 0.812500 0.750000
vt 0.937500 0.750000
vt 0.937500 0.875000
vt 0.687500 0.875000
vt 0.687500 0.750000
vt 0.562500 0.875000
vt 0.562500 0.750000
vt 0.437500 0.875000
vt 0.437500 0.750000
vt 0.312500 0.875000
vt 0.312500 0.750000
vt 0.187500 0.750000
vt 0.187500 0.875000
vt 0.062500 0.750000
vt 0.062500 0.875000
g Cube.002_Cube.002_road_ends
s off
f 6/1 2/2 1/3 5/4
f 7/1 3/2 2/3 6/4
g Cube.002_Cube.002_road_ends_default_grass.png
f 32/5 10/6 4/4 13/7 29/8 30/9 31/10
f 20/11 1/1 38/12
f 17/13 33/14 3/3
f 3/3 33/14 2/2
f 1/1 2/2 38/12
f 33/14 34/15 2/2
f 38/12 2/2 37/16
f 35/17 2/2 34/15
f 36/18 2/2 35/17
f 37/16 2/2 36/18
g Cube.002_Cube.002_road_ends_cottages_feldweg_end.png
f 5/1 1/2 52/19
f 7/4 8/1 51/19
f 8/1 4/2 51/19
f 4/2 10/20 51/19
f 10/20 9/21 51/19
f 9/21 11/22 51/19
f 11/22 16/23 51/19
f 16/23 15/24 51/19
f 15/24 17/25 51/19
f 17/25 3/3 51/19
f 3/3 7/4 51/19
f 1/2 20/20 52/19
f 20/20 18/21 52/19
f 18/21 19/22 52/19
f 19/22 14/23 52/19
f 14/23 12/24 52/19
f 12/24 13/25 52/19
f 13/25 4/3 52/19
f 4/3 8/4 52/19
f 8/4 5/1 52/19
g Cube.002_Cube.002_road_ends_cottages_feldweg.png
f 24/26 28/27 12/28 14/29
f 23/30 27/31 28/27 24/26
f 22/32 26/33 27/31 23/30
f 25/34 26/33 22/32 21/35
f 9/36 25/34 21/35 11/37
f 44/38 45/39 19/40 18/41
f 43/42 46/43 45/39 44/38
f 42/44 47/45 46/43 43/42
f 41/46 48/47 47/45 42/44
f 40/48 49/49 48/47 41/46
f 50/50 49/49 40/48 39/51
f 16/52 50/50 39/51 15/53
f 24/26 14/29 19/40 45/39
f 21/35 50/50 16/52 11/37
f 50/50 21/35 49/49
f 45/39 46/43 24/26
f 23/30 24/26 46/43 47/45
f 22/32 23/30 47/45 48/47
f 21/35 22/32 48/47 49/49
g Cube.002_Cube.002_bottom
f 7/4 6/1 5/2 8/3
g Cube.002_Cube.002_road-gass_blend
f 28/54 29/55 13/56 12/57
f 27/58 30/59 29/55 28/54
f 26/60 31/61 30/59 27/58
f 32/62 31/61 26/60 25/63
f 10/64 32/62 25/63 9/65
f 38/66 44/67 18/68 20/69
f 37/70 43/71 44/67 38/66
f 36/72 42/73 43/71 37/70
f 35/74 41/75 42/73 36/72
f 34/76 40/77 41/75 35/74
f 39/78 40/77 34/76 33/79
f 15/80 39/78 33/79 17/81

87
models/feldweg.obj Normal file
View File

@ -0,0 +1,87 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg.blend'
# www.blender.org
o Cube
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.250000 0.413592 0.500000
v 0.250000 0.413592 -0.500000
v 0.250000 0.413592 0.500000
v -0.250000 0.413592 -0.500000
v -0.375000 0.500000 0.500000
v 0.375000 0.500000 -0.500000
v 0.125000 0.375000 0.500000
v -0.125000 0.375000 -0.500000
v -0.125000 0.375000 0.500000
v 0.125000 0.375000 -0.500000
v 0.375000 0.500000 0.500000
v -0.375000 0.500000 -0.500000
v 0.000000 -0.005322 0.500000
v -0.000000 -0.005322 -0.500000
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.500000 0.494678
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 1.000000 0.875000
vt 0.000000 0.875000
vt 1.000000 0.125000
vt 0.000000 0.125000
vt 1.000000 0.625000
vt 1.000000 0.750000
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 1.000000 0.250000
vt 1.000000 0.375000
vt 0.000000 0.375000
vt 0.000000 0.250000
vt 1.000000 0.500000
vt 0.000000 0.500000
g Cube_Cube_road_ends
s off
f 4/1 20/2 22/3
f 2/1 19/2 21/3
f 19/2 11/4 21/3
f 11/4 15/5 21/3
f 15/5 17/6 21/3
f 17/6 9/7 21/3
f 9/7 13/8 21/3
f 13/8 1/9 21/3
f 1/9 5/10 21/3
f 5/10 6/11 21/3
f 6/11 2/1 21/3
f 20/2 12/4 22/3
f 12/4 16/5 22/3
f 16/5 18/6 22/3
f 18/6 10/7 22/3
f 10/7 14/8 22/3
f 14/8 3/9 22/3
f 3/9 7/10 22/3
f 7/10 8/11 22/3
f 8/11 4/1 22/3
g Cube_Cube_road_sides
f 1/1 4/9 8/10 5/11
f 3/1 2/9 6/10 7/11
g Cube_Cube_bottom
f 8/9 7/10 6/11 5/1
g Cube_Cube_top_grass
f 19/12 2/1 3/9 14/13
f 1/11 13/14 20/15 4/10
g Cube_Cube_road
f 15/16 11/17 10/18 18/19
f 9/20 17/21 16/22 12/23
f 15/16 18/19 16/22 17/21
g Cube_Cube_road-grass_blend
f 13/24 9/16 12/19 20/25
f 11/17 19/12 14/13 10/18

206
models/feldweg_end.obj Normal file
View File

@ -0,0 +1,206 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg_end.blend'
# www.blender.org
o Cube
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 0.500000 -0.500000
v -0.500000 0.500000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.250000 0.500000 0.500000
v 0.250000 0.413592 -0.500000
v 0.250000 0.500000 0.500000
v -0.250000 0.413592 -0.500000
v -0.375000 0.500000 0.500000
v 0.375000 0.500000 -0.500000
v 0.125000 0.500000 0.500000
v -0.125000 0.375000 -0.500000
v -0.125000 0.500000 0.500000
v 0.125000 0.375000 -0.500000
v 0.375000 0.500000 0.500000
v -0.375000 0.500000 -0.500000
v -0.000000 -0.005322 -0.500000
v 0.250000 0.413592 -0.000000
v -0.250000 0.413592 0.000000
v 0.375000 0.500000 -0.000000
v -0.125000 0.375000 0.000000
v 0.125000 0.375000 -0.016321
v -0.375000 0.500000 0.000000
v 0.210101 0.443819 0.205395
v -0.210101 0.443819 0.205395
v 0.359784 0.500000 0.250000
v -0.130863 0.426864 0.289840
v 0.075837 0.429295 0.285669
v -0.363898 0.500000 0.250000
v 0.250000 0.499467 0.375000
v -0.250000 0.499467 0.375000
v 0.338593 0.500000 0.299881
v -0.060925 0.480171 0.395010
v 0.125000 0.480171 0.399350
v -0.338593 0.500000 0.299881
v 0.250000 0.413592 0.125000
v -0.250000 0.413592 0.125000
v 0.375000 0.500000 0.125000
v -0.078088 0.375000 0.108679
v 0.125000 0.375000 0.145321
v -0.375000 0.500000 0.125000
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.500000 0.494678
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.750000 1.000000
vt 0.625000 1.000000
vt 0.375000 1.000000
vt 0.250000 1.000000
vt 0.500000 0.875000
vt 0.625000 0.125000
vt 0.750000 0.136102
vt 1.000000 0.625000
vt 1.000000 0.750000
vt 0.875000 0.750000
vt 1.000000 0.125000
vt 1.000000 0.250000
vt 0.875000 0.250000
vt 1.000000 0.875000
vt 0.799881 0.838593
vt 1.000000 0.375000
vt 0.895010 0.439075
vt 0.899350 0.625000
vt 0.799881 0.161407
vt 0.000000 0.125000
vt 0.500000 0.125000
vt 0.750000 0.859784
vt 0.000000 0.875000
vt 0.541968 0.500000
vt 0.541968 0.625000
vt 0.125000 0.625000
vt 0.125000 0.500000
vt 0.541968 0.750000
vt 0.541968 0.875000
vt 0.125000 0.875000
vt 0.125000 0.750000
vt 0.646210 0.500000
vt 0.646210 0.625000
vt 0.646210 0.750000
vt 0.646210 0.875000
vt 0.635605 0.135605
vt 0.760605 0.155911
vt 0.720706 0.297351
vt 0.172012 0.218555
vt 0.260605 0.155911
vt 0.300504 0.297350
vt 0.751051 0.512257
vt 0.876118 0.512257
vt 0.876118 0.600535
vt 0.449680 0.139224
vt 0.379742 0.226929
vt 0.586442 0.230407
vt 0.146707 0.260153
vt 0.260605 0.364395
vt 0.870389 0.260153
vt 0.885605 0.364395
vt 0.135605 0.364395
vt 0.760605 0.364395
vt 0.459281 0.625000
vt 0.474779 0.750000
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 0.474779 0.250000
vt 0.474779 0.375000
vt 0.000000 0.375000
vt 0.000000 0.250000
vt 0.612771 0.625000
vt 0.593474 0.750000
vt 0.593474 0.250000
vt 0.577976 0.421912
vt 0.746039 0.575837
vt 0.669814 0.710101
vt 0.669814 0.289899
vt 0.750000 0.369137
g Cube_Cube_ends
s off
f 4/1 20/2 21/3
f 20/2 12/4 21/3
f 12/4 16/5 21/3
f 16/5 18/6 21/3
f 18/6 10/7 21/3
f 10/7 14/8 21/3
f 14/8 3/9 21/3
f 3/9 7/10 21/3
f 7/10 8/11 21/3
f 8/11 4/1 21/3
g Cube_Cube_sides
f 1/1 4/9 8/10 5/11
f 3/1 2/9 6/10 7/11
f 1/9 5/10 6/11 2/1 19/2 11/12 15/13 17/14 9/15 13/8
g Cube_Cube_bottom
f 8/9 7/10 6/11 5/1
g Cube_Cube_top_grass
f 24/16 42/5 2/1
f 45/17 1/11 33/18
f 15/19 11/20 34/21
f 13/22 9/23 35/24
f 11/20 19/25 36/26
f 9/23 17/27 37/28
f 15/19 38/29 37/28
f 38/29 15/19 34/21
f 39/30 13/22 35/24
f 34/21 11/20 36/26
f 35/24 9/23 37/28
f 17/27 15/19 37/28
f 19/25 2/1 36/26
f 20/31 4/10 27/32
f 45/17 27/32 1/11
f 3/9 24/16 2/1
f 2/1 30/33 36/26
f 2/1 42/5 30/33
f 3/9 14/34 24/16
f 33/18 1/11 39/30
f 27/32 4/10 1/11
f 1/11 13/22 39/30
g Cube_Cube_top_grass_blend
f 27/35 23/36 12/37 20/38
f 22/39 24/40 14/41 10/42
f 45/43 41/44 23/36
f 40/45 42/46 24/40
f 38/47 34/48 28/49
f 39/50 35/51 29/52
f 34/53 36/54 30/55
f 35/51 37/56 31/57
f 38/47 32/58 31/57
f 33/59 29/52 41/60
f 28/49 30/61 42/62
f 27/35 45/43 23/36
f 22/39 40/45 24/40
f 32/58 38/47 28/49
f 33/59 39/50 29/52
f 28/49 34/48 30/61
f 29/52 35/51 31/57
f 37/56 38/47 31/57
f 45/63 33/59 41/60
f 40/64 28/49 42/62
g Cube_Cube_road
f 26/65 22/66 10/67 18/68
f 23/69 25/70 16/71 12/72
f 26/65 18/68 16/71 25/70
f 44/73 40/74 22/66
f 41/75 43/76 25/70
f 44/73 26/65 25/70
f 32/77 28/78 40/74
f 29/79 31/80 43/76
f 32/77 44/73 43/76
f 26/65 44/73 22/66
f 23/69 41/75 25/70
f 43/76 44/73 25/70
f 44/73 32/77 40/74
f 41/75 29/79 43/76
f 31/80 32/77 43/76

84
models/feldweg_slope.obj Normal file
View File

@ -0,0 +1,84 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg_slope.blend'
# www.blender.org
o Cube
v 0.500000 -0.500000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.625000 -0.500000
v -0.500000 -0.625000 -0.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.250000 -0.586408 -0.500000
v -0.250000 0.413592 0.500000
v -0.250000 -0.586408 -0.500000
v 0.250000 0.413592 0.500000
v 0.375000 -0.500000 -0.500000
v -0.375000 0.500000 0.500000
v -0.125000 -0.625000 -0.500000
v 0.125000 0.375000 0.500000
v 0.125000 -0.625000 -0.500000
v -0.125000 0.375000 0.500000
v -0.375000 -0.500000 -0.500000
v 0.375000 0.500000 0.500000
v -0.000000 -0.005322 0.500000
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.500000 0.494678
vt 1.000000 0.875000
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.875000
vt 0.000000 0.187500
vt 1.000000 0.312500
vt 0.000000 0.312500
vt 1.000000 0.187500
vt 1.000000 0.125000
vt 0.000000 0.125000
vt 1.000000 0.625000
vt 1.000000 0.750000
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 1.000000 0.250000
vt 1.000000 0.375000
vt 0.000000 0.375000
vt 0.000000 0.250000
vt 1.000000 0.500000
vt 0.000000 0.500000
g Cube_Cube_road_ends
s off
f 4/1 20/2 21/3
f 6/4 2/1 19/2 11/5 15/6
f 20/2 12/5 21/3
f 12/5 16/6 21/3
f 16/6 18/7 21/3
f 18/7 10/8 21/3
f 10/8 14/9 21/3
f 14/9 3/10 21/3
f 3/10 7/11 21/3
f 7/11 8/12 21/3
f 8/12 4/1 21/3
f 1/10 5/13 17/7 9/8 13/9
g Cube_Cube_road_ends_default_grass_side.png
f 6/14 7/15 2/16
f 2/11 7/12 3/1
f 4/10 8/11 1/12
f 5/17 1/15 8/16
g Cube_Cube_bottom
f 8/10 7/11 6/12 5/1
g Cube_Cube_top_grass
f 19/4 2/1 3/10 14/13
f 1/12 13/18 20/19 4/11
g Cube_Cube_road
f 15/20 11/21 10/22 18/23
f 9/24 17/25 16/26 12/27
f 15/20 18/23 16/26 17/25
g Cube_Cube_road-grass_blend
f 13/28 9/20 12/23 20/29
f 11/21 19/4 14/13 10/22

View File

@ -0,0 +1,108 @@
# Blender v2.72 (sub 0) OBJ File: 'feldweg_slope_long.blend'
# www.blender.org
o Cube
v 0.500000 -0.500000 -1.500000
v -0.500000 -0.500000 -1.500000
v -0.500000 0.500000 0.500000
v 0.500000 0.500000 0.500000
v 0.500000 -0.625000 -1.500000
v -0.500000 -0.625000 -1.500000
v -0.500000 -0.500000 0.500000
v 0.500000 -0.500000 0.500000
v 0.250000 -0.586408 -1.500000
v -0.250000 0.413592 0.500000
v -0.250000 -0.586408 -1.500000
v 0.250000 0.413592 0.500000
v 0.375000 -0.500000 -1.500000
v -0.375000 0.500000 0.500000
v -0.125000 -0.625000 -1.500000
v 0.125000 0.375000 0.500000
v 0.125000 -0.625000 -1.500000
v -0.125000 0.375000 0.500000
v -0.375000 -0.500000 -1.500000
v 0.375000 0.500000 0.500000
v -0.000000 -0.005322 0.500000
v -0.250000 -0.086408 -0.500000
v 0.500000 -0.562500 -0.500000
v 0.375000 0.000000 -0.500000
v 0.500000 -0.500000 -0.500000
v 0.250000 -0.086408 -0.500000
v -0.500000 -0.562500 -0.500000
v 0.500000 0.000000 -0.500000
v -0.500000 0.000000 -0.500000
v -0.375000 0.000000 -0.500000
v 0.125000 -0.125000 -0.500000
v -0.500000 -0.500000 -0.500000
v -0.125000 -0.125000 -0.500000
vt 1.000000 1.000000
vt 0.875000 1.000000
vt 0.500000 0.494678
vt 1.000000 0.875000
vt 0.750000 0.913592
vt 0.625000 0.875000
vt 0.375000 0.875000
vt 0.250000 0.913592
vt 0.125000 1.000000
vt 0.000000 1.000000
vt 0.000000 0.000000
vt 1.000000 0.000000
vt 0.000000 0.875000
vt 0.000000 0.250000
vt 1.000000 0.312500
vt 0.000000 0.312500
vt 0.000000 0.500000
vt 1.000000 0.187500
vt 1.000000 0.500000
vt 1.000000 0.250000
vt 0.000000 0.187500
vt 1.000000 0.125000
vt 0.000000 0.125000
vt 1.000000 0.625000
vt 1.000000 0.750000
vt 0.000000 0.750000
vt 0.000000 0.625000
vt 1.000000 0.375000
vt 0.000000 0.375000
g Cube_Cube_road_ends
s off
f 4/1 20/2 21/3
f 6/4 2/1 19/2 11/5 15/6
f 20/2 12/5 21/3
f 12/5 16/6 21/3
f 16/6 18/7 21/3
f 18/7 10/8 21/3
f 10/8 14/9 21/3
f 14/9 3/10 21/3
f 3/10 7/11 21/3
f 7/11 8/12 21/3
f 8/12 4/1 21/3
f 1/10 5/13 17/7 9/8 13/9
g Cube_Cube_road_ends_default_grass_side.png
f 27/14 7/15 32/16
f 32/11 7/12 3/1 29/17
f 28/17 25/11 1/12
f 5/18 1/15 25/16 23/14
f 2/11 32/12 29/19
f 23/20 25/15 8/16
f 6/21 27/20 32/15 2/16
f 4/10 8/11 25/12 28/19
g Cube_Cube_bottom
f 8/11 7/12 27/1 23/10
f 23/11 27/12 6/1 5/10
g Cube_Cube_top_grass
f 30/4 29/1 3/10 14/13
f 28/12 24/22 20/23 4/11
f 1/12 13/22 24/23 28/11
f 19/4 2/1 29/10 30/13
g Cube_Cube_road
f 15/24 11/25 22/26 33/27
f 26/20 31/28 16/29 12/14
f 33/24 18/27 16/29 31/28
f 33/24 22/25 10/26 18/27
f 9/20 17/28 31/29 26/14
f 15/24 33/27 31/29 17/28
g Cube_Cube_road-grass_blend
f 24/19 26/24 12/27 20/17
f 11/25 19/4 30/13 22/26
f 22/25 30/4 14/13 10/26
f 13/19 9/24 26/27 24/17

View File

@ -298,8 +298,8 @@ end
minetest.register_craft({
output = "cottages:hammer",
recipe = {
{cottages.craftitem_steel,cottages.craftitem_steel,cottages.craftitem_steel},
{cottages.craftitem_steel,cottages.craftitem_steel,cottages.craftitem_steel},
{'', cottages.craftitem_stick, '' } }
{cottages.craftitem_steel},
{'cottages:anvil'},
{cottages.craftitem_stick} }
})

486
nodes_feldweg.lua Normal file
View File

@ -0,0 +1,486 @@
---------------------------------------------------------------------------------------
-- decoration and building material
---------------------------------------------------------------------------------------
-- * includes a wagon wheel that can be used as decoration on walls or to build (stationary) wagons
-- * dirt road - those are more natural in small old villages than cobble roads
-- * loam - no, old buildings are usually not built out of clay; loam was used
-- * straw - useful material for roofs
-- * glass pane - an improvement compared to fence posts as windows :-)
---------------------------------------------------------------------------------------
local S = cottages.S
-- supported modes:
-- * simple: only a straight dirt road; no curves, junctions etc.
-- * flat: each node is a full node; junction, t-junction and corner are included
-- * nodebox: like flat - except that each node has a nodebox that fits to that road node
-- * mesh: like nodebox - except that it uses a nice roundish model
local cottages_feldweg_mode = minetest.settings:get("cottages_feldweg_mode")
if( cottages_feldweg_mode ~= "mesh"
and cottages_feldweg_mode ~= "flat"
and cottages_feldweg_mode ~= "nodebox"
and cottages_feldweg_mode ~= "flat") then
cottages_feldweg_mode = "mesh";
-- add the setting to the minetest.conf so that the player can set it there
minetest.settings:set("cottages_feldweg_mode", "mesh")
end
local function register_recipes(include_end)
minetest.register_craft({
output = "cottages:feldweg_crossing 5",
recipe = {
{"", "cottages:feldweg", "" },
{"cottages:feldweg", "cottages:feldweg", "cottages:feldweg"},
{"", "cottages:feldweg", "" },
},
})
minetest.register_craft({
output = "cottages:feldweg_t_junction 5",
recipe = {
{"", "cottages:feldweg", "" },
{"", "cottages:feldweg", "" },
{"cottages:feldweg", "cottages:feldweg", "cottages:feldweg"}
},
})
minetest.register_craft({
output = "cottages:feldweg_curve 5",
recipe = {
{"cottages:feldweg", "", "" },
{"cottages:feldweg", "", ""},
{"cottages:feldweg", "cottages:feldweg", "cottages:feldweg"}
},
})
if include_end then
minetest.register_craft({
output = "cottages:feldweg_end 5",
recipe = {
{"cottages:feldweg", "", "cottages:feldweg" },
{"cottages:feldweg", "cottages:feldweg", "cottages:feldweg"}
},
})
end
end
--- a nice dirt road for small villages or paths to fields
if( cottages_feldweg_mode == "simple" or cottages_feldweg_mode == "flat" ) then
minetest.register_node("cottages:feldweg", {
description = S("dirt road"),
tiles = {"cottages_feldweg.png","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
})
end
-- add crossing, t-junction and corner
--
-- flat - just textures, full blocks
--
if( cottages_feldweg_mode == "flat" ) then
minetest.register_node("cottages:feldweg_crossing", {
description = S("dirt road crossing"),
tiles = {"cottages_feldweg_kreuzung.png","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
})
minetest.register_node("cottages:feldweg_t_junction", {
description = S("dirt road t junction"),
tiles = {"cottages_feldweg_t-kreuzung.png^[transform2","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
})
minetest.register_node("cottages:feldweg_curve", {
description = S("dirt road curve"),
tiles = {"cottages_feldweg_ecke.png^[transform2","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
})
register_recipes(false)
--
-- cube-style nodebox version
--
elseif( cottages_feldweg_mode == "nodebox" ) then
minetest.register_node("cottages:feldweg", {
description = S("dirt road"),
tiles = {"cottages_feldweg_orig.png","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
roups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5},
-- Rasenkanten
{ -0.5, 0.5-2/16, -0.5, -0.5+3/16, 0.5, 0.5},
{ 0.5-3/16, 0.5-2/16, -0.5, 0.5, 0.5, 0.5},
-- uebergang zwischen Wagenspur und Rasenkante
{ -0.5+3/16, 0.5-2/16, -0.5, -0.5+4/16, 0.5-1/16, 0.5},
{ 0.5-4/16, 0.5-2/16, -0.5, 0.5-3/16, 0.5-1/16, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
})
minetest.register_node("cottages:feldweg_crossing", {
description = S("dirt road crossing"),
tiles = {"cottages_feldweg_kreuzung.png","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5},
-- Rasenkanten
{ -0.5, 0.5-2/16, -0.5, -0.5+3/16, 0.5, -0.5+3/16},
{ 0.5-3/16, 0.5-2/16, -0.5, 0.5, 0.5, -0.5+3/16},
{ -0.5, 0.5-2/16, 0.5-3/16, -0.5+3/16, 0.5, 0.5},
{ 0.5-3/16, 0.5-2/16, 0.5-3/16, 0.5, 0.5, 0.5},
-- uebergang zwischen Wagenspur und Rasenkante
{ -0.5+3/16, 0.5-2/16, -0.5, -0.5+4/16, 0.5-1/16, -0.5+4/16},
{ 0.5-4/16, 0.5-2/16, -0.5, 0.5-3/16, 0.5-1/16, -0.5+4/16},
{ -0.5+3/16, 0.5-2/16, 0.5-4/16, -0.5+4/16, 0.5-1/16, 0.5},
{ 0.5-4/16, 0.5-2/16, 0.5-4/16, 0.5-3/16, 0.5-1/16, 0.5},
{ -0.5, 0.5-2/16, -0.5+3/16, -0.5+3/16, 0.5-1/16, -0.5+4/16},
{ 0.5-3/16, 0.5-2/16, -0.5+3/16, 0.5, 0.5-1/16, -0.5+4/16},
{ -0.5, 0.5-2/16, 0.5-4/16, -0.5+3/16, 0.5-1/16, 0.5-3/16},
{ 0.5-3/16, 0.5-2/16, 0.5-4/16, 0.5, 0.5-1/16, 0.5-3/16},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
})
minetest.register_node("cottages:feldweg_t_junction", {
description = S("dirt road t junction"),
tiles = {"cottages_feldweg_t-kreuzung.png^[transform2","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5},
-- Rasenkanten
{ -0.5, 0.5-2/16, -0.5, -0.5+3/16, 0.5, -0.5+3/16},
{ -0.5, 0.5-2/16, 0.5-3/16, -0.5+3/16, 0.5, 0.5},
-- Rasenkante seitlich durchgehend
{ 0.5-3/16, 0.5-2/16, -0.5, 0.5, 0.5, 0.5},
-- uebergang zwischen Wagenspur und Rasenkante
{ -0.5+3/16, 0.5-2/16, -0.5, -0.5+4/16, 0.5-1/16, -0.5+4/16},
{ -0.5+3/16, 0.5-2/16, 0.5-4/16, -0.5+4/16, 0.5-1/16, 0.5},
{ -0.5, 0.5-2/16, -0.5+3/16, -0.5+3/16, 0.5-1/16, -0.5+4/16},
{ -0.5, 0.5-2/16, 0.5-4/16, -0.5+3/16, 0.5-1/16, 0.5-3/16},
-- Ueberganng seitlich durchgehend
{ 0.5-4/16, 0.5-2/16, -0.5, 0.5-3/16, 0.5-1/16, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
})
minetest.register_node("cottages:feldweg_curve", {
description = S("dirt road curve"),
tiles = {"cottages_feldweg_ecke.png^[transform2","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5-2/16, 0.5},
-- Rasenkante vorne durchgehend
{ -0.5, 0.5-2/16, -0.5, 0.5-3/16, 0.5, -0.5+3/16},
-- Rasenkanten
{ -0.5, 0.5-2/16, 0.5-3/16, -0.5+3/16, 0.5, 0.5},
-- Rasenkante seitlich durchgehend
{ 0.5-3/16, 0.5-2/16, -0.5, 0.5, 0.5, 0.5},
-- uebergang zwischen Wagenspur und Rasenkante
{ -0.5+3/16, 0.5-2/16, 0.5-4/16, -0.5+4/16, 0.5-1/16, 0.5},
-- Uebergang vorne durchgehend
{ -0.5, 0.5-2/16, -0.5+3/16, 0.5-3/16, 0.5-1/16, -0.5+4/16},
{ -0.5, 0.5-2/16, 0.5-4/16, -0.5+3/16, 0.5-1/16, 0.5-3/16},
-- Ueberganng seitlich durchgehend
{ 0.5-4/16, 0.5-2/16, -0.5, 0.5-3/16, 0.5-1/16, 0.5},
},
},
selection_box = {
type = "fixed",
fixed = {
{ -0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
},
},
})
register_recipes(false)
--
-- the mesh version (rounded); provided and created by VanessaE
--
elseif( cottages_feldweg_mode == "mesh" ) then
-- a nice dirt road for small villages or paths to fields
minetest.register_node("cottages:feldweg", {
description = S("dirt road"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png^default_grass_side.png",
"default_dirt.png", "default_grass.png",
"cottages_feldweg_surface.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg.obj",
})
minetest.register_node("cottages:feldweg_crossing", {
description = S("dirt road crossing"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png",
"default_grass.png","cottages_feldweg_surface.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg-crossing.obj",
})
minetest.register_node("cottages:feldweg_t_junction", {
description = S("dirt road t junction"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png^default_grass_side.png", "default_dirt.png",
"default_grass.png","cottages_feldweg_surface.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg-T-junction.obj",
})
minetest.register_node("cottages:feldweg_curve", {
description = S("dirt road curve"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"default_dirt.png^default_grass_side.png","default_grass.png",
"default_dirt.png^default_grass_side.png","cottages_feldweg_surface.png",
"default_dirt.png","cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg-curve.obj",
})
minetest.register_node("cottages:feldweg_end", {
description = S("dirt road end"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png^default_grass_side.png",
"default_dirt.png", "default_grass.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png",
"cottages_feldweg_surface.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg_end.obj",
})
register_recipes(true)
end
-- create stairs if possible
if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab) then
stairs.register_stair_and_slab("feldweg", "cottages:feldweg",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"cottages_feldweg.png","default_dirt.png", "default_grass.png","default_grass.png","cottages_feldweg.png","cottages_feldweg.png"},
S("Dirt Road Stairs"),
S("Dirt Road, half height"),
cottages.sounds.dirt)
end
if( cottages_feldweg_mode == "nodebox" or cottages_feldweg_mode == "mesh" ) then
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}};
local box_slope_long = {
type = "fixed",
fixed = {
{-0.5, -0.5, -1.5, 0.5, -0.10, 0.5},
{-0.5, -0.25, -1.3, 0.5, -0.25, 0.5},
{-0.5, -0.25, -1.0, 0.5, 0, 0.5},
{-0.5, 0, -0.5, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.5, 0.5}
}};
minetest.register_node("cottages:feldweg_slope", {
description = S("dirt road slope"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png^default_grass_side.png",
"default_dirt.png", "default_grass.png",
"cottages_feldweg_surface.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
})
minetest.register_node("cottages:feldweg_slope_long", {
description = S("dirt road slope long"),
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = cottages.sounds.dirt,
is_ground_content = false,
tiles = {"cottages_feldweg_end.png","default_dirt.png^default_grass_side.png",
"default_dirt.png", "default_grass.png",
"cottages_feldweg_surface.png",
"cottages_feldweg_surface.png^cottages_feldweg_edges.png"},
paramtype = "light",
drawtype = "mesh",
mesh = "feldweg_slope_long.obj",
collision_box = box_slope_long,
selection_box = box_slope_long,
})
minetest.register_craft({
output = "cottages:feldweg_slope 3",
recipe = {
{"cottages:feldweg", "", "" },
{"cottages:feldweg", "cottages:feldweg", ""}
},
})
minetest.register_craft({
output = "cottages:feldweg_slope_long 4",
recipe = {
{"cottages:feldweg", "", "" },
{"cottages:feldweg", "cottages:feldweg", "cottages:feldweg"}
},
})
end

View File

@ -23,7 +23,7 @@ minetest.register_node("cottages:bed_foot", {
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
sounds = cottages.sounds.wood,
node_box = {
type = "fixed",
fixed = {
@ -58,7 +58,7 @@ minetest.register_node("cottages:bed_head", {
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
sounds = cottages.sounds.wood,
node_box = {
type = "fixed",
fixed = {
@ -99,20 +99,20 @@ minetest.register_node("cottages:sleeping_mat", {
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3 },
sounds = default.node_sound_leaves_defaults(),
sounds = cottages.sounds.leaves,
selection_box = {
type = "wallmounted",
},
node_box = {
type = "fixed",
fixed = {
{-0.48, -0.5,-0.48, 0.48, -0.45, 0.48},
{-0.48, -0.5,-0.48, 0.48, -0.5+1/16, 0.48},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.48, -0.5,-0.48, 0.48, -0.25, 0.48},
{-0.48, -0.5,-0.48, 0.48, -0.5+2/16, 0.48},
}
},
is_ground_content = false,
@ -122,6 +122,37 @@ minetest.register_node("cottages:sleeping_mat", {
})
-- this one has a pillow for the head; thus, param2 becomes visible to the builder, and mobs may use it as a bed
minetest.register_node("cottages:sleeping_mat_head", {
description = S("sleeping mat with pillow"),
drawtype = 'nodebox',
tiles = { 'cottages_sleepingmat.png' }, -- done by VanessaE
wield_image = 'cottages_sleepingmat.png',
inventory_image = 'cottages_sleepingmat.png',
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = "facedir",
groups = { snappy = 3 },
sounds = cottages.sounds.leaves,
node_box = {
type = "fixed",
fixed = {
{-0.48, -0.5,-0.48, 0.48, -0.5+1/16, 0.48},
{-0.34, -0.5+1/16,-0.12, 0.34, -0.5+2/16, 0.34},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.48, -0.5,-0.48, 0.48, -0.5+2/16, 0.48},
}
},
is_ground_content = false,
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
return cottages.sleep_in_bed( pos, node, clicker, itemstack, pointed_thing );
end
})
-- furniture; possible replacement: 3dforniture:chair
minetest.register_node("cottages:bench", {
@ -131,7 +162,7 @@ minetest.register_node("cottages:bench", {
paramtype = "light",
paramtype2 = "facedir",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
sounds = default.node_sound_wood_defaults(),
sounds = cottages.sounds.wood,
node_box = {
type = "fixed",
fixed = {
@ -169,7 +200,7 @@ local cottages_table_def = {
type = "fixed",
fixed = {
{ -0.1, -0.5, -0.1, 0.1, 0.3, 0.1},
{ -0.5, 0.3, -0.5, 0.5, 0.4, 0.5},
{ -0.5, 0.48, -0.5, 0.5, 0.4, 0.5},
},
},
selection_box = {
@ -362,7 +393,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing )
if( animation and animation.animation=="sit") then
default.player_attached[pname] = false
clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
clicker:set_physics_override(1, 1, 1)
default.player_set_animation(clicker, "stand", 30)
@ -380,7 +411,7 @@ cottages.sit_on_bench = function( pos, node, clicker, itemstack, pointed_thing )
end
clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0})
clicker:setpos( p2 )
clicker:set_pos( p2 )
default.player_set_animation(clicker, "sit", 30)
clicker:set_physics_override(0, 0, 0)
default.player_attached[pname] = true
@ -395,6 +426,12 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
local animation = default.player_get_animation( clicker );
local pname = clicker:get_player_name();
local p_above = minetest.get_node( {x=pos.x, y=pos.y+1, z=pos.z});
if( not( p_above) or not( p_above.name ) or p_above.name ~= 'air' ) then
minetest.chat_send_player( pname, "This place is too narrow for sleeping. At least for you!");
return;
end
local place_name = 'place';
-- if only one node is present, the player can only sit;
-- sleeping requires a bed head+foot or two sleeping mats
@ -404,7 +441,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
-- let players get back up
if( animation and animation.animation=="lay" ) then
default.player_attached[pname] = false
clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
clicker:set_physics_override(1, 1, 1)
default.player_set_animation(clicker, "stand", 30)
@ -462,7 +499,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
end
place_name = 'bed';
elseif( node.name=='cottages:sleeping_mat' or node.name=='cottages:straw_mat') then
elseif( node.name=='cottages:sleeping_mat' or node.name=='cottages:straw_mat' or node.name=='cottages:sleeping_mat_head') then
place_name = 'mat';
dir = node.param2;
allow_sleep = false;
@ -470,7 +507,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
local offset = {{x=0,z=-1}, {x=-1,z=0}, {x=0,z=1}, {x=1,z=0}};
for i,off in ipairs( offset ) do
node2 = minetest.get_node( {x=pos.x+off.x, y=pos.y, z=pos.z+off.z} );
if( node2.name == 'cottages:sleeping_mat' or node2.name=='cottages:straw_mat' ) then
if( node2.name == 'cottages:sleeping_mat' or node2.name=='cottages:straw_mat' or node.name=='cottages:sleeping_mat_head' ) then
-- if a second mat is found, sleeping is possible
allow_sleep = true;
dir = i-1;
@ -505,7 +542,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
-- no sleeping on this place
else
default.player_attached[pname] = false
clicker:setpos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_pos({x=pos.x,y=pos.y-0.5,z=pos.z})
clicker:set_eye_offset({x=0,y=0,z=0}, {x=0,y=0,z=0})
clicker:set_physics_override(1, 1, 1)
default.player_set_animation(clicker, "stand", 30)
@ -516,7 +553,7 @@ cottages.sleep_in_bed = function( pos, node, clicker, itemstack, pointed_thing )
clicker:set_eye_offset({x=0,y=-7,z=2}, {x=0,y=0,z=0})
clicker:setpos( p );
clicker:set_pos( p );
default.player_set_animation(clicker, new_animation, 30)
clicker:set_physics_override(0, 0, 0)
default.player_attached[pname] = true
@ -557,6 +594,13 @@ minetest.register_craft({
})
minetest.register_craft({
output = "cottages:sleeping_mat_head",
recipe = {
{"cottages:sleeping_mat","cottages:straw_mat" }
}
})
minetest.register_craft({
output = "cottages:table",
recipe = {

135
nodes_hay.lua Normal file
View File

@ -0,0 +1,135 @@
-- contains hay_mat, hay and hay bale
-- (gives the pitchfork some work)
--
local S = cottages.S
-- If default:dirt_with_grass is digged while wielding a pitchfork, it will
-- turn into dirt and get some hay placed above it.
-- The hay will disappear (decay) after a couple of minutes.
if( minetest.registered_items["default:dirt_with_grass"]
and minetest.registered_tools["cottages:pitchfork"]) then
minetest.override_item("default:dirt_with_grass", {
after_dig_node = function(pos, oldnode, oldmetadata, digger)
if( not( pos ) or not( digger )) then
return
end
local wielded = digger:get_wielded_item()
if( not( wielded )
or not( wielded:get_name() )
or (wielded:get_name()~="cottages:pitchfork")) then
return
end
local pos_above = {x=pos.x, y=pos.y+1, z=pos.z}
local node_above = minetest.get_node_or_nil( pos_above)
if( not(node_above) or not(node_above.name) or node_above.name ~= "air" ) then
return nil
end
minetest.swap_node( pos, {name="default:dirt"})
minetest.add_node( pos_above, {name="cottages:hay_mat", param2=math.random(2,25)})
-- start a node timer so that the hay will decay after some time
local timer = minetest.get_node_timer(pos_above)
if not timer:is_started() then
timer:start(math.random(60, 300))
end
-- TODO: prevent dirt from beeing multiplied this way (that is: give no dirt!)
return
end,
})
end
-- more comparable to the straw mat than to a hay bale
-- (can be created by digging dirt with grass with the pitchfork)
minetest.register_node("cottages:hay_mat", {
drawtype = "nodebox",
paramtype2 = "leveled",
description = S("Some hay"),
tiles = {cottages.straw_texture.."^[multiply:#88BB88"},
groups = {hay=3, snappy=2, oddly_breakable_by_hand=2, flammable=3},
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
is_ground_content = false,
node_box = {
type = "leveled", --"fixed",
fixed = {
{-0.5,-0.5,-0.5, 0.5, 0.5, 0.5},
}
},
-- make sure a placed hay block looks halfway reasonable
after_place_node = function(pos, placer, itemstack, pointed_thing)
minetest.swap_node( pos, {name="cottages:hay_mat", param2=math.random(2,25)})
end,
on_timer = function(pos, elapsed)
local node = minetest.get_node(pos)
if( node and node.name=="cottages:hay_mat") then
minetest.remove_node(pos)
minetest.check_for_falling(pos)
end
end,
})
-- hay block, similar to straw block
minetest.register_node("cottages:hay", {
description = S("Hay"),
tiles = {cottages.straw_texture.."^[multiply:#88BB88"},
groups = {hay=3, snappy=2, oddly_breakable_by_hand=2, flammable=3},
sounds = cottages.sounds.leaves,
is_ground_content = false,
})
-- hay bales for hungry animals
minetest.register_node("cottages:hay_bale", {
drawtype = "nodebox",
description = S("Hay bale"),
tiles = {"cottages_darkage_straw_bale.png^[multiply:#88BB88"},
paramtype = "light",
groups = {hay=3, snappy=2, oddly_breakable_by_hand=2, flammable=3},
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
node_box = {
type = "fixed",
fixed = {
{-0.45, -0.5,-0.45, 0.45, 0.45, 0.45},
}
},
selection_box = {
type = "fixed",
fixed = {
{-0.45, -0.5,-0.45, 0.45, 0.45, 0.45},
}
},
is_ground_content = false,
})
--
-- craft recipes
--
minetest.register_craft({
output = "cottages:hay_mat 9",
recipe = {
{"cottages:hay"},
},
})
minetest.register_craft({
output = "cottages:hay",
recipe = {
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
{"cottages:hay_mat", "cottages:hay_mat", "cottages:hay_mat"},
},
})
minetest.register_craft({
output = "cottages:hay",
recipe = {{"cottages:hay_bale"}},
})
minetest.register_craft({
output = "cottages:hay_bale",
recipe = {{"cottages:hay"}},
})

View File

@ -27,20 +27,6 @@ minetest.register_node("cottages:wagon_wheel", {
},
groups = {choppy=2,dig_immediate=2,attached_node=1},
legacy_wallmounted = true,
sounds = default.node_sound_defaults(),
is_ground_content = false,
})
-- a nice dirt road for small villages or paths to fields
minetest.register_node("cottages:feldweg", {
description = S("dirt road"),
tiles = {"cottages_feldweg.png","default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype2 = "facedir",
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
legacy_facedir_simple = true,
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults,
is_ground_content = false,
})
@ -51,25 +37,19 @@ minetest.register_node("cottages:loam", {
tiles = {"cottages_loam.png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults,
sounds = cottages.sounds.dirt,
is_ground_content = false,
})
-- create stairs if possible
if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab) then
stairs.register_stair_and_slab("feldweg", "cottages:feldweg",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"cottages_feldweg.png","default_dirt.png", "default_grass.png","default_grass.png","cottages_feldweg.png","cottages_feldweg.png"},
S("Dirt Road Stairs"),
S("Dirt Road, half height"),
default.node_sound_dirt_defaults())
stairs.register_stair_and_slab("loam", "cottages:loam",
{snappy=2,choppy=2,oddly_breakable_by_hand=2},
{"cottages_loam.png"},
S("Loam Stairs"),
S("Loam Slab"),
default.node_sound_dirt_defaults())
cottages.sounds.dirt)
if( minetest.registered_nodes["default:clay"]) then
stairs.register_stair_and_slab("clay", "default:clay",
@ -77,7 +57,7 @@ if( minetest.get_modpath("stairs") and stairs and stairs.register_stair_and_slab
{"cottages_clay.png"},
S("Clay Stairs"),
S("Clay Slab"),
default.node_sound_dirt_defaults())
cottages.sounds.dirt)
end
end
@ -86,10 +66,10 @@ end
-- right now, this block mostly serves as a placeholder
minetest.register_node("cottages:straw_ground", {
description = S("straw ground for animals"),
tiles = {"cottages_darkage_straw.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png"},
tiles = {cottages.straw_texture,"cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png","cottages_loam.png"},
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2},
groups = {crumbly=3},
sounds = default.node_sound_dirt_defaults,
sounds = cottages.sounds.leaves,
is_ground_content = false,
})
@ -198,12 +178,16 @@ minetest.register_node("cottages:wool_tent", {
})
-- a fallback for cases in which there is no wool
minetest.register_node("cottages:wool", {
if( not( minetest.registered_nodes["wool:white"])) then
minetest.register_node("cottages:wool", {
description = "Wool",
tiles = {"cottages_wool.png"},
is_ground_content = false,
groups = {snappy=2,choppy=2,oddly_breakable_by_hand=3,flammable=3,wool=1},
})
})
else
minetest.register_alias("cottages:wool", "wool:white")
end
---------------------------------------------------------------------------------------

67
nodes_mining.lua Normal file
View File

@ -0,0 +1,67 @@
---------------------------------------------------------------------------------------
-- a rope that is of use to the mines
---------------------------------------------------------------------------------------
-- the rope can only be digged if there is no further rope above it;
-- Note: This rope also counts as a rail node; thus, carts can move through it
minetest.register_node("cottages:rope", {
description = "rope for climbing",
tiles = {"cottages_rope.png"},
groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=1},--connect_to_raillike=minetest.raillike_group("rail")},
walkable = false,
climbable = true,
paramtype = "light",
sunlight_propagates = true,
drawtype = "plantlike",
is_ground_content = false,
can_dig = function(pos, player)
local below = minetest.get_node( {x=pos.x, y=pos.y-1, z=pos.z});
if( below and below.name and below.name == "cottages:rope" ) then
if( player ) then
minetest.chat_send_player( player:get_player_name(),
'The entire rope would be too heavy. Start digging at its lowest end!');
end
return false;
end
return true;
end
})
minetest.register_craft({
output = "cottages:rope",
recipe = {
{"farming:cotton","farming:cotton","farming:cotton"}
}
})
-- Note: This rope also counts as a rail node; thus, carts can move through it
minetest.register_node("cottages:ladder_with_rope_and_rail", {
description = "Ladder with rail support",
drawtype = "signlike",
tiles = {"default_ladder_wood.png^carts_rail_straight.png^cottages_rope.png"},
inventory_image = "default_ladder_wood.png",
wield_image = "default_ladder_wood.png",
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
walkable = false,
climbable = true,
is_ground_content = false,
selection_box = {
type = "wallmounted",
},
groups = {choppy=2,oddly_breakable_by_hand=3,rail=1,connect_to_raillike=1}, --connect_to_raillike=minetest.raillike_group("rail")},
legacy_wallmounted = true,
sounds = cottages.sounds.wood,
})
minetest.register_craft({
output = "cottages:ladder_with_rope_and_rail 3",
recipe = {
{"default:ladder","cottages:rope", "default:rail"}
}
})

114
nodes_pitchfork.lua Normal file
View File

@ -0,0 +1,114 @@
local S = cottages.S
-- fast tool for digging nodes with the group "hay";
-- can also be placed as a node
-- the straw node from default and similar nodes can be digged with the pitchfork as well
local add_hay_group = {"farming:straw", "dryplants:reed", "darkage:straw_bale"}
for i, v in ipairs(add_hay_group) do
if( minetest.registered_items[v]) then
new_groups = minetest.registered_items[v].groups
new_groups.hay = 3
minetest.override_item(v, {groups = new_groups})
end
end
-- creates hay when digging dirt_with_grass (thanks to the override above);
-- useful for digging hay and straw
-- can be placed as a node
minetest.register_tool("cottages:pitchfork", {
description = S("pitchfork (dig dirt with grass to get hay, place with right-click)"),
groups = {},
inventory_image = "cottages_pitchfork.png",
wield_image = "cottages_pitchfork.png^[transformFYR180",
wield_scale = {x=1.5,y=1.5,z=0.5},
stack_max = 1,
liquids_pointable = false,
-- very useful for digging hay, straw and bales of those materials
tool_capabilities = {
full_punch_interval = 1.0,
max_drop_level=1,
groupcaps={
fleshy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 },
snappy={times={[2]=0.80, [3]=0.40}, maxlevel=1, uses=1/0.002 },
hay ={times={[2]=0.10, [3]=0.10}, maxlevel=1, uses=1/0.002 },
},
damage_groups = {fleshy=5}, -- slightly stronger than a stone sword
},
sound = {breaks = "default_tool_breaks"},
-- place the pitchfork somewhere
on_place = function(itemstack, placer, pointed_thing)
if( placer == nil or pointed_thing == nil or pointed_thing.type ~= "node") then
return nil
end
local pos = minetest.get_pointed_thing_position( pointed_thing, 1 )
local node = minetest.get_node_or_nil( pos )
if( node == nil or not(node.name) or node.name ~= "air") then
return nil
end
if minetest.is_protected(pos, placer:get_player_name()) then
return nil
end
minetest.rotate_and_place(ItemStack("cottages:pitchfork_placed"), placer, pointed_thing)
-- did the placing succeed?
local nnode = minetest.get_node(pos)
if( not(nnode) or not(nnode.name) or nnode.name ~= "cottages:pitchfork_placed") then
return nil
end
local meta = minetest.get_meta(pos)
meta:set_int( "wear", itemstack:get_wear())
meta:set_string("infotext", S("pitchfork (for hay and straw)"))
-- the tool has been placed; consume it
return ItemStack("")
end,
})
-- a ptichfork placed somewhere
minetest.register_node("cottages:pitchfork_placed", {
description = S("pitchfork (for hay and straw)"),
tiles = {"default_wood.png^[transformR90"}, --default_tree.png"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
groups = {snappy = 2, dig_immediate = 3, falling_node = 1, attached_node = 1, not_in_creative_inventory=1},
sounds = cottages.sounds.wood,
node_box = {
type = "fixed",
fixed = {
-- handle (goes a bit into the ground)
{ -(1/32), -(11/16), -(1/32), (1/32), 16/16, (1/32)},
-- middle connection
{ -(7/32), -(4/16), -(1/32), (7/32), -(2/16), (1/32)},
-- thongs
{ -(7/32), -(11/16), -(1/32), -(5/32), -(4/16), (1/32)},
{ (5/32), -(11/16), -(1/32), (7/32), -(4/16), (1/32)},
},
},
selection_box = {
type = "fixed",
fixed = { -0.3, -0.5, -0.1, 0.3, 1.0, 0.1 }
},
drop = "cottages:pitchfork",
-- perserve wear
preserve_metadata = function(pos, oldnode, oldmeta, drops)
if(oldmeta["wear"]) then
-- the first drop is the pitchfork
drops[1]:set_wear(oldmeta["wear"])
end
end,
})
--
-- craft recipes
--
minetest.register_craft({
output = 'cottages:pitchfork',
recipe = {
{ 'default:stick','default:stick','default:stick' },
{ '','default:stick', '' },
{ '','default:stick','' },
}
})

View File

@ -36,7 +36,8 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern
})
-- a better roof than the normal stairs; this one is for usage directly on top of walls (it has the form of a stair)
minetest.register_node("cottages:roof_connector_"..name, {
if( name~="straw" or not(minetest.registered_nodes["stairs:stair_straw"]) or not(cottages.use_farming_straw_stairs)) then
minetest.register_node("cottages:roof_connector_"..name, {
description = S("Roof connector "..name),
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
@ -60,9 +61,13 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern
},
is_ground_content = false,
})
else
minetest.register_alias("cottages:roof_connector_straw", "stairs:stair_straw")
end
-- this one is the slab version of the above roof
minetest.register_node("cottages:roof_flat_"..name, {
if( name~="straw" or not(minetest.registered_nodes["stairs:slab_straw"]) or not(cottages.use_farming_straw_stairs)) then
minetest.register_node("cottages:roof_flat_"..name, {
description = S("Roof (flat) "..name),
drawtype = "nodebox",
-- top, bottom, side1, side2, inner, outer
@ -85,6 +90,9 @@ cottages.register_roof = function( name, tiles, basic_material, homedecor_altern
},
is_ground_content = false,
})
else
minetest.register_alias("cottages:roof_flat_straw", "stairs:slab_straw")
end
if( not( homedecor_alternative )
@ -147,9 +155,9 @@ end -- of cottages.register_roof( name, tiles, basic_material )
-- add the diffrent roof types
---------------------------------------------------------------------------------------
cottages.register_roof( 'straw',
{"cottages_darkage_straw.png","cottages_darkage_straw.png",
"cottages_darkage_straw.png","cottages_darkage_straw.png",
"cottages_darkage_straw.png","cottages_darkage_straw.png"},
{cottages.straw_texture, cottages.straw_texture,
cottages.straw_texture, cottages.straw_texture,
cottages.straw_texture, cottages.straw_texture},
'cottages:straw_mat', nil );
cottages.register_roof( 'reet',
{"cottages_reet.png","cottages_reet.png",
@ -191,7 +199,7 @@ minetest.register_node("cottages:slate_vertical", {
tiles = {"cottages_slate.png",cottages.texture_roof_sides,"cottages_slate.png","cottages_slate.png",cottages.texture_roof_sides,"cottages_slate.png"},
paramtype2 = "facedir",
groups = {cracky=2, stone=1},
sounds = default.node_sound_stone_defaults(),
sounds = cottages.sounds.stone,
is_ground_content = false,
})
@ -208,8 +216,8 @@ minetest.register_craft({
minetest.register_node("cottages:reet", {
description = S("Reet for thatching"),
tiles = {"cottages_reet.png"},
groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3},
sounds = default.node_sound_wood_defaults(),
groups = {hay = 3, snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3},
sounds = cottages.sounds.leaves,
is_ground_content = false,
})

View File

@ -6,33 +6,21 @@
local S = cottages.S
local cottages_can_use = function( meta, player )
if( not( player) or not( meta )) then
return false;
end
local pname = player:get_player_name();
local owner = meta:get_string('owner' );
if( not(owner) or owner=="" or owner==pname ) then
return true;
end
return false;
end
-- an even simpler from of bed - usually for animals
-- it is a nodebox and not wallmounted because that makes it easier to replace beds with straw mats
minetest.register_node("cottages:straw_mat", {
description = S("layer of straw"),
drawtype = 'nodebox',
tiles = { 'cottages_darkage_straw.png' }, -- done by VanessaE
wield_image = 'cottages_darkage_straw.png',
inventory_image = 'cottages_darkage_straw.png',
tiles = { cottages.straw_texture }, -- done by VanessaE
wield_image = cottages.straw_texture,
inventory_image = cottages.straw_texture,
sunlight_propagates = true,
paramtype = 'light',
paramtype2 = "facedir",
walkable = false,
groups = { snappy = 3, flammable=4, fall_damage_add_percent=-10 },
sounds = default.node_sound_leaves_defaults(),
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable=3 },
sounds = cottages.sounds.leaves,
node_box = {
type = "fixed",
fixed = {
@ -57,8 +45,8 @@ minetest.register_node("cottages:straw_bale", {
description = S("straw bale"),
tiles = {"cottages_darkage_straw_bale.png"},
paramtype = "light",
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3, fall_damage_add_percent=-30},
sounds = default.node_sound_wood_defaults(),
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable=3 },
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
node_box = {
type = "fixed",
@ -76,21 +64,26 @@ minetest.register_node("cottages:straw_bale", {
})
-- just straw
minetest.register_node("cottages:straw", {
if( not(minetest.registered_nodes["farming:straw"])) then
minetest.register_node("cottages:straw", {
drawtype = "normal",
description = S("straw"),
tiles = {"cottages_darkage_straw.png"},
groups = {snappy=3,choppy=3,oddly_breakable_by_hand=3,flammable=3, fall_damage_add_percent=-30},
sounds = default.node_sound_wood_defaults(),
tiles = {cottages.straw_texture},
groups = { hay = 3, snappy = 2, oddly_breakable_by_hand = 2, flammable=3 },
sounds = cottages.sounds.leaves,
-- the bale is slightly smaller than a full node
is_ground_content = false,
})
})
else
minetest.register_alias("cottages:straw", "farming:straw")
end
local cottages_formspec_treshing_floor =
"size[8,8]"..
"image[1.5,0;1,1;"..cottages.texture_stick.."]"..
"image[0,1;1,1;farming_wheat.png]"..
"button_exit[6.8,0.0;1.5,0.5;public;"..S("Public?").."]"..
"list[current_name;harvest;1,1;2,1;]"..
"list[current_name;straw;5,0;2,2;]"..
"list[current_name;seeds;5,2;2,2;]"..
@ -109,7 +102,8 @@ minetest.register_node("cottages:threshing_floor", {
tiles = {"cottages_junglewood.png^farming_wheat.png","cottages_junglewood.png","cottages_junglewood.png^"..cottages.texture_stick},
paramtype = "light",
paramtype2 = "facedir",
groups = {cracky=2},
-- can be digged with axe and pick
groups = {cracky=2, choppy=2},
is_ground_content = false,
node_box = {
type = "fixed",
@ -131,23 +125,29 @@ minetest.register_node("cottages:threshing_floor", {
},
on_construct = function(pos)
local meta = minetest.get_meta(pos);
meta:set_string("infotext", S("Threshing floor"));
meta:set_string("infotext", S("Public threshing floor"));
local inv = meta:get_inventory();
inv:set_size("harvest", 2);
inv:set_size("straw", 4);
inv:set_size("seeds", 4);
meta:set_string("formspec", cottages_formspec_treshing_floor );
meta:set_string("public", "public")
end,
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos);
meta:set_string("owner", placer:get_player_name() or "");
meta:set_string("infotext", S("Threshing floor (owned by %s)"):format(meta:get_string("owner") or ""));
meta:set_string("infotext", S("Private threshing floor (owned by %s)"):format(meta:get_string("owner") or ""));
meta:set_string("formspec",
cottages_formspec_treshing_floor..
"label[2.5,-0.5;"..S("Owner: %s"):format(meta:get_string("owner") or "").."]" );
meta:set_string("public", "private")
end,
on_receive_fields = function(pos, formname, fields, sender)
cottages.switch_public(pos, formname, fields, sender, 'threshing floor')
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
@ -167,7 +167,7 @@ minetest.register_node("cottages:threshing_floor", {
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return count;
@ -182,7 +182,7 @@ minetest.register_node("cottages:threshing_floor", {
return 0;
end
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return stack:get_count()
@ -190,7 +190,7 @@ minetest.register_node("cottages:threshing_floor", {
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return stack:get_count()
@ -243,7 +243,7 @@ minetest.register_node("cottages:threshing_floor", {
end
local overlay1 = "^farming_wheat.png";
local overlay2 = "^cottages_darkage_straw.png";
local overlay2 = "^"..cottages.straw_texture;
local overlay3 = "^"..cottages.texture_wheat_seed;
-- this can be enlarged by a multiplicator if desired
@ -348,6 +348,7 @@ minetest.register_node("cottages:threshing_floor", {
local cottages_handmill_formspec = "size[8,8]"..
"image[0,1;1,1;"..cottages.texture_wheat_seed.."]"..
"button_exit[6.0,0.0;1.5,0.5;public;"..S("Public?").."]"..
"list[current_name;seeds;1,1;1,1;]"..
"list[current_name;flour;5,1;2,2;]"..
"label[0,0.5;"..S("Wheat seeds:").."]"..
@ -380,22 +381,28 @@ minetest.register_node("cottages:handmill", {
},
on_construct = function(pos)
local meta = minetest.get_meta(pos);
meta:set_string("infotext", S("Mill, powered by punching"));
meta:set_string("infotext", S("Public mill, powered by punching"));
local inv = meta:get_inventory();
inv:set_size("seeds", 1);
inv:set_size("flour", 4);
meta:set_string("formspec", cottages_handmill_formspec );
meta:set_string("public", "public")
end,
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos);
meta:set_string("owner", placer:get_player_name() or "");
meta:set_string("infotext", S("Mill, powered by punching (owned by %s)"):format(meta:get_string("owner") or ""));
meta:set_string("infotext", S("Private mill, powered by punching (owned by %s)"):format(meta:get_string("owner") or ""));
meta:set_string("formspec",
cottages_handmill_formspec..
"label[2.5,-0.5;"..S("Owner: %s"):format(meta:get_string('owner') or "").."]" );
meta:set_string("public", "private")
end,
on_receive_fields = function(pos, formname, fields, sender)
cottages.switch_public(pos, formname, fields, sender, 'mill, powered by punching')
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
@ -414,7 +421,7 @@ minetest.register_node("cottages:handmill", {
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
local meta = minetest.get_meta(pos)
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return count;
@ -428,7 +435,7 @@ minetest.register_node("cottages:handmill", {
return 0;
end
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return stack:get_count()
@ -436,7 +443,7 @@ minetest.register_node("cottages:handmill", {
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if( not( cottages_can_use( meta, player ))) then
if( not( cottages.player_can_use( meta, player ))) then
return 0
end
return stack:get_count()

314
nodes_water.lua Normal file
View File

@ -0,0 +1,314 @@
-- TODO: play sound while working
-- TODO: play sound when emptying a bucket
-- TODO: store correct bucket texture when loading the world anew
-- TODO: show particles when running? distinguish between running/idle state? (with punch?)
-- well for getting water
-- * has some storage space for buckets (filled with water, river water or empty)
-- * only the owner can use the bucket store and the well
-- * the bucket will be added as an entity and slowly rotate;
-- once filled, the texture of the bucket is changed
-- * full (water or river water) buckets can be emptied
-- * by default public; but can also be made private
-- how many seconds does it take to fill a bucket?
cottages.water_fill_time = 10
local S = cottages.S
-- code taken from the itemframes mod in homedecor
-- (the relevant functions are sadly private there and thus cannot be reused)
local tmp = {}
minetest.register_entity("cottages:bucket_entity",{
hp_max = 1,
visual="wielditem",
visual_size={x = 0.33, y = 0.33},
collisionbox = {0, 0, 0, 0, 0, 0},
physical = false,
textures = {"air"},
on_activate = function(self, staticdata)
if tmp.nodename ~= nil and tmp.texture ~= nil then
self.nodename = tmp.nodename
tmp.nodename = nil
self.texture = tmp.texture
tmp.texture = nil
else
if staticdata ~= nil and staticdata ~= "" then
local data = staticdata:split(';')
if data and data[1] and data[2] then
self.nodename = data[1]
self.texture = data[2]
end
end
end
if self.texture ~= nil then
self.object:set_properties({textures = {self.texture}})
end
self.object:set_properties({automatic_rotate = 1})
if self.texture ~= nil and self.nodename ~= nil then
local entity_pos = vector.round(self.object:get_pos())
local objs = minetest.get_objects_inside_radius(entity_pos, 0.5)
for _, obj in ipairs(objs) do
if obj ~= self.object and
obj:get_luaentity() and
obj:get_luaentity().name == "cottages:bucket_entity" and
obj:get_luaentity().nodename == self.nodename and
obj:get_properties() and
obj:get_properties().textures and
obj:get_properties().textures[1] == self.texture then
minetest.log("action","[cottages] Removing extra " ..
self.texture .. " found in " .. self.nodename .. " at " ..
minetest.pos_to_string(entity_pos))
self.object:remove()
break
end
end
end
end,
get_staticdata = function(self)
if self.nodename ~= nil and self.texture ~= nil then
return self.nodename .. ';' .. self.texture
end
return ""
end,
})
cottages.water_gen_fill_bucket = function(pos)
if( not(pos)) then
return
end
local meta = minetest.get_meta(pos)
local bucket = meta:get_string("bucket")
-- nothing to do
if( not(bucket) or bucket ~= "bucket:bucket_empty") then
return
end
-- abort if the water has not been running long enough
-- (the player may have removed a bucket before it was full)
start = meta:get_string("fillstarttime")
if( (minetest.get_us_time()/1000000) - tonumber(start) < cottages.water_fill_time -2) then
return
end
-- the bucket has been filled
meta:set_string("bucket", "bucket:bucket_river_water")
-- change the texture of the bucket to that of one filled with river water
local objs = nil
objs = minetest.get_objects_inside_radius(pos, .5)
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "cottages:bucket_entity" then
obj:set_properties( { textures = { "bucket:bucket_river_water" }})
obj:get_luaentity().nodename = "bucket:bucket_river_water"
obj:get_luaentity().texture = "bucket:bucket_river_water"
end
end
end
end
minetest.register_node("cottages:water_gen", {
description = "Tree Trunk Well",
tiles = {"default_tree_top.png", "default_tree.png^[transformR90", "default_tree.png^[transformR90"},
drawtype = "nodebox",
paramtype = "light",
paramtype2 = "facedir",
is_ground_content = false,
groups = {tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
sounds = cottages.sounds.wood,
node_box = {
type = "fixed",
fixed = {
-- floor of water bassin
{-0.5, -0.5+(3/16), -0.5, 0.5, -0.5+(4/16), 0.5},
-- walls
{-0.5, -0.5+(3/16), -0.5, 0.5, (4/16), -0.5+(2/16)},
{-0.5, -0.5+(3/16), -0.5, -0.5+(2/16), (4/16), 0.5},
{ 0.5, -0.5+(3/16), 0.5, 0.5-(2/16), (4/16), -0.5},
{ 0.5, -0.5+(3/16), 0.5, -0.5+(2/16), (4/16), 0.5-(2/16)},
-- feet
{-0.5+(3/16), -0.5, -0.5+(3/16), -0.5+(6/16), -0.5+(3/16), 0.5-(3/16)},
{ 0.5-(3/16), -0.5, -0.5+(3/16), 0.5-(6/16), -0.5+(3/16), 0.5-(3/16)},
-- real pump
{ 0.5-(4/16), -0.5, -(2/16), 0.5, 0.5+(4/16), (2/16)},
-- water pipe inside wooden stem
{ 0.5-(8/16), 0.5+(1/16), -(1/16), 0.5, 0.5+(3/16), (1/16)},
-- where the water comes out
{ 0.5-(15/32), 0.5, -(1/32), 0.5-(12/32), 0.5+(1/16), (1/32)},
},
},
selection_box = {
type = "fixed",
fixed = { -0.5, -0.5, -0.5, 0.5, 0.5+(4/16), 0.5 }
},
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local spos = pos.x .. "," .. pos.y .. "," .. pos.z
meta:set_string("formspec",
"size[8,9]" ..
"label[3.0,0.0;Tree trunk well]"..
"label[1.5,0.7;Punch the well while wielding an empty bucket.]"..
"label[1.5,1.0;Your bucket will slowly be filled with river water.]"..
"label[1.5,1.3;Punch again to get the bucket back when it is full.]"..
"label[1.0,2.9;Internal bucket storage (passive storage only):]"..
"item_image[0.2,0.7;1.0,1.0;bucket:bucket_empty]"..
"item_image[0.2,1.7;1.0,1.0;bucket:bucket_river_water]"..
"label[1.5,1.9;Punch well with full water bucket in order to empty bucket.]"..
"button_exit[6.0,0.0;2,0.5;public;"..S("Public?").."]"..
"list[nodemeta:" .. spos .. ";main;1,3.3;8,1;]" ..
"list[current_player;main;0,4.85;8,1;]" ..
"list[current_player;main;0,6.08;8,3;8]" ..
"listring[nodemeta:" .. spos .. ";main]" ..
"listring[current_player;main]")
local inv = meta:get_inventory()
inv:set_size('main', 6)
meta:set_string("infotext", S("Public tree trunk well")) -- (punch with empty bucket to fill bucket)")
end,
after_place_node = function(pos, placer)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name() or "")
meta:set_string("infotext", S("Public tree trunk well (owned by %s)"):format(meta:get_string("owner")))
-- no bucket loaded
meta:set_string("bucket", "")
meta:set_string("public", "public")
end,
can_dig = function(pos,player)
local meta = minetest.get_meta(pos);
local inv = meta:get_inventory()
return inv:is_empty("main") and
default.can_interact_with_node(player, pos)
end,
-- no inventory move allowed
allow_metadata_inventory_move = function(pos, from_list, from_index,
to_list, to_index, count, player)
return 0
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not(stack) or not cottages.player_can_use(meta, player) then
return 0
end
local inv = meta:get_inventory()
-- only for buckets
local sname = stack:get_name()
if( sname ~= "bucket:bucket_empty"
and sname ~= "bucket:bucket_water"
and sname ~= "bucket:bucket_river_water") then
return 0
end
return stack:get_count()
end,
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
local meta = minetest.get_meta(pos)
if not(cottages.player_can_use(meta, player)) then
return 0
end
return stack:get_count()
end,
on_blast = function() end,
on_receive_fields = function(pos, formname, fields, sender)
cottages.switch_public(pos, formname, fields, sender, 'tree trunk well')
end,
-- punch to place and retrieve bucket
on_punch = function(pos, node, puncher)
if( not( pos ) or not( node ) or not( puncher )) then
return
end
-- only the owner can use the well
local name = puncher:get_player_name()
local meta = minetest.get_meta(pos)
local owner = meta:get_string("owner")
local public = meta:get_string("public")
if( name ~= owner and public~="public") then
minetest.chat_send_player( name, S("This tree trunk well is owned by %s. You can't use it."):format(name))
return
end
-- we will either add or take from the players inventory
local pinv = puncher:get_inventory()
-- is the well working on something? (either empty or full bucket)
local bucket = meta:get_string("bucket")
-- there is a bucket loaded - either empty or full
if( bucket and bucket~="") then
if( not(pinv:room_for_item("main", bucket))) then
minetest.chat_send_player( puncher:get_player_name(),
S("Sorry. You have no room for the bucket. Please free some "..
"space in your inventory first!"))
return
end
end
-- remove the old entity (either a bucket will be placed now or a bucket taken)
local objs = nil
objs = minetest.get_objects_inside_radius(pos, .5)
if objs then
for _, obj in ipairs(objs) do
if obj and obj:get_luaentity() and obj:get_luaentity().name == "cottages:bucket_entity" then
obj:remove()
end
end
end
-- the player gets the bucket (either empty or full) into his inventory
if( bucket and bucket ~= "") then
pinv:add_item("main", bucket )
meta:set_string("bucket", "")
-- we are done
return
end
-- punching with empty bucket will put that bucket into the well (as an entity)
-- and will slowly fill it
local wielded = puncher:get_wielded_item()
if( wielded
and wielded:get_name()
and wielded:get_name() == "bucket:bucket_empty") then
-- remove the bucket from the players inventory
pinv:remove_item( "main", "bucket:bucket_empty")
-- remember that we got a bucket loaded
meta:set_string("bucket", "bucket:bucket_empty")
-- create the entity
tmp.nodename = "bucket:bucket_empty"
-- TODO: add a special texture with a handle for the bucket here
tmp.texture = "bucket:bucket_empty"
local e = minetest.add_entity({x=pos.x,y=pos.y+(4/16),z=pos.z},"cottages:bucket_entity")
-- fill the bucket with water
minetest.after(cottages.water_fill_time, cottages.water_gen_fill_bucket, pos)
-- the bucket will only be filled if the water ran long enough
meta:set_string("fillstarttime", tostring(minetest.get_us_time()/1000000))
return;
end
-- buckets can also be emptied here
if( wielded
and wielded:get_name()
and (wielded:get_name() == "bucket:bucket_water"
or wielded:get_name() == "bucket:bucket_river_water")
and (pinv:room_for_item("main", "bucket:bucket_empty"))) then
-- remove the full bucket from the players inventory
pinv:remove_item( "main", wielded:get_name())
-- add empty bucket
pinv:add_item("main", "bucket:bucket_empty")
-- TODO: play diffrent sound when pouring a bucket
return;
end
-- else check if there is a bucket that can be retrieved
meta:set_string("bucket","")
end,
})
-- a well (will fill water buckets) crafted from wooden materials
minetest.register_craft({
output = 'cottages:water_gen',
recipe = {
{'default:stick', '', ''},
{'default:tree', 'bucket:bucket_empty', 'bucket:bucket_empty'},
{'default:tree', 'default:tree', 'default:tree'},
}
})

BIN
screenshot.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 763 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 353 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 787 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 767 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
textures/cottages_rope.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB