world_map.lua 908 B

123456789101112131415161718192021
  1. --- Helper function that loads a world map through fade in and fadeout
  2. --
  3. -- @param map The world map to load. 0 is the normal world map, 1 is the submarine map, and 2 is the
  4. -- snowstorm map.
  5. -- @param x X coordinate in the map for the PC.
  6. -- @param y Y coordinate in the map for the PC.
  7. load_world_map_request = function(map, x, y)
  8. if map >= 0 and map <= 2 then
  9. -- TODO: Set propper names
  10. -- System["MapChanger"].map_name = map_name
  11. -- System["MapChanger"].point_name = point_name
  12. player_lock(true) -- disable menu and pc movement while load map
  13. script:request_end_sync(Script.UI, "Fade", "fade_out", 0)
  14. world_map(map, x, y)
  15. player_lock(false) -- enable menu and pc movement after load map
  16. --self.current_map_name = self.map_name
  17. --self.map_name = ""
  18. script:request_end_sync(Script.UI, "Fade", "fade_in", 0)
  19. end
  20. end