mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-08 05:34:58 +00:00
Added water ripple animation, removed second error message when the Compiler crashes
This commit is contained in:
@@ -400,6 +400,9 @@ module Settings
|
||||
# ID of the animation played when the player lands on the ground after hopping
|
||||
# over a ledge (shows a dust impact).
|
||||
DUST_ANIMATION_ID = 2
|
||||
# ID of the animation played when the player finishes taking a step onto still
|
||||
# water (shows a water ripple).
|
||||
WATER_RIPPLE_ANIMATION_ID = 8
|
||||
# ID of the animation played when a trainer notices the player (an exclamation
|
||||
# bubble).
|
||||
EXCLAMATION_ANIMATION_ID = 3
|
||||
|
||||
@@ -10,6 +10,7 @@ module GameData
|
||||
attr_reader :can_dive
|
||||
attr_reader :deep_bush
|
||||
attr_reader :shows_grass_rustle
|
||||
attr_reader :shows_water_ripple
|
||||
attr_reader :land_wild_encounters
|
||||
attr_reader :double_wild_encounters
|
||||
attr_reader :battle_environment
|
||||
@@ -50,6 +51,7 @@ module GameData
|
||||
@can_dive = hash[:can_dive] || false
|
||||
@deep_bush = hash[:deep_bush] || false
|
||||
@shows_grass_rustle = hash[:shows_grass_rustle] || false
|
||||
@shows_water_ripple = hash[:shows_water_ripple] || false
|
||||
@land_wild_encounters = hash[:land_wild_encounters] || false
|
||||
@double_wild_encounters = hash[:double_wild_encounters] || false
|
||||
@battle_environment = hash[:battle_environment]
|
||||
@@ -118,7 +120,8 @@ GameData::TerrainTag.register({
|
||||
:can_surf => true,
|
||||
:can_fish => true,
|
||||
:battle_environment => :StillWater,
|
||||
:shows_reflections => true
|
||||
:shows_reflections => true,
|
||||
:shows_water_ripple => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
@@ -195,7 +198,8 @@ GameData::TerrainTag.register({
|
||||
:id => :Puddle,
|
||||
:id_number => 16,
|
||||
:battle_environment => :Puddle,
|
||||
:shows_reflections => true
|
||||
:shows_reflections => true,
|
||||
:shows_water_ripple => true
|
||||
})
|
||||
|
||||
GameData::TerrainTag.register({
|
||||
|
||||
@@ -101,6 +101,7 @@ module Battle::Scene::Animation::BallAnimationMixin
|
||||
end
|
||||
|
||||
def ballTracksHand(ball, traSprite, safariThrow = false)
|
||||
raise _INTL("Trainer back sprite doesn't exist.") if !traSprite || !traSprite.bitmap
|
||||
# Back sprite isn't animated, no hand-tracking needed
|
||||
if traSprite.bitmap.width < traSprite.bitmap.height * 2
|
||||
ball.setVisible(7, true)
|
||||
|
||||
@@ -154,6 +154,18 @@ EventHandlers.add(:on_step_taken, :grass_rustling,
|
||||
}
|
||||
)
|
||||
|
||||
# Show water ripple animation
|
||||
EventHandlers.add(:on_step_taken, :still_water_ripple,
|
||||
proc { |event|
|
||||
next if !$scene.is_a?(Scene_Map)
|
||||
event.each_occupied_tile do |x, y|
|
||||
next if !$map_factory.getTerrainTagFromCoords(event.map.map_id, x, y, true).shows_water_ripple
|
||||
spriteset = $scene.spriteset(event.map_id)
|
||||
spriteset&.addUserAnimation(Settings::WATER_RIPPLE_ANIMATION_ID, x, y, true, -1)
|
||||
end
|
||||
}
|
||||
)
|
||||
|
||||
# Auto-move the player over waterfalls and ice
|
||||
EventHandlers.add(:on_step_taken, :auto_move_player,
|
||||
proc { |event|
|
||||
|
||||
@@ -658,7 +658,7 @@ def pbDynamicItemList(*args)
|
||||
end
|
||||
|
||||
# Common items to find via Pickup. Items from this list are added to the pool in
|
||||
# order, starting from a point dependng on the Pokémon's level. The number of
|
||||
# order, starting from a point depending on the Pokémon's level. The number of
|
||||
# items added is how many probabilities are in the PICKUP_COMMON_ITEM_CHANCES
|
||||
# array below.
|
||||
# There must be 9 + PICKUP_COMMON_ITEM_CHANCES.length number of items in this
|
||||
@@ -687,7 +687,7 @@ PICKUP_COMMON_ITEMS = [
|
||||
# Chances to get each item added to the pool from the array above.
|
||||
PICKUP_COMMON_ITEM_CHANCES = [30, 10, 10, 10, 10, 10, 10, 4, 4]
|
||||
# Rare items to find via Pickup. Items from this list are added to the pool in
|
||||
# order, starting from a point dependng on the Pokémon's level. The number of
|
||||
# order, starting from a point depending on the Pokémon's level. The number of
|
||||
# items added is how many probabilities are in the PICKUP_RARE_ITEM_CHANCES
|
||||
# array below.
|
||||
# There must be 9 + PICKUP_RARE_ITEM_CHANCES.length number of items in this
|
||||
|
||||
@@ -1111,6 +1111,7 @@ module Compiler
|
||||
end
|
||||
end
|
||||
raise Reset.new if e.is_a?(Hangup)
|
||||
raise SystemExit.new if e.is_a?(RuntimeError)
|
||||
raise "Unknown exception when compiling."
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user