Update: The Unnamed Update

This commit is contained in:
IamPyu 2024-07-24 18:26:07 -06:00
parent 2055d47a22
commit f9ebf25d9b
8 changed files with 122 additions and 69 deletions

View File

@ -1,6 +1,6 @@
# Changelog
## [Jul 18th - **STILL UNDER DEVELOPMENT** 2024] Update: The Unnamed Update
## [Jul 18th - Jul 24th 2024] Update: The Unnamed Update
This update contains breaking changes!
@ -25,6 +25,7 @@ This update contains breaking changes!
- Added necromancer boss battle
- Remove light's ability to change the time
- PyuTest now has an offical name: Nodelands!
- Added stone bricks
## [Jul 17th 2024] Unnamed Minor Update

View File

@ -75,7 +75,9 @@ PyuTestCore.make_building_blocks = function (name, desc, tex, colortint, cgroups
minetest.register_node(id_block, PyuTestCore.util.tableconcat({
description = Translate(desc.." Block"),
tiles = tex,
groups = groups,
groups = PyuTestCore.util.tableconcat(groups, {
whole_block = 1
}),
sounds = PyuTestCore.make_node_sounds(),
}, econf))
@ -281,7 +283,16 @@ PyuTestCore.make_building_blocks("pyutest_core:haybale", "Haybale", {"haybale-to
PyuTestCore.make_building_blocks("pyutest_core:crying_obsidian", "Enchanted Obsidian", {"enchanted-obsidian.png"}, nil, {
block = PyuTestCore.BLOCK_BREAKABLE_VERYLONG}, {is_ground_content = false
})
PyuTestCore.make_building_blocks("pyutest_core:brick", "Brick", {"bricks.png"}, nil, {block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE}, {is_ground_content = false})
PyuTestCore.make_building_blocks("pyutest_core:brick", "Brick", {"bricks.png"}, nil, {
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
}, {
is_ground_content = false
})
PyuTestCore.make_building_blocks("pyutest_core:stone_bricks", "Stone Bricks", {"stone-bricks.png"}, nil, {
block = PyuTestCore.BLOCK_BREAKABLE_MIDDLE
}, {
is_ground_content = false
})
PyuTestCore.make_building_blocks("pyutest_core:slime", "Slime", {"slime.png"}, nil, {bouncy = 85})
PyuTestCore.make_building_blocks("pyutest_core:clay", "Clay", {"clay-block.png"}, nil, {
acid_vulnerable = 1
@ -503,69 +514,3 @@ PyuTestCore.make_node("pyutest_core:ladder", "Ladder", {
},
inventory_image = "vines.png"
})
PyuTestCore.make_liquid = function (name, desc, groups, texture, speed, extra_conf)
local function make_liquid_flags(liquidtype)
local drawtype = ""
if liquidtype == "source" then
drawtype = "liquid"
elseif liquidtype == "flowing" then
drawtype = "flowingliquid"
end
local t = PyuTestCore.util.tableconcat({
drawtype = drawtype,
waving = 3,
walkable = false,
pointable = false,
buildable_to = true,
is_ground_content = false,
use_texture_alpha = "blend",
paramtype = "light",
drop = "",
drowning = 1,
liquidtype = liquidtype,
liquid_renewable = true,
liquid_viscosity = speed or 1,
liquid_alternative_flowing = name.."_flowing",
liquid_alternative_source = name.."_source",
paramtype2 = liquidtype == "flowing" and "flowingliquid" or nil,
special_tiles = liquidtype == "flowing" and {
{
name = texture,
backface_culling = false
},
{
name = texture,
backface_culling = true
}
} or nil
}, extra_conf or {})
return t
end
local g = groups or {}
g["liquid"] = 1
PyuTestCore.make_node(name.."_source", desc .. " Source", g, {texture}, make_liquid_flags("source"))
PyuTestCore.make_node(name.."_flowing", "Flowing " .. desc, g, {texture}, make_liquid_flags("flowing"))
end
PyuTestCore.make_liquid("pyutest_core:water", "Water", {
water = 1
}, "water.png", 1, {
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
paramtype2 = "color",
})
PyuTestCore.make_liquid("pyutest_core:lava", "Lava", {
lava = 1
}, "lava.png", 5, {
damage_per_second = 2,
light_source = 8
})
PyuTestCore.make_liquid("pyutest_core:oil", "Oil", {}, "oil.png", 3)
PyuTestCore.make_liquid("pyutest_core:liquid_acid", "Acid", {}, "acid.png", 7, {
damage_per_second = 2
})

View File

@ -28,6 +28,7 @@ dofile(PyuTestCore_Path.."/utils.lua") -- Utilities
-- Core Game Code
dofile(PyuTestCore_Path.."/blocks.lua")
minetest.register_alias("mapgen_dirt", "pyutest_core:dirt_block")
dofile(PyuTestCore_Path.."/liquid.lua")
dofile(PyuTestCore_Path.."/wood.lua")
dofile(PyuTestCore_Path.."/leaves.lua")

View File

@ -0,0 +1,65 @@
PyuTestCore.make_liquid = function (name, desc, groups, texture, speed, extra_conf)
local function make_liquid_flags(liquidtype)
local drawtype = ""
if liquidtype == "source" then
drawtype = "liquid"
elseif liquidtype == "flowing" then
drawtype = "flowingliquid"
end
local t = PyuTestCore.util.tableconcat({
drawtype = drawtype,
waving = 3,
walkable = false,
pointable = false,
buildable_to = true,
is_ground_content = false,
use_texture_alpha = "blend",
paramtype = "light",
drop = "",
drowning = 1,
liquidtype = liquidtype,
liquid_renewable = true,
liquid_viscosity = speed or 1,
liquid_alternative_flowing = name.."_flowing",
liquid_alternative_source = name.."_source",
paramtype2 = liquidtype == "flowing" and "flowingliquid" or nil,
special_tiles = liquidtype == "flowing" and {
{
name = texture,
backface_culling = false
},
{
name = texture,
backface_culling = true
}
} or nil
}, extra_conf or {})
return t
end
local g = groups or {}
g["liquid"] = 1
PyuTestCore.make_node(name.."_source", desc .. " Source", g, {texture}, make_liquid_flags("source"))
PyuTestCore.make_node(name.."_flowing", "Flowing " .. desc, g, {texture}, make_liquid_flags("flowing"))
end
PyuTestCore.make_liquid("pyutest_core:water", "Water", {
water = 1
}, "water.png", 1, {
post_effect_color = {a=60, r=24.7, g=46.3, b=89.4},
paramtype2 = "color",
})
PyuTestCore.make_liquid("pyutest_core:lava", "Lava", {
lava = 1
}, "lava.png", 5, {
damage_per_second = 2,
light_source = 8
})
PyuTestCore.make_liquid("pyutest_core:oil", "Oil", {}, "oil.png", 3)
PyuTestCore.make_liquid("pyutest_core:liquid_acid", "Acid", {}, "acid.png", 7, {
damage_per_second = 2
})

View File

@ -130,5 +130,31 @@ PyuTestCore.make_item("pyutest_core:bomb", "Bomb", {}, "bomb.png", {
end
})
PyuTestCore.make_item("pyutest_core:windball", "Windball", {}, "windball.png", {
stack_max = 16,
on_use = function (_, user)
if user == nil then
return
end
local pos = user:get_pos()
minetest.sound_play({name = "spellbook_action", gain = 0.75}, {pos = pos})
math.randomseed(os.time())
user:add_velocity({
x = 0,
z = 0,
y = math.random(12, 22)
})
local stack = user:get_wielded_item()
stack:set_count(stack:get_count() - 1)
user:set_wielded_item(stack)
end
})
PyuTestCore.make_food("pyutest_core:apple", "Apple", "apple.png", 5)
PyuTestCore.make_food("pyutest_core:bread", "Bread", "bread.png", 3)

View File

@ -61,3 +61,11 @@ unified_inventory.register_category("pyutest_inventory:fuel", {
index = 9,
items = get_items_from_group("fuel")
})
unified_inventory.register_category("pyutest_inventory:whole_blocks", {
symbol = "pyutest_core:stone_block",
label = "Whole Blocks",
index = 10,
items = get_items_from_group("whole_block")
})

View File

@ -65,6 +65,13 @@ mobs:register_mob("pyutest_mobs:wind_warrior", {
min = 4,
max = 7,
chance = 1
},
{
name = "pyutest_core:windball",
min = 2,
max = 4,
chance = 1
}
}
})

BIN
textures/stone-bricks.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 B