mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Added "Consumable" property to items.txt, light effects now properly centre themselves on the event regardless of graphic size, Disguise/Double Iron Bash Gen 8 changes
This commit is contained in:
@@ -141,29 +141,38 @@ end
|
||||
|
||||
|
||||
class LightEffect_Basic < LightEffect
|
||||
def initialize(event, viewport = nil, map = nil, filename = nil)
|
||||
super
|
||||
@light.ox = @light.bitmap.width / 2
|
||||
@light.oy = @light.bitmap.height / 2
|
||||
@light.opacity = 100
|
||||
end
|
||||
|
||||
def update
|
||||
return if !@light || !@event
|
||||
super
|
||||
@light.opacity = 100
|
||||
@light.ox = 32
|
||||
@light.oy = 48
|
||||
if (Object.const_defined?(:ScreenPosHelper) rescue false)
|
||||
@light.x = ScreenPosHelper.pbScreenX(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - Game_Map::TILE_HEIGHT / 2
|
||||
@light.zoom_x = ScreenPosHelper.pbScreenZoomX(@event)
|
||||
@light.zoom_y = @light.zoom_x
|
||||
else
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y
|
||||
@light.zoom_x = 1.0
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y - Game_Map::TILE_HEIGHT / 2
|
||||
end
|
||||
@light.zoom_y = @light.zoom_x
|
||||
@light.tone = $game_screen.tone
|
||||
@light.tone = $game_screen.tone
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
class LightEffect_DayNight < LightEffect
|
||||
def initialize(event, viewport = nil, map = nil, filename = nil)
|
||||
super
|
||||
@light.ox = @light.bitmap.width / 2
|
||||
@light.oy = @light.bitmap.height / 2
|
||||
end
|
||||
|
||||
def update
|
||||
return if !@light || !@event
|
||||
super
|
||||
@@ -177,18 +186,14 @@ class LightEffect_DayNight < LightEffect
|
||||
end
|
||||
@light.opacity = 255-shade
|
||||
if @light.opacity>0
|
||||
@light.ox = 32
|
||||
@light.oy = 48
|
||||
if (Object.const_defined?(:ScreenPosHelper) rescue false)
|
||||
@light.x = ScreenPosHelper.pbScreenX(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event)
|
||||
@light.y = ScreenPosHelper.pbScreenY(@event) - Game_Map::TILE_HEIGHT / 2
|
||||
@light.zoom_x = ScreenPosHelper.pbScreenZoomX(@event)
|
||||
@light.zoom_y = ScreenPosHelper.pbScreenZoomY(@event)
|
||||
else
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y
|
||||
@light.zoom_x = 1.0
|
||||
@light.zoom_y = 1.0
|
||||
@light.x = @event.screen_x
|
||||
@light.y = @event.screen_y - Game_Map::TILE_HEIGHT / 2
|
||||
end
|
||||
@light.tone.set($game_screen.tone.red,
|
||||
$game_screen.tone.green,
|
||||
|
||||
Reference in New Issue
Block a user