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_events ⇒ Hash{Integer => Array<RPG::Event>} (readonly)

Get the added events

Returns:

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

    Integer is map_id



1222
1223
1224
# File 'docs/4_Systems_003_Map_Engine.rb', line 1222

def added_events
  @added_events
end

.map_datas ⇒ Array<Yuki::Tilemap::MapData> (readonly)

Return the map datas

Returns:



1216
1217
1218
# File 'docs/4_Systems_003_Map_Engine.rb', line 1216

def map_datas
  @map_datas
end

.spriteset ⇒ Spriteset_Map

Return the SpritesetMap object used to load the map

Returns:



1219
1220
1221
# File 'docs/4_Systems_003_Map_Engine.rb', line 1219

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)


1226
1227
# File 'docs/4_Systems_003_Map_Engine.rb', line 1226

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:



1239
1240
# File 'docs/4_Systems_003_Map_Engine.rb', line 1239

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:



1234
1235
# File 'docs/4_Systems_003_Map_Engine.rb', line 1234

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:



1257
1258
# File 'docs/4_Systems_003_Map_Engine.rb', line 1257

def load_map_data(map_id)
end

Load a map data from a link

Parameters:

Returns:



1252
1253
# File 'docs/4_Systems_003_Map_Engine.rb', line 1252

def load_map_data_from_link(link, cardinal, current_map)
end

Load the map_datas array from the link_data

Parameters:



1245
1246
# File 'docs/4_Systems_003_Map_Engine.rb', line 1245

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)


1277
1278
# File 'docs/4_Systems_003_Map_Engine.rb', line 1277

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

.reset

Reset the module when the RGSS resets itself



1229
1230
# File 'docs/4_Systems_003_Map_Engine.rb', line 1229

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



1284
1285
# File 'docs/4_Systems_003_Map_Engine.rb', line 1284

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



1292
1293
# File 'docs/4_Systems_003_Map_Engine.rb', line 1292

def system_tag_here?(x, y, tag)
end

.tileset_name ⇒ String

Return the current tileset name

Returns:



1261
1262
# File 'docs/4_Systems_003_Map_Engine.rb', line 1261

def tileset_name
end

Instance Method Details

#test_warp

Test if the player can warp between maps and warp him



1265
1266
# File 'docs/4_Systems_003_Map_Engine.rb', line 1265

def test_warp
end