Compare commits

...

8 Commits

Author SHA1 Message Date
88f32b7fe5 mobs_jam - optimize textures for mobiles 2023-08-06 22:18:00 -04:00
796bba5386 add missing mobs framework mod for mobs 2023-08-06 22:16:40 -04:00
e96fc05124 mobs and mobs_jam that mixed and resume mobs_animal+mobs_monster+mobs_doomed
* spawn tune up, more animals in the world and more monters in undergrounds
* penguin spawns more (was pretty rare found one) also permit to spawn in higer grounds
* rats spawns more but pretty more down, basically only in dungeons
* sheep spawns more due we need more lana, autodetect ethereal and put nodes to spawn
* tortoise spawns more
* wardog spawns more
* panda spawn not only in ethereal, also spawn in normal mods
* kitty spawn more frecuently, less rare
* mese monster and lava flan spwans more
* owl spawn more
* fire spirit can spawn now in lava also, and cave realms if detected
* cow spawns more
* more chicken and als permit to spawn ar the sea level too
* bee spawn little more but in more high levels
* bunny spawns more
2023-08-06 22:14:48 -04:00
ea7c18886f default - revent knockback for attached players
* backported from default game
  fbbc7fc996
2023-08-06 13:20:11 -04:00
da95192b0e default - remove gui background to reduce media transport on mobiles
* the formspecs will look translucide
2023-08-06 12:59:47 -04:00
322d7d3b70 update player model remove vertial 1 node offset on newer engines only
* Player model: Remove vertical 1 node offset for new engines, but
  Required due to the settable player collision box engine feature
  change for MT/MTG v0.5.0 that breaks compatibility with old client
  so due that this commit will added backguard compatibility
* Autodetec minetest versoin engine and provide right model
  character, update player code to provide compatibility with player_api
2023-08-06 12:57:28 -04:00
5c5e8058d5 default - is_area_protected was renamed from intersects_protection
* backported for working able, renaming compatible function,
  https://github.com/minetest/minetest/pull/7073/files#diff-910f021741edbae068c5577bfc681853791aa6dce900b35305972bf5e24941e5R178
  for engines that already has it enabled, if not just use
  old way function, this backported and enabled
  66372e75d9
  from default game and also from newer engines build-in lua files
* provide both cases based on engine version, newer just call
  the is_area_protected and older just have the code improved,
  with aliasing to the improved code.
2023-08-06 10:10:14 -04:00
98e5ebc431 default - more optimized textures and restore already optimized 2023-08-06 09:10:40 -04:00
366 changed files with 19811 additions and 27 deletions

View File

@ -485,28 +485,32 @@ minetest.register_abm({
--
-- Checks if specified volume intersects a protected volume
-- Checks if specified volume intersects a protected volume, return first node intersected in protected area by player
--
function default.intersects_protection(minp, maxp, player_name, interval)
-- 'interval' is the largest allowed interval for the 3D lattice of checks
if is_50 then
-- but newer engines returned first node that intersect area protected or false
if is_50 then
return minetest.is_area_protected(minp, maxp, player_name, interval)
else
else
-- Compute the optimal float step 'd' for each axis so that all corners and
-- borders are checked. 'd' will be smaller or equal to 'interval'.
-- Subtracting 1e-4 ensures that the max co-ordinate will be reached by the
-- for loop (which might otherwise not be the case due to rounding errors).
local d = {}
for _, c in pairs({"x", "y", "z"}) do
if minp[c] > maxp[c] then
local tmp = maxp[c]
maxp[c] = minp[c]
minp[c] = tmp -- Repair positions: 'minp' > 'maxp'
end
if maxp[c] > minp[c] then
d[c] = (maxp[c] - minp[c]) / math.ceil((maxp[c] - minp[c]) / interval) - 1e-4
elseif maxp[c] == minp[c] then
else
d[c] = 1 -- Any value larger than 0 to avoid division by zero
else -- maxp[c] < minp[c], print error and treat as protection intersected
minetest.log("error", "maxp < minp in 'default.intersects_protection()'")
return true
end
end
@ -516,8 +520,9 @@ else
local y = math.floor(yf + 0.5)
for xf = minp.x, maxp.x, d.x do
local x = math.floor(xf + 0.5)
if minetest.is_protected({x = x, y = y, z = z}, player_name) then
return true
local pos = {x = x, y = y, z = z}
if core.is_protected(pos, player_name) then
return pos
end
end
end
@ -525,8 +530,13 @@ else
return false
end
end
if not is_50 then
-- older engines backguar compatibility
minetest.is_area_protected = default.intersects_protection
end

View File

@ -10,7 +10,7 @@ default.LIGHT_MAX = 14
-- GUI related stuff
default.gui_bg = "bgcolor[#080808BB;true]"
default.gui_bg_img = "background[5,5;1,1;gui_formbg.png;true]"
default.gui_bg_img = ""
default.gui_slots = "listcolors[#00000069;#5A5A5A;#141318;#30434C;#FFF]"
function default.get_hotbar_bg(x,y)

View File

@ -25,6 +25,7 @@ LIGHT_MAX = default.LIGHT_MAX
default.gui_suvival_form = default.gui_survival_form
default.gui_bg = ""
default.gui_bg_img = ""
default.gui_slots = ""
-- Players
if minetest.get_modpath("player_api") then

Binary file not shown.

Binary file not shown.

View File

@ -5,16 +5,22 @@
-- Note: This is currently broken due to a bug in Irrlicht, leave at 0
local animation_blend = 0
local hp_player_maximun = tonumber(minetest.settings:get('default_hp_player_maximun')) or 40
local modelchar
local eyeheithg
if minetest.has_feature("object_use_texture_alpha") then
core.PLAYER_MAX_HP_DEFAULT = hp_player_maximun
local is_50 = minetest.has_feature("object_use_texture_alpha") or nil
if is_50 then
core.PLAYER_MAX_HP_DEFAULT = hp_player_maximun
modelchar = "character50.b3d"
eyeheithg = 1.47
else
core.PLAYER_MAX_HP = hp_player_maximun
core.PLAYER_MAX_HP = hp_player_maximun
modelchar = "character40.b3d"
eyeheithg = 1.625
end
default.registered_player_models = { }
if minetest.get_modpath("hudbars") then
hb.settings.hp_player_maximun = hp_player_maximun
end
-- Local for speed.
local models = default.registered_player_models
@ -24,7 +30,7 @@ function default.player_register_model(name, def)
end
-- Default player appearance
default.player_register_model("character.b3d", {
default.player_register_model( modelchar, {
animation_speed = 30,
textures = {"character.png", },
animations = {
@ -36,7 +42,9 @@ default.player_register_model("character.b3d", {
walk_mine = { x=200, y=219, },
sit = { x= 81, y=160, },
},
eye_height = 1.625,
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
stepheight = 0.6,
eye_height = eyeheithg,
})
-- Player stats and animations
@ -68,14 +76,19 @@ function default.player_set_model(player, model_name)
textures = player_textures[name] or model.textures,
visual = "mesh",
visual_size = model.visual_size or {x=1, y=1},
eye_height = model.eye_height or 1.47,
collisionbox = model.collisionbox or {-0.3, 0.0, -0.3, 0.3, 1.7, 0.3},
stepheight = model.stepheight or 0.6,
eye_height = model.eye_height or eyeheithg,
})
default.player_set_animation(player, "stand")
else
player:set_properties({
textures = { "player.png", "player_back.png", },
visual = "upright_sprite",
eye_height = 1.625,
visual_size = {x=1, y=2},
collisionbox = {-0.3, 0.0, -0.3, 0.3, 1.75, 0.3},
stepheight = 0.6,
eye_height = eyeheithg,
})
end
player_model[name] = model_name
@ -83,8 +96,10 @@ end
function default.player_set_textures(player, textures)
local name = player:get_player_name()
player_textures[name] = textures
player:set_properties({textures = textures,})
local model = models[player_model[name]]
local model_textures = model and model.textures or nil
player_textures[name] = textures or model_textures
player:set_properties({textures = textures or model_textures,})
player:set_properties({hp_max = hp_player_maximun})
end
@ -105,12 +120,9 @@ end
-- Update appearance when the player joins
minetest.register_on_joinplayer(function(player)
default.player_attached[player:get_player_name()] = false
default.player_set_model(player, "character.b3d")
default.player_set_model(player, modelchar)
player:set_local_animation({x=0, y=79}, {x=168, y=187}, {x=189, y=198}, {x=200, y=219}, 30)
player:set_properties({hp_max = hp_player_maximun})
player:hud_set_hotbar_image("gui_hotbar.png")
player:hud_set_hotbar_selected_image("gui_hotbar_selected.png")
end)
minetest.register_on_leaveplayer(function(player)
@ -124,6 +136,15 @@ end)
local player_set_animation = default.player_set_animation
local player_attached = default.player_attached
-- Prevent knockback for attached players
local old_calculate_knockback = minetest.calculate_knockback
function minetest.calculate_knockback(player, ...)
if player_attached[player:get_player_name()] then
return 0
end
return old_calculate_knockback(player, ...)
end
-- Check each player and apply animations
minetest.register_globalstep(function(dtime)
for _, player in pairs(minetest.get_connected_players()) do

Binary file not shown.

Before

Width:  |  Height:  |  Size: 283 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 135 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 206 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 187 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 207 B

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 131 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 225 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 192 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 167 B

After

Width:  |  Height:  |  Size: 165 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 166 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 134 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 B

After

Width:  |  Height:  |  Size: 153 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 267 B

After

Width:  |  Height:  |  Size: 257 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 477 B

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 166 B

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 B

After

Width:  |  Height:  |  Size: 176 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 154 B

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 168 B

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 157 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 174 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 136 B

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 B

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 150 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 253 B

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 235 B

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 176 B

After

Width:  |  Height:  |  Size: 147 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 151 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 225 B

After

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 282 B

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1017 B

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 925 B

After

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 184 B

After

Width:  |  Height:  |  Size: 184 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 165 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 B

After

Width:  |  Height:  |  Size: 159 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 180 B

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 B

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 156 B

After

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

After

Width:  |  Height:  |  Size: 133 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 174 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 381 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 130 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 132 B

After

Width:  |  Height:  |  Size: 132 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 B

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 192 B

After

Width:  |  Height:  |  Size: 180 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 193 B

After

Width:  |  Height:  |  Size: 182 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 150 B

After

Width:  |  Height:  |  Size: 128 B

Some files were not shown because too many files have changed in this diff Show More