Allowed gamemode and ruleset objects to control each other

Also added GameMode:onExit(), which triggers on game exit or retry
This commit is contained in:
Ishaan Bhardwaj
2021-02-19 11:01:18 -05:00
parent cb2b693bcb
commit 8a459b68ba
3 changed files with 11 additions and 7 deletions

View File

@@ -39,8 +39,8 @@ Ruleset.pieces = 7
-- Component functions.
function Ruleset:new()
function Ruleset:new(game_mode)
self.game = game_mode
if config.gamesettings.piece_colour == 1 then
blocks["bone"] = (not self.world) and
{