Replace chat with HUD events, add BS 5 palette (#848)

* Replace chat with HUD events, add BS 5 palette

* Use HUD events for paxel too

* Move paxel_stop function up
This commit is contained in:
Lars Müller 2021-03-29 23:00:46 +02:00 committed by GitHub
parent e40d1e666a
commit 87f7212f43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 106 additions and 34 deletions

View file

@ -71,8 +71,11 @@ local function stop_healing(player, interrupted)
players[name] = nil
if interrupted then
minetest.chat_send_player(name, minetest.colorize("#FF4444",
"Your healing was interrupted"..reason_handler(interrupted)))
hud_event.new(name, {
name = "medkits:interrupt",
color = 0xFF4444,
value = "Your healing was interrupted" .. reason_handler(interrupted),
})
player:set_hp(info.hp)
player:get_inventory():add_item("main", ItemStack("medkits:medkit 1"))
end