From 342f99f23c66f0a65b0a9956130d216fc768a2d8 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Tue, 24 Feb 2015 22:07:05 +0100 Subject: [PATCH] Fixed homedecor's update, added inventorycheck - Added inventorycheck mod - Fixed ereased table in last commit (homedecor's update) - Fixed all the wrong uses of register_node in mods/maptools/default_nodes.lua to avoid 0.4.12-name-check-system from crashing server. The diff have been sent to Calinou. --- mods/homedecor_modpack/itemframes/init.lua | 1 + mods/inventorycheck/README.md | 1 + mods/inventorycheck/depends.txt | 1 + mods/inventorycheck/init.lua | 35 +++++++++++++++++++++ mods/maptools/.default_nodes.lua.swp | Bin 0 -> 28672 bytes mods/maptools/default_nodes.lua | 8 ++--- 6 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 mods/inventorycheck/README.md create mode 100644 mods/inventorycheck/depends.txt create mode 100644 mods/inventorycheck/init.lua create mode 100644 mods/maptools/.default_nodes.lua.swp diff --git a/mods/homedecor_modpack/itemframes/init.lua b/mods/homedecor_modpack/itemframes/init.lua index 2ffd031b..6b4bd0b7 100644 --- a/mods/homedecor_modpack/itemframes/init.lua +++ b/mods/homedecor_modpack/itemframes/init.lua @@ -1,4 +1,5 @@ local tmp = {} +local itemframes = {} minetest.register_entity("itemframes:item",{ hp_max = 1, diff --git a/mods/inventorycheck/README.md b/mods/inventorycheck/README.md new file mode 100644 index 00000000..723638aa --- /dev/null +++ b/mods/inventorycheck/README.md @@ -0,0 +1 @@ +# inventorycheck diff --git a/mods/inventorycheck/depends.txt b/mods/inventorycheck/depends.txt new file mode 100644 index 00000000..4ad96d51 --- /dev/null +++ b/mods/inventorycheck/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/inventorycheck/init.lua b/mods/inventorycheck/init.lua new file mode 100644 index 00000000..79965e3e --- /dev/null +++ b/mods/inventorycheck/init.lua @@ -0,0 +1,35 @@ +-- Check Inventory + +minetest.register_privilege("inv", "Can use /inv") + +minetest.register_chatcommand("inv", { + params = "", + description = "Shows inventory of ", + func = function(name, param) + if not minetest.check_player_privs(name, {inv=true}) then + return false, "You don't have permission to check inventories" + end + local player = minetest.get_player_by_name(param) + if player == nil then + minetest.chat_send_player(name, param.." is not online right now") + return false + end + local player_inv = player:get_inventory() + local invlist = param.."'s inventory: " + for i=1,player_inv:get_size("main") do + local items = player_inv:get_stack("main", i) + items = items:to_string() + if items ~= "" then + invlist = invlist..items.." | " + end + end + for i=1,player_inv:get_size("craft") do + local items = player_inv:get_stack("craft", i) + items = items:to_string() + if items ~= "" then + invlist = invlist..items.." | " + end + end + minetest.chat_send_player(name, invlist) + end, +}) diff --git a/mods/maptools/.default_nodes.lua.swp b/mods/maptools/.default_nodes.lua.swp new file mode 100644 index 0000000000000000000000000000000000000000..aa5e0938ceff918b15ec920b1817dd0025a2ec68 GIT binary patch literal 28672 zcmeI44~!Jm9mfYn=Iwl%3JYNNGiTLW5~ieRkO2COJXZEOOmsiv)(+J4@fnf-IO9CLSj z!qwT_=XPh_%)B?>_h;t!e!rQ{=4JC2sx#u#6+WL+lu>UVT5_Onh4R!zijwWgb#)se zq5sc9J(JaqPTlT*Gv!9_fKwLRR>szHIn6aJbILr!b*5aI>$Hs&e|l5SFm+dV+~SY4 zWv2^flcU>fb-PJRCUwV|lCx6$)AFumWt}N0J*^e8Zo;%ux)aY9w4;bEz6q~4i;qyyBV^ELa0O0=*?EjBXQ0=#*OqPz?{Apsq5GVHHYlpXL(cnmhfH=qM9hIhuY z4Qz!3Tm%s;1>8 z3^S3WNUpI~=l5FObS=Awt%JC09D&O9Jx#X{u>*Vi^>=O)Fa$h-E=~+D~ zMxsQgB?heZmEGAXm{}vU#!cku<61@|*o=)_yP#8oyhdbNa74M8IAXV!^+vMUYFf)W zV#97j&!!SaPLpF`ab(DA`5wFA$ZBM(;y82EE&C2K<%bG4!jz5Pc}5X87`^))oELi~ z4%J%xB9$5p8k18}Tn0*GyXB&(9NCZG5j?3S-GY;Ft-M!NYOw~7n&J?pSfg&*E=v(g zdaqdj2g-XFE!W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&D=0VeOA`q})AdfbMzz7c9@>Sf4=>+Rjr1pv7zvJ5*A{u#NS)A~ zS>zc`nc;qZue|M4e~PYei}K1;)U13WRLf@5JXq!=EcsBeCMJxAXlN{uPcVjRa$dp0 z2`isj{&d>hAUtS&MVI9bG#BK< z`Gc?%9)mS-0h|x5Fa}=5mfs6c!0oUZgq>gh%>P)H_hHjN0QbPHkb)I34h~?;zY4U55acW0E^%fXo4~D5qAAUa1(5R^>78838#Um+mHPBDVEv) zL+nj+JUd9fLgKyWpW+$eH)%-?B5H1+ArKlT3T)8YUh9hP)p=rCf3p3 zO>#`Ns^#RxoY2poj+BXt9FaLaHJwXbD2}LlQ;D+TL)~GPl_T73<}qzkH5F{2QhAws zD#>s@(ftNuB=>8GJ5Fx{9(%nxK7FHS_}9|Bu6V0Z=~W|B$uK629VS|Yl~YO)3B{L? z)b)G!??nbzyg;S=^(p)g-lWp1o~Poh?o614oO&*+r+SHU&Z6(zRO;kAmx^yvsR&~e zNuFlaMM*_a#jr-Y5MU!735c~EaZ^h4t7}~n;n4bFU{t%DoVrVpcM9d`SCK{R-7{FJsQ-aUj?17 J)UAU4^FQAz2Ymnl literal 0 HcmV?d00001 diff --git a/mods/maptools/default_nodes.lua b/mods/maptools/default_nodes.lua index e140aab5..9ae49706 100644 --- a/mods/maptools/default_nodes.lua +++ b/mods/maptools/default_nodes.lua @@ -390,7 +390,7 @@ minetest.register_node("maptools:desert_sand_soil_wet", { -- Fence: -minetest.register_node("default:fence_wood", { +minetest.register_node(":default:fence_wood", { description = S("Unbreakable Wooden Fence"), range = 12, stack_max = 10000, @@ -401,7 +401,7 @@ minetest.register_node("default:fence_wood", { }) -- carts: -minetest.register_node("carts:rail_copper", { +minetest.register_node(":carts:rail_copper", { description = "Unbreakable Copper Rail", drawtype = "raillike", tiles = {"carts_rail_copper.png", "carts_rail_copper_curved.png", "carts_rail_copper_t_junction.png", "carts_rail_copper_crossing.png"}, @@ -436,7 +436,7 @@ minetest.register_node("carts:rail_copper", { }, }) -minetest.register_node("carts:rail_power", { +minetest.register_node(":carts:rail_power", { description = "Unbreakable Powered Rail", drawtype = "raillike", tiles = {"carts_rail_pwr.png", "carts_rail_curved_pwr.png", "carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"}, @@ -469,4 +469,4 @@ minetest.register_node("carts:rail_power", { end, }, }, -}) \ No newline at end of file +})