From 46e60a23488283299bd0b9569324cbf61068d0a9 Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Fri, 6 Aug 2021 23:39:39 -0400 Subject: [PATCH] Graveled adze, new path to wood tech Get rid of the intuitive leap necessary to climb a tree to make planks. Instead, a wooden adze can be gravel-tipped (adzes are now represented in all tiers) and can chop tree trunks. The graveled adze is as powerful as a wooden hatchet and spade combined, in terms of diggability, but it breaks after a SINGLE use. It doesn't consume the gravel it's made from, but reapplying the tip each use is a lot of extra process. --- docs/ideas.txt | 7 ---- docs/issues-game.txt | 14 +------ mods/nc_api/item_tool_break.lua | 1 + mods/nc_stonework/adze.lua | 38 ++++++++++++++++++ mods/nc_stonework/hints.lua | 5 +++ mods/nc_stonework/init.lua | 1 + .../textures/nc_stonework_tip_adze.png | Bin 0 -> 85 bytes 7 files changed, 46 insertions(+), 20 deletions(-) create mode 100644 mods/nc_stonework/adze.lua create mode 100644 mods/nc_stonework/textures/nc_stonework_tip_adze.png diff --git a/docs/ideas.txt b/docs/ideas.txt index 981ea4b0..2ec6d073 100644 --- a/docs/ideas.txt +++ b/docs/ideas.txt @@ -9,13 +9,6 @@ IDEAS: Possible future additions/improvements to the game # # # # # # # # # # # # #### # #### # ###### ###### # # #### -- Alternative path to wood tech. - - Get around the "climb a tree and chop from the top" - counterintuitive leap. - - Use gravel to stone-tip an adze, giving it choppy=2 - - Make stone adze break really fast if used to cut a tree - (modify durability? post-dig hook?) - - Lenses in inventory react to nearby light. - Shine if facing an active lens within range. - Cast a distant flashlight beam if carrying a source (e.g. torch)? diff --git a/docs/issues-game.txt b/docs/issues-game.txt index f8a90ad3..bf09c164 100644 --- a/docs/issues-game.txt +++ b/docs/issues-game.txt @@ -46,19 +46,7 @@ ISSUES-GAME: Gameplay-affecting issues down to regular cobble, but it only works with the base node, not the etched ones. -- YCTIWY/Pickpocketing integration/overhaul. - - Protect items from being taken if: - - Player was non-idle within a certain amount of time - - Player is offline but was last on within certain time - - Player has a certain priv - - Display a "ghost" player entity for offline players - - Include a priv to prevent. - - Overlay a texture modifier to make them an outline. - - Make wield use an API to access players to allow virtual - players with virtual inventories. - - Disable pickpocket taking w/ sneak. - - Don't get into the weeds of trying to optimize for the "tons of - players" case until we have evidence it's a real issue. +- Integrate YCTIWY into base game - Rakes don't work with door press. diff --git a/mods/nc_api/item_tool_break.lua b/mods/nc_api/item_tool_break.lua index 024c5184..d006f84a 100644 --- a/mods/nc_api/item_tool_break.lua +++ b/mods/nc_api/item_tool_break.lua @@ -10,6 +10,7 @@ local function breakfx(who, def) end return nodecore.toolbreakparticles(who, def, 40) end +nodecore.toolbreakeffects = breakfx nodecore.register_on_register_item(function(_, def) if def.tool_wears_to or def.type == "tool" then diff --git a/mods/nc_stonework/adze.lua b/mods/nc_stonework/adze.lua new file mode 100644 index 00000000..f4900aba --- /dev/null +++ b/mods/nc_stonework/adze.lua @@ -0,0 +1,38 @@ +-- LUALOCALS < --------------------------------------------------------- +local ItemStack, minetest, nodecore + = ItemStack, minetest, nodecore +-- LUALOCALS > --------------------------------------------------------- + +local modname = minetest.get_current_modname() + +local adzedef +adzedef = { + description = "Graveled Adze", + inventory_image = "nc_woodwork_adze.png^" .. modname .. "_tip_adze.png", + groups = { + firestick = 2, + flammable = 2 + }, + tool_capabilities = nodecore.toolcaps({ + choppy = 2, + crumbly = 2 + }), + sounds = nodecore.sounds("nc_tree_sticky"), + after_use = function(_, who) + nodecore.toolbreakeffects(who, adzedef) + return ItemStack("nc_woodwork:adze") + end +} +minetest.register_tool(modname .. ":adze", adzedef) + +nodecore.register_craft({ + label = "assemble graveled adze", + indexkeys = {"group:gravel"}, + nodes = { + {match = {groups = {gravel = true}}}, + {y = -1, match = "nc_woodwork:adze", replace = "air"}, + }, + items = { + {name = modname .. ":adze"} + } + }) diff --git a/mods/nc_stonework/hints.lua b/mods/nc_stonework/hints.lua index 597f0564..58646122 100644 --- a/mods/nc_stonework/hints.lua +++ b/mods/nc_stonework/hints.lua @@ -3,6 +3,11 @@ local nodecore = nodecore -- LUALOCALS > --------------------------------------------------------- +nodecore.register_hint("put a gravel edge on a wooden adze", + "assemble graveled adze", + {"inv:group:gravel", "nc_woodwork:adze"} +) + nodecore.register_hint("break cobble into chips", "break cobble to chips", "nc_terrain:cobble_loose" diff --git a/mods/nc_stonework/init.lua b/mods/nc_stonework/init.lua index df998af0..88c8d11f 100644 --- a/mods/nc_stonework/init.lua +++ b/mods/nc_stonework/init.lua @@ -5,6 +5,7 @@ local include, nodecore nodecore.amcoremod() +include("adze") include("chip") include("tools") include("bricks") diff --git a/mods/nc_stonework/textures/nc_stonework_tip_adze.png b/mods/nc_stonework/textures/nc_stonework_tip_adze.png new file mode 100644 index 0000000000000000000000000000000000000000..27f694104928a498b5b6de2d392806bebdc4e7dc GIT binary patch literal 85 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!60wlNoGJgf6WISCQLn>}1FHqa?