From 2e5fa28342497ef461c08aa426edf4fc56812c81 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Fri, 18 May 2018 02:50:56 +0200 Subject: [PATCH] Add tool to conveniently access the treeform --- init.lua | 33 ++++++++++++++++++++++----------- textures/ltool_tool.png | Bin 0 -> 153 bytes 2 files changed, 22 insertions(+), 11 deletions(-) create mode 100644 textures/ltool_tool.png diff --git a/init.lua b/init.lua index 469d000..08a49f8 100644 --- a/init.lua +++ b/init.lua @@ -95,6 +95,17 @@ minetest.register_node("ltool:sapling", { end, }) +minetest.register_craftitem("ltool:tool", { + description = "L-System Tree Utility", + _doc_items_longdesc = "This gadget allows the aspiring genetic engineer to invent and change L-system trees, create L-system tree saplings and look at the inventions from other players.", + _doc_items_usagehelp = "Punch to open the L-System editor. A tabbed form will open. To edit and create trees, you need the “ledit” privilege, to make saplings, you need “lplant”. Detailed usage help can be found in that menu. You can also access the same editor with the server command “treeform”.", + inventory_image = "ltool_tool.png", + wield_image = "ltool_tool.png", + on_use = function(itemstack, user, pointed_thing) + ltool.show_treeform(user:get_player_name()) + end, +}) + --[[ Register privileges ]] minetest.register_privilege("ledit", { description = "Can add, edit, rename and delete own L-system tree definitions of the ltool mod", @@ -501,15 +512,15 @@ function ltool.tab_help_intro() "tablecolumns[text]".. "tableoptions[background=#000000;highlight=#000000;border=false]".. "table[-0.15,0.75;12,7;help_intro;".. - string.format("You are using the L-System Tree Utility mod version %s.,", ltool.VERSION.STRING).. + string.format("You are using the L-System Tree Utility, version %s.,", ltool.VERSION.STRING).. ",".. - "The purpose of this mod is to aid with the creation of L-system trees.,".. - "With this mod you can create\\, save\\, manage and plant L-system trees.,".. + "The purpose of this utility is to aid with the creation of L-system trees.,".. + "You can create\\, save\\, manage and plant L-system trees.,".. "All trees are saved into /ltool.mt on server shutdown.,".. - "This mod assumes you already understand the concept of L-systems\\;,".. - "this mod is mainly aimed towards modders.,".. + "It assumes you already understand the concept of L-systems\\;,".. + "this is mainly aimed towards modders.,".. ",".. - "The usual workflow in this mod goes like this:,".. + "The usual workflow goes like this:,".. ",".. "1. Create a new tree in the \"Edit\" tab and save it,".. "2. Select it in the database,".. @@ -539,11 +550,11 @@ function ltool.tab_help_database() "tablecolumns[text]".. "tableoptions[background=#000000;highlight=#000000;border=false]".. "table[-0.15,0.75;12,8;help_database;".. - "The database contains a server-wide list of all created trees.,".. - "Each tree has an \"owner\". In this mod\\, the concept of ownership is a very,".. - "weak one: The owner may rename\\, change and delete his/her own trees\\,,".. - "everyone else is prevented from doing that. In contrast\\, all trees can be,".. - "copied freely\\;,".. + "The database contains a list of all created trees among all players.,".. + "Each tree has an \"owner\". This kind of ownership is limited:,".. + "The owner may rename\\, change and delete their own trees\\,,".. + "everyone else is prevented from doing that. But all trees can be,".. + "copied freely by everyone\\;,".. "To do so\\, simply hit \"Copy tree to editor\"\\, change the name and hit,".. "\"Save tree to database\". If you like someone else's tree definition\\,,".. "it is recommended to make a copy for yourself\\, since the original owner,".. diff --git a/textures/ltool_tool.png b/textures/ltool_tool.png new file mode 100644 index 0000000000000000000000000000000000000000..d13f5f69239bbea281e4904e9845efaf391017e7 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!73?$#)eFPE^3h)VWUDIsRm7!L9!>a70)y`V8 z%q>P%%!}UuWt}`-978G?lN*@b92p%I1QHTLgapb2OC6JEbhI@{aF{OAbJEM`5l|Fe xAtl(s!OZMpIH6@lV33o+fiA~ojaLpZFz|SCb$N50JPS09!PC{xWt~$(6958rE0zEN literal 0 HcmV?d00001