Massive update (#6)

* Refactor some of the code, multiple bug fixes

* Fix something stupid

* More bug fixes

* LOTS OF STUFF

* Make the sniper alot stronger and other changes

* Prevent Players from respawning in the middle of a match

* Fix stupid mistake

* Small update

* More updates

* Remove minimap access.. and downgrade the sniper class
This commit is contained in:
IonicCheese 2025-12-10 19:17:42 -08:00 committed by GitHub
commit 17eeae8937
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
499 changed files with 616 additions and 225 deletions

View file

@ -0,0 +1,27 @@
-- Makes players glow
minetest.register_on_joinplayer(function(player)
player:set_properties({glow = 3})
end)
local MIN_GLOW = 8
-- Makes dropped items glow
minetest.register_on_mods_loaded(function()
local itemdef = minetest.registered_entities["__builtin:item"]
local old_set_item = itemdef.set_item
itemdef.set_item = function(self, itemstring)
old_set_item(self, itemstring)
local iname = itemstring or self.itemstring
iname = ItemStack(iname):get_name()
if not minetest.registered_items[iname] or (minetest.registered_items[iname].light_source or 0) < MIN_GLOW then
self.object:set_properties({glow = MIN_GLOW})
else
self.object:set_properties({glow = minetest.registered_items[iname].light_source})
end
end
minetest.register_entity(":__builtin:item", itemdef)
end)