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

@@ -1390,7 +1390,8 @@ def pbAnimationsOrganiser
Graphics.width / 2, 64, Graphics.width / 2, Graphics.height - 64, viewport)
info.z = 2
commands = []
refreshlist = true; oldsel = -1
refreshlist = true
oldsel = -1
cmd = [0,0]
loop do
if refreshlist
@@ -1399,7 +1400,8 @@ def pbAnimationsOrganiser
commands.push(sprintf("%d: %s",i,(list[i]) ? list[i].name : "???"))
end
end
refreshlist = false; oldsel = -1
refreshlist = false
oldsel = -1
cmd = pbCommands3(cmdwin,commands,-1,cmd[1],true)
if cmd[0]==1 # Swap animation up
if cmd[1]>=0 && cmd[1]<commands.length-1

View File

@@ -15,7 +15,9 @@ class MiniBattle
def initialize
@battlers=[]
for i in 0...4; @battlers[i]=MiniBattler.new(i); end
for i in 0...4
@battlers[i] = MiniBattler.new(i)
end
end
end
@@ -950,8 +952,8 @@ def pbAnimEditorHelpWindow
helptext=""+
"To add a cel to the scene, click on the canvas. The selected cel will have a black "+
"frame. After a cel is selected, you can modify its properties using the keyboard:\n"+
"E, R - Rotate left/right;\nP - Open properties screen;\nArrow keys - Move cel 8 pixels "+
"(hold ALT for 2 pixels);\n+/- : Zoom in/out;\nL - Lock a cel. Locking a cel prevents it "+
"E, R - Rotate left/right.\nP - Open properties screen.\nArrow keys - Move cel 8 pixels "+
"(hold ALT for 2 pixels).\n+/- : Zoom in/out.\nL - Lock a cel. Locking a cel prevents it "+
"from being moved or deleted.\nDEL - Deletes the cel.\nAlso press TAB to switch the selected cel."
cmdwin=Window_UnformattedTextPokemon.newWithSize("",0,0,640,512)
cmdwin.opacity=224

View File

@@ -77,7 +77,8 @@ class SpriteWindow_DebugVariables < Window_DrawableCommand
def drawItem(index,_count,rect)
pbSetNarrowFont(self.contents)
colors = 0; codeswitch = false
colors = 0
codeswitch = false
if @mode==0
name = $data_system.switches[index+1]
codeswitch = (name[/^s\:/])
@@ -235,7 +236,7 @@ def pbDebugDayCare
for i in 0...2
textpos.push([_INTL("Pokémon {1}",i+1),Graphics.width/4+i*Graphics.width/2,2,2,base,shadow])
end
for i in 0...pbDayCareDeposited
for i in 0...2
next if !$PokemonGlobal.daycare[i][0]
y = 34
pkmn = $PokemonGlobal.daycare[i][0]
@@ -381,12 +382,16 @@ class SpriteWindow_DebugRoamers < Window_DrawableCommand
def shadowtext(t,x,y,w,h,align=0,colors=0)
width = self.contents.text_size(t).width
if align==1 ; x += (w-width) # Right aligned
elsif align==2; x += (w/2)-(width/2) # Centre aligned
if align==1
x += (w-width) # Right aligned
elsif align==2
x += (w/2)-(width/2) # Centre aligned
end
base = Color.new(12*8,12*8,12*8)
if colors==1; base = Color.new(168,48,56) # Red
elsif colors==2; base = Color.new(0,144,0) # Green
if colors==1
base = Color.new(168,48,56) # Red
elsif colors==2
base = Color.new(0,144,0) # Green
end
pbDrawShadowText(self.contents,x,y,[width,w].max,h,t,base,Color.new(26*8,26*8,25*8))
end