Started by ShadowSaber, April 09, 2011, 09:20:29 am
Quote from: winkio on June 15, 2011, 07:30:23 pmAh, excellent. You liked my amusing sideshow, yes? I'm just a simple fool, my wit entertains the wise, and my wisdom fools the fools.
Quote from: Blizzard on April 10, 2011, 02:11:40 pmIt's this easy.module MapManager @maps = {} def self.get_map(map_id) @maps[map_id] = Game_Map.new if !@maps.has_key?(map_id) return @maps[map_id] end endclass Game_Map alias setup_mapmanager_alias setup def setup(map_id) $game_map = MapManager.get_map(map_id) $game_map.setup_mapmanager_alias(map_id) end end
module MapManager @maps = {} def self.get_map(map_id) @maps[map_id] = Game_Map.new if !@maps.has_key?(map_id) return @maps[map_id] end endclass Game_Map alias setup_mapmanager_alias setup def setup(map_id) $game_map = MapManager.get_map(map_id) $game_map.setup_mapmanager_alias(map_id) end end
Quote from: winkioI do not speak to bricks, either as individuals or in wall form.
Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.
Quote from: Blizzard on April 11, 2011, 04:14:59 amJust insert is above main and that's that. No need to do anything.
module MapManager @maps = {} def self.get_map(map_id) if !@maps.has_key?(map_id) @maps[map_id] = Game_Map.new @maps[map_id].setup_mapmanager_alias(map_id) end return @maps[map_id] end endclass Game_Map alias setup_mapmanager_alias setup def setup(map_id) $game_map = MapManager.get_map(map_id) end end
class EventManager attr_accessor :events def initialize @events = {} endend$eventmanager = EventManager.newclass Game_Map attr_reader :events alias setup_eventmanager_alias setup def setup(map_id) setup_eventmanager_alias(map_id) if $eventmanager.events[map_id] != nil @events = $eventmanager.events[map_id] refresh else $eventmanager.events[map_id] = @events end end end