Editor: clean up (new Customise section)

master
Zughy 2022-01-09 23:26:52 +01:00
parent d848aa9bcb
commit 4691bd2d0e
20 changed files with 38 additions and 41 deletions

View File

@ -19,6 +19,7 @@ dofile(srcpath .. "/dependencies/parties.lua")
dofile(srcpath .. "/editor/editor_main.lua") dofile(srcpath .. "/editor/editor_main.lua")
dofile(srcpath .. "/editor/editor_icons.lua") dofile(srcpath .. "/editor/editor_icons.lua")
dofile(srcpath .. "/editor/tools_bgm.lua") dofile(srcpath .. "/editor/tools_bgm.lua")
dofile(srcpath .. "/editor/tools_customise.lua")
dofile(srcpath .. "/editor/tools_players.lua") dofile(srcpath .. "/editor/tools_players.lua")
dofile(srcpath .. "/editor/tools_settings.lua") dofile(srcpath .. "/editor/tools_settings.lua")
dofile(srcpath .. "/editor/tools_sign.lua") dofile(srcpath .. "/editor/tools_sign.lua")

View File

@ -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) Spawners | sel. ID: @1 (right click slot #2 to change)=Spawner | ID sel.: @1 (tasto dx su slot #2 per cambiare)
Signs=Cartelli Signs=Cartelli
One sign per arena=Un cartello per arena One sign per arena=Un cartello per arena
Customise=Personalizza
Pimp my arena=Rendila bella bellina
Settings=Impostazioni Settings=Impostazioni
Arena settings=Impostazioni arena Arena settings=Impostazioni arena
Info=Info Info=Info

View File

@ -175,6 +175,8 @@ Spawners=
Spawners | sel. ID: @1 (right click slot #2 to change)= Spawners | sel. ID: @1 (right click slot #2 to change)=
Signs= Signs=
One sign per arena= One sign per arena=
Customise=
Pimp my arena=
Settings= Settings=
Arena settings= Arena settings=
Info= Info=

View File

@ -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"), description = S("Customise"),
inventory_image = "arenalib_editor_bgm.png", inventory_image = "arenalib_editor_customise.png",
groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"}, groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
on_place = function() end, on_place = function() end,
on_drop = function() end, on_drop = function() end,
on_use = function(itemstack, user) 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() minetest.after(0, function()
arena_lib.give_bgm_tools(user) arena_lib.give_customise_tools(user)
end) end)
end end

View File

@ -6,8 +6,7 @@ local editor_tools = {
"arena_lib:editor_players", "arena_lib:editor_players",
"arena_lib:editor_spawners", "arena_lib:editor_spawners",
"arena_lib:editor_signs", "arena_lib:editor_signs",
"arena_lib:editor_sky", "arena_lib:editor_customise",
"arena_lib:editor_bgm",
"arena_lib:editor_settings", "arena_lib:editor_settings",
"", "",
"arena_lib:editor_info", "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.mod", mod)
player:get_meta():set_string("arena_lib_editor.arena", arena_name) player:get_meta():set_string("arena_lib_editor.arena", arena_name)
player:hud_set_hotbar_itemcount(10) player:hud_set_hotbar_itemcount(9)
player:hud_set_hotbar_image("arenalib_gui_hotbar10.png") player:hud_set_hotbar_image("arenalib_gui_hotbar9.png")
-- imposto volta celeste, controllando ogni elemento onde evitare un ripristino causa passaggio zero argomenti -- imposto volta celeste, controllando ogni elemento onde evitare un ripristino causa passaggio zero argomenti
if next(arena.celestial_vault) then if next(arena.celestial_vault) then

View File

@ -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"), 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"}, groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
on_place = function() end, on_place = function() end,
on_drop = 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
---------------------------------------------- ----------------------------------------------

View File

@ -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

View File

@ -10,7 +10,6 @@ local players_tools = {
"", -- arena_lib:players_teams_on/off "", -- arena_lib:players_teams_on/off
"", "",
"", "",
"",
"arena_lib:editor_return", "arena_lib:editor_return",
"arena_lib:editor_quit", "arena_lib:editor_quit",
} }

View File

@ -12,7 +12,6 @@ local settings_tools = {
"", -- timer_off/_on "", -- timer_off/_on
"", "",
"", "",
"",
"arena_lib:settings_delete", "arena_lib:settings_delete",
"", "",
"arena_lib:editor_return", "arena_lib:editor_return",

View File

@ -7,7 +7,6 @@ local spawners_tools = {
"", "",
"", "",
"", "",
"",
"arena_lib:editor_return", "arena_lib:editor_return",
"arena_lib:editor_quit", "arena_lib:editor_quit",
} }

View File

@ -12,25 +12,13 @@ local function get_palette_col_and_sorted_table() end
local function compare_elem() end local function compare_elem() end
local temp_sky_settings = {} -- KEY = p_name; VALUE = {all the sky settings} 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"), 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"}, groups = {not_in_creative_inventory = 1, oddly_breakable_by_hand = "2"},
on_place = function() end, on_place = function() end,
on_drop = function() end, on_drop = function() end,
@ -44,16 +32,12 @@ minetest.register_tool("arena_lib:editor_sky", {
fill_tempsky(p_name, arena) 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 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) 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 p_name = player:get_player_name()
local temp_sky = temp_sky_settings[p_name].sky local temp_sky = temp_sky_settings[p_name].sky

View File

@ -21,7 +21,6 @@ local spawners_tools_noteam = {
"arena_lib:spawner_deleteall", "arena_lib:spawner_deleteall",
"", "",
"", "",
"",
"arena_lib:editor_return", "arena_lib:editor_return",
"arena_lib:editor_quit", "arena_lib:editor_quit",
} }

View File

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 190 B

View File

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

BIN
textures/arenalib_gui_hotbar9.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 200 B