MyTetra Share
Делитесь знаниями!
Merge parallel events
Время создания: 15.12.2016 19:54
Автор: DeadElf79
Текстовые метки: events
Раздел: Ruby - RGSS3
Запись: deadelf79/mytetra/raw/master/data/base/1481820880wmizot0j3k/text.html на github.com

#==============================================================================

# Merge parallel events

# Version 1.0

# by DeadElf79

#==============================================================================


module De79Merge

MERGE_PARALLELS = true

end


class Game_Event

attr_accessor :list

end


class Game_Map

def parallels

@parallels ||= @events.values.select{ |event|

event.trigger == 4 && event.pages.size == 1 && not(event.empty?)

}

end

end


class Scene_Map < Scene_Base

def start

super

SceneManager.clear

$game_player.straighten

$game_map.refresh

$game_message.visible = false

merge_parallels

create_spriteset

create_all_windows

@menu_calling = false

end


def merge_parallels

if De79TemplateEvents_Merge::MERGE_PARALLELS

there_can_be_only_one = $game_map.parallels[0]

return unless there_can_be_only_one

for index in 1...$game_map.parallels.size

event = $game_map.parallels[ index ]

if event.list != nil

there_can_be_only_one.list += event.list

end

event.erase

end

end

end

end

 
MyTetra Share v.0.65
Яндекс индекс цитирования