This commit totally rewrites and reworks several aspects of
the random_chests.lua file. A summary of the changes is as
follows.
- Simplify and improve configuration
- Totally rework chest generation code making it much more readable
and allowing the user to specify node groups which chests will not
spawn on
- Refactor code to follow minetest lua style conventions
- Store configuration variables in the random_chests table, rather
than in a local variable accessed via a setter function
- Remove the group parameter from random_chests.register_item
as it was unnecessary
weapons.lua was unnecessary. It did however contain the code that
handles disabling node digging. That code has been moved to setup.lua
a file with code that will execute immediately after init.lua has
finished executing, making it useful in the future for any other code
that needs to be executed to set things up after init.lua has finished.
Rework the glass arena mod so that it simply limits the mapgen instead
of generating a barrier to keep players from leaving the area. Remove
the glass_arena mod and incorporate the reworked version into the
hungry_games mod.
This commit adds a sudden death feature. A time period can now be specified
in mods/hungry_games/init.lua when all player inventories and chests
will be cleared, chest refills will stop (if enabled), and players will
all receive a predefined set of items. This ensures that games do not
continue on for very long periods of time due to players continually
healing themselves and restocking with chest items.
A configurable hard time limit has also been added. Once the hard time
limit is up, the game stops immediately.
The minetest_game mods that hungry_games was based off of were very
outdated. An update has been in order for some time now.
Mods updated:
-default
-dye
-bucket
-doors
-fire
-flowers
-stairs
-vessels
-wool
Mods added:
-boats
-xpanes
Mods removed:
-snow
-give_initial_stuff
-playermodel
-Remove nodetimer and ABM fill methods as they were confusing and unneeded
-Add hungry_games.chest_refill_interval to allow for refilling of chests during a match
-Add random_chests.setrefillspeed to set default refill speed of chests
-Clean up init.lua file in hungry_games
New itemstrings: default:apple_node, default:apple_item
Changes have been made to make sure the player only gets default:apple_item
so the apple can't be placed in the game (this was a bit irritating).