diff --git a/init.lua b/init.lua index 8c0e244..e3ba24e 100755 --- a/init.lua +++ b/init.lua @@ -19,6 +19,7 @@ dofile(srcpath .. "/dependencies/parties.lua") dofile(srcpath .. "/editor/editor_main.lua") dofile(srcpath .. "/editor/editor_icons.lua") dofile(srcpath .. "/editor/tools_bgm.lua") +dofile(srcpath .. "/editor/tools_customise.lua") dofile(srcpath .. "/editor/tools_players.lua") dofile(srcpath .. "/editor/tools_settings.lua") dofile(srcpath .. "/editor/tools_sign.lua") diff --git a/locale/arena_lib.it.tr b/locale/arena_lib.it.tr index b3b2b50..5d320f9 100755 --- a/locale/arena_lib.it.tr +++ b/locale/arena_lib.it.tr @@ -175,6 +175,8 @@ Spawners=Spawner Spawners | sel. ID: @1 (right click slot #2 to change)=Spawner | ID sel.: @1 (tasto dx su slot #2 per cambiare) Signs=Cartelli One sign per arena=Un cartello per arena +Customise=Personalizza +Pimp my arena=Rendila bella bellina Settings=Impostazioni Arena settings=Impostazioni arena Info=Info diff --git a/locale/template.txt b/locale/template.txt index 71243a6..afd0edf 100755 --- a/locale/template.txt +++ b/locale/template.txt @@ -175,6 +175,8 @@ Spawners= Spawners | sel. ID: @1 (right click slot #2 to change)= Signs= One sign per arena= +Customise= +Pimp my arena= Settings= Arena settings= Info= diff --git a/src/editor/editor_icons.lua b/src/editor/editor_icons.lua index 81f1c28..516a89a 100755 --- a/src/editor/editor_icons.lua +++ b/src/editor/editor_icons.lua @@ -78,20 +78,20 @@ minetest.register_tool("arena_lib:editor_signs", { -minetest.register_tool("arena_lib:editor_bgm", { +minetest.register_tool("arena_lib:editor_customise", { - description = S("BGM"), - inventory_image = "arenalib_editor_bgm.png", + description = S("Customise"), + inventory_image = "arenalib_editor_customise.png", groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"}, on_place = function() end, on_drop = function() end, on_use = function(itemstack, user) - arena_lib.HUD_send_msg("hotbar", user:get_player_name(), S("Background music")) + arena_lib.HUD_send_msg("hotbar", user:get_player_name(), S("Pimp my arena")) minetest.after(0, function() - arena_lib.give_bgm_tools(user) + arena_lib.give_customise_tools(user) end) end diff --git a/src/editor/editor_main.lua b/src/editor/editor_main.lua index ec31a1c..78fae57 100755 --- a/src/editor/editor_main.lua +++ b/src/editor/editor_main.lua @@ -6,8 +6,7 @@ local editor_tools = { "arena_lib:editor_players", "arena_lib:editor_spawners", "arena_lib:editor_signs", - "arena_lib:editor_sky", - "arena_lib:editor_bgm", + "arena_lib:editor_customise", "arena_lib:editor_settings", "", "arena_lib:editor_info", @@ -115,8 +114,8 @@ function arena_lib.enter_editor(sender, mod, arena_name) player:get_meta():set_string("arena_lib_editor.mod", mod) player:get_meta():set_string("arena_lib_editor.arena", arena_name) - player:hud_set_hotbar_itemcount(10) - player:hud_set_hotbar_image("arenalib_gui_hotbar10.png") + player:hud_set_hotbar_itemcount(9) + player:hud_set_hotbar_image("arenalib_gui_hotbar9.png") -- imposto volta celeste, controllando ogni elemento onde evitare un ripristino causa passaggio zero argomenti if next(arena.celestial_vault) then diff --git a/src/editor/tools_bgm.lua b/src/editor/tools_bgm.lua index 562cef1..d3ccb38 100755 --- a/src/editor/tools_bgm.lua +++ b/src/editor/tools_bgm.lua @@ -8,10 +8,10 @@ local audio_currently_playing = {} -- KEY p_name; VALUE sound handle -minetest.register_tool("arena_lib:editor_bgm", { +minetest.register_tool("arena_lib:customise_bgm", { description = S("Background music"), - inventory_image = "arenalib_editor_bgm.png", + inventory_image = "arenalib_customise_bgm.png", groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"}, on_place = function() end, on_drop = function() end, @@ -28,12 +28,6 @@ minetest.register_tool("arena_lib:editor_bgm", { -function arena_lib.give_bgm_tools(player) - player:get_inventory():set_list("main", bgm_tools) -end - - - ---------------------------------------------- diff --git a/src/editor/tools_customise.lua b/src/editor/tools_customise.lua new file mode 100644 index 0000000..71c6e6c --- /dev/null +++ b/src/editor/tools_customise.lua @@ -0,0 +1,19 @@ +local S = minetest.get_translator("arena_lib") + +local customise_tools = { + "arena_lib:customise_bgm", + "arena_lib:customise_sky", + "", + "", + "", + "", + "", + "arena_lib:editor_return", + "arena_lib:editor_quit", +} + + + +function arena_lib.give_customise_tools(user) + user:get_inventory():set_list("main", customise_tools) +end diff --git a/src/editor/tools_players.lua b/src/editor/tools_players.lua index 17c8d8c..d96c10e 100755 --- a/src/editor/tools_players.lua +++ b/src/editor/tools_players.lua @@ -10,7 +10,6 @@ local players_tools = { "", -- arena_lib:players_teams_on/off "", "", - "", "arena_lib:editor_return", "arena_lib:editor_quit", } diff --git a/src/editor/tools_settings.lua b/src/editor/tools_settings.lua index 1ee2e4d..b877f54 100755 --- a/src/editor/tools_settings.lua +++ b/src/editor/tools_settings.lua @@ -12,7 +12,6 @@ local settings_tools = { "", -- timer_off/_on "", "", - "", "arena_lib:settings_delete", "", "arena_lib:editor_return", diff --git a/src/editor/tools_sign.lua b/src/editor/tools_sign.lua index 762c77d..577acf0 100755 --- a/src/editor/tools_sign.lua +++ b/src/editor/tools_sign.lua @@ -7,7 +7,6 @@ local spawners_tools = { "", "", "", - "", "arena_lib:editor_return", "arena_lib:editor_quit", } diff --git a/src/editor/tools_sky.lua b/src/editor/tools_sky.lua index 8b35010..49712f1 100755 --- a/src/editor/tools_sky.lua +++ b/src/editor/tools_sky.lua @@ -12,25 +12,13 @@ local function get_palette_col_and_sorted_table() end local function compare_elem() end local temp_sky_settings = {} -- KEY = p_name; VALUE = {all the sky settings} -local sky_tools = { - "arena_lib:sky", - "", - "", - "", - "", - "", - "", - "", - "arena_lib:editor_return", - "arena_lib:editor_quit", -} -minetest.register_tool("arena_lib:editor_sky", { +minetest.register_tool("arena_lib:customise_sky", { description = S("Celestial vault"), - inventory_image = "arenalib_editor_sky.png", + inventory_image = "arenalib_customise_sky.png", groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"}, on_place = function() end, on_drop = function() end, @@ -44,16 +32,12 @@ minetest.register_tool("arena_lib:editor_sky", { fill_tempsky(p_name, arena) - minetest.show_formspec(p_name, "arena_lib:settings_sky", get_celvault_formspec(p_name, "sky")) + minetest.show_formspec(p_name, "arena_lib:celestial_vault", get_celvault_formspec(p_name, "sky")) end }) -function arena_lib.give_sky_tools(player) - player:get_inventory():set_list("main", sky_tools) -end - ---------------------------------------------- @@ -412,7 +396,7 @@ end minetest.register_on_player_receive_fields(function(player, formname, fields) - if formname ~= "arena_lib:settings_sky" then return end + if formname ~= "arena_lib:celestial_vault" then return end local p_name = player:get_player_name() local temp_sky = temp_sky_settings[p_name].sky diff --git a/src/editor/tools_spawner.lua b/src/editor/tools_spawner.lua index fa71df5..493271f 100755 --- a/src/editor/tools_spawner.lua +++ b/src/editor/tools_spawner.lua @@ -21,7 +21,6 @@ local spawners_tools_noteam = { "arena_lib:spawner_deleteall", "", "", - "", "arena_lib:editor_return", "arena_lib:editor_quit", } diff --git a/textures/arenalib_editor_bgm.png b/textures/arenalib_customise_bgm.png similarity index 100% rename from textures/arenalib_editor_bgm.png rename to textures/arenalib_customise_bgm.png diff --git a/textures/arenalib_editor_sky.png b/textures/arenalib_customise_sky.png similarity index 100% rename from textures/arenalib_editor_sky.png rename to textures/arenalib_customise_sky.png diff --git a/textures/arenalib_editor_customise.png b/textures/arenalib_editor_customise.png new file mode 100644 index 0000000..d93692b Binary files /dev/null and b/textures/arenalib_editor_customise.png differ diff --git a/textures/arenalib_gui_hotbar10.png b/textures/arenalib_gui_hotbar10.png deleted file mode 100755 index 6ae7f34..0000000 Binary files a/textures/arenalib_gui_hotbar10.png and /dev/null differ diff --git a/textures/arenalib_gui_hotbar9.png b/textures/arenalib_gui_hotbar9.png new file mode 100755 index 0000000..8379a06 Binary files /dev/null and b/textures/arenalib_gui_hotbar9.png differ diff --git a/textures/arenalib_immunity.png b/textures/arenalib_immunity.png deleted file mode 100755 index d786974..0000000 Binary files a/textures/arenalib_immunity.png and /dev/null differ diff --git a/textures/arenalib_tool_settings_rename.png b/textures/arenalib_tool_settings_rename.png deleted file mode 100755 index be871de..0000000 Binary files a/textures/arenalib_tool_settings_rename.png and /dev/null differ diff --git a/textures/arenalib_tool_settings_timer.png b/textures/arenalib_tool_settings_timer.png index abfe6f1..dae9019 100755 Binary files a/textures/arenalib_tool_settings_timer.png and b/textures/arenalib_tool_settings_timer.png differ