mirror of
https://github.com/SashLilac/cambridge.git
synced 2025-05-13 20:21:25 -05:00
Compare commits
10 Commits
v0.3
...
a063f10d33
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a063f10d33 | ||
|
|
6e0b5e27c1 | ||
|
|
18e0e02c76 | ||
|
|
9381091110 | ||
| deb69fe28d | |||
|
|
3085b765e5 | ||
|
|
412405c1a1 | ||
|
|
7495c4ad04 | ||
|
|
0fce4b632f | ||
|
|
aa56248e34 |
@@ -57,13 +57,13 @@ Coding conventions
|
|||||||
Use tabs to indent, spaces to align.
|
Use tabs to indent, spaces to align.
|
||||||
|
|
||||||
* Specifically, spaces should not appear at the beginning of a line, and tabs should not appear _except_ at the beginning of a line.
|
* Specifically, spaces should not appear at the beginning of a line, and tabs should not appear _except_ at the beginning of a line.
|
||||||
* The sole exception is in a multiline `if` statement; the initial `if` should have four spaces before it to align it with an `elseif` on the next line. For example:
|
* If you're aligning multiline if-statements, the initial "if", "elseif" or "else" should be flush left with the indentation level, with spaces padding the gap to the next word as necessary. For example:
|
||||||
|
|
||||||
```lua
|
```lua
|
||||||
---- 4 spaces
|
if self.level < 900 then return 12
|
||||||
if self.level < 900 then return 12
|
elseif self.level < 1200 then return 8
|
||||||
elseif self.level < 1200 then return 8
|
else return 6
|
||||||
else return 6 end
|
end
|
||||||
```
|
```
|
||||||
|
|
||||||
Comments at the end of lines of code must be one line long. Multi-line comments must appear in their own block.
|
Comments at the end of lines of code must be one line long. Multi-line comments must appear in their own block.
|
||||||
|
|||||||
5
main.lua
5
main.lua
@@ -78,7 +78,10 @@ function love.draw()
|
|||||||
if config.gamesettings.display_gamemode == 1 or scene.title == "Title" then
|
if config.gamesettings.display_gamemode == 1 or scene.title == "Title" then
|
||||||
love.graphics.setFont(font_3x5_2)
|
love.graphics.setFont(font_3x5_2)
|
||||||
love.graphics.setColor(1, 1, 1, 1)
|
love.graphics.setColor(1, 1, 1, 1)
|
||||||
love.graphics.printf(version, 0, 460, 635, "right")
|
love.graphics.printf(
|
||||||
|
string.format("%.2f", 1 / love.timer.getAverageDelta()) ..
|
||||||
|
"fps - " .. version, 0, 460, 635, "right"
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
love.graphics.pop()
|
love.graphics.pop()
|
||||||
|
|||||||
BIN
res/img/rpc/1year.jpg
Normal file
BIN
res/img/rpc/1year.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 156 KiB |
@@ -44,8 +44,8 @@ function TitleScene:new()
|
|||||||
DiscordRPC:update({
|
DiscordRPC:update({
|
||||||
details = "In menus",
|
details = "In menus",
|
||||||
state = mainmenuidle[math.random(#mainmenuidle)],
|
state = mainmenuidle[math.random(#mainmenuidle)],
|
||||||
largeImageKey = "icon2",
|
largeImageKey = "1year",
|
||||||
largeImageText = version
|
largeImageText = version.." | Thanks for 1 year!"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -530,6 +530,8 @@ function GameMode:onEnterOrHold(inputs, ruleset)
|
|||||||
if not self.grid:canPlacePiece(self.piece) then
|
if not self.grid:canPlacePiece(self.piece) then
|
||||||
self.game_over = true
|
self.game_over = true
|
||||||
return
|
return
|
||||||
|
elseif self.piece:isDropBlocked(self.grid) then
|
||||||
|
playSE("bottom")
|
||||||
end
|
end
|
||||||
ruleset:dropPiece(
|
ruleset:dropPiece(
|
||||||
inputs, self.piece, self.grid, self:getGravity(),
|
inputs, self.piece, self.grid, self:getGravity(),
|
||||||
@@ -578,10 +580,6 @@ function GameMode:initializeNextPiece(
|
|||||||
self.piece_soft_locked = false
|
self.piece_soft_locked = false
|
||||||
self.buffer_hard_drop = false
|
self.buffer_hard_drop = false
|
||||||
self.buffer_soft_drop = false
|
self.buffer_soft_drop = false
|
||||||
if self.piece:isDropBlocked(self.grid) and
|
|
||||||
self.grid:canPlacePiece(self.piece) then
|
|
||||||
playSE("bottom")
|
|
||||||
end
|
|
||||||
if generate_next_piece == nil then
|
if generate_next_piece == nil then
|
||||||
table.remove(self.next_queue, 1)
|
table.remove(self.next_queue, 1)
|
||||||
table.insert(self.next_queue, self:getNextPiece(ruleset))
|
table.insert(self.next_queue, self:getNextPiece(ruleset))
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ function MarathonA2Game:advanceOneFrame()
|
|||||||
if self.clear then
|
if self.clear then
|
||||||
self.roll_frames = self.roll_frames + 1
|
self.roll_frames = self.roll_frames + 1
|
||||||
if self.roll_frames < 0 then return false end
|
if self.roll_frames < 0 then return false end
|
||||||
if self.roll_frames > 3694 then
|
if self.roll_frames > 3701 then
|
||||||
self.completed = true
|
self.completed = true
|
||||||
if self.grade == 32 then
|
if self.grade == 32 then
|
||||||
self.grade = 33
|
self.grade = 33
|
||||||
@@ -365,10 +365,10 @@ function MarathonA2Game:drawScoringInfo()
|
|||||||
love.graphics.setFont(font_3x5_3)
|
love.graphics.setFont(font_3x5_3)
|
||||||
if self.clear then
|
if self.clear then
|
||||||
if self:qualifiesForMRoll() then
|
if self:qualifiesForMRoll() then
|
||||||
if self.lines >= 32 and self.roll_frames > 3694 then love.graphics.setColor(1, 0.5, 0, 1)
|
if self.lines >= 32 and self.roll_frames > 3701 then love.graphics.setColor(1, 0.5, 0, 1)
|
||||||
else love.graphics.setColor(0, 1, 0, 1) end
|
else love.graphics.setColor(0, 1, 0, 1) end
|
||||||
else
|
else
|
||||||
if self.roll_frames > 3694 then love.graphics.setColor(1, 0.5, 0, 1)
|
if self.roll_frames > 3701 then love.graphics.setColor(1, 0.5, 0, 1)
|
||||||
else love.graphics.setColor(0, 1, 0, 1) end
|
else love.graphics.setColor(0, 1, 0, 1) end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user