Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Sep 15, 2024
2 parents 26c95a8 + 3f5e4b2 commit 2bc71d3
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 60 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change Log

## [2024.08.p1](https://github.com/lord-server/lord/releases/tag/2024.08.p1)
- Fix tapestry collision_box; convert tapestry.lua to tabs. Closes #1645 (#1661)
- Fix not returning an empty bottle on drinking honey. Closes #1649 (#1662)
- Fix banister replacing blocks; Fixes #1493 (#1664)
- Fix a typo: poisen -> poison; Closes #1670 (#1671)

## [2024.08](https://github.com/lord-server/lord/releases/tag/2024.08)
- New Damage System:
- Now dead men attacks with `soul` damage. Closes #1631
Expand Down
96 changes: 52 additions & 44 deletions mods/lord/Blocks/castle/tapestry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,18 @@ function tapestry.register(name, desc, tile)
tiles = { tile, },
drawtype = "mesh",
mesh = "tapestry.obj",
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,1.500000,0.500000},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,1.500000,0.500000},
},
},
collision_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,1.500000,0.500000},
},
},
use_texture_alpha = "clip",
}))
end
Expand All @@ -88,25 +94,26 @@ function tapestry.register_long(name, desc, tile)
description = desc,
tiles = { tile, },
node_box = {
type = "fixed",
fixed = {
{-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
{0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
{-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
{0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
{-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
{0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
{-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
{0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
{-0.500000,0.000000,0.437500,0.500000,2.500000,0.500000},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,2.500000,0.500000},
},
},
type = "fixed",
fixed = {
{-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
{0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
{-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
{0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
{-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
{0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
{-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
{0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
{-0.500000,0.000000,0.437500,0.500000,2.500000,0.500000},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,2.500000,0.500000},
},
},
use_texture_alpha = "clip",
}))
end

Expand All @@ -119,25 +126,26 @@ function tapestry.register_very_long(name, desc, tile)
description = desc,
tiles = { tile, },
node_box = {
type = "fixed",
fixed = {
{-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
{0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
{-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
{0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
{-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
{0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
{-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
{0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
{-0.500000,0.000000,0.437500,0.500000,3.500000,0.500000},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,3.500000,0.500000},
},
},
type = "fixed",
fixed = {
{-0.312500,-0.500000,0.437500,-0.187500,-0.375000,0.500000},
{0.187500,-0.500000,0.437500,0.312500,-0.375000,0.500000},
{-0.375000,-0.375000,0.437500,-0.125000,-0.250000,0.500000},
{0.125000,-0.375000,0.437500,0.375000,-0.250000,0.500000},
{-0.437500,-0.250000,0.437500,-0.062500,-0.125000,0.500000},
{0.062500,-0.250000,0.437500,0.437500,-0.125000,0.500000},
{-0.500000,-0.125000,0.437500,0.000000,0.000000,0.500000},
{0.000000,-0.125000,0.437500,0.500000,0.000000,0.500000},
{-0.500000,0.000000,0.437500,0.500000,3.500000,0.500000},
},
},
selection_box = {
type = "fixed",
fixed = {
{-0.500000,-0.500000,0.437500,0.500000,3.500000,0.500000},
},
},
use_texture_alpha = "clip",
}))
end

Expand Down
5 changes: 4 additions & 1 deletion mods/lord/Entities/bees/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,10 @@ local S = minetest.get_translator("bees")
minetest.register_craftitem('bees:bottle_honey', {
description = S('honey bottle'),
inventory_image = 'bees_bottle_honey.png',
on_use = minetest.item_eat(22),
on_use = function(itemstack, user, pointed_thing)
minetest.give_or_drop(user, ItemStack("vessels:glass_bottle"))
return minetest.do_item_eat(22, nil, itemstack, user, pointed_thing)
end,
_tt_food_hp = 22,
})

Expand Down
30 changes: 15 additions & 15 deletions mods/lord/Player/hud_modpack/hbhunger/hunger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ end
-- food functions
local food = hbhunger.food

function hbhunger.register_food(name, hunger_change, replace_with_item, poisen, heal, sound)
function hbhunger.register_food(name, hunger_change, replace_with_item, poison, heal, sound)
food[name] = {}
food[name].saturation = hunger_change -- hunger points added
food[name].replace = replace_with_item -- what item is given back after eating
food[name].poisen = poisen -- time its poisening
food[name].poison = poison -- time its poisoning
food[name].healing = heal -- amount of HP
food[name].sound = sound -- special sound that is played when eating
end
Expand All @@ -43,15 +43,15 @@ function hbhunger.eat(hp_change, replace_with_item, itemstack, user, pointed_thi
def.saturation = hp_change
def.replace = replace_with_item
end
local func = hbhunger.item_eat(def.saturation, def.replace, def.poisen, def.healing, def.sound)
local func = hbhunger.item_eat(def.saturation, def.replace, def.poison, def.healing, def.sound)
return func(itemstack, user, pointed_thing)
end

local function poisenp(tick, poisen, time_left, player, player_name)
local time_full = math.abs(poisen)
local function poisonp(tick, poison, time_left, player, player_name)
local time_full = math.abs(poison)
time_left = time_left + tick
if time_left < time_full then
minetest.after(tick, poisenp, tick, poisen, time_left, player, player_name)
minetest.after(tick, poisonp, tick, poison, time_left, player, player_name)
else
hbhunger.poisonings[player_name] = hbhunger.poisonings[player_name] - 1
if hbhunger.poisonings[player_name] <= 0 then
Expand All @@ -61,12 +61,12 @@ local function poisenp(tick, poisen, time_left, player, player_name)
end

local hp = player:get_hp()
if hp and (hp-1 > 0) and (poisen < 0) then
if hp and (hp-1 > 0) and (poison < 0) then
player:set_hp(hp - 1)
end
end

function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound)
function hbhunger.item_eat(hunger_change, replace_with_item, poison, heal, sound)
return function(itemstack, user, pointed_thing)
if itemstack:take_item() ~= nil and user ~= nil then
local name = user:get_player_name()
Expand Down Expand Up @@ -97,17 +97,17 @@ function hbhunger.item_eat(hunger_change, replace_with_item, poisen, heal, sound
user:set_hp(hp)
end
-- Poison
if poisen then
if poison then
-- Set poison bar
local hotbar_poisen_texture
if poisen < 0 then
hotbar_poisen_texture = "hbhunger_icon_health_poison.png"
local hotbar_poison_texture
if poison < 0 then
hotbar_poison_texture = "hbhunger_icon_health_poison.png"
else
hotbar_poisen_texture = "hbhunger_icon_health_regen.png"
hotbar_poison_texture = "hbhunger_icon_health_regen.png"
end
hb.change_hudbar(user, "health", nil, nil, hotbar_poisen_texture, nil, hotbar_poisen_texture)
hb.change_hudbar(user, "health", nil, nil, hotbar_poison_texture, nil, hotbar_poison_texture)
hbhunger.poisonings[name] = hbhunger.poisonings[name] + 1
poisenp(1, poisen, 0, user, user:get_player_name())
poisonp(1, poison, 0, user, user:get_player_name())
end

if itemstack:get_count() == 0 then
Expand Down

0 comments on commit 2bc71d3

Please sign in to comment.