From 971dc826489908f7c5212e479430bf3293685e2f Mon Sep 17 00:00:00 2001 From: Migdyn Date: Sun, 27 Nov 2022 14:08:38 -0500 Subject: [PATCH] Finalize for release 0.5 --- mods/ip_cops/init.lua | 3 +- mods/ip_destruction_counter/init.lua | 11 +- .../textures/extinguisher_shot.png | Bin 314 -> 6776 bytes mods/ip_help/init.lua | 9 + mods/ip_help/mod.conf | 3 + mods/ip_people/init.lua | 1 + mods/ip_roads/infrastructure/nodes.lua | 19 +- mods/ip_soviet/init.lua | 37 +--- mods/ip_story/init.lua | 7 +- mods/ip_waterworks/nodes.lua | 14 +- mods/sfinv/README.txt | 18 ++ mods/sfinv/api.lua | 189 ++++++++++++++++++ mods/sfinv/init.lua | 20 ++ mods/sfinv/license.txt | 59 ++++++ mods/sfinv/locale/sfinv.de.tr | 2 + mods/sfinv/locale/sfinv.eo.tr | 2 + mods/sfinv/locale/sfinv.es.tr | 2 + mods/sfinv/locale/sfinv.fr.tr | 2 + mods/sfinv/locale/sfinv.id.tr | 2 + mods/sfinv/locale/sfinv.it.tr | 2 + mods/sfinv/locale/sfinv.ja.tr | 2 + mods/sfinv/locale/sfinv.jbo.tr | 2 + mods/sfinv/locale/sfinv.ms.tr | 2 + mods/sfinv/locale/sfinv.pl.tr | 2 + mods/sfinv/locale/sfinv.pt_BR.tr | 2 + mods/sfinv/locale/sfinv.ru.tr | 2 + mods/sfinv/locale/sfinv.sk.tr | 2 + mods/sfinv/locale/sfinv.sv.tr | 2 + mods/sfinv/locale/sfinv.uk.tr | 2 + mods/sfinv/locale/sfinv.zh_CN.tr | 2 + mods/sfinv/locale/sfinv.zh_TW.tr | 2 + mods/sfinv/locale/template.txt | 2 + mods/sfinv/mod.conf | 2 + mods/sfinv/textures/sfinv_crafting_arrow.png | Bin 0 -> 188 bytes 34 files changed, 379 insertions(+), 49 deletions(-) create mode 100644 mods/ip_help/init.lua create mode 100644 mods/ip_help/mod.conf create mode 100644 mods/sfinv/README.txt create mode 100644 mods/sfinv/api.lua create mode 100644 mods/sfinv/init.lua create mode 100644 mods/sfinv/license.txt create mode 100644 mods/sfinv/locale/sfinv.de.tr create mode 100644 mods/sfinv/locale/sfinv.eo.tr create mode 100644 mods/sfinv/locale/sfinv.es.tr create mode 100644 mods/sfinv/locale/sfinv.fr.tr create mode 100644 mods/sfinv/locale/sfinv.id.tr create mode 100644 mods/sfinv/locale/sfinv.it.tr create mode 100644 mods/sfinv/locale/sfinv.ja.tr create mode 100644 mods/sfinv/locale/sfinv.jbo.tr create mode 100644 mods/sfinv/locale/sfinv.ms.tr create mode 100644 mods/sfinv/locale/sfinv.pl.tr create mode 100644 mods/sfinv/locale/sfinv.pt_BR.tr create mode 100644 mods/sfinv/locale/sfinv.ru.tr create mode 100644 mods/sfinv/locale/sfinv.sk.tr create mode 100644 mods/sfinv/locale/sfinv.sv.tr create mode 100644 mods/sfinv/locale/sfinv.uk.tr create mode 100644 mods/sfinv/locale/sfinv.zh_CN.tr create mode 100644 mods/sfinv/locale/sfinv.zh_TW.tr create mode 100644 mods/sfinv/locale/template.txt create mode 100644 mods/sfinv/mod.conf create mode 100644 mods/sfinv/textures/sfinv_crafting_arrow.png diff --git a/mods/ip_cops/init.lua b/mods/ip_cops/init.lua index e9287c9..01f86d7 100644 --- a/mods/ip_cops/init.lua +++ b/mods/ip_cops/init.lua @@ -80,7 +80,7 @@ minetest.register_abm({ interval = 40, chance = 140, action = function(pos, node, active_object_count, active_object_count_wider) - if cops.copsSpawned < 20 then + if cops.copsSpawned < 25 then newPos = {x = pos.x, y = pos.y + 2, z = pos.z} local i = math.random(0, 7) if i < 2 then @@ -280,4 +280,5 @@ onCopDie = function(self, pos) minetest.set_node(pos, {name = "literal_trash:bloodstain", param2 = 1}) destruction_counter.pigsKilled = destruction_counter.pigsKilled + 1 cops.copsSpawned = cops.copsSpawned - 1 + destruction_counter.updateCounter() end diff --git a/mods/ip_destruction_counter/init.lua b/mods/ip_destruction_counter/init.lua index 9b3c24e..04e1933 100644 --- a/mods/ip_destruction_counter/init.lua +++ b/mods/ip_destruction_counter/init.lua @@ -50,14 +50,17 @@ end) function destruction_counter.updateCounter(player) if not player then - return + player = minetest.get_player_by_name("singleplayer") end local totalDestruction = destruction_counter.nodesDestroyed + destruction_counter.pigsKilled * 20 + destruction_counter.peopleKilled * 10 + math.floor(nodesDestroyedByHand / 10) - local percentage = (totalDestruction / 1000 * 4) - if percentage > 100 then - percentage = 100 + local percentage = (totalDestruction / 2000 * 4) + if percentage > 4 then + percentage = 4 end + + + player:hud_change(idText, "text", "Destruction meter: " .. totalDestruction) player:hud_change(idMeter, "scale", {x = percentage, y = 4}) end diff --git a/mods/ip_extinguisher/textures/extinguisher_shot.png b/mods/ip_extinguisher/textures/extinguisher_shot.png index c1d03f307ea89ca33d0896e0d783b98972ba68bb..ae7721ebf9cef96cfb3881ccc47f2e3a057a1181 100644 GIT binary patch literal 6776 zcmV-;8i(bHP)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2j&YK z5g{hOck1Z?02%m6L_t(|+U=YBa~xN8-#@qCeP=KO%-{_W1YZzEQlhL~?QZRs9lKJF z9j_~YY4TIbu`4dGvrZx@qC~w&iXsURZ(uOM4CZzF-8VmUa{!2Gqkfr1M{^39U7v@)&_}QQQ zQv5&ZfYE4lwvw*PNB{I2e(|e6N2CgXK`&&Y?vdt--a*3u`s_pg>OcJZv*)9XcwzYPFrYf`<2aHukIB;%TM7gQs&8Uh zF;coH6^)6BcI|@TwJBJFQ|RCj_QbzFylr+}$RV-i7yk z*Lcs9^gAca&s@5ge*ZTk;L+w&eR*aP2ml{|2T#A@?%i8tO5?dcVH99H7D=4G96`!r zrYQ)NMvD}LL~2kdGTY>2XA^{hU#mf;nW)x~QWA!Wk3Rl{h1peBR%grQOR?=5{lO4l zN-C}?{*OmM9=&*^F#gdOkGON=Z8B9XNEii#aX2>Kv`hk-BW(+SgZ(X3kYHDe`)v!3 zg5%=vAZF$24QjP1Osm3#oagIDkNEP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-}fOoP4c zXDqE;M@o%Sg2AZEM5O>H-;?a_?9iNP{^&`MMkB3GN65)ai5&^PKlv~ATf;wGf4KfX ay8bt<lw)>*VL@>F4C-=;-L^=;P|+>*wp~>E!9@ z>Fes}>gww4>gwz3>+0?8?(FaF?d|OD@9ysI@9*#I@bmHU@$&NW^Yioa_44rc@%8oa z_4W1k_V)Pr`276*{r&y_|NmxMBK z0I;}Qx5ctL>Z;=ZACv$90BQi>@qBlp03g0UB>{k0AG@ZD1i&^50EqSw3jozMavr?^ zHd&;a&gTr!4yF|Vaude&a7hB-uv&AB3&5>3d&C5An$zC_00000{*S>1Mf4FDfB*mh M07*qoM6N<$f^yuf`~Uy| diff --git a/mods/ip_help/init.lua b/mods/ip_help/init.lua new file mode 100644 index 0000000..2174336 --- /dev/null +++ b/mods/ip_help/init.lua @@ -0,0 +1,9 @@ +sfinv.register_page("ip_help:how_to_play", { + title = "How to Play", + get = function(self, player, context) + return sfinv.make_formspec(player, context, [[ + bgcolor[#3A41EA] + hypertext[.1, .5; 5, 12;;Here's how to play:The goal is to destroy as much stuff as you can. You can use pipebombs, firebombs (molotov cocktails), your fist, or even the batons that some cops drop upon death. You can craft molotov cocktails by surrounding a jerrycan with empty beer bottles. You get points by killing police officers, regular people, and destroying buildings.] + ]], true) + end +}) \ No newline at end of file diff --git a/mods/ip_help/mod.conf b/mods/ip_help/mod.conf new file mode 100644 index 0000000..9db3cd7 --- /dev/null +++ b/mods/ip_help/mod.conf @@ -0,0 +1,3 @@ +title = Insane Protestor Help +name = ip_help +depends = sfinv \ No newline at end of file diff --git a/mods/ip_people/init.lua b/mods/ip_people/init.lua index f163b62..675bba2 100644 --- a/mods/ip_people/init.lua +++ b/mods/ip_people/init.lua @@ -142,4 +142,5 @@ mobs:register_mob(":people:male", { onPersonDie = function(self, pos) minetest.set_node(pos, {name = "literal_trash:bloodstain", param2 = 1}) destruction_counter.peopleKilled = destruction_counter.peopleKilled + 1 + destruction_counter.updateCounter() end diff --git a/mods/ip_roads/infrastructure/nodes.lua b/mods/ip_roads/infrastructure/nodes.lua index 8427553..b0d6658 100644 --- a/mods/ip_roads/infrastructure/nodes.lua +++ b/mods/ip_roads/infrastructure/nodes.lua @@ -205,7 +205,7 @@ tiles = {"infrastructure_truss.png"}, drawtype = "nodebox", paramtype = "light", - groups = {cracky = 2}, + groups = {cracky = 3, falling_node = 1}, node_box = { type = "fixed", fixed = { @@ -248,7 +248,7 @@ drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - groups = {cracky = 2}, + groups = {cracky = 4}, node_box = { type = "fixed", fixed = { @@ -281,7 +281,7 @@ drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - groups = {cracky = 2}, + groups = {cracky = 3}, node_box = { type = "fixed", fixed = {-1/2, -1/2, -1/2, 0, -3/8, 1/2} @@ -355,7 +355,7 @@ description = "Riffled Sheet", tiles = {"infrastructure_riffled_sheet.png"}, is_ground_content = false, - groups = {cracky = 2}, + groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), paramtype2 = "wallmounted", drawtype = "nodebox", @@ -374,9 +374,16 @@ tiles = {"infrastructure_corrugated_sheet.png"}, inventory_image = "infrastructure_corrugated_sheet.png", wield_image = "infrastructure_corrugated_sheet.png", - drawtype = "raillike", + groups = {cracky = 3, oddly_breakable_by_hand = 1}, + paramtype2 = "wallmounted", + drawtype = "nodebox", paramtype = "light", - groups = {cracky = 2, oddly_breakable_by_hand = 1}, + node_box = { + type = "wallmounted", + fixed = { + {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, + } + } }) -- **************************************************************************************************** ADVANCED ITEMS diff --git a/mods/ip_soviet/init.lua b/mods/ip_soviet/init.lua index 4a9be05..2efdba2 100644 --- a/mods/ip_soviet/init.lua +++ b/mods/ip_soviet/init.lua @@ -40,7 +40,7 @@ minetest.register_node(":soviet:concrete", { stairs.register_stair_and_slab( "concrete", "soviet:concrete", - {cracky = 2}, + {cracky = 3}, {"soviet_concrete.png"}, "Concrete Stair", "Concrete Slab", @@ -52,7 +52,7 @@ minetest.register_node(":soviet:concrete_window", { description = "Chunk of Concrete with a Window in it", tiles = {"soviet_concrete_window.png"}, is_ground_content = false, - groups = {cracky = 2}, + groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), }) @@ -60,14 +60,14 @@ minetest.register_node(":soviet:staircase_flooring", { description = "Apt Building Staircase/Lobby Flooring", tiles = {"soviet_staircase_flooring.png"}, is_ground_content = false, - groups = {cracky = 2}, + groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), }) stairs.register_stair_and_slab( "staircase_flooring", "soviet:staircase_flooring", - {cracky = 2}, + {cracky = 3}, {"soviet_staircase_flooring.png"}, "Apt Staircase/Lobby Flooring Stair", "Apt Staircase/Lobby Flooring Slab", @@ -86,7 +86,7 @@ minetest.register_node(":soviet:glass", sunlight_propagates = true, sounds = default.node_sound_glass_defaults(), is_ground_content = false, - groups = {cracky = 1}, + groups = {cracky = 3}, }) -- Plantlike nodes @@ -122,7 +122,7 @@ minetest.register_node(":soviet:tea", { type = "fixed", fixed = {-0.25, -0.5, -0.25, 0.25, 0.3, 0.25} }, - groups = {dig_immediate = 3, attached_node = 1}, + groups = {cracky = 4, dig_immediate = 3, attached_node = 1}, sounds = default.node_sound_glass_defaults() }) @@ -137,7 +137,7 @@ minetest.register_node(":soviet:ceilling_light", { light_source = 15, is_ground_content = false, walkable = false, - groups = {cracky = 1}, + groups = {cracky = 3}, sounds = default.node_sound_glass_defaults(), }) @@ -178,7 +178,7 @@ minetest.register_node(":soviet:transradio", { drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", - groups = {cracky = 2}, + groups = {cracky = 4}, node_box = { type = "fixed", fixed = { @@ -195,7 +195,7 @@ minetest.register_node(":soviet:concrete_thin", { description = "Thin Concrete Wall", tiles = {"soviet_concrete.png"}, is_ground_content = false, - groups = {cracky = 2}, + groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), paramtype2 = "wallmounted", drawtype = "nodebox", @@ -212,7 +212,7 @@ minetest.register_node(":soviet:concrete_thin_lower", { description = "Thin Concrete Wall", tiles = {"soviet_concrete.png"}, is_ground_content = false, - groups = {cracky = 2}, + groups = {cracky = 3}, sounds = default.node_sound_stone_defaults(), paramtype2 = "facedir", drawtype = "nodebox", @@ -224,20 +224,3 @@ minetest.register_node(":soviet:concrete_thin_lower", { } } }) - -minetest.register_node(":soviet:concrete_thin", { - description = "Thin Concrete Wall", - tiles = {"soviet_concrete.png"}, - is_ground_content = false, - groups = {cracky = 2}, - sounds = default.node_sound_stone_defaults(), - paramtype2 = "wallmounted", - drawtype = "nodebox", - paramtype = "light", - node_box = { - type = "wallmounted", - fixed = { - {-0.5, -0.5, 0.4375, 0.5, 0.5, 0.5}, - } - } -}) diff --git a/mods/ip_story/init.lua b/mods/ip_story/init.lua index f0d11cd..14b1057 100644 --- a/mods/ip_story/init.lua +++ b/mods/ip_story/init.lua @@ -53,15 +53,14 @@ minetest.register_on_joinplayer(function(player) end) minetest.register_on_newplayer(function(ObjectRef) - minetest.place_schematic({x = 0, y = -1, z = 0}, minetest.get_modpath("ip_story") .. "/schems/citymap-v2.mts", "0", nil, true) + minetest.place_schematic({x = 0, y = -1, z = 0}, minetest.get_modpath("ip_story") .. "/schems/citymap-v3.mts", "0", nil, true) minetest.after(4, function() minetest.fix_light({x = 20, y = 129, z = 191}, {x = 236, y = 12, z = 6}) end) - ObjectRef:set_pos({x = 180, y = 42, z = 145}) + ObjectRef:set_pos({x = 185, y = 24, z = 152}) end) minetest.register_on_respawnplayer(function(player) minetest.after(.1, function() - player:set_pos({x = 180, y = 42, z = 145}) - + player:set_pos({x = 185, y = 24, z = 152}) end) end) diff --git a/mods/ip_waterworks/nodes.lua b/mods/ip_waterworks/nodes.lua index b71fea4..35cefc1 100644 --- a/mods/ip_waterworks/nodes.lua +++ b/mods/ip_waterworks/nodes.lua @@ -26,7 +26,7 @@ minetest.register_node(":waterworks:pipe", { paramtype = "light", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_pipe = 1}, + groups = {cracky = 3, waterworks_pipe = 1}, --sounds = default.node_sound_metal_defaults(), on_construct = function(pos) waterworks.place_pipe(pos) @@ -57,7 +57,7 @@ minetest.register_node(":waterworks:valve_on", { paramtype = "light", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_pipe = 1}, + groups = {cracky = 3, waterworks_pipe = 1}, --sounds = default.node_sound_metal_defaults(), on_construct = function(pos) waterworks.place_pipe(pos) @@ -91,7 +91,7 @@ minetest.register_node(":waterworks:valve_off", { drops = "waterworks:valve_on", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_inert = 1, not_in_creative_inventory = 1}, + groups = {cracky = 3, waterworks_inert = 1, not_in_creative_inventory = 1}, --sounds = default.node_sound_metal_defaults(), on_rightclick = function(pos, node, clicker, itemstack, pointed_thing) node.name = "waterworks:valve_on" @@ -121,7 +121,7 @@ minetest.register_node(":waterworks:inlet", { }, paramtype2 = "facedir", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_connected = 1}, + groups = {cracky = 3, waterworks_connected = 1}, --sounds = default.node_sound_metal_defaults(), paramtype = "light", drawtype = "nodebox", @@ -165,7 +165,7 @@ minetest.register_node(":waterworks:pumped_inlet", { }, paramtype2 = "facedir", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_connected = 1}, + groups = {cracky = 3, waterworks_connected = 1}, --sounds = default.node_sound_metal_defaults(), paramtype = "light", drawtype = "normal", @@ -205,7 +205,7 @@ minetest.register_node(":waterworks:outlet", { }, paramtype2 = "facedir", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_connected = 1}, + groups = {cracky = 3, waterworks_connected = 1}, paramtype = "light", drawtype = "nodebox", @@ -251,7 +251,7 @@ minetest.register_node(":waterworks:grate", { }, paramtype2 = "facedir", is_ground_content = false, - groups = {oddly_breakable_by_hand = 1, waterworks_connected = 1}, + groups = {cracky = 3, waterworks_connected = 1}, paramtype = "light", drawtype = "nodebox", diff --git a/mods/sfinv/README.txt b/mods/sfinv/README.txt new file mode 100644 index 0000000..a69e3c3 --- /dev/null +++ b/mods/sfinv/README.txt @@ -0,0 +1,18 @@ +Minetest Game mod: sfinv +======================== +See license.txt for license information. + +Simple Fast Inventory. +A cleaner, simpler, solution to having an advanced inventory in Minetest. +See game_api.txt for this mod's API. +Available for use outside of MTG here: +https://forum.minetest.net/viewtopic.php?t=19765 + +Authors of source code +---------------------- +rubenwardy (MIT) + +Authors of media +---------------- +paramat (CC BY-SA 3.0): + sfinv_crafting_arrow.png - derived from a texture by BlockMen (CC BY-SA 3.0) diff --git a/mods/sfinv/api.lua b/mods/sfinv/api.lua new file mode 100644 index 0000000..1dbc44a --- /dev/null +++ b/mods/sfinv/api.lua @@ -0,0 +1,189 @@ +sfinv = { + pages = {}, + pages_unordered = {}, + contexts = {}, + enabled = true +} + +function sfinv.register_page(name, def) + assert(name, "Invalid sfinv page. Requires a name") + assert(def, "Invalid sfinv page. Requires a def[inition] table") + assert(def.get, "Invalid sfinv page. Def requires a get function.") + assert(not sfinv.pages[name], "Attempt to register already registered sfinv page " .. dump(name)) + + sfinv.pages[name] = def + def.name = name + table.insert(sfinv.pages_unordered, def) +end + +function sfinv.override_page(name, def) + assert(name, "Invalid sfinv page override. Requires a name") + assert(def, "Invalid sfinv page override. Requires a def[inition] table") + local page = sfinv.pages[name] + assert(page, "Attempt to override sfinv page " .. dump(name) .. " which does not exist.") + for key, value in pairs(def) do + page[key] = value + end +end + +function sfinv.get_nav_fs(player, context, nav, current_idx) + -- Only show tabs if there is more than one page + if #nav > 1 then + return "tabheader[0,0;sfinv_nav_tabs;" .. table.concat(nav, ",") .. + ";" .. current_idx .. ";true;false]" + else + return "" + end +end + +local theme_inv = [[ + image[0,5.2;1,1;gui_hb_bg.png] + image[1,5.2;1,1;gui_hb_bg.png] + image[2,5.2;1,1;gui_hb_bg.png] + image[3,5.2;1,1;gui_hb_bg.png] + image[4,5.2;1,1;gui_hb_bg.png] + image[5,5.2;1,1;gui_hb_bg.png] + image[6,5.2;1,1;gui_hb_bg.png] + image[7,5.2;1,1;gui_hb_bg.png] + list[current_player;main;0,5.2;8,1;] + list[current_player;main;0,6.35;8,3;8] + ]] + +function sfinv.make_formspec(player, context, content, show_inv, size) + local tmp = { + size or "size[8,9.1]", + sfinv.get_nav_fs(player, context, context.nav_titles, context.nav_idx), + show_inv and theme_inv or "", + content + } + return table.concat(tmp, "") +end + +function sfinv.get_homepage_name(player) + return "sfinv:crafting" +end + +function sfinv.get_formspec(player, context) + -- Generate navigation tabs + local nav = {} + local nav_ids = {} + local current_idx = 1 + for i, pdef in pairs(sfinv.pages_unordered) do + if not pdef.is_in_nav or pdef:is_in_nav(player, context) then + nav[#nav + 1] = pdef.title + nav_ids[#nav_ids + 1] = pdef.name + if pdef.name == context.page then + current_idx = #nav_ids + end + end + end + context.nav = nav_ids + context.nav_titles = nav + context.nav_idx = current_idx + + -- Generate formspec + local page = sfinv.pages[context.page] or sfinv.pages["404"] + if page then + return page:get(player, context) + else + local old_page = context.page + local home_page = sfinv.get_homepage_name(player) + + if old_page == home_page then + minetest.log("error", "[sfinv] Couldn't find " .. dump(old_page) .. + ", which is also the old page") + + return "" + end + + context.page = home_page + assert(sfinv.pages[context.page], "[sfinv] Invalid homepage") + minetest.log("warning", "[sfinv] Couldn't find " .. dump(old_page) .. + " so switching to homepage") + + return sfinv.get_formspec(player, context) + end +end + +function sfinv.get_or_create_context(player) + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + context = { + page = sfinv.get_homepage_name(player) + } + sfinv.contexts[name] = context + end + return context +end + +function sfinv.set_context(player, context) + sfinv.contexts[player:get_player_name()] = context +end + +function sfinv.set_player_inventory_formspec(player, context) + local fs = sfinv.get_formspec(player, + context or sfinv.get_or_create_context(player)) + player:set_inventory_formspec(fs) +end + +function sfinv.set_page(player, pagename) + local context = sfinv.get_or_create_context(player) + local oldpage = sfinv.pages[context.page] + if oldpage and oldpage.on_leave then + oldpage:on_leave(player, context) + end + context.page = pagename + local page = sfinv.pages[pagename] + if page.on_enter then + page:on_enter(player, context) + end + sfinv.set_player_inventory_formspec(player, context) +end + +function sfinv.get_page(player) + local context = sfinv.contexts[player:get_player_name()] + return context and context.page or sfinv.get_homepage_name(player) +end + +minetest.register_on_joinplayer(function(player) + if sfinv.enabled then + sfinv.set_player_inventory_formspec(player) + end +end) + +minetest.register_on_leaveplayer(function(player) + sfinv.contexts[player:get_player_name()] = nil +end) + +minetest.register_on_player_receive_fields(function(player, formname, fields) + if formname ~= "" or not sfinv.enabled then + return false + end + + -- Get Context + local name = player:get_player_name() + local context = sfinv.contexts[name] + if not context then + sfinv.set_player_inventory_formspec(player) + return false + end + + -- Was a tab selected? + if fields.sfinv_nav_tabs and context.nav then + local tid = tonumber(fields.sfinv_nav_tabs) + if tid and tid > 0 then + local id = context.nav[tid] + local page = sfinv.pages[id] + if id and page then + sfinv.set_page(player, id) + end + end + else + -- Pass event to page + local page = sfinv.pages[context.page] + if page and page.on_player_receive_fields then + return page:on_player_receive_fields(player, context, fields) + end + end +end) diff --git a/mods/sfinv/init.lua b/mods/sfinv/init.lua new file mode 100644 index 0000000..a02ebb3 --- /dev/null +++ b/mods/sfinv/init.lua @@ -0,0 +1,20 @@ +-- sfinv/init.lua + +dofile(minetest.get_modpath("sfinv") .. "/api.lua") + +-- Load support for MT game translation. +local S = minetest.get_translator("sfinv") + +sfinv.register_page("sfinv:crafting", { + title = S("Crafting"), + get = function(self, player, context) + return sfinv.make_formspec(player, context, [[ + bgcolor[#3A41EA] + list[current_player;craft;1.75,0.5;3,3;] + list[current_player;craftpreview;5.75,1.5;1,1;] + image[4.75,1.5;1,1;sfinv_crafting_arrow.png] + listring[current_player;main] + listring[current_player;craft] + ]], true) + end +}) diff --git a/mods/sfinv/license.txt b/mods/sfinv/license.txt new file mode 100644 index 0000000..6676d74 --- /dev/null +++ b/mods/sfinv/license.txt @@ -0,0 +1,59 @@ +License of source code +---------------------- + +The MIT License (MIT) +Copyright (C) 2016-2018 rubenwardy + +Permission is hereby granted, free of charge, to any person obtaining a copy of this +software and associated documentation files (the "Software"), to deal in the Software +without restriction, including without limitation the rights to use, copy, modify, merge, +publish, distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or +substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR +PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE +FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +For more details: +https://opensource.org/licenses/MIT + + +License of media +---------------- + +Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) +Copyright (C) 2019 paramat + +You are free to: +Share — copy and redistribute the material in any medium or format. +Adapt — remix, transform, and build upon the material for any purpose, even commercially. +The licensor cannot revoke these freedoms as long as you follow the license terms. + +Under the following terms: + +Attribution — You must give appropriate credit, provide a link to the license, and +indicate if changes were made. You may do so in any reasonable manner, but not in any way +that suggests the licensor endorses you or your use. + +ShareAlike — If you remix, transform, or build upon the material, you must distribute +your contributions under the same license as the original. + +No additional restrictions — You may not apply legal terms or technological measures that +legally restrict others from doing anything the license permits. + +Notices: + +You do not have to comply with the license for elements of the material in the public +domain or where your use is permitted by an applicable exception or limitation. +No warranties are given. The license may not give you all of the permissions necessary +for your intended use. For example, other rights such as publicity, privacy, or moral +rights may limit how you use the material. + +For more details: +http://creativecommons.org/licenses/by-sa/3.0/ diff --git a/mods/sfinv/locale/sfinv.de.tr b/mods/sfinv/locale/sfinv.de.tr new file mode 100644 index 0000000..044e9ba --- /dev/null +++ b/mods/sfinv/locale/sfinv.de.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Fertigung diff --git a/mods/sfinv/locale/sfinv.eo.tr b/mods/sfinv/locale/sfinv.eo.tr new file mode 100644 index 0000000..1fac1ad --- /dev/null +++ b/mods/sfinv/locale/sfinv.eo.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Konstruado diff --git a/mods/sfinv/locale/sfinv.es.tr b/mods/sfinv/locale/sfinv.es.tr new file mode 100644 index 0000000..d3d6609 --- /dev/null +++ b/mods/sfinv/locale/sfinv.es.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Creación diff --git a/mods/sfinv/locale/sfinv.fr.tr b/mods/sfinv/locale/sfinv.fr.tr new file mode 100644 index 0000000..58ead96 --- /dev/null +++ b/mods/sfinv/locale/sfinv.fr.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Artisanat diff --git a/mods/sfinv/locale/sfinv.id.tr b/mods/sfinv/locale/sfinv.id.tr new file mode 100644 index 0000000..643196e --- /dev/null +++ b/mods/sfinv/locale/sfinv.id.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Kerajinan diff --git a/mods/sfinv/locale/sfinv.it.tr b/mods/sfinv/locale/sfinv.it.tr new file mode 100644 index 0000000..e449b75 --- /dev/null +++ b/mods/sfinv/locale/sfinv.it.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Assemblaggio diff --git a/mods/sfinv/locale/sfinv.ja.tr b/mods/sfinv/locale/sfinv.ja.tr new file mode 100644 index 0000000..04122d7 --- /dev/null +++ b/mods/sfinv/locale/sfinv.ja.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=クラフト diff --git a/mods/sfinv/locale/sfinv.jbo.tr b/mods/sfinv/locale/sfinv.jbo.tr new file mode 100644 index 0000000..0ff0328 --- /dev/null +++ b/mods/sfinv/locale/sfinv.jbo.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=nu zbasu diff --git a/mods/sfinv/locale/sfinv.ms.tr b/mods/sfinv/locale/sfinv.ms.tr new file mode 100644 index 0000000..f62ba8a --- /dev/null +++ b/mods/sfinv/locale/sfinv.ms.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Pertukangan diff --git a/mods/sfinv/locale/sfinv.pl.tr b/mods/sfinv/locale/sfinv.pl.tr new file mode 100644 index 0000000..6230d82 --- /dev/null +++ b/mods/sfinv/locale/sfinv.pl.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Konstruowanie diff --git a/mods/sfinv/locale/sfinv.pt_BR.tr b/mods/sfinv/locale/sfinv.pt_BR.tr new file mode 100644 index 0000000..f9e57ae --- /dev/null +++ b/mods/sfinv/locale/sfinv.pt_BR.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Construir diff --git a/mods/sfinv/locale/sfinv.ru.tr b/mods/sfinv/locale/sfinv.ru.tr new file mode 100644 index 0000000..d7c11b2 --- /dev/null +++ b/mods/sfinv/locale/sfinv.ru.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Крафтинг diff --git a/mods/sfinv/locale/sfinv.sk.tr b/mods/sfinv/locale/sfinv.sk.tr new file mode 100644 index 0000000..18566f1 --- /dev/null +++ b/mods/sfinv/locale/sfinv.sk.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Vytváranie diff --git a/mods/sfinv/locale/sfinv.sv.tr b/mods/sfinv/locale/sfinv.sv.tr new file mode 100644 index 0000000..df426b6 --- /dev/null +++ b/mods/sfinv/locale/sfinv.sv.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Tillverkning diff --git a/mods/sfinv/locale/sfinv.uk.tr b/mods/sfinv/locale/sfinv.uk.tr new file mode 100644 index 0000000..d7c11b2 --- /dev/null +++ b/mods/sfinv/locale/sfinv.uk.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=Крафтинг diff --git a/mods/sfinv/locale/sfinv.zh_CN.tr b/mods/sfinv/locale/sfinv.zh_CN.tr new file mode 100644 index 0000000..3ec3c72 --- /dev/null +++ b/mods/sfinv/locale/sfinv.zh_CN.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=合成 diff --git a/mods/sfinv/locale/sfinv.zh_TW.tr b/mods/sfinv/locale/sfinv.zh_TW.tr new file mode 100644 index 0000000..3ec3c72 --- /dev/null +++ b/mods/sfinv/locale/sfinv.zh_TW.tr @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting=合成 diff --git a/mods/sfinv/locale/template.txt b/mods/sfinv/locale/template.txt new file mode 100644 index 0000000..ace5519 --- /dev/null +++ b/mods/sfinv/locale/template.txt @@ -0,0 +1,2 @@ +# textdomain: sfinv +Crafting= diff --git a/mods/sfinv/mod.conf b/mods/sfinv/mod.conf new file mode 100644 index 0000000..2934435 --- /dev/null +++ b/mods/sfinv/mod.conf @@ -0,0 +1,2 @@ +name = sfinv +description = Minetest Game mod: sfinv diff --git a/mods/sfinv/textures/sfinv_crafting_arrow.png b/mods/sfinv/textures/sfinv_crafting_arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..b16dcc63b059f410f15dfd76509d6854da5a4f67 GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!D3?x-;bCrM;V{wqX6T`Z5GB1G~wg8_HS0LTc z&@d@;rwT~AB*-tA!Qt7BG!Q4r+uensgH_f8$l)yTh%9Dc;1&j9Muu5)B!GhKC7!;n z?9aHRgv?palpcQu6jJhZaSY+Oo}AFY%*w{b%*Mve#wOkNt6qU6rC|qKf~E!oL$)kS UbGf!vKTtJ;r>mdKI;Vst0J9D#r2qf` literal 0 HcmV?d00001