Initial commit

This commit is contained in:
MCLx86
2021-12-21 18:09:12 -05:00
commit 5fb9897a36
431 changed files with 7241 additions and 0 deletions

76
mods/main/craftitems.lua Normal file
View File

@@ -0,0 +1,76 @@
---------------
---------------
--Craft Items--
---------------
---------------
--Stick
minetest.register_craftitem("main:stick", {
description = "Stick",
inventory_image = "main_stick.png",
})
--Twig
minetest.register_craftitem("main:twig", {
description = "Twig",
inventory_image = "main_twig.png",
})
----------
--Minerals
----------
--Salt Crystals
minetest.register_craftitem("main:salt_crystals", {
description = "Salt Crystals",
inventory_image = "main_salt_crystals.png",
})
--Sulfur Lump
minetest.register_craftitem("main:lump_sulfur", {
description = "Sulfur Lump",
inventory_image = "main_lump_sulfur.png",
})
--Coal
minetest.register_craftitem("main:coal", {
description = "Coal",
inventory_image = "main_lump_coal.png",
})
--Iron Lump
minetest.register_craftitem("main:lump_iron", {
description = "Iron Lump",
inventory_image = "main_lump_iron.png",
})
--Copper Lump
minetest.register_craftitem("main:lump_copper", {
description = "Copper Lump",
inventory_image = "main_lump_copper.png",
})
--Raw Diamond
minetest.register_craftitem("main:diamond_raw", {
description = "Raw Diamond",
inventory_image = "main_dirt.png", -- Dummy/placeholder texture, will be changed in the future
--inventory_image = "main_diamond_raw.png",
})
--Polished Diamond
minetest.register_craftitem("main:diamond_polished", {
description = "Polished Diamond",
inventory_image = "main_dirt.png", -- Dummy/placeholder, will be changed in the future
--inventory_image = "main_diamond_polished.png",
})
---------
--Edibles
---------
--Strawberry
minetest.register_craftitem("main:berry_straw", {
description = "Strawberry",
tiles = {"main_berry_straw.png"},
on_use = minetest.item_eat(1),
})

11
mods/main/init.lua Normal file
View File

@@ -0,0 +1,11 @@
local modpath = minetest.get_modpath("main")
dofile(modpath.."/nodes.lua")
dofile(modpath.."/craftitems.lua")
dofile(modpath.."/mapgen.lua")
dofile(modpath.."/tools.lua")
minetest.register_on_joinplayer(function(player)
player:hud_set_hotbar_image("gui_hotbar.png")
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)

7
mods/main/license.txt Normal file
View File

@@ -0,0 +1,7 @@
Copyright 2019-2021 MCL
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 without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

43
mods/main/mapgen.lua Normal file
View File

@@ -0,0 +1,43 @@
minetest.register_alias("mapgen_stone", "main:stone")
minetest.register_alias("mapgen_dirt", "main:dirt")
minetest.register_alias("mapgen_dirt_with_grass", "main:grass")
minetest.register_alias("mapgen_sand", "main:sand")
minetest.register_alias("mapgen_water_source", "main:water_source")
--Beach
minetest.register_biome(
{
name = "Beach",
node_top = "main:sand",
node_filler = "main:sand",
depth_top = 1,
depth_filler = 3,
y_min = -20,
y_max = 32000,
heat_point = 70,
humidity_point = 55,
})
--Small Rock
minetest.register_decoration(
{
deco_type = "schematic",
place_on = {"main:dirt_with_grass", "main:dirt", "main:sand", "main:dirt_with_swamp_grass"},
rotation = "random",
sidelen = 16,
fill_ratio = 0.004,
biomes = {"Grasslands", "Swamp", "Desert", "Wasteland"},
flags = "place_center_x, place_center_z",
schematic = minetest.get_modpath("main")
.. "/schematics/main_rock_cobble_small.mts",
y_min = -32000,
y_max = 32000,
})

193
mods/main/nodes.lua Normal file
View File

@@ -0,0 +1,193 @@
--Naturally generating nodes
minetest.register_node("main:stone", {
description = "Stone",
tiles = {"main_stone.png"},
groups = {cracky = 3, stone = 1},
drop = 'main:cobble',
legacy_mineral = true,
})
minetest.register_node("main:cobble", {
description = "Cobble",
tiles = {"main_cobble.png"},
groups = {cracky = 2, stone = 1},
drop = 'main:cobble',
legacy_mineral = true,
})
minetest.register_node("main:dirt", {
description = "Dirt",
tiles = {"main_dirt.png"},
groups = {crumbly = 3, soil = 1},
})
minetest.register_node("main:grass", {
description = "Grass",
tiles = {"main_grass.png", "main_dirt.png",
{name = "main_dirt.png^main_grass_side.png",
tileable_vertical = false}},
groups = {crumbly = 3, soil = 1, spreading_dirt_type = 1},
drop = 'main:dirt',
})
minetest.register_node("main:sand", {
description = "Sand",
tiles = {"main_sand.png"},
groups = {crumbly = 3, sand = 1},
})
--Player made nodes
minetest.register_node("main:light", {
description = "Lamp",
tiles = {"main_indsutrial_decor_lamp.png"},
light_source = 14,
groups = {choppy = 3, oddly_breakable_by_hand = 3},
})
--Steel Block
minetest.register_node("main:block_steel", {
description = "Steel Block",
tiles = {"main_block_iron.png"},
groups = {cracky = 3},
drop = 'main:block_iron',
})
--Gold Block
minetest.register_node("main:block_gold", {
description = "Gold Block",
tiles = {"main_block_gold.png"},
groups = {cracky = 3},
drop = 'main:block_gold',
})
--Planks
minetest.register_node("main:planks_oak", {
description = "Planks",
tiles = {"main_planks_oak.png"},
groups = {choppy = 3},
})
--
-- Plants and Other Living Organisms
--
--Oak Log
minetest.register_node("main:log", {
description = "Log",
tiles = {"main_log.png"},
groups = {choppy = 2, logs = 1},
})
--Oak Leaves
minetest.register_node("main:leaves", {
drawtype = "plantlike",
paramtype = "light",
light_propagates = true,
sunlight_propagates = true,
walkable = false,
climbable = true,
is_ground_content = false,
description = "Leaves",
tiles = {"main_leaves.png"},
groups = {snappy = 3},
})
--
-- Liquids
--
--Fresh water
minetest.register_node("main:water_source", {
description = "Fresh Water Source",
drawtype = "liquid",
paramtype = "light",
tiles = {
{
name = "main_water_source_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 50, b = 200},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 14,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "source",
liquid_alternative_flowing = "main:water_flowing",
liquid_alternative_source = "main:water_source",
groups = {liquid = 3, water = 1},
})
minetest.register_node("main:water_flowing", {
description = "Flowing Water",
drawtype = "flowingliquid",
paramtype = "light",
tiles = {
{
name = "main_water_flowing_animated.png",
animation = {
type = "vertical_frames",
aspect_w = 16,
aspect_h = 16,
length = 2.0,
},
},
},
special_tiles = {
{
name = "main_water_flowing_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = true,
},
{
name = "main_water_flowing_animated.png",
animation = {type = "vertical_frames", aspect_w = 16,
aspect_h = 16, length = 2.0},
backface_culling = false,
}
},
alpha = 180,
post_effect_color = {a = 50, r = 0, g = 50, b = 200},
--Behavior
walkable = false,
pointable = false,
buildable_to = true,
diggable = false,
is_ground_content = false,
--Properties
liquid_range = 14,
liquid_viscosity = 0.1,
drowning = 1,
liquidtype = "flowing",
liquid_alternative_flowing = "main:water_flowing",
liquid_alternative_source = "main:water_source",
groups = {liquid = 3, water = 1},
})

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

BIN
mods/main/textures/hand.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 268 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 401 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 289 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 427 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 635 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 285 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 283 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 448 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 350 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

74
mods/main/tools.lua Normal file
View File

@@ -0,0 +1,74 @@
minetest.register_item(":",
{
type = "none",
wield_image = "hand.png",
wield_scale = {x=1,y=1,z=3.5},
tool_capabilities =
{
max_drop_level = 0,
full_punch_interval = 0.4,
groupcaps =
{
oddly_breakable_by_hand = {times={[1]=3.50,[2]=2.00,[3]=0.70}, uses=0},
snappy = {times={[3]=1.00}, uses=0, maxlevel=1},
crumbly = {times={[2]=4.50, [3]=1.80}, uses=0, maxlevel=1},
},
damage_groups = {fleshy = 3, snappy = 2},
}
})
minetest.register_item("main:pickaxe_steel",
{
type = "none",
wield_image = "main_pickaxe_steel.png",
inventory_image = "main_pickaxe_steel.png",
tool_capabilities =
{
max_drop_level = 1,
full_punch_interval = 0.8,
groupcaps =
{
cracky = {times={[1]=1.80, [2]=1.00,[3]=0.50}, uses=0, maxlevel=1},
crumbly = {times={[2]=2.50, [3]=0.80}, uses=0, maxlevel=1},
},
damage_groups = {fleshy = 5, cracky = 8},
}
})
minetest.register_item("main:pickaxe_stone",
{
type = "none",
wield_image = "main_pickaxe_stone.png",
tool_capabilities =
{
max_drop_level = 1,
full_punch_interval = 0.8,
groupcaps =
{
cracky = {times={[1]=3.80, [2]=2.00,[3]=1.50}, uses=0, maxlevel=1},
crumbly = {times={[2]=3.50, [3]=1.80}, uses=0, maxlevel=1},
},
damage_groups = {fleshy = 4, cracky = 5},
}
})
minetest.register_item("main:ax_steel",
{
type = "none",
wield_image = "main_pickaxe_stone.png",
tool_capabilities =
{
max_drop_level = 1,
full_punch_interval = 0.4,
groupcaps =
{
choppy = {times={[1]=3.80, [2]=2.00,[3]=1.50}, uses=0, maxlevel=1},
crumbly = {times={[2]=3.50, [3]=1.80}, uses=0, maxlevel=1},
},
damage_groups = {fleshy = 4, cracky = 8},
}
})