This commit is contained in:
Andrew Miner
2026-10-30 22:13:20 -06:00
parent a1ee82308c
commit 2b2e29a4fd
4 changed files with 44 additions and 2 deletions
+21 -2
View File
@@ -1,3 +1,8 @@
-- Import ------------------------------------------------------------------------------------------
local jvmi = _G.jvmi
-- Private ----------------------------------------------------------------------------------------- -- Private -----------------------------------------------------------------------------------------
local C = {} local C = {}
@@ -20,6 +25,13 @@ C.DRAW_TYPE = {
PLANT_LIKE = "plantlike", PLANT_LIKE = "plantlike",
} }
C.DIGABILITY = {
IMPOSSIBLE = 0,
HARD = 1,
MEDIUM = 2,
EASY = 3,
}
C.LIQUID_TYPE = { C.LIQUID_TYPE = {
NONE = "none", NONE = "none",
SOURCE = "source", SOURCE = "source",
@@ -32,6 +44,13 @@ C.TEXTURE_ALPHA = {
BLEND = "blend", BLEND = "blend",
} }
C.TOOL_LEVEL = {
BASIC = 0,
WEAK = 1,
MEDIUM = 2,
STRONG = 3,
}
C.VISCOSITY = { C.VISCOSITY = {
XXX_FAST = 0, XXX_FAST = 0,
XX_FAST = 1, XX_FAST = 1,
@@ -111,6 +130,6 @@ C.TERRAIN_TYPES = {
} }
-- Export ------------------------------------------------------------------------------------------ -- Public ------------------------------------------------------------------------------------------
_G.jvmi.C = C jvmi.C = C
+6
View File
@@ -3,6 +3,7 @@
local core = _G.core local core = _G.core
local jvmi = _G.jvmi local jvmi = _G.jvmi
local C = jvmi.C
local S = jvmi.mods.nodes.S local S = jvmi.mods.nodes.S
@@ -11,6 +12,7 @@ local S = jvmi.mods.nodes.S
core.register_node("jvmi_nodes:clay", { core.register_node("jvmi_nodes:clay", {
description = S("Clay"), description = S("Clay"),
drop = "jvmi_nodes:clay", drop = "jvmi_nodes:clay",
groups = { crumbly = C.DIGABILITY.EASY },
is_ground_content = true, is_ground_content = true,
sounds = { footstep = "jvmi_nodes_clay_footstep" }, sounds = { footstep = "jvmi_nodes_clay_footstep" },
tiles = {"jvmi_nodes_clay.png"}, tiles = {"jvmi_nodes_clay.png"},
@@ -19,6 +21,7 @@ core.register_node("jvmi_nodes:clay", {
core.register_node("jvmi_nodes:dirt", { core.register_node("jvmi_nodes:dirt", {
description = S("Dirt"), description = S("Dirt"),
drop = "jvmi_nodes:dirt", drop = "jvmi_nodes:dirt",
groups = { crumbly = C.DIGABILITY.EASY },
is_ground_content = true, is_ground_content = true,
sounds = { footstep = "jvmi_nodes_dirt_footstep" }, sounds = { footstep = "jvmi_nodes_dirt_footstep" },
tiles = {"jvmi_nodes_dirt.png"}, tiles = {"jvmi_nodes_dirt.png"},
@@ -27,6 +30,7 @@ core.register_node("jvmi_nodes:dirt", {
core.register_node("jvmi_nodes:gravel", { core.register_node("jvmi_nodes:gravel", {
description = S("Gravel"), description = S("Gravel"),
drop = "jvmi_nodes:gravel", drop = "jvmi_nodes:gravel",
groups = { crumbly = C.DIGABILITY.EASY },
is_ground_content = true, is_ground_content = true,
sounds = { footstep = "jvmi_nodes_gravel_footstep" }, sounds = { footstep = "jvmi_nodes_gravel_footstep" },
tiles = {"jvmi_nodes_gravel.png"}, tiles = {"jvmi_nodes_gravel.png"},
@@ -35,6 +39,7 @@ core.register_node("jvmi_nodes:gravel", {
core.register_node("jvmi_nodes:sand", { core.register_node("jvmi_nodes:sand", {
description = S("Sand"), description = S("Sand"),
drop = "jvmi_nodes:sand", drop = "jvmi_nodes:sand",
groups = { crumbly = C.DIGABILITY.EASY },
is_ground_content = true, is_ground_content = true,
sounds = { footstep = "jvmi_nodes_sand_footstep" }, sounds = { footstep = "jvmi_nodes_sand_footstep" },
tiles = {"jvmi_nodes_sand.png"}, tiles = {"jvmi_nodes_sand.png"},
@@ -43,6 +48,7 @@ core.register_node("jvmi_nodes:sand", {
core.register_node("jvmi_nodes:turf", { core.register_node("jvmi_nodes:turf", {
description = S("Turf"), description = S("Turf"),
drop = "jvmi_nodes:turf", drop = "jvmi_nodes:turf",
groups = { crumbly = C.DIGABILITY.EASY },
is_ground_content = true, is_ground_content = true,
sounds = { footstep = "jvmi_nodes_turf_footstep" }, sounds = { footstep = "jvmi_nodes_turf_footstep" },
tiles = {"jvmi_nodes_turf.png"}, tiles = {"jvmi_nodes_turf.png"},
+3
View File
@@ -3,6 +3,7 @@
local core = _G.core local core = _G.core
local jvmi = _G.jvmi local jvmi = _G.jvmi
local C = jvmi.C
local S = jvmi.mods.nodes.S local S = jvmi.mods.nodes.S
@@ -11,6 +12,7 @@ local S = jvmi.mods.nodes.S
core.register_node("jvmi_nodes:bedrock", { core.register_node("jvmi_nodes:bedrock", {
description = S("Bedrock"), description = S("Bedrock"),
drop = "", drop = "",
groups = { cracky = C.DIGABILITY.IMPOSSIBLE },
is_ground_content = false, is_ground_content = false,
sounds = { footstep = "jvmi_nodes_stone_footstep" }, sounds = { footstep = "jvmi_nodes_stone_footstep" },
tiles = {"jvmi_nodes_bedrock.png"}, tiles = {"jvmi_nodes_bedrock.png"},
@@ -20,6 +22,7 @@ core.register_alias("mapgen_bedrock", "jvmi_nodes:bedrock")
core.register_node("jvmi_nodes:stone", { core.register_node("jvmi_nodes:stone", {
description = S("Stone"), description = S("Stone"),
drop = "jvmi_nodes:stone", drop = "jvmi_nodes:stone",
groups = { cracky = C.DIGABILITY.EASY },
sounds = { footstep = "jvmi_nodes_stone_footstep" }, sounds = { footstep = "jvmi_nodes_stone_footstep" },
tiles = {"jvmi_nodes_stone.png"}, tiles = {"jvmi_nodes_stone.png"},
}) })
+14
View File
@@ -29,6 +29,20 @@ local SINGLEPLAYER_PRIVS = {
--[[ Configure the player's hand with default settings for this game. ]]-- --[[ Configure the player's hand with default settings for this game. ]]--
function private.configure_hand() function private.configure_hand()
local hand_def = core.registered_items[""] local hand_def = core.registered_items[""]
local groupcap = {
maxlevel = C.TOOL_LEVEL.STRONG,
times = { [1] = 0.15, [2] = 0.15, [3] = 0.15 },
}
core.override_item("", {
tool_capabilities = {
full_punch_interval = 1.0,
groupcaps = {
crumbly = groupcap,
cracky = groupcap,
choppy = groupcap,
},
}
})
core.debug("hand: "..jvmi.dump(hand_def)) core.debug("hand: "..jvmi.dump(hand_def))
end end