From ed6b72f9c81670a9c0c1d1b6670861abc8b04315 Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Sun, 26 Nov 2023 16:23:54 -0500 Subject: [PATCH] namespace trees mod --- mods/{trees => dg_trees}/README.txt | 0 mods/{trees => dg_trees}/init.lua | 19 ++++++++++-------- mods/{trees => dg_trees}/license.txt | 2 +- .../schematics/dg_trees_pine_tree.mts} | Bin .../textures/dg_trees_pine_needles.png} | Bin .../textures/dg_trees_pine_trunk_side.png} | Bin .../textures/dg_trees_pine_trunk_top.png} | Bin 7 files changed, 12 insertions(+), 9 deletions(-) rename mods/{trees => dg_trees}/README.txt (100%) rename mods/{trees => dg_trees}/init.lua (55%) rename mods/{trees => dg_trees}/license.txt (98%) rename mods/{trees/schematics/trees_pine_tree.mts => dg_trees/schematics/dg_trees_pine_tree.mts} (100%) rename mods/{trees/textures/trees_pine_needles.png => dg_trees/textures/dg_trees_pine_needles.png} (100%) rename mods/{trees/textures/trees_pine_trunk_side.png => dg_trees/textures/dg_trees_pine_trunk_side.png} (100%) rename mods/{trees/textures/trees_pine_trunk_top.png => dg_trees/textures/dg_trees_pine_trunk_top.png} (100%) diff --git a/mods/trees/README.txt b/mods/dg_trees/README.txt similarity index 100% rename from mods/trees/README.txt rename to mods/dg_trees/README.txt diff --git a/mods/trees/init.lua b/mods/dg_trees/init.lua similarity index 55% rename from mods/trees/init.lua rename to mods/dg_trees/init.lua index 801958b..5297f15 100644 --- a/mods/trees/init.lua +++ b/mods/dg_trees/init.lua @@ -1,22 +1,25 @@ -- Nodes -minetest.register_node("trees:pine_trunk", { +minetest.register_node("dg_trees:pine_trunk", { description = "Pine Trunk", tiles = { - "trees_pine_trunk_top.png", - "trees_pine_trunk_top.png", - "trees_pine_trunk_side.png", + "dg_trees_pine_trunk_top.png", + "dg_trees_pine_trunk_top.png", + "dg_trees_pine_trunk_side.png", }, groups = {choppy = 2}, }) -minetest.register_node("trees:pine_needles", { +minetest.register_node("dg_trees:pine_needles", { description = "Pine Needles", - tiles = {"trees_pine_needles.png"}, + tiles = {"dg_trees_pine_needles.png"}, walkable = false, groups = {dig_immediate = 2}, }) +minetest.register_alias("trees:pine_trunk", "dg_trees:pine_trunk") +minetest.register_alias("trees:pine_needles", "dg_trees:pine_needles") + -- Decoration. -- Placed by voxelmanip in 'track' mod, not by core mapgen, so use: @@ -24,7 +27,7 @@ minetest.register_node("trees:pine_needles", { minetest.register_decoration({ deco_type = "schematic", - place_on = {"mapgen:grass"}, + place_on = {"dg_mapgen:grass"}, sidelen = 16, noise_params = { offset = 0.0, @@ -37,6 +40,6 @@ minetest.register_decoration({ biomes = {"grassland"}, y_min = -31000, y_max = 31000, - schematic = minetest.get_modpath("trees").."/schematics/trees_pine_tree.mts", + schematic = minetest.get_modpath("dg_trees").."/schematics/dg_trees_pine_tree.mts", flags = "place_center_x, place_center_z", }) diff --git a/mods/trees/license.txt b/mods/dg_trees/license.txt similarity index 98% rename from mods/trees/license.txt rename to mods/dg_trees/license.txt index df39686..1e8fd93 100644 --- a/mods/trees/license.txt +++ b/mods/dg_trees/license.txt @@ -2,7 +2,7 @@ License of source code ---------------------- The MIT License (MIT) -Copyright (C) 2020 paramat +Copyright (C) 2020-2023 paramat, wsor4035 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software diff --git a/mods/trees/schematics/trees_pine_tree.mts b/mods/dg_trees/schematics/dg_trees_pine_tree.mts similarity index 100% rename from mods/trees/schematics/trees_pine_tree.mts rename to mods/dg_trees/schematics/dg_trees_pine_tree.mts diff --git a/mods/trees/textures/trees_pine_needles.png b/mods/dg_trees/textures/dg_trees_pine_needles.png similarity index 100% rename from mods/trees/textures/trees_pine_needles.png rename to mods/dg_trees/textures/dg_trees_pine_needles.png diff --git a/mods/trees/textures/trees_pine_trunk_side.png b/mods/dg_trees/textures/dg_trees_pine_trunk_side.png similarity index 100% rename from mods/trees/textures/trees_pine_trunk_side.png rename to mods/dg_trees/textures/dg_trees_pine_trunk_side.png diff --git a/mods/trees/textures/trees_pine_trunk_top.png b/mods/dg_trees/textures/dg_trees_pine_trunk_top.png similarity index 100% rename from mods/trees/textures/trees_pine_trunk_top.png rename to mods/dg_trees/textures/dg_trees_pine_trunk_top.png