Ruleset and randomizer refactoring (Read comments)

You can now specify an arbitrary number of pieces for a ruleset.
The randomizers will adjust accordingly.
Expect a pento ruleset in the modpack soon!
Also, gamemode skin selection has been refactored.
This commit is contained in:
Ishaan Bhardwaj
2021-01-06 22:53:44 -05:00
parent ced40297cc
commit 1fdd091456
5 changed files with 54 additions and 12 deletions

View File

@@ -86,12 +86,8 @@ function PhantomMania2Game:getGarbageLimit()
else return 8 end
end
function PhantomMania2Game:getNextPiece(ruleset)
return {
skin = self.level >= 1000 and "bone" or "2tie",
shape = self.randomizer:nextPiece(),
orientation = ruleset:getDefaultOrientation(),
}
function PhantomMania2Game:getSkin()
return self.level >= 1000 and "bone" or "2tie"
end
function PhantomMania2Game:hitTorikan(old_level, new_level)