From 9560c68a17985f614a4b83748d220416504ce3ae Mon Sep 17 00:00:00 2001 From: Signal Date: Sun, 14 Sep 2025 23:18:11 -0400 Subject: [PATCH] Fix --- mods/rgt_player/init.lua | 31 ++++++++++++++++++ mods/rgt_player/textures/rgt_heart_empty.png | Bin 0 -> 178 bytes .../textures/rgt_towns_constructor_bottom.png | Bin 95 -> 193 bytes 3 files changed, 31 insertions(+) create mode 100644 mods/rgt_player/init.lua create mode 100644 mods/rgt_player/textures/rgt_heart_empty.png diff --git a/mods/rgt_player/init.lua b/mods/rgt_player/init.lua new file mode 100644 index 0000000..f979e14 --- /dev/null +++ b/mods/rgt_player/init.lua @@ -0,0 +1,31 @@ +local ns = rgt +ns.players = {} + +Player = { + new = function(p) + local e = setmetatable({ + name = p:get_player_name(), + object = p + }, {__index = Player}) + return e + end +} +setmetatable(Player, { + __call = function(_, ...) return Player.new(...) end +}) + +-- TODO: Replace builtin health system with custom health system +minetest.hud_replace_builtin("health", { + type = "statbar", + position = {x=0.5,y=1}, + offset = {x=-27 *10 -1,y=-96}, + scale = {x=4,y=4}, + alignment = {x=-1, y=-1}, + size = {x=27,y=27}, + text = "rgt_heart.png", + text2 = "rgt_heart_empty.png" +}) + +minetest.register_on_joinplayer(function(p) + ns.players[p:get_player_name()] = Player(p) +end) diff --git a/mods/rgt_player/textures/rgt_heart_empty.png b/mods/rgt_player/textures/rgt_heart_empty.png new file mode 100644 index 0000000000000000000000000000000000000000..16faec5a2c8a8a31c4ca5f31a14cbda61ac90780 GIT binary patch literal 178 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1|%O$WD@{VjKx9jP7LeL$-D$|ay(reLo_D# z_AlgPFywGP{nX%hqa@G&|AEFYJkK2Qi%~ek>*{&irlDJrA>gWPyCGYrN0za2(ABeN zW=3T%%ql-Fz34k1!;E4%Muv*K8Jkv`U75x_XXa#8o_GJ6+oN5|vfnb88J}8~wPyYC ae~kAJ7|2vH zB=;~dFt8wV-aL3rlpo*#?oeWF;NTPZ@#zCrb#TjB@Jl0G&cML%<=toOp2l<=Jd{|l znuo`2Ohoz>4p@lvD~b(x0H);xG{F5ztOiWLNNVy108$1Z5vVlUOh^C#002ovPDHLk FV1nSKLzDmj delta 52 zcmX@e7(c;KPtw!HF~p)b`OY@I`Hdn6TqeB=gTe~ HDWM4f{|6F#