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:
Maruno17
2021-07-21 22:46:49 +01:00
parent 03a7ff39ad
commit 551f64e8a1
20 changed files with 184 additions and 162 deletions

View File

@@ -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,