1
0
Fork 0

Compare commits

..

1 Commits

Author SHA1 Message Date
Mikita Wiśniewski cb684521cc mcl_archaeology 2023-08-05 20:45:30 +07:00
39 changed files with 154 additions and 14 deletions

5
.gitignore vendored
View File

@ -5,4 +5,7 @@
*.blend3
/.idea/
*.xcf
.Rproj.user
.Rproj.user
# Windows Thumbnail Cache
Thumbs.db

View File

@ -187,6 +187,15 @@ function mcl_sounds.node_sound_lava_defaults(table)
return table
end
function mcl_sounds.node_sound_decorated_pot_defaults(table)
table = table or {}
-- TODO: Footstep and dug sounds
table.place = table.place or
{name = "archaeology_decorated_pot_place", gain = 1.0}
mcl_sounds.node_sound_defaults(table)
return table
end
-- Player death sound
minetest.register_on_dieplayer(function(player)
-- TODO: Add separate death sound

View File

@ -169,9 +169,10 @@ local professions = {
jobsite = "mcl_fletching_table:fletching_table",
trades = {
{
{ { "mcl_core:stick", 32, 32 }, E1 },
{ { "mcl_mobitems:string", 15, 20 }, E1 },
{ E1, { "mcl_bows:arrow", 8, 12 } },
{ { "mcl_core:gravel", 10, 10, "mcl_core:emerald", 1, 1 }, { "mcl_core:flint", 6, 10 } },
{ { "mcl_core:stick", 32, 32 }, E1 },
},
{
{ { "mcl_core:flint", 26, 26 }, E1 },
@ -182,7 +183,7 @@ local professions = {
{ { "mcl_core:emerald", 3, 3 }, { "mcl_bows:crossbow", 1, 1 } },
},
{
{ { "mcl_mobitems:feather", 24, 24 }, E1 },
{ { "mcl_mobitems:string", 24, 24 }, E1 },
{ { "mcl_core:emerald", 7, 21 } , { "mcl_bows:bow_enchanted", 1, 1 } },
},
{
@ -350,7 +351,7 @@ local professions = {
leatherworker = {
name = N("Leatherworker"),
texture = "mobs_mc_villager_leatherworker.png",
jobsite = "group:cauldron",
jobsite = "mcl_cauldrons:cauldron",
trades = {
{
{ { "mcl_mobitems:leather", 9, 12 }, E1 },
@ -1007,15 +1008,7 @@ end
----- JOBSITE LOGIC
local function get_profession_by_jobsite(js)
for k,v in pairs(professions) do
if v.jobsite == js then
return k
-- Catch Nitwit doesn't have a jobsite
elseif v.jobsite and v.jobsite:find("^group:") then
local group = v.jobsite:gsub("^group:", "")
if minetest.get_item_group(js, group) > 0 then
return k
end
end
if v.jobsite == js then return k end
end
end

View File

@ -0,0 +1,11 @@
# MineClone2 Archaeology [mcl_archaeology]
Adds 1.20 archaeology mechanic(s) (brush, suspicious blocks, pottery sherds, decorated pots, trail ruins)
## Credits
* rudzik8 (all code and textures except for what is mentioned below)
* XSSheep (for the textures I've used as a base for my own ones)
* Ex (advice, also `mcl_archaeology_decorated_pot_base.png`, `mcl_archaeology_decorated_pot_side.png` and derevatives)
* chmodsayshello (advice, consultation and some MC showcase)
* Nicu (advice)

View File

@ -0,0 +1,31 @@
local mp = minetest.get_modpath(minetest.get_current_modname())
local S = minetest.get_translator(mp)
mcl_archaeology = {}
mcl_archaeology.pottery_sherds = {
-- name, description
{"angler", S("Angler Pottery Sherd")},
{"archer", S("Archer Pottery Sherd")},
{"arms_up", S("Arms Up Pottery Sherd")},
{"blade", S("Blade Pottery Sherd")},
{"brewer", S("Brewer Pottery Sherd")},
{"burn", S("Burn Pottery Sherd")},
{"danger", S("Danger Pottery Sherd")},
{"explorer", S("Explorer Pottery Sherd")},
{"friend", S("Friend Pottery Sherd")},
{"heart", S("Heart Pottery Sherd")},
{"heartbreak", S("Heartbreak Pottery Sherd")},
{"howl", S("Howl Pottery Sherd")},
{"miner", S("Miner Pottery Sherd")},
{"mourner", S("Mourner Pottery Sherd")},
{"plenty", S("Plenty Pottery Sherd")},
{"prize", S("Prize Pottery Sherd")},
{"sheaf", S("Sheaf Pottery Sherd")},
{"shelter", S("Shelter Pottery Sherd")},
{"skull", S("Skull Pottery Sherd")},
{"snort", S("Snort Pottery Sherd")}
}
dofile(mp.."/items.lua")
dofile(mp.."/nodes.lua")

View File

@ -0,0 +1,33 @@
local S = minetest.get_translator(minetest.get_current_modname())
for _, row in ipairs(mcl_archaeology.pottery_sherds) do
-- assign variable = row[x]
local name = row[1]
local desc = row[2] -- short for "description"
-- register
minetest.register_craftitem("mcl_archaeology:"..name.."_pottery_sherd", {
description = desc,
_doc_items_longdesc = S("A pottery sherd is used to craft Decorated Pots."),
inventory_image = "mcl_archaeology_pottery_sherd_"..name..".png",
groups = { craftitem = 1, pottery_sherd = 1, pottery = 1 }
})
end
minetest.register_craftitem("mcl_archaeology:brush", {
description = S("Brush"),
_doc_items_longdesc = S("A brush can be used to excavate suspicious blocks."),
_tt_help = S("Excavates suspicious blocks"),
inventory_image = "mcl_archaeology_brush.png",
stack_max = 1,
groups = {tool=1},
})
minetest.register_craft({
output = "mcl_archaeology:brush",
recipe = {
{"mcl_mobitems:feather"},
{"mcl_copper:copper_ingot"},
{"mcl_core:stick"}
}
})

View File

@ -0,0 +1,4 @@
name = mcl_archaeology
title = MineClone2 Archaeology
description = Adds 1.20 archaeology mechanic(s) (brush, suspicious blocks, pottery sherds, decorated pots, trail ruins) into the MineClone 2 game
depends = mcl_core

View File

@ -0,0 +1,56 @@
local S = minetest.get_translator(minetest.get_current_modname())
minetest.register_node("mcl_archaeology:suspicious_sand", {
description = S("Suspicious Sand"),
tiles = {"mcl_archaeology_suspicious_sand.png"},
groups = { handy = 1, shovely = 1, falling_node = 1,
dig_by_piston = 1, dig_immediate_piston = 1 },
sounds = mcl_sounds.node_sound_sand_defaults(),
_mcl_blast_resistance = 0.5,
_mcl_hardness = 0.5,
})
minetest.register_node("mcl_archaeology:suspicious_gravel", {
description = S("Suspicious Gravel"),
tiles = {"mcl_archaeology_suspicious_gravel.png"},
groups = { handy = 1, shovely = 1, falling_node = 1,
dig_by_piston = 1, dig_immediate_piston = 1 },
sounds = mcl_sounds.node_sound_gravel_defaults(),
_mcl_blast_resistance = 0.6,
_mcl_hardness = 0.6,
})
minetest.register_node("mcl_archaeology:decorated_pot", {
description = S("Decorated Pot"),
tiles = {
"mcl_archaeology_decorated_pot_top.png",
"mcl_archaeology_decorated_pot_bottom.png",
"mcl_archaeology_decorated_pot_side.png",
"mcl_archaeology_decorated_pot_side.png",
"mcl_archaeology_decorated_pot_side.png",
"mcl_archaeology_decorated_pot_side.png"
},
drawtype = "nodebox",
paramtype = "light",
node_box = {
type = "fixed",
fixed = {
{-0.4375, -0.5, -0.4375, 0.4375, 0.5, 0.4375}, -- base
{-0.1875, 0.5, -0.1875, 0.1875, 0.5625, 0.1875}, -- neck (bottom part)
{-0.25, 0.5625, -0.25, 0.25, 0.6875, 0.25}, -- neck (top part)
}
},
--drops = {},
groups = { handy = 1 },
_mcl_silk_touch_drop = true -- TODO: different sound when breaking with silk touch
})
-- normal, non-pattern recipe
minetest.register_craft({
output = "mcl_archaeology:decorated_pot",
recipe = {
{"", "group:pottery", ""},
{"group:pottery", "", "group:pottery"},
{"", "group:pottery", ""},
}
})

View File

@ -114,7 +114,7 @@ minetest.register_craftitem("mcl_core:brick", {
_doc_items_longdesc = S("Bricks are used to craft brick blocks."),
inventory_image = "default_clay_brick.png",
stack_max = 64,
groups = { craftitem=1 },
groups = { craftitem=1, pottery=1 },
})
minetest.register_craftitem("mcl_core:flint", {

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 200 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 197 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 246 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B