From 40f17d3679c83d2bcfff0c803cff9945009a8805 Mon Sep 17 00:00:00 2001 From: NathanSalapat Date: Fri, 3 May 2019 09:07:21 -0500 Subject: [PATCH] added grass. --- changelog.txt | 3 + game.conf | 2 +- mods/common/colbox.lua | 4 +- mods/ground/mapgen.lua | 26 +++++-- mods/metals/mapgen.lua | 25 +++++++ mods/plants/grasses.lua | 62 ++++++++++++++++ mods/plants/init.lua | 5 ++ mods/plants/mod.conf | 4 ++ mods/plants/textures/plants_grass.xcf | Bin 0 -> 6583 bytes mods/plants/textures/plants_grass_1.png | Bin 0 -> 455 bytes mods/plants/textures/plants_grass_2.png | Bin 0 -> 469 bytes mods/plants/textures/plants_grass_3.png | Bin 0 -> 433 bytes mods/plants/textures/plants_grass_4.png | Bin 0 -> 457 bytes mods/storage/chests.lua | 68 ++++++++++++++++-- mods/storage/formspecs.lua | 1 + mods/storage/functions.lua | 2 +- .../textures/storage_label_outline.png | Bin 0 -> 267 bytes 17 files changed, 188 insertions(+), 14 deletions(-) create mode 100644 mods/plants/grasses.lua create mode 100644 mods/plants/init.lua create mode 100644 mods/plants/mod.conf create mode 100644 mods/plants/textures/plants_grass.xcf create mode 100644 mods/plants/textures/plants_grass_1.png create mode 100644 mods/plants/textures/plants_grass_2.png create mode 100644 mods/plants/textures/plants_grass_3.png create mode 100644 mods/plants/textures/plants_grass_4.png create mode 100644 mods/storage/textures/storage_label_outline.png diff --git a/changelog.txt b/changelog.txt index 1d98fe4..15bfd13 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +2019-05-03: +Added grass. + 2017-05-29: Added a chest and did some updates to the players inventory and formspecs. diff --git a/game.conf b/game.conf index e05e229..ba2fd42 100644 --- a/game.conf +++ b/game.conf @@ -1 +1 @@ -name = new subgame +name = new-subgame diff --git a/mods/common/colbox.lua b/mods/common/colbox.lua index 55aa696..8d99a56 100644 --- a/mods/common/colbox.lua +++ b/mods/common/colbox.lua @@ -1,11 +1,11 @@ -common.colbox_stair = { +common.colbox_stair = { --Stairs nodebox type = 'fixed', fixed = { {-.5, -.5, -.5, .5, 0, .5}, {-.5, 0, 0, .5, .5, .5}, }} -common.colbox_1_5_slab = { +common.colbox_1_5_slab = { --1/5th height slab type = 'fixed', fixed = { {-0.5, -0.5, -0.5, 0.5, -0.3, 0.5}, diff --git a/mods/ground/mapgen.lua b/mods/ground/mapgen.lua index ae24dbe..4ad3734 100644 --- a/mods/ground/mapgen.lua +++ b/mods/ground/mapgen.lua @@ -56,9 +56,9 @@ minetest.register_biome({ minetest.register_biome({ name = "grassland_dunes", --node_dust = "", - node_top = "ground:sand", + node_top = "ground:dirt_with_grass", depth_top = 1, - node_filler = "ground:sand", + node_filler = "ground:dirt_with_grass", depth_filler = 2, --node_stone = "", --node_water_top = "", @@ -99,11 +99,11 @@ minetest.register_biome({ depth_top = 1, node_filler = 'ground:dirt', depth_filler = 4, - node_stone = 'ground:desert_stone', + node_stone = 'ground:stone', node_riverbed = 'ground:sand', depth_riverbed = 1, y_min = 12, - y_max = 60, + y_max = 20, heat_point = 10, humidity_point = 47, }) @@ -116,8 +116,24 @@ minetest.register_biome({ depth_filler = 10, node_riverbed = 'ground:dirt', depth_riverbed = 2, + vertical_blend = 3, y_min = -5, - y_max = 15, + y_max = 5, heat_point = 65, humidity_point = 70, }) + +minetest.register_biome({ + name = 'stone', + node_top = 'ground:stone', + depth_top = 1, + node_filler = 'ground:stone', + depth_filler = 4, + node_stone = 'ground:stone', + node_riverbed = 'ground:stone', + depth_riverbed = 1, + y_min = 20, + y_max = 80, + heat_point = 10, + humidity_point = 47, +}) diff --git a/mods/metals/mapgen.lua b/mods/metals/mapgen.lua index 2b15adc..7f25ad8 100644 --- a/mods/metals/mapgen.lua +++ b/mods/metals/mapgen.lua @@ -19,3 +19,28 @@ minetest.register_ore({ y_min = -31000, y_max = -50, }) + +minetest.register_ore({ + ore_type = 'stratum', + ore = 'ground:dirt', + wherein = 'ground:stone', + clust_scarcity = 1, + y_min = 25, + y_max = 30, + noise_params = { + offset = 27, + scale = 4, + spread = {x = 100, y = 100, z = 100}, + seed = 90122, + octaves = 3, + persist = 0.7 + }, + np_stratum_thickness = { + offset = 8, + scale = 4, + spread = {x = 100, y = 100, z = 100}, + seed = 17, + octaves = 3, + persist = 0.7 + }, +}) diff --git a/mods/plants/grasses.lua b/mods/plants/grasses.lua new file mode 100644 index 0000000..25a8c4d --- /dev/null +++ b/mods/plants/grasses.lua @@ -0,0 +1,62 @@ +minetest.register_node('plants:grass_1', { + description = 'grass', + tiles = {'plants_grass_1.png'}, + drawtype = 'plantlike', + inventory_image = "plants_grass_4.png", + wield_image = "plants_grass_4.png", + groups = {flora=1, grass=1, oddly_breakable_by_hand=1, attached_node=1}, + drop = 'plants:grass_1', + waving = 1, + walkable = false, + sunlight_propagates = true, + buildable_to = true, + paramtype = 'light', + selection_box = plants.grass_sel, + on_place = function(itemstack, placer, pointed_thing) + local stack = ItemStack('plants:grass_' .. math.random(1,4)) + local ret = minetest.item_place(stack, placer, pointed_thing) + return ItemStack('plants:grass_1 '.. itemstack:get_count() - (1 - ret:get_count())) + end +}) + +minetest.register_node('plants:grass_2', { + description = 'grass', + tiles = {'plants_grass_2.png'}, + drawtype = 'plantlike', + groups = {flora=1, grass=1, oddly_breakable_by_hand=1, attached_node=1}, + drop = 'plants:grass_1', + waving = 1, + walkable = false, + sunlight_propagates = true, + buildable_to = true, + paramtype = 'light', + selection_box = plants.grass_sel, +}) + +minetest.register_node('plants:grass_3', { + description = 'grass', + tiles = {'plants_grass_3.png'}, + drawtype = 'plantlike', + groups = {flora=1, grass=1, oddly_breakable_by_hand=1, attached_node=1}, + drop = 'plants:grass_1', + waving = 1, + walkable = false, + sunlight_propagates = true, + buildable_to = true, + paramtype = 'light', + selection_box = plants.grass_sel, +}) + +minetest.register_node('plants:grass_4', { + description = 'grass', + tiles = {'plants_grass_4.png'}, + drawtype = 'plantlike', + groups = {flora=1, grass=1, oddly_breakable_by_hand=1, attached_node=1}, + drop = 'plants:grass_1', + waving = 1, + walkable = false, + sunlight_propagates = true, + buildable_to = true, + paramtype = 'light', + selection_box = plants.grass_sel, +}) diff --git a/mods/plants/init.lua b/mods/plants/init.lua new file mode 100644 index 0000000..3ba0d9d --- /dev/null +++ b/mods/plants/init.lua @@ -0,0 +1,5 @@ +plants = {} +plants.grass_sel = {type = 'fixed', + fixed = {{-0.4, -0.5, -0.4, 0.4, -0.3, 0.4},}} + +dofile(minetest.get_modpath('plants')..'/grasses.lua') diff --git a/mods/plants/mod.conf b/mods/plants/mod.conf new file mode 100644 index 0000000..b100d2f --- /dev/null +++ b/mods/plants/mod.conf @@ -0,0 +1,4 @@ +name = plants +depends = common +description = All sorts of plants. +author = Nathan diff --git a/mods/plants/textures/plants_grass.xcf b/mods/plants/textures/plants_grass.xcf new file mode 100644 index 0000000000000000000000000000000000000000..23c7d7e7e5091b36051911806ec4edc497336f24 GIT binary patch literal 6583 zcmeHM!A=`j6rFi9h6EZVGy|>_s3vVKP1Fa9!&`WVr7WT@60>1hMFbCyC14_;Z6b|I zrT#+~-S!Xq30>wZx=6~RiiDI(32B0R&YSnlo7h&;R*4Ggg){fez3mDpNApZfF0(>8b4}l3_PT&yma1l6j9g7H91cboHz>MLnoW>Pyz@O{j zX7g*==4QIJi*rw3_WE|Zx|_D+Z@Rm8;~QVxTxRBiUfSJU?WFUa?QYww_Pu0h_rXRQ z?_?X@_LYfby|b2WWZQ9~-TZdv&T4#h;i|SFq;67IPRq z_~=>TOUD>z1mFEL%c~n3>23<@jRAaoJ>W9=(swvw4Zt|6e@X0`*x{27 z|G?qr9DW|0_p>$*!fWyRHN)Y&&&Yc)_)i^fe+60Rm@w~?4#hYU<~0U(#n}BF7Ns-M;(FRt4q*pP z{?=S}w7E5t^|mUOi0rl!wOJ*qK(rTl%3qvQN7oi-RBy3jiBLFV3%=wlj17GF zGo9_#ot@hX)Z-s1?M+XXbtmP?@(DW@K6FlEaKb#<@HcR4F$e(*j|%U3uRqy6|JTHC z`6EzayfGX)H@d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