Module: Yuki::MapLinker

Defined in:
docs/4_Systems_003_Map_Engine.rb

Overview

MapLinker, script that emulate the links between maps. This script also display events.

Author:

  • Nuri Yuri

Constant Summary collapse

OFFSET_X =

The offset in X until we see black borders

Configs.display.tilemap_settings.map_linker_offset.x
OFFSET_Y =

The offset in Y until we seen black borders

Configs.display.tilemap_settings.map_linker_offset.y
DELTA_MAKER =

The number of tiles the Maker has to let in common between each maps

Configs.display.tilemap_settings.uses_old_map_linker ? 3 : 0
DEFAULT_MAP =

The default Map (black borders)

RPG::Map.new(20, 15)
MAP_FORMAT =

The map filename format

'Data/Map%03d.rxdata'
%i[north east south west]

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.added_eventsHash<Integer => Array<RPG::Event>> (readonly)

Get the added events

Returns:

  • (Hash<Integer => Array<RPG::Event>>)

    Integer is map_id



1054
1055
1056
# File 'docs/4_Systems_003_Map_Engine.rb', line 1054

def added_events
  @added_events
end

.map_datasArray<Yuki::Tilemap::MapData> (readonly)

Return the map datas

Returns:



1048
1049
1050
# File 'docs/4_Systems_003_Map_Engine.rb', line 1048

def map_datas
  @map_datas
end

.spritesetSpriteset_Map

Return the SpritesetMap object used to load the map

Returns:



1051
1052
1053
# File 'docs/4_Systems_003_Map_Engine.rb', line 1051

def spriteset
  @spriteset
end

Class Method Details

.from_center_map?(event) ⇒ Boolean?

Test if the given event is from the center map or not

Parameters:

Returns:

  • (Boolean, nil)


1058
1059
# File 'docs/4_Systems_003_Map_Engine.rb', line 1058

def from_center_map?(event)
end

.load_current_map_datas(map_id) ⇒ Array<Yuki::Tilemap::MapData>

Function that loads the current map data

Parameters:

  • map_id (Integer)

Returns:



1071
1072
# File 'docs/4_Systems_003_Map_Engine.rb', line 1071

def load_current_map_datas(map_id)
end

.load_map(map_id) ⇒ RPG::Map

Load a map and its linked map

Parameters:

  • map_id (Integer)

    the map ID

Returns:



1066
1067
# File 'docs/4_Systems_003_Map_Engine.rb', line 1066

def load_map(map_id)
end

.load_map_data(map_id) ⇒ RPG::Map

Load the data of a map (with some optimizations)

Parameters:

  • map_id (Integer)

    the id of the Map

Returns:



1089
1090
# File 'docs/4_Systems_003_Map_Engine.rb', line 1089

def load_map_data(map_id)
end

Load a map data from a link

Parameters:

Returns:



1084
1085
# File 'docs/4_Systems_003_Map_Engine.rb', line 1084

def load_map_data_from_link(link, cardinal, current_map)
end

Load the map_datas array from the link_data

Parameters:



1077
1078
# File 'docs/4_Systems_003_Map_Engine.rb', line 1077

def load_map_data_from_link_data(link_data, map_datas, current_map)
end

.passable?(x, y, d = 0, event = $game_player) ⇒ Boolean

Test if a tile is passable

Parameters:

  • x (Integer)

    x coordinate of the tile on the map

  • y (Integer)

    y coordinate of the tile on the map

  • d (Integer) (defaults to: 0)

    direction to check

  • event (Game_Character) (defaults to: $game_player)

Returns:

  • (Boolean)


1109
1110
# File 'docs/4_Systems_003_Map_Engine.rb', line 1109

def passable?(x, y, d = 0, event = $game_player)
end

.reset

Reset the module when the RGSS resets itself



1061
1062
# File 'docs/4_Systems_003_Map_Engine.rb', line 1061

def reset
end

.system_tag(x, y) ⇒ Integer

Retrieve the ID of the SystemTag on a specific tile

Parameters:

  • x (Integer)

    x position of the tile

  • y (Integer)

    y position of the tile

Returns:

  • (Integer)

Author:

  • Nuri Yuri



1116
1117
# File 'docs/4_Systems_003_Map_Engine.rb', line 1116

def system_tag(x, y)
end

.system_tag_here?(x, y, tag) ⇒ Boolean

Check if a specific SystemTag is present on a specific tile

Parameters:

  • x (Integer)

    x position of the tile

  • y (Integer)

    y position of the tile

  • tag (Integer)

    ID of the SystemTag

Returns:

  • (Boolean)

Author:

  • Nuri Yuri



1124
1125
# File 'docs/4_Systems_003_Map_Engine.rb', line 1124

def system_tag_here?(x, y, tag)
end

.tileset_nameString

Return the current tileset name

Returns:



1093
1094
# File 'docs/4_Systems_003_Map_Engine.rb', line 1093

def tileset_name
end

Instance Method Details

#test_warp

Test if the player can warp between maps and warp him



1097
1098
# File 'docs/4_Systems_003_Map_Engine.rb', line 1097

def test_warp
end