#==============================================================================
# MOG MPW Equip V1.1 / HUD Ekwipunku XP
#==============================================================================
# Autor: Moghunter
#==============================================================================
# Tłumaczenie: Ayene
#==============================================================================
# Skrypt wyświetla na mapie HUD z ekwipunkiem.
# Instalacja: Umieść skrypt nad Main.
#==============================================================================
if true # True = wyświetla HUD / False = nie wyświetla
module MOG
# Przełącznik, kontrolujący wyświetlanie HUD
EQPMAPVIS = 5
# Przezroczystość okna HUD
EQPMAPOPA = 0
# Okno
EQPMAPSKIN = "001-Blue01"
# Położenie HUD - współrzędne x i y
EQPMAPX = 409 # współrzędna x
EQPMAPY = 280 # współrzędna y
end
$mogscript = {} if $mogscript == nil
$mogscript["mpequip"] = true
#==============================================================================
# Window_Base
#==============================================================================
class Window_Base < Window
def draw_equip_map(item, x, y)
if item == nil
return
end
bitmap = RPG::Cache.icon(item.icon_name)
self.contents.blt(x + 92, y + 96, bitmap, Rect.new(0, 0, 24, 24))
end
def draw_mequip(x, y)
mequip = RPG::Cache.picture("SelectedItem")
cw = mequip.width
ch = mequip.height
src_rect = Rect.new(0, 0, cw, ch)
self.contents.blt(x , y ,mequip , src_rect)
end
end
#==============================================================================
# Window_Equip_Map
#==============================================================================
class Window_Equipmap < Window_Base
def initialize(actor)
super(0, 0, 247, 216)
self.contents = Bitmap.new(width - 32, height - 32)
self.opacity = MOG::EQPMAPOPA
self.windowskin = RPG::Cache.windowskin(MOG::EQPMAPSKIN)
@actor = actor
refresh
end
def refresh
self.contents.clear
draw_mequip(0,0)
@data = []
@data.push($data_weapons[@actor.weapon_id])
self.contents.font.color = system_color
draw_equip_map(@data[0], 32 * 0, 0)
end
end
#==============================================================================
# Scene_Map
#==============================================================================
class Scene_Map
alias mog8_main main
def main
@actor = $game_party.actors[0]
@eqmap = Window_Equipmap.new(@actor)
@eqmap.x = MOG::EQPMAPX
@eqmap.y = MOG::EQPMAPY
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
mog8_main
@eqmap.dispose
end
alias mog8_update update
def update
if $game_switches[MOG::EQPMAPVIS] == false
@eqmap.visible = true
else
@eqmap.visible = false
end
if $eref == true
@eqmap.refresh
$eref = false
end
mog8_update
end
end
#==============================================================================
# Game_Map
#==============================================================================
class Game_Map
attr_accessor :eref
end
class Interpreter
def eref
$eref = true
end
alias mog319ref command_319
def command_319
eref
return mog319ref
end
end
end