Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #==============================================================================
- # ** Spriteset_Map
- #------------------------------------------------------------------------------
- # This class brings together map screen sprites, tilemaps, etc. It's used
- # within the Scene_Map class.
- #==============================================================================
- class Spriteset_Map
- #--------------------------------------------------------------------------
- # * Cerberus's Changed Method : Create Tilemap
- #--------------------------------------------------------------------------
- def create_tilemap
- #--------------------------------------------------------------------------
- # if we start on XP map - we'll use the ZTilemap
- #--------------------------------------------------------------------------
- klass = $game_map.xp_base ? ZTilemap : Tilemap
- @tilemap = klass.new(@viewport1)
- @tilemap.map_data = $game_map.data
- load_tileset
- end
- #--------------------------------------------------------------------------
- # * Cerberus's Changed Method : Load Tileset
- #--------------------------------------------------------------------------
- alias ztilemap_load_tileset load_tileset
- def load_tileset
- if @tilemap.is_a?(Tilemap)
- ztilemap_load_tileset
- else
- #--------------------------------------------------------------------------
- # if we are on XP map - we'll load the XP tileset
- #--------------------------------------------------------------------------
- @tilemap.tileset = ModCache.tileset($game_map.xp_map[:tileset_name])
- @tilemap.priorities = $game_map.xp_map[:priorities]
- $game_map.xp_map[:autotile_names] .each_with_index do |name, i|
- @tilemap.autotiles[i] = LiTTleDRAgo.cache.autotile_cr_tilemap(name)
- end
- end
- end
- #--------------------------------------------------------------------------
- # * Cerberus's Changed Method : Update Tileset
- #--------------------------------------------------------------------------
- def update_tileset
- if (@tileset != $game_map.tileset) ||
- ($game_map.xp_base && @tileset.id != $game_map.xp_map[:tileset_id])
- load_tileset
- refresh_characters
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment