wip
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
-- Import ------------------------------------------------------------------------------------------
|
||||
|
||||
local jvmi = _G.jvmi
|
||||
|
||||
|
||||
-- Private -----------------------------------------------------------------------------------------
|
||||
|
||||
local C = {}
|
||||
@@ -20,6 +25,13 @@ C.DRAW_TYPE = {
|
||||
PLANT_LIKE = "plantlike",
|
||||
}
|
||||
|
||||
C.DIGABILITY = {
|
||||
IMPOSSIBLE = 0,
|
||||
HARD = 1,
|
||||
MEDIUM = 2,
|
||||
EASY = 3,
|
||||
}
|
||||
|
||||
C.LIQUID_TYPE = {
|
||||
NONE = "none",
|
||||
SOURCE = "source",
|
||||
@@ -32,6 +44,13 @@ C.TEXTURE_ALPHA = {
|
||||
BLEND = "blend",
|
||||
}
|
||||
|
||||
C.TOOL_LEVEL = {
|
||||
BASIC = 0,
|
||||
WEAK = 1,
|
||||
MEDIUM = 2,
|
||||
STRONG = 3,
|
||||
}
|
||||
|
||||
C.VISCOSITY = {
|
||||
XXX_FAST = 0,
|
||||
XX_FAST = 1,
|
||||
@@ -111,6 +130,6 @@ C.TERRAIN_TYPES = {
|
||||
}
|
||||
|
||||
|
||||
-- Export ------------------------------------------------------------------------------------------
|
||||
-- Public ------------------------------------------------------------------------------------------
|
||||
|
||||
_G.jvmi.C = C
|
||||
jvmi.C = C
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
local core = _G.core
|
||||
local jvmi = _G.jvmi
|
||||
|
||||
local C = jvmi.C
|
||||
local S = jvmi.mods.nodes.S
|
||||
|
||||
|
||||
@@ -11,6 +12,7 @@ local S = jvmi.mods.nodes.S
|
||||
core.register_node("jvmi_nodes:clay", {
|
||||
description = S("Clay"),
|
||||
drop = "jvmi_nodes:clay",
|
||||
groups = { crumbly = C.DIGABILITY.EASY },
|
||||
is_ground_content = true,
|
||||
sounds = { footstep = "jvmi_nodes_clay_footstep" },
|
||||
tiles = {"jvmi_nodes_clay.png"},
|
||||
@@ -19,6 +21,7 @@ core.register_node("jvmi_nodes:clay", {
|
||||
core.register_node("jvmi_nodes:dirt", {
|
||||
description = S("Dirt"),
|
||||
drop = "jvmi_nodes:dirt",
|
||||
groups = { crumbly = C.DIGABILITY.EASY },
|
||||
is_ground_content = true,
|
||||
sounds = { footstep = "jvmi_nodes_dirt_footstep" },
|
||||
tiles = {"jvmi_nodes_dirt.png"},
|
||||
@@ -27,6 +30,7 @@ core.register_node("jvmi_nodes:dirt", {
|
||||
core.register_node("jvmi_nodes:gravel", {
|
||||
description = S("Gravel"),
|
||||
drop = "jvmi_nodes:gravel",
|
||||
groups = { crumbly = C.DIGABILITY.EASY },
|
||||
is_ground_content = true,
|
||||
sounds = { footstep = "jvmi_nodes_gravel_footstep" },
|
||||
tiles = {"jvmi_nodes_gravel.png"},
|
||||
@@ -35,6 +39,7 @@ core.register_node("jvmi_nodes:gravel", {
|
||||
core.register_node("jvmi_nodes:sand", {
|
||||
description = S("Sand"),
|
||||
drop = "jvmi_nodes:sand",
|
||||
groups = { crumbly = C.DIGABILITY.EASY },
|
||||
is_ground_content = true,
|
||||
sounds = { footstep = "jvmi_nodes_sand_footstep" },
|
||||
tiles = {"jvmi_nodes_sand.png"},
|
||||
@@ -43,6 +48,7 @@ core.register_node("jvmi_nodes:sand", {
|
||||
core.register_node("jvmi_nodes:turf", {
|
||||
description = S("Turf"),
|
||||
drop = "jvmi_nodes:turf",
|
||||
groups = { crumbly = C.DIGABILITY.EASY },
|
||||
is_ground_content = true,
|
||||
sounds = { footstep = "jvmi_nodes_turf_footstep" },
|
||||
tiles = {"jvmi_nodes_turf.png"},
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
local core = _G.core
|
||||
local jvmi = _G.jvmi
|
||||
|
||||
local C = jvmi.C
|
||||
local S = jvmi.mods.nodes.S
|
||||
|
||||
|
||||
@@ -11,6 +12,7 @@ local S = jvmi.mods.nodes.S
|
||||
core.register_node("jvmi_nodes:bedrock", {
|
||||
description = S("Bedrock"),
|
||||
drop = "",
|
||||
groups = { cracky = C.DIGABILITY.IMPOSSIBLE },
|
||||
is_ground_content = false,
|
||||
sounds = { footstep = "jvmi_nodes_stone_footstep" },
|
||||
tiles = {"jvmi_nodes_bedrock.png"},
|
||||
@@ -20,6 +22,7 @@ core.register_alias("mapgen_bedrock", "jvmi_nodes:bedrock")
|
||||
core.register_node("jvmi_nodes:stone", {
|
||||
description = S("Stone"),
|
||||
drop = "jvmi_nodes:stone",
|
||||
groups = { cracky = C.DIGABILITY.EASY },
|
||||
sounds = { footstep = "jvmi_nodes_stone_footstep" },
|
||||
tiles = {"jvmi_nodes_stone.png"},
|
||||
})
|
||||
|
||||
@@ -29,6 +29,20 @@ local SINGLEPLAYER_PRIVS = {
|
||||
--[[ Configure the player's hand with default settings for this game. ]]--
|
||||
function private.configure_hand()
|
||||
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))
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user