############ CHECK IF THERE ARE SWAPPED TILES AT START PLAY TIME ###############
=begin
We must ensure user is starting game and there are physically swapped tiles or
passage settings,
tiles that have been for example swapped from the application
=end
class Scene_Title < Scene_Base
alias swapxt_start start
def start
swapxt_start
check_if_tileset_swapped_exist
check_if_passage_swapped_exist
end
def check_if_tileset_swapped_exist
tile = "Graphics/System/swapped_"
tileset_swap_loaded_message_error if FileTest.exist?(tile + "A1.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "A2.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "A3.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "A4.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "A5.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "B.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "C.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "D.png")
tileset_swap_loaded_message_error if FileTest.exist?(tile + "E.png")
end
def tileset_swap_loaded_message_error
p sprintf("SwapXT Error: You are not allowed to start your game with swapped tilesets. You must unload your tilesets with SwapXT application first. Open SwapXT, click at top Tools->Restore all Tilesets")
exit
end
def check_if_passage_swapped_exist
passage = "swapxt/passage_warning.stx"
passage_swap_loaded_message_error if FileTest.exist?(passage)
end
def passage_swap_loaded_message_error
p sprintf("SwapXT Error: You are not allowed to start your game with swapped passage settings. You must unload your passage setting with SwapXT application first. Open SwapXT, go on PassageSetting tab and click on Restore to Default.")
p sprintf("SwapXT Error: You have called $game_map.swapxt(" + integer.to_s() + ") , but that Real-Time swap doesn't exist. Please better check it inside SwapXT app, under the Real-Time section.")