HUDs, hunger, mobs, mapgen, splash, mainmemu etc
@ -42,6 +42,9 @@ local function add_server_formspec(dialogdata)
|
||||
end
|
||||
|
||||
local function add_server_buttonhandler(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["server_add_cancel"] then
|
||||
this:delete()
|
||||
|
@ -119,6 +119,9 @@ end
|
||||
|
||||
|
||||
local function handle_buttons(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["world_config_modlist"] ~= nil then
|
||||
local event = core.explode_textlist_event(fields["world_config_modlist"])
|
||||
|
@ -83,6 +83,9 @@ local function create_world_formspec(dialogdata)
|
||||
end
|
||||
|
||||
local function create_world_buttonhandler(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["world_create_cancel"] then
|
||||
this:delete()
|
||||
|
@ -35,6 +35,10 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function delete_mod_buttonhandler(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["dlg_delete_mod_confirm"] ~= nil then
|
||||
|
||||
if this.data.mod.path ~= nil and
|
||||
|
@ -31,22 +31,23 @@ local function delete_world_formspec(dialogdata)
|
||||
end
|
||||
|
||||
local function delete_world_buttonhandler(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
if fields["world_delete_confirm"] then
|
||||
|
||||
if this.data.delete_index > 0 and
|
||||
this.data.delete_index <= #menudata.worldlist:get_raw_list() then
|
||||
core.delete_world(this.data.delete_index)
|
||||
menudata.worldlist:refresh()
|
||||
end
|
||||
this:delete()
|
||||
return true
|
||||
if this.data.delete_index > 0 and
|
||||
this.data.delete_index <= #menudata.worldlist:get_raw_list() then
|
||||
core.delete_world(this.data.delete_index)
|
||||
menudata.worldlist:refresh()
|
||||
end
|
||||
this:delete()
|
||||
return true
|
||||
end
|
||||
|
||||
if fields["world_delete_cancel"] then
|
||||
this:delete()
|
||||
return true
|
||||
this:delete()
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
|
@ -37,6 +37,10 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function rename_modpack_buttonhandler(this, fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["dlg_rename_modpack_confirm"] ~= nil then
|
||||
local oldpath = core.get_modpath() .. DIR_DELIM .. this.data.mod.name
|
||||
local targetpath = core.get_modpath() .. DIR_DELIM .. fields["te_modpack_name"]
|
||||
|
@ -79,6 +79,10 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
local function main_button_handler2(tabview, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
local index = ''
|
||||
if fields["btn_show_singleplayer"] then index = "singleplayer" end
|
||||
if fields["btn_show_multiplayer"] then index = "multiplayer" end
|
||||
|
@ -165,6 +165,10 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
-- @function [parent=#modstore] handle_buttons
|
||||
function modstore.handle_buttons(current_tab,fields)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
|
||||
if fields["modstore_tab"] then
|
||||
local index = tonumber(fields["modstore_tab"])
|
||||
|
@ -187,6 +187,10 @@ end
|
||||
--------------------------------------------------------------------------------
|
||||
-- @function [parent=#modstore] handle_buttons
|
||||
function modstore.handle_buttons(parent, fields, name, data)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
|
||||
if fields["btn_modstore_page_up"] then
|
||||
if modstore.current_list ~= nil and modstore.current_list.page > 0 then
|
||||
|
@ -28,8 +28,8 @@ tab_credits = {
|
||||
"box[-100,-10;200,12;#999999]" ..
|
||||
|
||||
"image_button[12,9.55;4,0.8;"..core.formspec_escape(mm_texture.basetexturedir).."menu_button.png;btn_cancel;".. fgettext("OK") .. ";true;true;"..core.formspec_escape(mm_texture.basetexturedir).."menu_button_b.png]"..
|
||||
"label[3.5,9.75;Magichet 1.0 (based on FM " .. core.get_version() .. ")]" ..
|
||||
"image[0.25,9;2,2;"..core.formspec_escape(logofile).."]"..
|
||||
"label[3.5,9.75;Multicraft (" .. core.get_version() .. ")]" ..
|
||||
-- "image[0.25,9;2,2;"..core.formspec_escape(logofile).."]"..
|
||||
"textlist[0,2.0;15.8,6.25;list_credits;" ..
|
||||
"#FFFF00" .. fgettext("Core Developers") .."," ..
|
||||
" Perttu Ahola (celeron55) <celeron55@gmail.com>,"..
|
||||
@ -48,7 +48,7 @@ tab_credits = {
|
||||
" paramat,"..
|
||||
" ...,"..
|
||||
","..
|
||||
"#FFFF00" .. fgettext("Magichet Developers") .. "," ..
|
||||
"#FFFF00" .. fgettext("Multicraft Developers") .. "," ..
|
||||
" 4aiman Konsorumaniakku <4aiman@inbox.ru>,"..
|
||||
" ...,"..
|
||||
"," ..
|
||||
@ -70,6 +70,10 @@ tab_credits = {
|
||||
";0;true]"
|
||||
end,
|
||||
cbf_button_handler = function(tabview, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["btn_cancel"] ~= nil then
|
||||
tabview:hide()
|
||||
tabview.parent:show()
|
||||
|
@ -111,6 +111,10 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function handle_buttons(tabview, fields, tabname, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["modlist"] ~= nil then
|
||||
local event = core.explode_textlist_event(fields["modlist"])
|
||||
tabdata.selected_mod = event.index
|
||||
|
@ -118,6 +118,10 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function main_button_handler(tabview, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if not tabdata then tabdata = {} end
|
||||
|
||||
if fields["add_server"] ~= nil then
|
||||
|
@ -77,6 +77,9 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function main_button_handler(this, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
local world_doubleclick = false
|
||||
|
||||
@ -114,7 +117,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
bool = 'true'
|
||||
end
|
||||
core.setting_set("enable_damage", bool)
|
||||
-- print(bool)
|
||||
minetest.setting_save()
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -81,6 +81,9 @@ local function dlg_confirm_reset_formspec(data)
|
||||
end
|
||||
|
||||
local function dlg_confirm_reset_btnhandler(this, fields, dialogdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["dlg_reset_singleplayer_confirm"] ~= nil then
|
||||
local worldlist = core.get_worlds()
|
||||
|
@ -34,8 +34,7 @@ local function singleplayer_refresh_gamebar()
|
||||
for key,value in pairs(fields) do
|
||||
for j=1,#gamemgr.games,1 do
|
||||
if ("game_btnbar_" .. gamemgr.games[j].id == key) then
|
||||
mm_texture.update("singleplayer", gamemgr.games[j])
|
||||
--core.set_topleft_text(gamemgr.games[j].name)
|
||||
-- mm_texture.update("singleplayer", gamemgr.games[j])
|
||||
core.setting_set("menu_last_game",gamemgr.games[j].id)
|
||||
menudata.worldlist:set_filtercriteria(gamemgr.games[j].id)
|
||||
return true
|
||||
@ -124,6 +123,9 @@ local function get_formspec(tabview, name, tabdata)
|
||||
end
|
||||
|
||||
local function main_button_handler(this, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
--assert(name == "singleplayer")
|
||||
|
||||
@ -155,13 +157,22 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
return true
|
||||
end
|
||||
|
||||
if fields["cb_creative_mode"] then
|
||||
core.setting_set("creative_mode", fields["cb_creative_mode"])
|
||||
return true
|
||||
end
|
||||
if fields["cb_creative_mode"] then
|
||||
core.setting_set("creative_mode", fields["cb_creative_mode"])
|
||||
local bool = fields["cb_creative_mode"]
|
||||
if bool == 'true' then
|
||||
bool = 'false'
|
||||
else
|
||||
bool = 'true'
|
||||
end
|
||||
core.setting_set("enable_damage", bool)
|
||||
minetest.setting_save()
|
||||
return true
|
||||
end
|
||||
|
||||
if fields["cb_enable_damage"] then
|
||||
core.setting_set("enable_damage", fields["cb_enable_damage"])
|
||||
minetest.setting_save()
|
||||
return true
|
||||
end
|
||||
|
||||
@ -169,7 +180,6 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
world_doubleclick or
|
||||
fields["key_enter"] then
|
||||
local selected = core.get_textlist_index("sp_worlds")
|
||||
print(selected)
|
||||
if selected ~= nil then
|
||||
gamedata.selected_world = menudata.worldlist:get_raw_index(selected)
|
||||
gamedata.singleplayer = true
|
||||
@ -184,7 +194,6 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
create_world_dlg:set_parent(this)
|
||||
this:hide()
|
||||
create_world_dlg:show()
|
||||
mm_texture.update("singleplayer",current_game())
|
||||
return true
|
||||
end
|
||||
|
||||
@ -201,7 +210,6 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
delete_world_dlg:set_parent(this)
|
||||
this:hide()
|
||||
delete_world_dlg:show()
|
||||
mm_texture.update("singleplayer",current_game())
|
||||
end
|
||||
end
|
||||
|
||||
@ -219,7 +227,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
||||
configdialog:set_parent(this)
|
||||
this:hide()
|
||||
configdialog:show()
|
||||
mm_texture.update("singleplayer",current_game())
|
||||
--mm_texture.update("singleplayer",current_game())
|
||||
end
|
||||
end
|
||||
|
||||
@ -249,14 +257,14 @@ local function on_change(type, old_tab, new_tab)
|
||||
if game then
|
||||
menudata.worldlist:set_filtercriteria(game.id)
|
||||
--core.set_topleft_text(game.name)
|
||||
mm_texture.update("singleplayer",game)
|
||||
-- mm_texture.update("singleplayer",game)
|
||||
end
|
||||
buttonbar:show()
|
||||
else
|
||||
menudata.worldlist:set_filtercriteria(nil)
|
||||
buttonbar:hide()
|
||||
--core.set_topleft_text("")
|
||||
mm_texture.update(new_tab,nil)
|
||||
--mm_texture.update(new_tab,nil)
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -87,6 +87,10 @@ end
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
local function main_button_handler(tabview, fields, name, tabdata)
|
||||
core.set_clouds(false)
|
||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||
|
||||
if fields["TPs"] ~= nil then
|
||||
local event = core.explode_textlist_event(fields["TPs"])
|
||||
if event.type == "CHG" or event.type == "DCL" then
|
||||
|
@ -34,7 +34,6 @@ function mm_texture.update(tab,gamedetails)
|
||||
if gamedetails == nil then
|
||||
return
|
||||
end
|
||||
|
||||
mm_texture.update_game(gamedetails)
|
||||
end
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
|
||||
-----------------------------
|
||||
--- 4hunger mod by 4aiman ---
|
||||
-----------------------------
|
||||
--- license: GPLv3 ---
|
||||
-----------------------------
|
||||
--------------------------------------------------
|
||||
--- 4hunger mod by 4aiman - Multicraft version ---
|
||||
--------------------------------------------------
|
||||
--- CC BY-NC-SA ---
|
||||
--------------------------------------------------
|
||||
|
||||
----
|
||||
---- Many thanks go to fairiestoy, who forced me to understand Lua a little bit more!
|
||||
@ -16,8 +16,6 @@
|
||||
-- This mod TRIES too copy MC hunger mechanics as described at wiki
|
||||
-- here: http://minecraft.gamepedia.com/Hunger#Mechanics and FAILS to do do:
|
||||
-- several things aren't covered due to internal differences of MT and MC.
|
||||
-- Those are subject to get added by some other mod(s), creation of which
|
||||
-- has began allready.
|
||||
----
|
||||
|
||||
----
|
||||
@ -25,6 +23,7 @@
|
||||
----
|
||||
-- Since lua_api documentation sucks (it's of GREAT use nevertheless),
|
||||
-- I got inspired AND "guided" by some other mods that this one:
|
||||
--
|
||||
-- 1. "Farming" from the "Minitest" game by PilzAdam. What hunger if
|
||||
-- there's nothing to eat?
|
||||
-- 2. "HUD & hunger". I make mistakes. Stupid ones too.
|
||||
@ -34,7 +33,6 @@
|
||||
-- That was when I saw that his "hunger" do NOT depend on taken by a player
|
||||
-- actions... That was a shame!
|
||||
-- So, I got my lazy butt up and wrote this hunger mod.
|
||||
-- 3. The "Sprint" mod by I-don't-know-who. Very useful. (The old one.)
|
||||
--
|
||||
----
|
||||
|
||||
@ -63,10 +61,14 @@
|
||||
-- Update: ported for Multicraft
|
||||
--
|
||||
|
||||
--
|
||||
-- Update: Merge upstream changes. (License change, food_saturation depletion fixes, respawn==reset hunger feature introduction)
|
||||
--
|
||||
|
||||
max_save_time = 10
|
||||
save_time = 0
|
||||
max_drumsticks = 20
|
||||
foodTickTimerMAX = 10
|
||||
foodTickTimerMAX = 5
|
||||
max_exhaustion = 8
|
||||
foodTickTimerMax = {}
|
||||
food_level = {}
|
||||
@ -83,8 +85,6 @@ jumped = {}
|
||||
keypress_track = {}
|
||||
hungerhud = {}
|
||||
hungerhudb = {}
|
||||
hearthud = {}
|
||||
hearthudb = {}
|
||||
need_to_update_ph = {}
|
||||
|
||||
|
||||
@ -273,10 +273,8 @@ function multicraft.item_eat(food_points, saturation_points, replace_with_item)
|
||||
food_saturation[pll]=food_points
|
||||
end
|
||||
if poisoned then
|
||||
if poisoned==1 then state[pll] = 7 end
|
||||
if poisoned==2 then state[pll] = 8 end
|
||||
else
|
||||
state[pll] = -1
|
||||
if poisoned==1 then state[pll].poison1 = true end
|
||||
if poisoned==2 then state[pll].poison2 = true end
|
||||
end
|
||||
itemstack:add_item(replace_with_item)
|
||||
end
|
||||
@ -292,49 +290,60 @@ function distance(pos1,pos2)
|
||||
return math.sqrt( (pos1.x - pos2.x)^2 + (pos1.y - pos2.y)^2 + (pos1.z - pos2.z)^2 )
|
||||
end
|
||||
|
||||
function init_hunger(player)
|
||||
local damage_enabled = multicraft.setting_getbool("enable_damage")
|
||||
|
||||
function init_hunger(player, force)
|
||||
if player then
|
||||
local pll = player:get_player_name()
|
||||
if not foodTickTimerMax[pll] then foodTickTimerMax[pll]=foodTickTimerMAX end
|
||||
if not food_level[pll] then food_level[pll] = max_drumsticks end
|
||||
if not death_timer[pll] then death_timer[pll] = 0 end
|
||||
if not food_saturation[pll] then food_saturation[pll]=food_level[pll] end
|
||||
if not timers[pll] then timers[pll] = -1 end
|
||||
if not keypress_track[pll] then keypress_track[pll] = {} end
|
||||
if not foodTickTimerMax[pll] or force then foodTickTimerMax[pll]=foodTickTimerMAX end
|
||||
if not food_level[pll] or force then food_level[pll] = max_drumsticks end
|
||||
if not death_timer[pll] or force then death_timer[pll] = 0 end
|
||||
if not food_saturation[pll] or force then food_saturation[pll]=food_level[pll] end
|
||||
if not timers[pll] or force then timers[pll] = -1 end
|
||||
if not keypress_track[pll] or force then keypress_track[pll] = {} end
|
||||
if not state[pll] or type(state[pll])~="table" or force then state[pll] = {} end
|
||||
|
||||
multicraft.after(0, function()
|
||||
if not player then return end
|
||||
hungerhudb[pll]=player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = HUD_HUNGER_POS,
|
||||
size = HUD_SB_SIZE,
|
||||
text = "hud_hunger_bg.png",
|
||||
number = 20,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = HUD_HUNGER_OFFSET,
|
||||
})
|
||||
hungerhud[pll]=player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = HUD_HUNGER_POS,
|
||||
size = HUD_SB_SIZE,
|
||||
text = "hud_hunger_fg.png",
|
||||
number = 20,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = HUD_HUNGER_OFFSET,
|
||||
})
|
||||
if damage_enabled then
|
||||
multicraft.after(0.5, function()
|
||||
if not player then return end
|
||||
local hhf,hhb = player:hud_get(hungerhud[pll]), player:hud_get(hungerhudb[pll])
|
||||
if hungerhud[pll] and hhf and hhf.text == "hud_hunger_fg.png" then print('remove FG') player:hud_remove(hungerhud[pll]) end
|
||||
if hungerhudb[pll] and hhf and hhb.text == "hud_hunger_bg.png" then print('remove BG') player:hud_remove(hungerhudb[pll]) end
|
||||
hungerhudb[pll]=player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = HUD_HUNGER_POS,
|
||||
size = HUD_SB_SIZE,
|
||||
text = "hud_hunger_bg.png",
|
||||
number = 20,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = HUD_HUNGER_OFFSET,
|
||||
})
|
||||
hungerhud[pll]=player:hud_add({
|
||||
hud_elem_type = "statbar",
|
||||
position = HUD_HUNGER_POS,
|
||||
size = HUD_SB_SIZE,
|
||||
text = "hud_hunger_fg.png",
|
||||
number = 20,
|
||||
alignment = {x=-1,y=-1},
|
||||
offset = HUD_HUNGER_OFFSET,
|
||||
})
|
||||
local hhf,hhb = player:hud_get(hungerhud[pll]), player:hud_get(hungerhudb[pll])
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
multicraft.register_on_joinplayer(function(player)
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
init_hunger(player)
|
||||
local pll = player:get_player_name()
|
||||
state[pll] = {}
|
||||
end)
|
||||
|
||||
local function get_field(item,field)
|
||||
if multicraft.registered_nodes[item] then return multicraft.registered_nodes[item][field] end
|
||||
if multicraft.registered_items[item] then return multicraft.registered_items[item][field] end
|
||||
if multicraft.registered_craftitems[item] then return multicraft.registered_craftitems[item][field] end
|
||||
if multicraft.registered_tools[item] then return multicraft.registered_tools[item][field] end
|
||||
if minetest.registered_nodes[item] then return minetest.registered_nodes[item][field] end
|
||||
if minetest.registered_items[item] then return minetest.registered_items[item][field] end
|
||||
if minetest.registered_craftitems[item] then return minetest.registered_craftitems[item][field] end
|
||||
if minetest.registered_tools[item] then return minetest.registered_tools[item][field] end
|
||||
return ""
|
||||
end
|
||||
|
||||
@ -342,173 +351,207 @@ local function get_on_eat(item)
|
||||
return get_field(item,"on_eat")
|
||||
end
|
||||
|
||||
multicraft.after(0, function(dtime)
|
||||
local global_dtime = 0
|
||||
local doit = false
|
||||
multicraft.register_globalstep(function(dtime)
|
||||
global_dtime = global_dtime + dtime
|
||||
if global_dtime>1 then
|
||||
doit = true
|
||||
global_dtime = 0
|
||||
end
|
||||
if save_time > max_save_time then
|
||||
save_time=0
|
||||
save_4hunger()
|
||||
else
|
||||
save_time=save_time+dtime
|
||||
end
|
||||
local players = multicraft.get_connected_players()
|
||||
for i,player in ipairs(players) do
|
||||
local pll = player:get_player_name()
|
||||
local pos = player:getpos()
|
||||
local hp = player:get_hp()
|
||||
local control = player:get_player_control()
|
||||
local wstack = player:get_wielded_item():get_name()
|
||||
local bar
|
||||
local addex = 0
|
||||
if hp==1 and food_level[pll]<=0 and food_saturation[pll]<=0 then
|
||||
death_timer[pll] = death_timer[pll] + dtime
|
||||
end
|
||||
if not food_level[pll] then init_hunger(player) end
|
||||
if (death_timer[pll] or 0) > max_being_hungry_time then
|
||||
death_timer[pll] = 0
|
||||
multicraft.chat_send_all(death_message .. pll)
|
||||
food_level[pll] = max_drumsticks
|
||||
food_saturation[pll] = max_drumsticks
|
||||
food_exhaustion[pll] = 0
|
||||
player:set_hp(0)
|
||||
end
|
||||
if damage_enabled then
|
||||
minetest.after(0, function(dtime)
|
||||
local global_dtime = 0
|
||||
local doit = false
|
||||
minetest.register_globalstep(function(dtime)
|
||||
global_dtime = global_dtime + dtime
|
||||
if global_dtime>1 then
|
||||
doit = true
|
||||
global_dtime = 0
|
||||
end
|
||||
|
||||
if state[pll] == 7 or state[pll] == 8 then
|
||||
if not timers[pll] then
|
||||
timers[pll] = 15
|
||||
player:hud_change(hungerhudb[pll],"text",'hunger_tile_d.png')
|
||||
player:hud_change(hungerhud[pll] ,"text",'hunger_tile_c.png')
|
||||
if save_time > max_save_time then
|
||||
save_time=0
|
||||
save_4hunger()
|
||||
else
|
||||
save_time=save_time+dtime
|
||||
end
|
||||
|
||||
local players = minetest.get_connected_players()
|
||||
for i,player in ipairs(players) do
|
||||
local pll = player:get_player_name()
|
||||
local pos = player:getpos()
|
||||
local hp = player:get_hp()
|
||||
local control = player:get_player_control()
|
||||
local wstack = player:get_wielded_item():get_name()
|
||||
local bar
|
||||
local addex = 0
|
||||
|
||||
if hp==1 and food_level[pll]<=0 and food_saturation[pll]<=0 then
|
||||
death_timer[pll] = death_timer[pll] + dtime
|
||||
end
|
||||
|
||||
if (death_timer[pll] or 0) > max_being_hungry_time then
|
||||
death_timer[pll] = 0
|
||||
minetest.chat_send_all(death_message .. pll)
|
||||
food_level[pll] = max_drumsticks
|
||||
food_saturation[pll] = max_drumsticks
|
||||
food_exhaustion[pll] = 0
|
||||
player:set_hp(0)
|
||||
end
|
||||
|
||||
if state[pll].poison1 or state[pll].poison2 then
|
||||
if not timers[pll] then
|
||||
timers[pll] = 15
|
||||
player:hud_change(hungerhudb[pll],"text",'hunger_tile_d.png')
|
||||
player:hud_change(hungerhud[pll] ,"text",'hunger_tile_c.png')
|
||||
if doit==true and hp>10 then
|
||||
player:set_hp(hp-1)
|
||||
hp=hp-1
|
||||
player:set_hp(hp-1)
|
||||
hp=hp-1
|
||||
end
|
||||
end
|
||||
if state[pll].poison1 then addex = addex + ef1
|
||||
elseif state[pll].poison2 then addex = addex + ef2 end
|
||||
end
|
||||
|
||||
if timers[pll] then
|
||||
timers[pll] = timers[pll] - dtime
|
||||
if timers[pll]<0 then
|
||||
timers[pll]=nil
|
||||
local hhf,hhb = player:hud_get(hungerhud[pll]), player:hud_get(hungerhudb[pll])
|
||||
if hungerhud[pll] and hhf and hhf.text == "hud_hunger_fg.png" then
|
||||
player:hud_change(hungerhud[pll] ,"text",'hud_hunger_fg.png')
|
||||
end
|
||||
if hungerhudb[pll] and hhf and hhb.text == "hud_hunger_bg.png" then
|
||||
player:hud_change(hungerhudb[pll],"text",'hud_hunger_bg.png')
|
||||
end
|
||||
else
|
||||
if doit==true and hp>10 then
|
||||
player:set_hp(hp-1)
|
||||
hp=hp-1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local hp_diff = 0
|
||||
if oldHPs[pll] and hp then
|
||||
hp_diff = oldHPs[pll]-hp
|
||||
end
|
||||
|
||||
if hp_diff~=0 then
|
||||
state[pll].hurt = true
|
||||
addex = addex + edm
|
||||
end
|
||||
|
||||
oldHPs[pll] = hp
|
||||
|
||||
local dist = distance(oldpos[pll],pos)
|
||||
oldpos[pll] = pos
|
||||
|
||||
local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z})
|
||||
local name = node.name
|
||||
|
||||
if not jumped[pll] then
|
||||
if state[pll].jump then
|
||||
if not name:find("air") then
|
||||
state[pll].jump = nil
|
||||
end
|
||||
else
|
||||
if name:find("air") then
|
||||
state[pll].jump = true
|
||||
jumped[pll] = true
|
||||
addex = addex + ejp
|
||||
end
|
||||
end
|
||||
else
|
||||
if not name:find("air") then
|
||||
state[pll].jump = nil
|
||||
jumped[pll] = false
|
||||
end
|
||||
end
|
||||
|
||||
if dist and dist>0 then
|
||||
state[pll].walk = true
|
||||
end
|
||||
|
||||
pos.y=pos.y+1
|
||||
local node = minetest.get_node(pos)
|
||||
local name = node.name
|
||||
if minetest.get_item_group(name, "water") ~= 0 then
|
||||
state[pll].swim = true
|
||||
end
|
||||
|
||||
if food_level[pll]<=0 then food_level[pll] = 0 end
|
||||
|
||||
if food_level[pll]==0 or (food_level[pll]>17 and food_level[pll]<=max_drumsticks) then
|
||||
if foodTickTimer[pll] then
|
||||
foodTickTimer[pll] = foodTickTimer[pll] + dtime
|
||||
else
|
||||
foodTickTimer[pll] = dtime
|
||||
end
|
||||
end
|
||||
if state == 7 then addex = addex + ef1
|
||||
elseif state == 8 then addex = addex + ef2 end
|
||||
end
|
||||
|
||||
if timers[pll] then
|
||||
timers[pll] = timers[pll] - dtime
|
||||
if timers[pll]<0 then
|
||||
timers[pll]=nil
|
||||
player:hud_change(hungerhudb[pll],"text", "hud_hunger_bg.png")
|
||||
player:hud_change(hungerhud[pll] ,"text", "hud_hunger_fg.png")
|
||||
else
|
||||
if doit==true and hp>1 then
|
||||
player:set_hp(hp-1)
|
||||
hp=hp-1
|
||||
end
|
||||
end
|
||||
end
|
||||
local hp_diff = 0
|
||||
if oldHPs[pll] and hp then
|
||||
hp_diff = oldHPs[pll]-hp
|
||||
end
|
||||
if hp_diff~=0 then
|
||||
state[pll] = 5
|
||||
addex = addex + edm
|
||||
player:hud_change(hearthud[pll],"number",hp)
|
||||
end
|
||||
oldHPs[pll] = hp
|
||||
local dist = distance(oldpos[pll],pos)
|
||||
if not jumped[pll] then
|
||||
local node = multicraft.get_node(pos)
|
||||
local name = node.name
|
||||
if name:find("air") then
|
||||
if state[pll] == 1 then
|
||||
state[pll] = 6
|
||||
addex = addex + esj
|
||||
else
|
||||
state[pll] = 3
|
||||
addex = addex + ejp
|
||||
end
|
||||
jumped[pll] = true
|
||||
else
|
||||
if dist and dist>0 then
|
||||
state[pll] = 0
|
||||
else
|
||||
state[pll] = -1
|
||||
if foodTickTimer[pll]>foodTickTimerMax[pll] then
|
||||
foodTickTimer[pll] = 0
|
||||
if food_level[pll]>17 and food_level[pll]<=max_drumsticks then
|
||||
if hp>0 then
|
||||
player:set_hp(hp+1)
|
||||
end
|
||||
elseif food_level[pll]==0 then
|
||||
if hp>10 then
|
||||
player:set_hp(hp-1)
|
||||
hp = hp-1
|
||||
end
|
||||
jumped[pll] = false
|
||||
end
|
||||
end
|
||||
pos.y=pos.y+1
|
||||
local node = multicraft.get_node(pos)
|
||||
local name = node.name
|
||||
if multicraft.get_item_group(name, "water") ~= 0 then
|
||||
state[pll] = 2
|
||||
end
|
||||
if food_level[pll]<=0 then food_level[pll] = 0 end
|
||||
if food_level[pll]==0 or (food_level[pll]>17 and food_level[pll]<=max_drumsticks)
|
||||
then
|
||||
if foodTickTimer[pll]
|
||||
then foodTickTimer[pll] = foodTickTimer[pll] + dtime
|
||||
else foodTickTimer[pll] = dtime
|
||||
end
|
||||
end
|
||||
if foodTickTimer[pll]>foodTickTimerMax[pll] then
|
||||
if food_level[pll]>17 and food_level[pll]<=max_drumsticks then
|
||||
if hp>0 then
|
||||
player:set_hp(hp+1)
|
||||
end
|
||||
elseif food_level[pll]==0 then
|
||||
if hp>1 then
|
||||
player:set_hp(hp-1)
|
||||
hp = hp-1
|
||||
end
|
||||
end
|
||||
foodTickTimer[pll] = 0
|
||||
end
|
||||
if not walked_distance[pll] then walked_distance[pll] = 0 end
|
||||
oldpos[pll]=pos
|
||||
walked_distance[pll] = walked_distance[pll] + dist
|
||||
if hp_diff<0 and hp>18 then state[pll]=10 end
|
||||
end
|
||||
|
||||
if not state[pll] then state[pll]=-1 end
|
||||
if state[pll]==-1 then addex=addex+eid
|
||||
elseif state[pll]==00 then addex=addex+ews*dist
|
||||
elseif state[pll]==01 then addex=addex+esp*dist
|
||||
elseif state[pll]==02 then addex=addex+esw*dist
|
||||
elseif state[pll]==03 then addex=addex+ejp*dist
|
||||
elseif state[pll]==06 then addex=addex+esj*dist
|
||||
elseif state[pll]==09 then addex=addex+ebr
|
||||
elseif state[pll]==10 then addex=addex+erg*-hp_diff
|
||||
end
|
||||
if food_exhaustion[pll] then
|
||||
food_exhaustion[pll]=food_exhaustion[pll]+addex
|
||||
else
|
||||
if not walked_distance[pll] then walked_distance[pll] = 0 end
|
||||
|
||||
oldpos[pll]=pos
|
||||
walked_distance[pll] = walked_distance[pll] + dist
|
||||
|
||||
if hp_diff<0 and hp>18 then state[pll].regen = true end
|
||||
local ccc = 0
|
||||
for k,v in pairs(state[pll]) do
|
||||
ccc = ccc + 1
|
||||
end
|
||||
if ccc == 0 then
|
||||
addex=addex+eid
|
||||
else
|
||||
if state[pll].walk then addex=addex+ews*dist end
|
||||
if state[pll].swim then addex=addex+esw*0.1 end
|
||||
if state[pll].jump then addex=addex+ejp end
|
||||
if state[pll].hurt then addex=edm*hp_diff end
|
||||
if state[pll].poison1 then addex=ef1*dist end
|
||||
if state[pll].poison2 then addex=ef2*dist end
|
||||
if state[pll].dig then addex=addex+ebr end
|
||||
if state[pll].regen then addex=addex+erg*-hp_diff end
|
||||
end
|
||||
|
||||
state[pll] = {}
|
||||
if food_exhaustion[pll] then
|
||||
food_exhaustion[pll]=food_exhaustion[pll]+addex
|
||||
else
|
||||
food_exhaustion[pll]=addex
|
||||
end
|
||||
if food_exhaustion[pll]>max_exhaustion then
|
||||
if food_saturation[pll] then
|
||||
food_saturation[pll] = food_saturation[pll]-1
|
||||
if food_saturation[pll]<0 then food_saturation[pll]=0 end
|
||||
else
|
||||
food_saturation[pll] = food_level[pll]-1
|
||||
end
|
||||
if food_saturation[pll]==0 then food_level[pll]=food_level[pll]-1 end
|
||||
if food_level[pll]<0 then food_level[pll]=0 end
|
||||
food_exhaustion[pll] = 0
|
||||
end
|
||||
if hungerhud[pll] and food_level[pll] then
|
||||
player:hud_change(hungerhud[pll],"number",food_level[pll])
|
||||
end
|
||||
end
|
||||
doit = false
|
||||
end
|
||||
|
||||
if food_exhaustion[pll]>max_exhaustion then
|
||||
if food_saturation[pll] then
|
||||
food_saturation[pll] = food_saturation[pll]-1
|
||||
if food_saturation[pll]<0 then food_saturation[pll]=0 end
|
||||
else
|
||||
food_saturation[pll] = food_level[pll]-1
|
||||
end
|
||||
if food_saturation[pll]==0 then food_level[pll]=food_level[pll]-1 end
|
||||
if food_level[pll]<0 then food_level[pll]=0 end
|
||||
food_exhaustion[pll] = 0
|
||||
end
|
||||
|
||||
if hungerhud[pll] and food_level[pll] then
|
||||
player:hud_change(hungerhud[pll],"number",food_level[pll])
|
||||
end
|
||||
end
|
||||
doit = false
|
||||
end)
|
||||
end)
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
multicraft.register_on_dignode(function(pos, oldnode, digger)
|
||||
minetest.register_on_dignode(function(pos, oldnode, digger)
|
||||
if not digger then return end
|
||||
local pll = digger:get_player_name()
|
||||
state[pll]=9
|
||||
state[pll].dig = true
|
||||
if food_exhaustion[pll] then
|
||||
food_exhaustion[pll]=food_exhaustion[pll]+ebr
|
||||
else
|
||||
@ -516,21 +559,26 @@ multicraft.register_on_dignode(function(pos, oldnode, digger)
|
||||
end
|
||||
end)
|
||||
|
||||
multicraft.after(0,function(dtime)
|
||||
for cou,def in pairs(multicraft.registered_items) do
|
||||
minetest.after(0,function(dtime)
|
||||
for cou,def in pairs(minetest.registered_items) do
|
||||
if get_points(def['name']) ~= false then
|
||||
def['on_use'] = multicraft.item_eat(1)
|
||||
multicraft.register_item(':' .. def.name, def)
|
||||
def['on_use'] = minetest.item_eat(1)
|
||||
minetest.register_item(':' .. def.name, def)
|
||||
end
|
||||
end
|
||||
end )
|
||||
|
||||
multicraft.register_chatcommand("hunger", {
|
||||
minetest.register_chatcommand("hunger", {
|
||||
privs = {server = true},
|
||||
func = function(name, param)
|
||||
food_level[name] = 0
|
||||
food_saturation[name] = 0
|
||||
end
|
||||
})
|
||||
|
||||
minetest.register_on_respawnplayer(function(player)
|
||||
init_hunger(player, true)
|
||||
end)
|
||||
|
||||
|
||||
print('[OK] 4hunger (Multicraft version) loaded')
|
||||
|
@ -1,16 +1,12 @@
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not multicraft.get_modpath("check") then os.exit() end
|
||||
if not default.multicraft_is_variable_is_a_part_of_multicraft_subgame_and_copying_it_means_you_use_our_code_so_we_become_contributors_of_your_project then exit() end
|
||||
-------------------------
|
||||
-- adbs mod by 4aiman --
|
||||
-------------------------
|
||||
-- (Multicraft port) --
|
||||
-------------------------
|
||||
-- --
|
||||
-- Licence:GPLv3 --
|
||||
-- --
|
||||
-------------------------
|
||||
-----------------------------------------------
|
||||
--- adbs mod by 4aiman - Multicraft version ---
|
||||
-----------------------------------------------
|
||||
--- CC BY-NC-SA ---
|
||||
-----------------------------------------------
|
||||
|
||||
--Update: Merged upstream changes. (License change, less "jumpy" mobs)
|
||||
|
||||
|
||||
math.randomseed(os.time())
|
||||
@ -496,12 +492,15 @@ adbs.dd = {
|
||||
end
|
||||
end
|
||||
|
||||
local yaw = self.object:getyaw()
|
||||
local yaw = self.object:getyaw() -- jump, if there's something that can be juped on
|
||||
local x = -math.sin(yaw)
|
||||
local z = math.cos(yaw)
|
||||
local nm = multicraft.get_node(posf).name
|
||||
if multicraft.registered_nodes[nm]
|
||||
and multicraft.registered_nodes[nm].walkable
|
||||
local nm = minetest.get_node({x = posf.x+x,y = posf.y+1,z = posf.z+z}).name
|
||||
local nm2 = minetest.get_node({x = posf.x+x,y = posf.y+2,z = posf.z+z}).name
|
||||
if minetest.registered_nodes[nm]
|
||||
and minetest.registered_nodes[nm].walkable
|
||||
and minetest.registered_nodes[nm2]
|
||||
and not minetest.registered_nodes[nm2].walkable
|
||||
then
|
||||
self:jump()
|
||||
end
|
||||
|
@ -26,7 +26,15 @@ multicraft.register_alias("mapgen_stone_with_coal", "default:stone_with_coal")
|
||||
multicraft.register_alias("mapgen_stone_with_iron", "default:stone_with_iron")
|
||||
multicraft.register_alias("mapgen_desert_sand", "default:sand")
|
||||
multicraft.register_alias("mapgen_desert_stone", "default:sandstone")
|
||||
|
||||
multicraft.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow")
|
||||
multicraft.register_alias("mapgen_snowblock", "default:snowblock")
|
||||
multicraft.register_alias("mapgen_snow", "default:snow")
|
||||
multicraft.register_alias("mapgen_ice", "default:ice")
|
||||
multicraft.register_alias("mapgen_jungletree", "default:jungletree")
|
||||
multicraft.register_alias("mapgen_jungleleaves", "default:jungleleaves")
|
||||
multicraft.register_alias("mapgen_junglegrass", "default:junglegrass")
|
||||
multicraft.register_alias("mapgen_pinetree", "default:pinetree")
|
||||
multicraft.register_alias("mapgen_pine_needles", "default:pine_needles")
|
||||
|
||||
--
|
||||
-- Ore generation
|
||||
@ -490,40 +498,20 @@ multicraft.register_on_generated(function(minp, maxp, seed)
|
||||
local p = {x=x,y=ground_y,z=z}
|
||||
-- Check if the node can be replaced
|
||||
if #(multicraft.find_nodes_in_area({x=x-5,y=ground_y-2,z=z-5}, {x=x+5,y=ground_y+2,z=z+5}, {"group:grass", "group:flower"}))>7 then
|
||||
for i=1,pr:next(1,4) do
|
||||
local ground_y = nil
|
||||
for y=30,0,-1 do
|
||||
if multicraft.get_node({x=x,y=y,z=z}).name ~= "air"
|
||||
and not multicraft.get_node({x=x,y=y,z=z}).name:find("water") then
|
||||
ground_y = y
|
||||
break
|
||||
end
|
||||
local fruit = {"farming:pumpkin_face", "farming:melon", "farming:carrot", "farming:potato"}
|
||||
local choice = fruit[pr:next(1,#fruit)]
|
||||
if pr:next() < 2500 then -- the "proper" alternative
|
||||
local xx = pr:next(1,i+1)
|
||||
local zz = pr:next(1,i+1)
|
||||
local nname = multicraft.get_node({x=p.x+xx,z=p.z+zz,y=ground_y}).name
|
||||
if nname ~="air"
|
||||
and (multicraft.registered_nodes[nname] and not multicraft.registered_nodes[nname].buildable_to)
|
||||
then
|
||||
multicraft.set_node({x=p.x+xx,z=p.z+zz,y=ground_y+1},{name=choice})
|
||||
end
|
||||
local fruit = {"farming:pumpkin_face", "farming:melon", "farming:carrot", "farming:potato"}
|
||||
local choice = fruit[pr:next(1,#fruit)]
|
||||
--print(choice)
|
||||
|
||||
if pr:next() < 2500 then -- the "proper" alternative
|
||||
for i = 1, pr:next(1,3) do
|
||||
local xx = pr:next(1,i+1)
|
||||
local zz = pr:next(1,i+1)
|
||||
local nname = multicraft.get_node({x=p.x+xx,z=p.z+zz,y=ground_y}).name
|
||||
if nname ~="air"
|
||||
and (multicraft.registered_nodes[nname] and not multicraft.registered_nodes[nname].buildable_to)
|
||||
then
|
||||
|
||||
multicraft.set_node({x=p.x+xx,z=p.z+zz,y=ground_y+1},{name=choice})
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -3,6 +3,73 @@
|
||||
--
|
||||
-- Node definitions
|
||||
--
|
||||
multicraft.register_node("default:dirt_with_snow", {
|
||||
description = "Dirt with Snow",
|
||||
tiles = {"default_snow.png", "default_dirt.png", "default_dirt.png^default_snow_side.png"},
|
||||
groups = {crumbly=3,soil=1},
|
||||
drop = 'default:dirt',
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
multicraft.register_node("default:snow", {
|
||||
description = "Snow",
|
||||
tiles = {"default_snow.png"},
|
||||
inventory_image = "default_snowball.png",
|
||||
wield_image = "default_snowball.png",
|
||||
paramtype = "light",
|
||||
buildable_to = true,
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, -0.5, 0.5, -0.5+2/16, 0.5},
|
||||
},
|
||||
},
|
||||
groups = {crumbly=3,falling_node=1},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
pos.y = pos.y - 1
|
||||
if multicraft.get_node(pos).name == "default:dirt_with_grass" then
|
||||
multicraft.set_node(pos, {name="default:dirt_with_snow"})
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
multicraft.register_node("default:snowblock", {
|
||||
description = "Snow Block",
|
||||
tiles = {"default_snow.png"},
|
||||
groups = {crumbly=3},
|
||||
sounds = default.node_sound_dirt_defaults(),
|
||||
})
|
||||
|
||||
multicraft.register_node("default:ice", {
|
||||
description = "Ice",
|
||||
tiles = {"default_ice.png"},
|
||||
is_ground_content = false,
|
||||
paramtype = "light",
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
multicraft.register_node("default:pinetree", {
|
||||
description = "Pine Tree",
|
||||
tiles = {"default_pinetree_top.png", "default_pinetree_top.png", "default_pinetree.png"},
|
||||
paramtype2 = "facedir",
|
||||
groups = {tree=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
multicraft.register_node("default:pine_needles",{
|
||||
description = "Pine Needles",
|
||||
drawtype = "allfaces_optional",
|
||||
visual_scale = 1.3,
|
||||
tiles = {"default_pine_needles.png"},
|
||||
waving = 1,
|
||||
paramtype = "light",
|
||||
groups = {snappy=3, leafdecay=3, flammable=2, leaves=1},
|
||||
sounds = default.node_sound_leaves_defaults(),
|
||||
})
|
||||
|
||||
multicraft.register_node("default:stone", {
|
||||
description = "Stone",
|
||||
|
After Width: | Height: | Size: 203 B |
After Width: | Height: | Size: 280 B |
After Width: | Height: | Size: 574 B |
@ -183,7 +183,6 @@ local function add_hud_item(player, name, def)
|
||||
end
|
||||
|
||||
multicraft.register_on_joinplayer(function(player)
|
||||
|
||||
-- first: hide the default statbars
|
||||
local hud_flags = player:hud_get_flags()
|
||||
hud_flags.healthbar = false
|
||||
|
@ -1,7 +1,7 @@
|
||||
HUD_IW_MAX = 8
|
||||
HUD_IW_TICK = 0.4
|
||||
if multicraft.is_singleplayer() == true then
|
||||
HUD_IW_TICK = 0.2
|
||||
HUD_IW_TICK = 0.1
|
||||
end
|
||||
|
||||
HUD_SB_SIZE = {x = 24, y = 24}
|
||||
@ -50,6 +50,7 @@ if damage_enabled then
|
||||
text = "hud_heart_fg.png",
|
||||
number = 20,
|
||||
alignment = {x = -1, y = -1},
|
||||
autohide_bg = false,
|
||||
offset = HUD_HEALTH_OFFSET,
|
||||
background = "hud_heart_bg.png",
|
||||
events = {
|
||||
@ -97,7 +98,6 @@ if damage_enabled then
|
||||
autohide_bg = false,
|
||||
max = 20,
|
||||
})
|
||||
|
||||
else
|
||||
hud.show_armor = false
|
||||
end
|
||||
|
144
src/game.cpp
@ -282,11 +282,11 @@ public:
|
||||
Check if a node is pointable
|
||||
*/
|
||||
inline bool isPointableNode(const MapNode &n,
|
||||
Client *client, bool liquids_pointable)
|
||||
Client *client, bool liquids_pointable)
|
||||
{
|
||||
const ContentFeatures &features = client->getNodeDefManager()->get(n);
|
||||
return features.pointable ||
|
||||
(liquids_pointable && features.isLiquid());
|
||||
(liquids_pointable && features.isLiquid());
|
||||
}
|
||||
|
||||
/*
|
||||
@ -321,8 +321,8 @@ PointedThing getPointedThing(Client *client, v3f player_position,
|
||||
|
||||
v3f pos = selected_object->getPosition();
|
||||
hilightboxes.push_back(aabb3f(
|
||||
selection_box->MinEdge + pos - intToFloat(camera_offset, BS),
|
||||
selection_box->MaxEdge + pos - intToFloat(camera_offset, BS)));
|
||||
selection_box->MinEdge + pos - intToFloat(camera_offset, BS),
|
||||
selection_box->MaxEdge + pos - intToFloat(camera_offset, BS)));
|
||||
}
|
||||
|
||||
mindistance = (selected_object->getPosition() - camera_position).getLength();
|
||||
@ -902,8 +902,8 @@ bool nodePlacementPrediction(Client &client,
|
||||
|
||||
if (prediction != "" && !nodedef->get(node).rightclickable) {
|
||||
verbosestream << "Node placement prediction for "
|
||||
<< playeritem_def.name << " is "
|
||||
<< prediction << std::endl;
|
||||
<< playeritem_def.name << " is "
|
||||
<< prediction << std::endl;
|
||||
v3s16 p = neighbourpos;
|
||||
|
||||
// Place inside node itself if buildable_to
|
||||
@ -925,9 +925,9 @@ bool nodePlacementPrediction(Client &client,
|
||||
|
||||
if (!found) {
|
||||
errorstream << "Node placement prediction failed for "
|
||||
<< playeritem_def.name << " (places "
|
||||
<< prediction
|
||||
<< ") - Name not known" << std::endl;
|
||||
<< playeritem_def.name << " (places "
|
||||
<< prediction
|
||||
<< ") - Name not known" << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -1000,9 +1000,9 @@ bool nodePlacementPrediction(Client &client,
|
||||
}
|
||||
} catch (InvalidPositionException &e) {
|
||||
errorstream << "Node placement prediction failed for "
|
||||
<< playeritem_def.name << " (places "
|
||||
<< prediction
|
||||
<< ") - Position not loaded" << std::endl;
|
||||
<< playeritem_def.name << " (places "
|
||||
<< prediction
|
||||
<< ") - Position not loaded" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1017,7 +1017,7 @@ static inline void create_formspec_menu(GUIFormSpecMenu **cur_formspec,
|
||||
|
||||
if (*cur_formspec == 0) {
|
||||
*cur_formspec = new GUIFormSpecMenu(device, guiroot, -1, &g_menumgr,
|
||||
invmgr, gamedef, tsrc, fs_src, txt_dest, client);
|
||||
invmgr, gamedef, tsrc, fs_src, txt_dest, client);
|
||||
(*cur_formspec)->doPause = false;
|
||||
|
||||
/*
|
||||
@ -1035,13 +1035,13 @@ static inline void create_formspec_menu(GUIFormSpecMenu **cur_formspec,
|
||||
}
|
||||
|
||||
#ifdef __ANDROID__
|
||||
# define SIZE_TAG "size[11,5.5]"
|
||||
# define PAUSE_MENU_SIZE_TAG "size[6,3.5]"
|
||||
# define PAUSE_MENU_BUTTON_LEFT 1.5
|
||||
# define SIZE_TAG "size[11,5.5]"
|
||||
# define PAUSE_MENU_SIZE_TAG "size[6,3.5]"
|
||||
# define PAUSE_MENU_BUTTON_LEFT 1.5
|
||||
#else
|
||||
# define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
|
||||
# define PAUSE_MENU_SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
|
||||
# define PAUSE_MENU_BUTTON_LEFT 4
|
||||
# define SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
|
||||
# define PAUSE_MENU_SIZE_TAG "size[11,5.5,true]" // Fixed size on desktop
|
||||
# define PAUSE_MENU_BUTTON_LEFT 4
|
||||
#endif
|
||||
|
||||
static void show_chat_menu(GUIFormSpecMenu **cur_formspec,
|
||||
@ -1093,19 +1093,19 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
|
||||
bool singleplayermode)
|
||||
{
|
||||
#ifdef __ANDROID__
|
||||
// std::string control_text = wide_to_narrow(wstrgettext("Default Controls:\n"
|
||||
// "No menu visible:\n"
|
||||
// "- single tap: button activate\n"
|
||||
// "- double tap: place/use\n"
|
||||
// "- slide finger: look around\n"
|
||||
// "Menu/Inventory visible:\n"
|
||||
// "- double tap (outside):\n"
|
||||
// " -->close\n"
|
||||
// "- touch stack, touch slot:\n"
|
||||
// " --> move stack\n"
|
||||
// "- touch&drag, tap 2nd finger\n"
|
||||
// " --> place single item to slot\n"
|
||||
// ));
|
||||
// std::string control_text = wide_to_narrow(wstrgettext("Default Controls:\n"
|
||||
// "No menu visible:\n"
|
||||
// "- single tap: button activate\n"
|
||||
// "- double tap: place/use\n"
|
||||
// "- slide finger: look around\n"
|
||||
// "Menu/Inventory visible:\n"
|
||||
// "- double tap (outside):\n"
|
||||
// " -->close\n"
|
||||
// "- touch stack, touch slot:\n"
|
||||
// " --> move stack\n"
|
||||
// "- touch&drag, tap 2nd finger\n"
|
||||
// " --> place single item to slot\n"
|
||||
// ));
|
||||
#else
|
||||
std::string control_text = wide_to_narrow(wstrgettext("Default Controls:\n"
|
||||
"- WASD: move\n"
|
||||
@ -1118,7 +1118,7 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
|
||||
"- Mouse right: place/use\n"
|
||||
"- Mouse wheel: select item\n"
|
||||
"- T: chat\n"
|
||||
));
|
||||
));
|
||||
#endif
|
||||
|
||||
float ypos = singleplayermode ? 0.5 : 0.1;
|
||||
@ -1134,14 +1134,14 @@ static void show_pause_menu(GUIFormSpecMenu **cur_formspec,
|
||||
}
|
||||
|
||||
#ifndef __ANDROID__
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_sound;"
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_sound;"
|
||||
<< wide_to_narrow(wstrgettext("Sound Volume")) << "]";
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_key_config;"
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_key_config;"
|
||||
<< wide_to_narrow(wstrgettext("Change Keys")) << "]";
|
||||
#endif
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_exit_menu;"
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_exit_menu;"
|
||||
<< wide_to_narrow(wstrgettext("Exit to Menu")) << "]";
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_exit_os;"
|
||||
os << "button_exit[" << PAUSE_MENU_BUTTON_LEFT << "," << (ypos++) << ";3,0.5;btn_exit_os;"
|
||||
<< wide_to_narrow(wstrgettext("Exit to OS")) << "]"
|
||||
#ifndef __ANDROID__
|
||||
<< "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"
|
||||
@ -1200,13 +1200,13 @@ static void updateChat(Client &client, f32 dtime, bool show_debug,
|
||||
|
||||
// first pass to calculate height of text to be set
|
||||
s32 width = std::min(g_fontengine->getTextWidth(recent_chat) + 10,
|
||||
porting::getWindowSize().X - 20);
|
||||
porting::getWindowSize().X - 20);
|
||||
core::rect<s32> rect(10, chat_y, width, chat_y + porting::getWindowSize().Y);
|
||||
guitext_chat->setRelativePosition(rect);
|
||||
|
||||
//now use real height of text and adjust rect according to this size
|
||||
rect = core::rect<s32>(10, chat_y, width,
|
||||
chat_y + guitext_chat->getTextHeight());
|
||||
chat_y + guitext_chat->getTextHeight());
|
||||
|
||||
|
||||
guitext_chat->setRelativePosition(rect);
|
||||
@ -1574,7 +1574,7 @@ private:
|
||||
GUIChatConsole *gui_chat_console; // Free using ->Drop()
|
||||
MapDrawControl *draw_control;
|
||||
Camera *camera;
|
||||
Clouds *clouds; // Free using ->Drop()
|
||||
Clouds *clouds; // Free using ->Drop()
|
||||
Sky *sky; // Free using ->Drop()
|
||||
Inventory *local_inventory;
|
||||
Hud *hud;
|
||||
@ -1605,7 +1605,7 @@ private:
|
||||
gui::IGUIStaticText *guitext2; // Second line of debug text
|
||||
gui::IGUIStaticText *guitext_info; // At the middle of the screen
|
||||
gui::IGUIStaticText *guitext_status;
|
||||
gui::IGUIStaticText *guitext_chat; // Chat text
|
||||
gui::IGUIStaticText *guitext_chat; // Chat text
|
||||
gui::IGUIStaticText *guitext_profiler; // Profiler text
|
||||
|
||||
std::wstring infotext;
|
||||
@ -1671,7 +1671,7 @@ Game::Game() :
|
||||
m_cache_mouse_sensitivity = rangelim(m_cache_mouse_sensitivity, 0.001, 100.0);
|
||||
|
||||
#ifdef __ANDROID__
|
||||
m_cache_hold_aux1 = false; // This is initialised properly later
|
||||
m_cache_hold_aux1 = false; // This is initialised properly later
|
||||
#endif
|
||||
|
||||
}
|
||||
@ -1973,7 +1973,7 @@ bool Game::createSingleplayerServer(const std::string map_dir,
|
||||
}
|
||||
|
||||
server = new Server(map_dir, gamespec, simple_singleplayer_mode,
|
||||
bind_addr.isIPv6());
|
||||
bind_addr.isIPv6());
|
||||
|
||||
server->start(bind_addr);
|
||||
|
||||
@ -2036,7 +2036,7 @@ bool Game::createClient(const std::string &playername,
|
||||
/* Skybox
|
||||
*/
|
||||
sky = new Sky(smgr->getRootSceneNode(), smgr, -1, texture_src);
|
||||
skybox = NULL; // This is used/set later on in the main run loop
|
||||
skybox = NULL; // This is used/set later on in the main run loop
|
||||
|
||||
local_inventory = new Inventory(itemdef_manager);
|
||||
|
||||
@ -2152,7 +2152,7 @@ bool Game::connectToServer(const std::string &playername,
|
||||
const std::string &password, std::string *address, u16 port,
|
||||
bool *connect_ok, bool *aborted)
|
||||
{
|
||||
*connect_ok = false; // Let's not be overly optimistic
|
||||
*connect_ok = false; // Let's not be overly optimistic
|
||||
*aborted = false;
|
||||
bool local_server_mode = false;
|
||||
|
||||
@ -2197,7 +2197,7 @@ bool Game::connectToServer(const std::string &playername,
|
||||
if (!client)
|
||||
return false;
|
||||
|
||||
gamedef = client; // Client acts as our GameDef
|
||||
gamedef = client; // Client acts as our GameDef
|
||||
|
||||
infostream << "Connecting to server at ";
|
||||
connect_address.print(&infostream);
|
||||
@ -2397,19 +2397,19 @@ inline bool Game::handleCallbacks()
|
||||
|
||||
if (g_gamecallback->changepassword_requested) {
|
||||
(new GUIPasswordChange(guienv, guiroot, -1,
|
||||
&g_menumgr, client))->drop();
|
||||
&g_menumgr, client))->drop();
|
||||
g_gamecallback->changepassword_requested = false;
|
||||
}
|
||||
|
||||
if (g_gamecallback->changevolume_requested) {
|
||||
(new GUIVolumeChange(guienv, guiroot, -1,
|
||||
&g_menumgr, client))->drop();
|
||||
&g_menumgr, client))->drop();
|
||||
g_gamecallback->changevolume_requested = false;
|
||||
}
|
||||
|
||||
if (g_gamecallback->keyconfig_requested) {
|
||||
(new GUIKeyChangeMenu(guienv, guiroot, -1,
|
||||
&g_menumgr))->drop();
|
||||
&g_menumgr))->drop();
|
||||
g_gamecallback->keyconfig_requested = false;
|
||||
}
|
||||
|
||||
@ -2643,10 +2643,10 @@ void Game::processKeyboardInput(VolatileRunFlags *flags,
|
||||
else if (input->wasKeyDown(keycache.key[KeyCache::KEYMAP_ID_DEBUG_STACKS])) {
|
||||
// Print debug stacks
|
||||
dstream << "-----------------------------------------"
|
||||
<< std::endl;
|
||||
<< std::endl;
|
||||
dstream << DTIME << "Printing debug stacks:" << std::endl;
|
||||
dstream << "-----------------------------------------"
|
||||
<< std::endl;
|
||||
<< std::endl;
|
||||
debug_stacks_print();
|
||||
}
|
||||
|
||||
@ -2675,7 +2675,7 @@ void Game::processItemSelection(u16 *new_playeritem)
|
||||
|
||||
s32 wheel = input->getMouseWheel();
|
||||
u16 max_item = MYMIN(PLAYER_INVENTORY_SIZE - 1,
|
||||
player->hud_hotbar_itemcount - 1);
|
||||
player->hud_hotbar_itemcount - 1);
|
||||
|
||||
if (wheel < 0)
|
||||
*new_playeritem = *new_playeritem < max_item ? *new_playeritem + 1 : 0;
|
||||
@ -2894,7 +2894,7 @@ void Game::toggleProfiler(float *statustext_time, u32 *profiler_current_page,
|
||||
if (*profiler_current_page != 0) {
|
||||
std::wstringstream sstr;
|
||||
sstr << "Profiler shown (page " << *profiler_current_page
|
||||
<< " of " << profiler_max_page << ")";
|
||||
<< " of " << profiler_max_page << ")";
|
||||
statustext = sstr.str();
|
||||
} else {
|
||||
statustext = L"Profiler hidden";
|
||||
@ -3061,7 +3061,7 @@ inline void Game::step(f32 *dtime)
|
||||
bool can_be_and_is_paused =
|
||||
(simple_singleplayer_mode && g_menumgr.pausesGame());
|
||||
|
||||
if (can_be_and_is_paused) { // This is for a singleplayer server
|
||||
if (can_be_and_is_paused) { // This is for a singleplayer server
|
||||
*dtime = 0; // No time passes
|
||||
} else {
|
||||
if (server != NULL) {
|
||||
@ -3104,7 +3104,7 @@ void Game::processClientEvents(CameraOrientation *cam, float *damage_flash)
|
||||
show_deathscreen(¤t_formspec, client, gamedef, texture_src,
|
||||
device, client);
|
||||
|
||||
chat_backend->addMessage(L"", L"You died.");
|
||||
// chat_backend->addMessage(L"", L"You died.");
|
||||
|
||||
/* Handle visualization */
|
||||
*damage_flash = 0;
|
||||
@ -3118,7 +3118,7 @@ void Game::processClientEvents(CameraOrientation *cam, float *damage_flash)
|
||||
new TextDestPlayerInventory(client, *(event.show_formspec.formname));
|
||||
|
||||
create_formspec_menu(¤t_formspec, client, gamedef,
|
||||
texture_src, device, fs_src, txt_dst, client);
|
||||
texture_src, device, fs_src, txt_dst, client);
|
||||
|
||||
delete(event.show_formspec.formspec);
|
||||
delete(event.show_formspec.formname);
|
||||
@ -3322,7 +3322,7 @@ void Game::updateCamera(VolatileRunFlags *flags, u32 busy_time,
|
||||
|
||||
tool_reload_ratio = MYMIN(tool_reload_ratio, 1.0);
|
||||
camera->update(player, dtime, busy_time / 1000.0f, tool_reload_ratio,
|
||||
client->getEnv());
|
||||
client->getEnv());
|
||||
camera->step(dtime);
|
||||
|
||||
v3f camera_position = camera->getPosition();
|
||||
@ -3352,13 +3352,13 @@ void Game::updateSound(f32 dtime)
|
||||
// Update sound listener
|
||||
v3s16 camera_offset = camera->getOffset();
|
||||
sound->updateListener(camera->getCameraNode()->getPosition() + intToFloat(camera_offset, BS),
|
||||
v3f(0, 0, 0), // velocity
|
||||
camera->getDirection(),
|
||||
camera->getCameraNode()->getUpVector());
|
||||
v3f(0, 0, 0), // velocity
|
||||
camera->getDirection(),
|
||||
camera->getCameraNode()->getUpVector());
|
||||
sound->setListenerGain(g_settings->getFloat("sound_volume"));
|
||||
|
||||
|
||||
// Update sound maker
|
||||
// Update sound maker
|
||||
soundmaker->step(dtime);
|
||||
|
||||
LocalPlayer *player = client->getEnv().getLocalPlayer();
|
||||
@ -3411,7 +3411,7 @@ void Game::processPlayerInteraction(std::vector<aabb3f> &highlight_boxes,
|
||||
camera_position + camera_direction * BS * (d + 1));
|
||||
|
||||
} else {
|
||||
// prevent player pointing anything in front-view
|
||||
// prevent player pointing anything in front-view
|
||||
if (camera->getCameraMode() == CAMERA_MODE_THIRD_FRONT)
|
||||
shootline = core::line3d<f32>(0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
@ -3457,7 +3457,7 @@ void Game::processPlayerInteraction(std::vector<aabb3f> &highlight_boxes,
|
||||
if (runData->digging) {
|
||||
if (input->getLeftReleased()) {
|
||||
infostream << "Left button released"
|
||||
<< " (stopped digging)" << std::endl;
|
||||
<< " (stopped digging)" << std::endl;
|
||||
runData->digging = false;
|
||||
} else if (pointed != runData->pointed_old) {
|
||||
if (pointed.type == POINTEDTHING_NODE
|
||||
@ -3468,7 +3468,7 @@ void Game::processPlayerInteraction(std::vector<aabb3f> &highlight_boxes,
|
||||
// Don't reset.
|
||||
} else {
|
||||
infostream << "Pointing away from node"
|
||||
<< " (stopped digging)" << std::endl;
|
||||
<< " (stopped digging)" << std::endl;
|
||||
runData->digging = false;
|
||||
}
|
||||
}
|
||||
@ -3584,7 +3584,7 @@ void Game::handlePointingAtNode(GameRunData *runData,
|
||||
TextDest *txt_dst = new TextDestNodeMetadata(nodepos, client);
|
||||
|
||||
create_formspec_menu(¤t_formspec, client, gamedef,
|
||||
texture_src, device, fs_src, txt_dst, client);
|
||||
texture_src, device, fs_src, txt_dst, client);
|
||||
|
||||
current_formspec->setFormSpec(meta->getString("formspec"), inventoryloc);
|
||||
} else {
|
||||
@ -3829,7 +3829,7 @@ void Game::updateFrame(std::vector<aabb3f> &highlight_boxes,
|
||||
direct_brightness = client->getEnv().getClientMap()
|
||||
.getBackgroundBrightness(MYMIN(runData->fog_range * 1.2, 60 * BS),
|
||||
daynight_ratio, (int)(old_brightness * 255.5), &sunlight_seen)
|
||||
/ 255.0;
|
||||
/ 255.0;
|
||||
}
|
||||
|
||||
float time_of_day = runData->time_of_day;
|
||||
@ -3868,7 +3868,7 @@ void Game::updateFrame(std::vector<aabb3f> &highlight_boxes,
|
||||
clouds->setVisible(true);
|
||||
clouds->step(dtime);
|
||||
clouds->update(v2f(player_position.X, player_position.Z),
|
||||
sky->getCloudColor());
|
||||
sky->getCloudColor());
|
||||
} else {
|
||||
clouds->setVisible(false);
|
||||
}
|
||||
@ -4264,20 +4264,20 @@ void Game::extendedResourceCleanup()
|
||||
// Extended resource accounting
|
||||
infostream << "Irrlicht resources after cleanup:" << std::endl;
|
||||
infostream << "\tRemaining meshes : "
|
||||
<< device->getSceneManager()->getMeshCache()->getMeshCount() << std::endl;
|
||||
<< device->getSceneManager()->getMeshCache()->getMeshCount() << std::endl;
|
||||
infostream << "\tRemaining textures : "
|
||||
<< driver->getTextureCount() << std::endl;
|
||||
<< driver->getTextureCount() << std::endl;
|
||||
|
||||
for (unsigned int i = 0; i < driver->getTextureCount(); i++) {
|
||||
irr::video::ITexture *texture = driver->getTextureByIndex(i);
|
||||
infostream << "\t\t" << i << ":" << texture->getName().getPath().c_str()
|
||||
<< std::endl;
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
clearTextureNameCache();
|
||||
infostream << "\tRemaining materials: "
|
||||
<< driver-> getMaterialRendererCount()
|
||||
<< " (note: irrlicht doesn't support removing renderers)" << std::endl;
|
||||
<< driver-> getMaterialRendererCount()
|
||||
<< " (note: irrlicht doesn't support removing renderers)" << std::endl;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 47 KiB |