mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2026-03-14 20:32:02 +00:00
More aligning of code
This commit is contained in:
@@ -31,7 +31,7 @@ def pbCaveEntranceEx(exiting)
|
||||
for i in 0...totalBands
|
||||
currentGray = grays[i]
|
||||
sprite.bitmap.fill_rect(Rect.new(x, y, rectwidth, rectheight),
|
||||
Color.new(currentGray, currentGray, currentGray))
|
||||
Color.new(currentGray, currentGray, currentGray))
|
||||
x += bandwidth
|
||||
y += bandheight
|
||||
rectwidth -= bandwidth * 2
|
||||
|
||||
@@ -507,7 +507,8 @@ def pbMoveRoute(event, commands, waitComplete = false)
|
||||
i += 2
|
||||
when PBMoveRoute::Graphic
|
||||
route.list.push(RPG::MoveCommand.new(commands[i],
|
||||
[commands[i + 1], commands[i + 2], commands[i + 3], commands[i + 4]]))
|
||||
[commands[i + 1], commands[i + 2],
|
||||
commands[i + 3], commands[i + 4]]))
|
||||
i += 4
|
||||
else
|
||||
route.list.push(RPG::MoveCommand.new(commands[i]))
|
||||
@@ -728,7 +729,7 @@ def pbItemBall(item, quantity = 1)
|
||||
pbMessage(_INTL("\\me[{1}]You found a \\c[1]{2}\\c[0]!\\wtnp[30]", meName, itemname))
|
||||
end
|
||||
pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
|
||||
itemname, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
itemname, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
return true
|
||||
end
|
||||
# Can't add the item
|
||||
@@ -774,7 +775,7 @@ def pbReceiveItem(item, quantity = 1)
|
||||
end
|
||||
if $bag.add(item, quantity) # If item can be added
|
||||
pbMessage(_INTL("You put the {1} in\\nyour Bag's <icon=bagPocket{2}>\\c[1]{3}\\c[0] pocket.",
|
||||
itemname, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
itemname, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
return true
|
||||
end
|
||||
return false # Can't add the item
|
||||
|
||||
@@ -508,8 +508,7 @@ def pbTrainerBattle(trainerID, trainerName, endSpeech = nil,
|
||||
# Perform the battle
|
||||
if $game_temp.waiting_trainer
|
||||
decision = pbTrainerBattleCore($game_temp.waiting_trainer[0],
|
||||
[trainerID, trainerName, trainerPartyID, endSpeech]
|
||||
)
|
||||
[trainerID, trainerName, trainerPartyID, endSpeech])
|
||||
else
|
||||
decision = pbTrainerBattleCore([trainerID, trainerName, trainerPartyID, endSpeech])
|
||||
end
|
||||
|
||||
@@ -91,7 +91,8 @@ def pbHiddenMoveAnimation(pokemon)
|
||||
interp = RectInterpolator.new(
|
||||
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
||||
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
||||
Graphics.frame_rate / 4)
|
||||
Graphics.frame_rate / 4
|
||||
)
|
||||
ptinterp = nil
|
||||
phase = 1
|
||||
frames = 0
|
||||
@@ -110,7 +111,8 @@ def pbHiddenMoveAnimation(pokemon)
|
||||
ptinterp = PointInterpolator.new(
|
||||
Graphics.width + (sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
||||
Graphics.width / 2, bg.bitmap.height / 2,
|
||||
Graphics.frame_rate * 4 / 10)
|
||||
Graphics.frame_rate * 4 / 10
|
||||
)
|
||||
end
|
||||
when 2 # Slide Pokémon sprite in from right to centre
|
||||
ptinterp.update
|
||||
@@ -129,7 +131,8 @@ def pbHiddenMoveAnimation(pokemon)
|
||||
ptinterp = PointInterpolator.new(
|
||||
Graphics.width / 2, bg.bitmap.height / 2,
|
||||
-(sprite.bitmap.width / 2), bg.bitmap.height / 2,
|
||||
Graphics.frame_rate * 4 / 10)
|
||||
Graphics.frame_rate * 4 / 10
|
||||
)
|
||||
frames = 0
|
||||
end
|
||||
when 4 # Slide Pokémon sprite off from centre to left
|
||||
@@ -142,7 +145,8 @@ def pbHiddenMoveAnimation(pokemon)
|
||||
interp = RectInterpolator.new(
|
||||
Rect.new(0, (Graphics.height - bg.bitmap.height) / 2, Graphics.width, bg.bitmap.height),
|
||||
Rect.new(0, Graphics.height / 2, Graphics.width, 0),
|
||||
Graphics.frame_rate / 4)
|
||||
Graphics.frame_rate / 4
|
||||
)
|
||||
end
|
||||
when 5 # Shrink viewport height from full to zero
|
||||
interp.update
|
||||
|
||||
@@ -272,7 +272,7 @@ class BerryPlantSprite
|
||||
@old_stage > 0 && berry_plant.growth_stage <= GameData::BerryPlant::NUMBER_OF_GROWTH_STAGES + 1
|
||||
spriteset = $scene.spriteset(@map.map_id)
|
||||
spriteset.addUserAnimation(Settings::PLANT_SPARKLE_ANIMATION_ID,
|
||||
@event.x, @event.y, false, 1) if spriteset
|
||||
@event.x, @event.y, false, 1) if spriteset
|
||||
end
|
||||
end
|
||||
@old_stage = berry_plant.growth_stage
|
||||
@@ -356,7 +356,7 @@ def pbBerryPlant
|
||||
GameData::BerryPlant::WATERING_CANS.each do |item|
|
||||
next if !$bag.has?(item)
|
||||
break if !pbConfirmMessage(_INTL("Want to sprinkle some water with the {1}?",
|
||||
GameData::Item.get(item).name))
|
||||
GameData::Item.get(item).name))
|
||||
berry_plant.water
|
||||
pbMessage(_INTL("{1} watered the plant.\\wtnp[40]", $player.name))
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
@@ -376,7 +376,7 @@ def pbBerryPlant
|
||||
pbMessage(_INTL("{1} has been laid down.\1", GameData::Item.get(berry_plant.mulch_id).name))
|
||||
else
|
||||
case pbMessage(_INTL("It's soft, earthy soil."),
|
||||
[_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
[_INTL("Fertilize"), _INTL("Plant Berry"), _INTL("Exit")], -1)
|
||||
when 0 # Fertilize
|
||||
mulch = nil
|
||||
pbFadeOutIn {
|
||||
@@ -417,10 +417,10 @@ def pbBerryPlant
|
||||
$bag.remove(berry)
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("The {1} was planted in the soft, earthy soil.",
|
||||
GameData::Item.get(berry).name))
|
||||
GameData::Item.get(berry).name))
|
||||
else
|
||||
pbMessage(_INTL("{1} planted a {2} in the soft loamy soil.",
|
||||
$player.name, GameData::Item.get(berry).name))
|
||||
$player.name, GameData::Item.get(berry).name))
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -454,7 +454,7 @@ def pbPickBerry(berry, qty = 1)
|
||||
end
|
||||
pocket = berry.pocket
|
||||
pbMessage(_INTL("{1} put the \\c[1]{2}\\c[0] in the <icon=bagPocket{3}>\\c[1]{4}\\c[0] Pocket.\1",
|
||||
$player.name, berry_name, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
$player.name, berry_name, pocket, PokemonBag.pocket_names[pocket - 1]))
|
||||
if Settings::NEW_BERRY_PLANTS
|
||||
pbMessage(_INTL("The soil returned to its soft and earthy state."))
|
||||
else
|
||||
|
||||
@@ -575,11 +575,11 @@ module RandomDungeonGenerator
|
||||
for y in 0...maxHeight / cellHeight
|
||||
for x in 0...maxWidth / cellWidth
|
||||
pattern = maze.getEdgePattern(x, y)
|
||||
if DungeonMaze.paint_cell_contents(
|
||||
self, BUFFER_X + x * cellWidth, BUFFER_Y + y * cellHeight,
|
||||
corridor_patterns[pattern], DungeonMaze::TURN_NONE)
|
||||
roomcount += 1
|
||||
end
|
||||
next if !DungeonMaze.paint_cell_contents(
|
||||
self, BUFFER_X + x * cellWidth, BUFFER_Y + y * cellHeight,
|
||||
corridor_patterns[pattern], DungeonMaze::TURN_NONE
|
||||
)
|
||||
roomcount += 1
|
||||
end
|
||||
end
|
||||
# If no rooms were generated, make the whole map a room
|
||||
|
||||
Reference in New Issue
Block a user