Tidied up semicolon use, refactored random dungeon generation code, fixed visual bug in Day Care debug screen

This commit is contained in:
Maruno17
2021-08-22 23:18:34 +01:00
parent ecc5a040cd
commit 8bb70a226e
64 changed files with 1286 additions and 926 deletions

View File

@@ -42,11 +42,16 @@ class MiningGameTile < BitmapSprite
@viewport.z=99999
super(32,32,@viewport)
r = rand(100)
if r<10; @layer = 2 # 10%
elsif r<25; @layer = 3 # 15%
elsif r<60; @layer = 4 # 35%
elsif r<85; @layer = 5 # 25%
else; @layer = 6 # 15%
if r < 10
@layer = 2 # 10%
elsif r < 25
@layer = 3 # 15%
elsif r < 60
@layer = 4 # 35%
elsif r < 85
@layer = 5 # 25%
else
@layer = 6 # 15%
end
@image=AnimatedBitmap.new(_INTL("Graphics/Pictures/Mining/tiles"))
update
@@ -104,10 +109,12 @@ class MiningGameCursor < BitmapSprite
y = 32*(@position/MiningGameScene::BOARDWIDTH)
if @counter>0
@counter -= 1
toolx = x; tooly = y
toolx = x
tooly = y
i = 10-(@counter/2).floor
if ToolPositions[i][1]==1
toolx -= 8; tooly += 8
toolx -= 8
tooly += 8
elsif ToolPositions[i][1]==2
toolx += 6
end