Files
infinitefusion-e18/Data/Scripts/051_AddOns/TempEvents.rb
infinitefusion 3a488c9ba6 release 6.2
2024-06-28 12:01:39 -04:00

35 lines
647 B
Ruby

class PokemonTemp
attr_accessor :tempEvents
attr_accessor :silhouetteDirection
def tempEvents
@tempEvents = {} if !@tempEvents
return @tempEvents
end
def pbClearTempEvents()
@tempEvents.keys.each {|map_id|
map = $MapFactory.getMap(map_id)
@tempEvents[map_id].each { |event|
map.events[event.id].erase if map.events[event.id]
}
}
@tempEvents={}
@silhouetteDirection=nil
end
def addTempEvent(map,event)
@tempEvents = {} if !@tempEvents
mapEvents = @tempEvents.has_key?(map) ? @tempEvents[map] : []
mapEvents.push(event)
@tempEvents[map] = mapEvents
end
end