From 3ed54ea8fc2d205ad30c2c5850d0b2b14549b7b3 Mon Sep 17 00:00:00 2001 From: Freeman Date: Thu, 17 Aug 2023 21:10:08 +0200 Subject: [PATCH] revert, chat msgs instead titles --- commands.lua | 6 +++--- income.lua | 4 ++-- shop.lua | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/commands.lua b/commands.lua index 9303c7e..ada7761 100644 --- a/commands.lua +++ b/commands.lua @@ -1,6 +1,6 @@ --- Copyright (C) 2021, 2022 Ale +-- Copyright (C) 2021, 2023 Ale -- This file is part of Emeraldbank Minetest Mod. @@ -56,10 +56,10 @@ core.register_chatcommand("pay", { pitch = 1.0, }) else - mcl_title.set(player1, "subtitle", {text=S("Not enough Emeralds in your account"), color="dark_red"}) + core.chat_send_player(name, S("Not enough Emeralds in your account")) end else - mcl_title.set(player1, "subtitle", {text=S("Invalid pay"), color="dark_red"}) + core.chat_send_player(name, S("Invalid pay")) end return true end diff --git a/income.lua b/income.lua index f876072..9844233 100644 --- a/income.lua +++ b/income.lua @@ -1,6 +1,6 @@ --- Copyright (C) 2021, 2022 Ale +-- Copyright (C) 2021, 2023 Ale -- This file is part of Emeraldbank Minetest Mod. @@ -34,7 +34,7 @@ core.register_globalstep(function(dtime) for _, player in ipairs(core.get_connected_players()) do if not player or player.is_fake_player then return end local name = player:get_player_name() - mcl_title.set(player, "subtitle", {text=S("You have earned @1 emeralds in your bank account!", income_count), color="green"}) + core.chat_send_player(name, S("You have earned @1 emeralds in your bank account!", income_count)) emeraldbank.add_emeralds(player, income_count) end end diff --git a/shop.lua b/shop.lua index d9ef287..ecd6e12 100644 --- a/shop.lua +++ b/shop.lua @@ -1,6 +1,6 @@ --- Copyright (C) 2021, 2022 Ale +-- Copyright (C) 2021, 2023 Ale -- This file is part of Emeraldbank Minetest Mod. @@ -298,7 +298,7 @@ core.register_on_player_receive_fields(function(sender, formname, fields) -- owner try exchanges if meta:get_string("owner") == name then - mcl_title.set(sender, "subtitle", {text=S("This is your own shop, you can't exchange to yourself!"), color="dark_red"}) + core.chat_send_player(name, S("This is your own shop, you can't exchange to yourself!")) else @@ -307,13 +307,13 @@ core.register_on_player_receive_fields(function(sender, formname, fields) -- have u money? if bankemeralds < old_price then can_exchange = false - mcl_title.set(sender, "subtitle", {text=S("Not enough Emeralds in your account"), color="dark_red"}) + core.chat_send_player(name, S("Not enough Emeralds in your account")) end --there are enough items? if not minv:contains_item("stock", shop_item.." "..old_count, true) then can_exchange = false - mcl_title.set(sender, "subtitle", {text=S("Out of Stock!"), color="dark_red"}) + core.chat_send_player(name, S("Out of Stock!")) end -- do not trade air