1075 lines
62 KiB
Ruby
1075 lines
62 KiB
Ruby
# encoding: utf-8
|
|
# Auto-generated from map_info.json (TSV) for RPG Maker VX Ace (RGSS3).
|
|
# Place this script in the Script Editor (Materials) or require it from a .rb file.
|
|
|
|
module MAP_INFO
|
|
DATA = {
|
|
# Склон Росендо
|
|
#
|
|
#
|
|
#
|
|
#
|
|
# $game_player.actor.sta+=450
|
|
# $game_player.actor.health+=350
|
|
# $game_party.gain_item($data_items[21], 1)
|
|
# $game_party.gain_gold(500000)
|
|
#
|
|
#
|
|
#
|
|
#
|
|
1 => {:name => "-lib-MapObject", :x => 0, :y => 206, :enabled => true, :file => "Data/Map001.rvdata2", :title => "Служебная карта: MapObject", :note => nil},
|
|
2 => {:name => "OvermapMain", :x => 0, :y => 10, :enabled => true, :file => "Data/Map002.rvdata2", :title => "Основная карта", :note => nil},
|
|
3 => {:name => "NpcLab/SndLab", :x => 8, :y => 2, :enabled => false, :file => "Data/Map003.rvdata2", :title => "Звуковая лаборатория", :note => nil},
|
|
4 => {:name => "r21_NoerTown2", :x => 5, :y => 170, :enabled => false, :file => "Data/Map004.rvdata2", :title => "Районы Ноэртауна 2", :note => nil}, # Print (Город 2 Ноэра)
|
|
5 => {:name => "r21_NoerTown1", :x => 25, :y => 169, :enabled => true, :file => "Data/Map005.rvdata2", :title => "Районы Ноэртауна 1", :note => nil}, # Print (Город 1 Ноэра)
|
|
6 => {:name => "EliseGynecology", :x => 52, :y => 15, :enabled => false, :file => "Data/Map006.rvdata2", :title => "Клиника Акушерства и Гинекологии у Элис", :note => nil},
|
|
7 => {:name => "r21_NoerTown3", :x => 5, :y => 171, :enabled => false, :file => "Data/Map007.rvdata2", :title => "Районы Ноэртауна 3", :note => nil}, # Print (Город 3 Ноэра)
|
|
8 => {:name => "MAIN LAB", :x => 0, :y => 1, :enabled => true, :file => "Data/Map008.rvdata2", :title => "Главная лаборатория", :note => nil},
|
|
9 => {:name => "TransportLab", :x => 8, :y => 4, :enabled => false, :file => "Data/Map009.rvdata2", :title => "Транспортная лаборатория", :note => nil},
|
|
10 => {:name => "Sight&Camera_Lab", :x => 8, :y => 3, :enabled => false, :file => "Data/Map010.rvdata2", :title => "Лаборатория зрения и камер", :note => nil},
|
|
11 => {:name => "QuestUnique", :x => 2, :y => 186, :enabled => true, :file => "Data/Map011.rvdata2", :title => "Уникальные события", :note => nil},
|
|
12 => {:name => "MineCaveQuest", :x => 11, :y => 187, :enabled => false, :file => "Data/Map012.rvdata2", :title => "Шахта (квест)", :note => nil},
|
|
13 => {:name => "r5_PineFroest2", :x => 30, :y => 138, :enabled => false, :file => "Data/Map013.rvdata2", :title => "Хвойный лес 2", :note => nil}, # Print () в игре Сосновый лес
|
|
14 => {:name => "NoerDock", :x => 52, :y => 18, :enabled => true, :file => "Data/Map014.rvdata2", :title => "Порт Ноэра", :note => nil},
|
|
15 => {:name => "NoerBank", :x => 52, :y => 13, :enabled => false, :file => "Data/Map015.rvdata2", :title => "Фондовая Биржа Ноэра (Банк)", :note => nil},
|
|
16 => {:name => "r1_PlainField3", :x => 28, :y => 129, :enabled => false, :file => "Data/Map016.rvdata2", :title => "Поле 3", :note => nil}, # Print (Равнина Поле)
|
|
17 => {:name => "r10_Slum1", :x => 25, :y => 148, :enabled => true, :file => "Data/Map017.rvdata2", :title => "Трущобы 1", :note => nil}, # Print ()
|
|
18 => {:name => "OrkindCave3", :x => 23, :y => 86, :enabled => false, :file => "Data/Map018.rvdata2", :title => "Пещера орков 3", :note => "Центральное логово"},
|
|
19 => {:name => "r8_25_Swamp1", :x => 25, :y => 144, :enabled => true, :file => "Data/Map019.rvdata2", :title => "Болото Ноэра 1", :note => nil}, # Print (Болото)
|
|
20 => {:name => "NoerCatacomb", :x => 52, :y => 16, :enabled => true, :file => "Data/Map020.rvdata2", :title => "Кладбище", :note => nil},
|
|
21 => {:name => "r6_BadlandForest1", :x => 25, :y => 140, :enabled => true, :file => "Data/Map021.rvdata2", :title => "Мертвый лес 1", :note => nil}, # Print ()
|
|
22 => {:name => "Wild", :x => 2, :y => 46, :enabled => true, :file => "Data/Map022.rvdata2", :title => "Дикая местность", :note => nil},
|
|
23 => {:name => "OrkindCave1", :x => 22, :y => 84, :enabled => true, :file => "Data/Map023.rvdata2", :title => "Пещера орков 1", :note => "Логово при городе"},
|
|
24 => {:name => "OrkindCave2", :x => 23, :y => 85, :enabled => false, :file => "Data/Map024.rvdata2", :title => "Сторожевая башня Северного перевала", :note => "Логово в башне"},
|
|
25 => {:name => "RegionMaps", :x => 2, :y => 126, :enabled => true, :file => "Data/Map025.rvdata2", :title => "Карты регионов", :note => nil},
|
|
26 => {:name => "r1_PlainField2", :x => 28, :y => 128, :enabled => false, :file => "Data/Map026.rvdata2", :title => "Поле 2", :note => nil}, # Print (Равнина Поле)
|
|
27 => {:name => "r2_r27_Beach1", :x => 25, :y => 130, :enabled => true, :file => "Data/Map027.rvdata2", :title => "Берег Ноэра 1", :note => nil}, # Print (Пляж)
|
|
28 => {:name => "r1_PlainField1", :x => 25, :y => 127, :enabled => true, :file => "Data/Map028.rvdata2", :title => "Поле 1", :note => nil}, # Print (Равнина Поле)
|
|
29 => {:name => "r4_RainFroest1", :x => 25, :y => 134, :enabled => true, :file => "Data/Map029.rvdata2", :title => "Тропический лес 1", :note => nil}, # Print ()
|
|
30 => {:name => "r5_PineFroest1", :x => 25, :y => 137, :enabled => true, :file => "Data/Map030.rvdata2", :title => "Хвойный лес 1", :note => nil}, # Print () в игре Сосновый лес
|
|
31 => {:name => "AbomHive2", :x => 71, :y => 94, :enabled => false, :file => "Data/Map031.rvdata2", :title => "Логово Тварей 2", :note => nil},
|
|
32 => {:name => "r11_RoadPlain2", :x => 34, :y => 151, :enabled => false, :file => "Data/Map032.rvdata2", :title => "Дорога 2", :note => nil}, # Print (Дорога Равнина)
|
|
33 => {:name => "r11_RoadPlain3", :x => 34, :y => 152, :enabled => false, :file => "Data/Map033.rvdata2", :title => "Дорога 3", :note => nil}, # Print (Дорога Равнина)
|
|
34 => {:name => "r11_RoadPlain1", :x => 25, :y => 150, :enabled => true, :file => "Data/Map034.rvdata2", :title => "Дорога 1", :note => nil}, # Print (Дорога Равнина)
|
|
35 => {:name => "r20_RefugeeCamp1", :x => 25, :y => 167, :enabled => true, :file => "Data/Map035.rvdata2", :title => "Лагерь беженцев 1", :note => nil}, # Print ()
|
|
36 => {:name => "SybCrunch_Hall****", :x => 190, :y => 116, :enabled => false, :file => "Data/Map036.rvdata2", :title => "Syb Crunch Hall", :note => nil},
|
|
37 => {:name => "r7_PineFroestMountain1", :x => 25, :y => 142, :enabled => true, :file => "Data/Map037.rvdata2", :title => "Горы 1", :note => nil}, # Print ()
|
|
38 => {:name => "SouthFL", :x => 22, :y => 98, :enabled => true, :file => "Data/Map038.rvdata2", :title => "Лагерь у южных ворот Сибариса", :note => nil},
|
|
39 => {:name => "r3_BadlandMountain", :x => 25, :y => 133, :enabled => false, :file => "Data/Map039.rvdata2", :title => "Зараженные Горы", :note => nil}, # Print ()
|
|
40 => {:name => "RangeLab", :x => 8, :y => 5, :enabled => false, :file => "Data/Map040.rvdata2", :title => "Лаборатория дальности", :note => nil},
|
|
41 => {:name => "-lib-Overevents", :x => 1, :y => 208, :enabled => false, :file => "Data/Map041.rvdata2", :title => "Служебная карта: Overevents", :note => nil},
|
|
42 => {:name => "NoerPrison", :x => 52, :y => 14, :enabled => false, :file => "Data/Map042.rvdata2", :title => "Тюрьма", :note => nil},
|
|
43 => {:name => "NoerBlackSmithShop", :x => 75, :y => 28, :enabled => false, :file => "Data/Map043.rvdata2", :title => "Сталь и изделия из стали Железного Буббы", :note => "NoerBSS"},
|
|
44 => {:name => "-lib-QuestObject", :x => 1, :y => 207, :enabled => false, :file => "Data/Map044.rvdata2", :title => "Служебная карта: QuestObject", :note => nil},
|
|
45 => {:name => "r9_AbanbonedHouse1", :x => 25, :y => 146, :enabled => true, :file => "Data/Map045.rvdata2", :title => "Заброшенный дом 1", :note => nil}, # Print ()
|
|
46 => {:name => "OrkindCave4", :x => 23, :y => 87, :enabled => false, :file => "Data/Map046.rvdata2", :title => "Пещера орков 4", :note => "Пещера в болотах"},
|
|
47 => {:name => "r9_AbanbonedHouse2", :x => 45, :y => 147, :enabled => false, :file => "Data/Map047.rvdata2", :title => "Заброшенный дом 2", :note => nil}, # Print ()
|
|
48 => {:name => "r22_RoadNoer1", :x => 25, :y => 172, :enabled => true, :file => "Data/Map048.rvdata2", :title => "Улицы Ноэртауна 1", :note => nil}, # Print (Дорога Ноэр)
|
|
49 => {:name => "SexLab", :x => 8, :y => 6, :enabled => false, :file => "Data/Map049.rvdata2", :title => "Sex Lab", :note => nil},
|
|
50 => {:name => "HumanPrisonCave", :x => 68, :y => 39, :enabled => false, :file => "Data/Map050.rvdata2", :title => "Кристальная Шахта", :note => nil},
|
|
51 => {:name => "r23_Boulevard1", :x => 25, :y => 175, :enabled => true, :file => "Data/Map051.rvdata2", :title => "Главная дорога 1", :note => nil}, # Print (Бульвар)
|
|
52 => {:name => "Noer", :x => 2, :y => 11, :enabled => true, :file => "Data/Map052.rvdata2", :title => "Ноэр", :note => nil},
|
|
53 => {:name => "NoerSewer", :x => 52, :y => 12, :enabled => false, :file => "Data/Map053.rvdata2", :title => "Канализации Ноэра", :note => nil},
|
|
54 => {:name => "r23_Boulevard2", :x => 51, :y => 176, :enabled => false, :file => "Data/Map054.rvdata2", :title => "Главная дорога 2", :note => nil}, # Print (Бульвар)
|
|
55 => {:name => "r23_Boulevard3", :x => 51, :y => 177, :enabled => false, :file => "Data/Map055.rvdata2", :title => "Главная дорога 3", :note => nil}, # Print (Бульвар)
|
|
56 => {:name => "r22_RoadNoer2", :x => 48, :y => 173, :enabled => false, :file => "Data/Map056.rvdata2", :title => "Улицы Ноэртауна 2", :note => nil}, # Print (Дорога Ноэр)
|
|
57 => {:name => "r22_RoadNoer3", :x => 48, :y => 174, :enabled => false, :file => "Data/Map057.rvdata2", :title => "Улицы Ноэртауна 3", :note => nil}, # Print (Дорога Ноэр)
|
|
58 => {:name => "NoerMobHouse", :x => 63, :y => 22, :enabled => false, :file => "Data/Map058.rvdata2", :title => "Чёрный Рынок", :note => nil},
|
|
59 => {:name => "NoerTavern", :x => 52, :y => 25, :enabled => true, :file => "Data/Map059.rvdata2", :title => "Горящий Бочонок", :note => nil},
|
|
60 => {:name => "NoerCatacombB1Grind", :x => 20, :y => 17, :enabled => false, :file => "Data/Map060.rvdata2", :title => "Кладбище B1G", :note => nil},
|
|
61 => {:name => "ScoutCampOrkind", :x => 68, :y => 38, :enabled => false, :file => "Data/Map061.rvdata2", :title => "Пропавший караван", :note => nil},
|
|
62 => {:name => "NoerMarket", :x => 52, :y => 20, :enabled => false, :file => "Data/Map062.rvdata2", :title => "Центральный Рынок Ноэра", :note => nil},
|
|
63 => {:name => "NoerBackStreet", :x => 52, :y => 21, :enabled => true, :file => "Data/Map063.rvdata2", :title => "Закоулки Ноэртауна / Территория банды Широкий Клинок", :note => nil},
|
|
64 => {:name => "SaintMonastery", :x => 22, :y => 47, :enabled => true, :file => "Data/Map064.rvdata2", :title => "Монастырь Святых", :note => nil},
|
|
65 => {:name => "TitleScreenMarket", :x => 2, :y => 201, :enabled => true, :file => "Data/Map065.rvdata2", :title => "Title Screen Рынок", :note => nil},
|
|
66 => {:name => "NoerCatacombB1", :x => 11, :y => 191, :enabled => false, :file => "Data/Map066.rvdata2", :title => "Кладбище B1", :note => nil},
|
|
67 => {:name => "CargoSaveCecily", :x => 11, :y => 188, :enabled => true, :file => "Data/Map067.rvdata2", :title => "Склад номер 13. Запад, Убежище Бандитов", :note => nil},
|
|
68 => {:name => "NoerEastCp", :x => 52, :y => 37, :enabled => true, :file => "Data/Map068.rvdata2", :title => "Седьмой Восточный Охранный Пост", :note => nil},
|
|
69 => {:name => "RabbitCave", :x => 64, :y => 50, :enabled => false, :file => "Data/Map069.rvdata2", :title => "Заброшенная Медная Шахта", :note => nil},
|
|
70 => {:name => "FishTempleOut", :x => 115, :y => 79, :enabled => false, :file => "Data/Map070.rvdata2", :title => "Затерянный Храм", :note => nil},
|
|
71 => {:name => "AbomHive1", :x => 22, :y => 93, :enabled => true, :file => "Data/Map071.rvdata2", :title => "Логово Тварей 1", :note => nil},
|
|
72 => {:name => "FishkindCave2", :x => 100, :y => 122, :enabled => false, :file => "Data/Map072.rvdata2", :title => "Храм Твин Пикс 2", :note => nil},
|
|
73 => {:name => "r20_RefugeeCamp2", :x => 35, :y => 168, :enabled => false, :file => "Data/Map073.rvdata2", :title => "Лагерь Беженцев 2", :note => nil}, # Print () ?
|
|
74 => {:name => "CreditsScreen", :x => 65, :y => 205, :enabled => false, :file => "Data/Map074.rvdata2", :title => "Титры", :note => nil},
|
|
75 => {:name => "NoerRecRoom", :x => 52, :y => 27, :enabled => true, :file => "Data/Map075.rvdata2", :title => "Восточная Торговля", :note => nil},
|
|
76 => {:name => "NoerTavern2F", :x => 59, :y => 26, :enabled => false, :file => "Data/Map076.rvdata2", :title => "Горящий Бочонок 2", :note => nil},
|
|
77 => {:name => "BanditCamp1", :x => 22, :y => 89, :enabled => true, :file => "Data/Map077.rvdata2", :title => "Убежище Бандитов", :note => nil},
|
|
78 => {:name => "OrkindCamp1", :x => 23, :y => 88, :enabled => false, :file => "Data/Map078.rvdata2", :title => "Маленькая хижина", :note => nil},
|
|
79 => {:name => "OrkindResearch1", :x => 11, :y => 192, :enabled => false, :file => "Data/Map079.rvdata2", :title => "Орки Research 1", :note => nil},
|
|
80 => {:name => "r4_RainFroest2", :x => 29, :y => 135, :enabled => false, :file => "Data/Map080.rvdata2", :title => "Тропический лес 2", :note => nil}, # Print ()
|
|
81 => {:name => "PirateBaneInn", :x => 92, :y => 54, :enabled => false, :file => "Data/Map081.rvdata2", :title => "Пиратская Погибель Inn", :note => nil},
|
|
82 => {:name => "NoerGoldenBar", :x => 52, :y => 30, :enabled => true, :file => "Data/Map082.rvdata2", :title => "Золотой Слиток Клуб для богачей", :note => nil},
|
|
83 => {:name => "r12_RoadNoerNob1", :x => 25, :y => 153, :enabled => false, :file => "Data/Map083.rvdata2", :title => "Дорога Ноэр Nob 1", :note => nil},
|
|
84 => {:name => "AbanHouse1", :x => 68, :y => 40, :enabled => false, :file => "Data/Map084.rvdata2", :title => "Заброшенный Дом 1", :note => nil},
|
|
85 => {:name => "AbanHouse2", :x => 92, :y => 56, :enabled => false, :file => "Data/Map085.rvdata2", :title => "Лагерь на Болотах", :note => nil},
|
|
86 => {:name => "TitleDedMarket", :x => 65, :y => 202, :enabled => false, :file => "Data/Map086.rvdata2", :title => "Title Ded Рынок", :note => nil},
|
|
87 => {:name => "SaintMonasteryB1", :x => 64, :y => 48, :enabled => false, :file => "Data/Map087.rvdata2", :title => "Монастырь Святых B1", :note => nil},
|
|
88 => {:name => "NoerRelay", :x => 52, :y => 43, :enabled => false, :file => "Data/Map088.rvdata2", :title => "Плацдарм Ноэртауна", :note => nil},
|
|
89 => {:name => "SwampRDK1", :x => 11, :y => 193, :enabled => false, :file => "Data/Map089.rvdata2", :title => "Лагерь", :note => nil},
|
|
90 => {:name => "NoerArena", :x => 91, :y => 35, :enabled => false, :file => "Data/Map090.rvdata2", :title => "Арена Ноэра", :note => nil},
|
|
91 => {:name => "NoerRing", :x => 52, :y => 34, :enabled => true, :file => "Data/Map091.rvdata2", :title => "Колизей Ноэра", :note => nil},
|
|
92 => {:name => "PirateBane", :x => 22, :y => 53, :enabled => true, :file => "Data/Map092.rvdata2", :title => "Пиратская Погибель", :note => nil},
|
|
93 => {:name => "r4_RainFroest3", :x => 29, :y => 136, :enabled => false, :file => "Data/Map093.rvdata2", :title => "Тропический лес 3", :note => nil}, # Print ()
|
|
94 => {:name => "PB_MassGrave", :x => 92, :y => 55, :enabled => false, :file => "Data/Map094.rvdata2", :title => "Братская Могила", :note => nil},
|
|
95 => {:name => "FishkindCave3", :x => 100, :y => 123, :enabled => false, :file => "Data/Map095.rvdata2", :title => "Храм Твин Пикс 3 / Святилище Плодородия", :note => nil},
|
|
96 => {:name => "PB_NorthCP", :x => 92, :y => 57, :enabled => false, :file => "Data/Map096.rvdata2", :title => "Северный Форпост", :note => nil},
|
|
97 => {:name => "DoomFortressInn", :x => 98, :y => 64, :enabled => false, :file => "Data/Map097.rvdata2", :title => "Твердыня Рока Inn", :note => nil},
|
|
98 => {:name => "DoomFortressL", :x => 22, :y => 62, :enabled => true, :file => "Data/Map098.rvdata2", :title => "Твердыня Рока L.", :note => nil},
|
|
99 => {:name => "DoomFortressR", :x => 98, :y => 63, :enabled => false, :file => "Data/Map099.rvdata2", :title => "Твердыня Рока R.", :note => nil},
|
|
100 => {:name => "FishkindCave1", :x => 22, :y => 121, :enabled => true, :file => "Data/Map100.rvdata2", :title => "Пещера (твин пикс)", :note => nil},
|
|
101 => {:name => "r13_24_SwampRoad1", :x => 25, :y => 154, :enabled => true, :file => "Data/Map101.rvdata2", :title => "Болотная тропа Ноэра 1", :note => nil}, # Print (Болото Дорога)
|
|
102 => {:name => "r13_24_SwampRoad2", :x => 101, :y => 155, :enabled => false, :file => "Data/Map102.rvdata2", :title => "Болотная тропа Ноэра 2", :note => nil}, # Print (Болото Дорога)
|
|
103 => {:name => "CecilyHijack0", :x => 67, :y => 189, :enabled => false, :file => "Data/Map103.rvdata2", :title => "Cecily Hijack 0", :note => nil},
|
|
104 => {:name => "DoomFortEastCP", :x => 98, :y => 65, :enabled => false, :file => "Data/Map104.rvdata2", :title => "Восточный КПП", :note => nil},
|
|
105 => {:name => "CecilyHijack1", :x => 67, :y => 190, :enabled => false, :file => "Data/Map105.rvdata2", :title => "Cecily Hijack 1", :note => nil},
|
|
106 => {:name => "DoomFarmA", :x => 98, :y => 66, :enabled => false, :file => "Data/Map106.rvdata2", :title => "Небольшой фермерский дом в лесу", :note => nil},
|
|
107 => {:name => "r14_AbomDesert1", :x => 25, :y => 156, :enabled => true, :file => "Data/Map107.rvdata2", :title => "Пустоши абоминаций 1", :note => nil}, # Print (Пустыня тварей)
|
|
108 => {:name => "r15_26_Marsh1", :x => 25, :y => 158, :enabled => true, :file => "Data/Map108.rvdata2", :title => "Топи Ноэра 1", :note => nil}, # Print (Топь)
|
|
109 => {:name => "FishBeach", :x => 115, :y => 80, :enabled => false, :file => "Data/Map109.rvdata2", :title => "Берег Останков", :note => nil},
|
|
110 => {:name => "FishCeramic", :x => 115, :y => 81, :enabled => false, :file => "Data/Map110.rvdata2", :title => "Магазин горшков Красти Краба", :note => nil},
|
|
111 => {:name => "r19_OrkDesert1", :x => 25, :y => 165, :enabled => true, :file => "Data/Map111.rvdata2", :title => "Загрязненные земли 1", :note => nil}, # Print (Пустыня орков)
|
|
112 => {:name => "r14_AbomDesert2", :x => 107, :y => 157, :enabled => false, :file => "Data/Map112.rvdata2", :title => "Пустоши абоминаций 2", :note => nil}, # Print (Пустыня тварей)
|
|
113 => {:name => "AbanHouse3", :x => 98, :y => 67, :enabled => false, :file => "Data/Map113.rvdata2", :title => "Заброшенный Дом 3", :note => nil},
|
|
114 => {:name => "DoomArmory", :x => 98, :y => 72, :enabled => false, :file => "Data/Map114.rvdata2", :title => "Оружейная", :note => nil},
|
|
115 => {:name => "FishTownL", :x => 22, :y => 73, :enabled => true, :file => "Data/Map115.rvdata2", :title => "Город рыбы Л", :note => "Town=Рынок Рыбополиса"},
|
|
116 => {:name => "FishTownR", :x => 115, :y => 74, :enabled => false, :file => "Data/Map116.rvdata2", :title => "Город рыбы П", :note => "Slave=Деревня Рыбополиса"},
|
|
117 => {:name => "FishTownInn", :x => 115, :y => 75, :enabled => false, :file => "Data/Map117.rvdata2", :title => "Таверна на рынке Рыбополиса Inn", :note => nil},
|
|
118 => {:name => "FishTownLeather", :x => 115, :y => 82, :enabled => false, :file => "Data/Map118.rvdata2", :title => "Изделия из Кожи у Гумпа", :note => nil},
|
|
119 => {:name => "FishEscPT", :x => 115, :y => 76, :enabled => false, :file => "Data/Map119.rvdata2", :title => "Водный Путь", :note => nil},
|
|
120 => {:name => "fish r24,25,26,27 note", :x => 25, :y => 178, :enabled => false, :file => "Data/Map120.rvdata2", :title => "Заметка: fish r24,25,26,27 note", :note => nil},
|
|
121 => {:name => "BanditCamp2", :x => 77, :y => 90, :enabled => true, :file => "Data/Map121.rvdata2", :title => "Заброшенный город у Медной Шахты", :note => nil},
|
|
122 => {:name => "FishEscSlave", :x => 115, :y => 77, :enabled => false, :file => "Data/Map122.rvdata2", :title => "Лагерь Рабов", :note => nil},
|
|
123 => {:name => "FishTownT", :x => 115, :y => 78, :enabled => false, :file => "Data/Map123.rvdata2", :title => "Храм Торнов", :note => nil},
|
|
124 => {:name => "r5_PineFroest3", :x => 30, :y => 139, :enabled => false, :file => "Data/Map124.rvdata2", :title => "Хвойный лес 3", :note => nil}, # Print () в игре Сосновый лес
|
|
125 => {:name => "r15_26_Marsh2", :x => 108, :y => 159, :enabled => false, :file => "Data/Map125.rvdata2", :title => "Топи Ноэра 2", :note => nil}, # Print (Топь)
|
|
126 => {:name => "SaintMonasteryC", :x => 11, :y => 198, :enabled => false, :file => "Data/Map126.rvdata2", :title => "Монастырь Святых C", :note => nil},
|
|
127 => {:name => "r6_BadlandForest2", :x => 21, :y => 141, :enabled => false, :file => "Data/Map127.rvdata2", :title => "Мертвый лес 2", :note => nil}, # Print ()
|
|
128 => {:name => "NoerArenaB1", :x => 91, :y => 36, :enabled => false, :file => "Data/Map128.rvdata2", :title => "Арена Ноэра B1", :note => nil},
|
|
129 => {:name => "NoerDockC1", :x => 14, :y => 19, :enabled => false, :file => "Data/Map129.rvdata2", :title => "Порт Ноэра C1", :note => nil},
|
|
130 => {:name => "PenisTribe", :x => 98, :y => 68, :enabled => false, :file => "Data/Map130.rvdata2", :title => "Племя Девяти Дюймов", :note => nil},
|
|
131 => {:name => "r16_PlainBadland1", :x => 25, :y => 160, :enabled => true, :file => "Data/Map131.rvdata2", :title => "Зараженный край абоминаций 1", :note => nil}, # Print ()
|
|
132 => {:name => "DF_TribeForest", :x => 98, :y => 69, :enabled => false, :file => "Data/Map132.rvdata2", :title => "Спиральный лес", :note => "TribeForest"},
|
|
133 => {:name => "SMRefugeeCamp", :x => 64, :y => 49, :enabled => false, :file => "Data/Map133.rvdata2", :title => "Лагерь Беженцев", :note => nil},
|
|
134 => {:name => "r16_PlainBadland2", :x => 131, :y => 161, :enabled => false, :file => "Data/Map134.rvdata2", :title => "Зараженный край абоминаций 2", :note => nil}, # Print ()
|
|
135 => {:name => "SouthFL_INN", :x => 38, :y => 99, :enabled => false, :file => "Data/Map135.rvdata2", :title => "Лагерь у южных ворот Сибариса Inn", :note => nil},
|
|
136 => {:name => "SpawnPoolE", :x => 38, :y => 100, :enabled => false, :file => "Data/Map136.rvdata2", :title => "Инкубатор", :note => nil},
|
|
137 => {:name => "BreedlingEC1", :x => 71, :y => 97, :enabled => false, :file => "Data/Map137.rvdata2", :title => "Breedling EC 1", :note => nil},
|
|
138 => {:name => "VideoLab", :x => 8, :y => 7, :enabled => true, :file => "Data/Map138.rvdata2", :title => "Видеолаборатория", :note => nil},
|
|
139 => {:name => "TutorialOP", :x => 11, :y => 195, :enabled => false, :file => "Data/Map139.rvdata2", :title => "Обучение", :note => nil},
|
|
140 => {:name => "SpawnPoolR", :x => 38, :y => 101, :enabled => false, :file => "Data/Map140.rvdata2", :title => "Деревня в руинах", :note => nil},
|
|
141 => {:name => "BC2_SideQu", :x => 121, :y => 91, :enabled => false, :file => "Data/Map141.rvdata2", :title => "Разграбленный конвой", :note => nil},
|
|
142 => {:name => "NoerGarrisonIn*******", :x => 52, :y => 41, :enabled => true, :file => "Data/Map142.rvdata2", :title => "Штаб гвардии Ноэра", :note => "NoerGarrisonIn"},
|
|
143 => {:name => "-lib-Follower", :x => 1, :y => 209, :enabled => false, :file => "Data/Map143.rvdata2", :title => "Служебная карта: Follower", :note => nil},
|
|
144 => {:name => "AbomHive3", :x => 71, :y => 95, :enabled => false, :file => "Data/Map144.rvdata2", :title => "Логово Тварей 3", :note => nil},
|
|
145 => {:name => "r17_RoadSyb1", :x => 25, :y => 162, :enabled => true, :file => "Data/Map145.rvdata2", :title => "Загрязненная дорога 1", :note => nil}, # Print (Дорога Сибариса)
|
|
146 => {:name => "r17_RoadSyb2", :x => 145, :y => 163, :enabled => false, :file => "Data/Map146.rvdata2", :title => "Загрязненная дорога 2", :note => nil}, # Print (Дорога Сибариса)
|
|
147 => {:name => "r2_r27_Beach2", :x => 27, :y => 131, :enabled => false, :file => "Data/Map147.rvdata2", :title => "Берег Ноэра 2", :note => nil}, # Print (Пляж)
|
|
148 => {:name => "NorthFL_INN", :x => 152, :y => 107, :enabled => false, :file => "Data/Map148.rvdata2", :title => "Батальонная станция Inn", :note => nil},
|
|
149 => {:name => "r2_r27_Beach3", :x => 27, :y => 132, :enabled => false, :file => "Data/Map149.rvdata2", :title => "Берег Ноэра 3", :note => nil}, # Print (Пляж)
|
|
150 => {:name => "r18_TownSyb1", :x => 25, :y => 164, :enabled => false, :file => "Data/Map150.rvdata2", :title => "Руины зараженного города", :note => nil}, # Print ()
|
|
151 => {:name => "BanditShip1*********", :x => 77, :y => 92, :enabled => false, :file => "Data/Map151.rvdata2", :title => "Бандиты Ship 1", :note => nil},
|
|
152 => {:name => "NorthFL", :x => 22, :y => 105, :enabled => true, :file => "Data/Map152.rvdata2", :title => "Соляная ферма Северного Моря / Солдатские Казармы", :note => nil},
|
|
153 => {:name => "PB_GobForest", :x => 92, :y => 58, :enabled => false, :file => "Data/Map153.rvdata2", :title => "Лес Оркоидов", :note => nil},
|
|
154 => {:name => "NorthFL_Dock", :x => 152, :y => 106, :enabled => false, :file => "Data/Map154.rvdata2", :title => "Прибрежная Крепость / Забытые солевые поля Чайки", :note => nil},
|
|
155 => {:name => "SouthFL_Warfare", :x => 38, :y => 102, :enabled => false, :file => "Data/Map155.rvdata2", :title => "Северо-восточная застава", :note => nil},
|
|
156 => {:name => "EndingShip", :x => 11, :y => 196, :enabled => false, :file => "Data/Map156.rvdata2", :title => "Финальный корабль", :note => nil},
|
|
157 => {:name => "SybFDgate", :x => 38, :y => 103, :enabled => false, :file => "Data/Map157.rvdata2", :title => "Юго-западные ворота Сибариса", :note => nil},
|
|
158 => {:name => "SybBarn", :x => 38, :y => 104, :enabled => false, :file => "Data/Map158.rvdata2", :title => "Хлев у юго-западных ворот Сибариса", :note => nil},
|
|
159 => {:name => "r19_OrkDesert2", :x => 111, :y => 166, :enabled => false, :file => "Data/Map159.rvdata2", :title => "Загрязненные земли 2", :note => nil}, # Print (Пустыня орков)
|
|
160 => {:name => "r28_OrkBadland1", :x => 25, :y => 179, :enabled => true, :file => "Data/Map160.rvdata2", :title => "Зараженный край оркойдов 1", :note => nil}, # Print ()
|
|
161 => {:name => "r28_OrkBadland2", :x => 160, :y => 180, :enabled => false, :file => "Data/Map161.rvdata2", :title => "Зараженный край оркойдов 2", :note => nil}, # Print ()
|
|
162 => {:name => "NoerMilo1**********", :x => 82, :y => 33, :enabled => false, :file => "Data/Map162.rvdata2", :title => "Milo 1 Ноэра", :note => nil},
|
|
163 => {:name => "r8_25_Swamp2", :x => 19, :y => 145, :enabled => false, :file => "Data/Map163.rvdata2", :title => "Болото Ноэра 2", :note => nil}, # Print (Болото)
|
|
164 => {:name => "NFL_BridgeBunker *****", :x => 152, :y => 109, :enabled => true, :file => "Data/Map164.rvdata2", :title => "NFL Bridge Bunker", :note => nil},
|
|
165 => {:name => "AriseVillage", :x => 92, :y => 59, :enabled => false, :file => "Data/Map165.rvdata2", :title => "Деревня Арис", :note => nil},
|
|
166 => {:name => "DfRefugeeCamp", :x => 98, :y => 70, :enabled => false, :file => "Data/Map166.rvdata2", :title => "Лагерь беженцев Твердыни Рока", :note => nil},
|
|
167 => {:name => "B4CampOrkind", :x => 11, :y => 194, :enabled => false, :file => "Data/Map167.rvdata2", :title => "B 4 Лагерь Орки", :note => "Мужчины-жертвы"},
|
|
168 => {:name => "NoerRelayOut", :x => 52, :y => 44, :enabled => false, :file => "Data/Map168.rvdata2", :title => "Вход через Восточные Ворота", :note => nil},
|
|
169 => {:name => "DfWaterCave", :x => 98, :y => 71, :enabled => false, :file => "Data/Map169.rvdata2", :title => "Водная Пещера", :note => nil},
|
|
170 => {:name => "r10_Slum2", :x => 17, :y => 149, :enabled => false, :file => "Data/Map170.rvdata2", :title => "Трущобы 2", :note => nil}, # Print ()
|
|
171 => {:name => "NoerGoldenBar2F******", :x => 82, :y => 31, :enabled => false, :file => "Data/Map171.rvdata2", :title => "Золотой Слиток 2", :note => nil},
|
|
172 => {:name => "NFL_BridgeBunkerINN***", :x => 164, :y => 110, :enabled => false, :file => "Data/Map172.rvdata2", :title => "NFL Bridge Bunker Таверна", :note => nil},
|
|
173 => {:name => "RngTeng1********", :x => 2, :y => 185, :enabled => false, :file => "Data/Map173.rvdata2", :title => "Rng Teng 1", :note => nil},
|
|
174 => {:name => "NoerWest13WH", :x => 63, :y => 23, :enabled => false, :file => "Data/Map174.rvdata2", :title => "Запад 13 WH Ноэра", :note => nil},
|
|
175 => {:name => "NoerGangBase", :x => 63, :y => 24, :enabled => false, :file => "Data/Map175.rvdata2", :title => "Укрытие банды Широкое Лезвие", :note => nil},
|
|
176 => {:name => "NoerBackStreetQ", :x => 11, :y => 197, :enabled => false, :file => "Data/Map176.rvdata2", :title => "Закоулки Ноэртауна Q", :note => nil},
|
|
177 => {:name => "DesertIsland1", :x => 22, :y => 125, :enabled => false, :file => "Data/Map177.rvdata2", :title => "Пустынный остров", :note => nil},
|
|
178 => {:name => "PB_FishCampA", :x => 92, :y => 60, :enabled => false, :file => "Data/Map178.rvdata2", :title => "Лагерь Рыболюдей", :note => nil},
|
|
179 => {:name => "BoardSwordCave", :x => 92, :y => 61, :enabled => false, :file => "Data/Map179.rvdata2", :title => "Гробница Тёмного Берсерка", :note => nil},
|
|
180 => {:name => "FishkindCave1B2", :x => 100, :y => 124, :enabled => false, :file => "Data/Map180.rvdata2", :title => "Храм Твин Пикс 1", :note => nil},
|
|
181 => {:name => "Title666", :x => 65, :y => 203, :enabled => false, :file => "Data/Map181.rvdata2", :title => "Title 666", :note => nil},
|
|
182 => {:name => "SMCloudVillage", :x => 64, :y => 52, :enabled => false, :file => "Data/Map182.rvdata2", :title => "Облачная Деревня", :note => nil},
|
|
183 => {:name => "MT_crunch", :x => 64, :y => 51, :enabled => false, :file => "Data/Map183.rvdata2", :title => "Горный Монастырь", :note => nil},
|
|
184 => {:name => "r7_PineFroestMountain2", :x => 37, :y => 143, :enabled => false, :file => "Data/Map184.rvdata2", :title => "Горы 2", :note => nil}, # Print ()
|
|
185 => {:name => "AbomBG VID TEST", :x => 138, :y => 8, :enabled => false, :file => "Data/Map185.rvdata2", :title => "Твари BG VID TEST", :note => nil},
|
|
186 => {:name => "ParkA test******", :x => 138, :y => 9, :enabled => false, :file => "Data/Map186.rvdata2", :title => "Park A test", :note => nil},
|
|
187 => {:name => "NoerDarneyl TEST****", :x => 82, :y => 32, :enabled => false, :file => "Data/Map187.rvdata2", :title => "Darneyl TEST Ноэра", :note => nil},
|
|
188 => {:name => "BossMamaDual", :x => 11, :y => 199, :enabled => false, :file => "Data/Map188.rvdata2", :title => "Boss Mama Dual", :note => nil},
|
|
189 => {:name => "Syb_WarBossRoom", :x => 190, :y => 117, :enabled => true, :file => "Data/Map189.rvdata2", :title => "Павшая крепость", :note => "Вождь"},
|
|
190 => {:name => "SybCrunch_Main*****", :x => 22, :y => 115, :enabled => true, :file => "Data/Map190.rvdata2", :title => "Syb Crunch Main", :note => nil},
|
|
191 => {:name => "r29_SYB_KeepAbom1", :x => 25, :y => 181, :enabled => false, :file => "Data/Map191.rvdata2", :title => "Руины павшей крепости абоминаций", :note => nil}, # Print ()
|
|
192 => {:name => "r30_SYB_KeepOrk1", :x => 25, :y => 182, :enabled => false, :file => "Data/Map192.rvdata2", :title => "Руины павшей крепости оркоидов", :note => nil}, # Print ()
|
|
193 => {:name => "AbomHive4*****", :x => 71, :y => 96, :enabled => false, :file => "Data/Map193.rvdata2", :title => "Логово Тварей 4", :note => nil},
|
|
194 => {:name => "NFL_BatHive", :x => 152, :y => 108, :enabled => false, :file => "Data/Map194.rvdata2", :title => "Логово летучей мыши-мутанта", :note => nil},
|
|
195 => {:name => "NoerTransHouse", :x => 75, :y => 29, :enabled => false, :file => "Data/Map195.rvdata2", :title => "Дом игрушек Плохого Дракона", :note => nil},
|
|
196 => {:name => "OrkindKeep1_Qu", :x => 189, :y => 119, :enabled => false, :file => "Data/Map196.rvdata2", :title => "Крепость орков 1 Qu", :note => nil},
|
|
197 => {:name => "OrkindKeep1", :x => 189, :y => 118, :enabled => false, :file => "Data/Map197.rvdata2", :title => "Крепость орков 1", :note => "Опорный пункт"},
|
|
198 => {:name => "NFL_OrkCamp2", :x => 152, :y => 113, :enabled => false, :file => "Data/Map198.rvdata2", :title => "Перевалочная станция для охотников", :note => nil},
|
|
199 => {:name => "NFL_OrkCamp1", :x => 152, :y => 112, :enabled => false, :file => "Data/Map199.rvdata2", :title => "12-е Южное Зернохранилище", :note => nil},
|
|
200 => {:name => "r31_SYB_RoadOrk1", :x => 25, :y => 183, :enabled => false, :file => "Data/Map200.rvdata2", :title => "Улицы Сибариса", :note => nil}, # Print (Дорога Орки 1)
|
|
201 => {:name => "r32_SYB_AlleyOrk1", :x => 25, :y => 184, :enabled => false, :file => "Data/Map201.rvdata2", :title => "Аллеи Сибариса", :note => nil}, # Print (Переулок Орки 1)
|
|
202 => {:name => "BossRushPicker", :x => 11, :y => 200, :enabled => false, :file => "Data/Map202.rvdata2", :title => "Выбор Boss Rush", :note => nil},
|
|
203 => {:name => "TitleHiveBattle", :x => 65, :y => 204, :enabled => false, :file => "Data/Map203.rvdata2", :title => "Title Hive Battle", :note => nil},
|
|
204 => {:name => "NFL_MerCamp", :x => 152, :y => 114, :enabled => false, :file => "Data/Map204.rvdata2", :title => "Лагерь наёмников", :note => nil},
|
|
205 => {:name => "Syb_N_Gate*******", :x => 190, :y => 120, :enabled => false, :file => "Data/Map205.rvdata2", :title => "Syb N Ворота", :note => nil},
|
|
206 => {:name => "NFL_BridgeBunkerBat", :x => 164, :y => 111, :enabled => false, :file => "Data/Map206.rvdata2", :title => "NFL Bridge Bunker Bat", :note => nil},
|
|
207 => {:name => "-lib-Skills", :x => 1, :y => 210, :enabled => false, :file => "Data/Map207.rvdata2", :title => "Служебная карта: Skills", :note => nil},
|
|
208 => {:name => "FishFistMasterCave*****", :x => 115, :y => 83, :enabled => false, :file => "Data/Map208.rvdata2", :title => "Рыба Fist Master Пещера", :note => nil},
|
|
210 => {:name => "OvermapMain", :x => 52, :y => 45, :enabled => false, :file => "Data/Map210.rvdata2", :title => "Основная карта", :note => nil},
|
|
212 => {:name => "asdasdasdasd", :x => 142, :y => 42, :enabled => false, :file => "Data/Map212.rvdata2", :title => "asdasdasdasd", :note => nil},
|
|
999 => {:name => "theTree", :x => nil, :y => nil, :enabled => nil, :file => nil, :title => "Место исследований Элис", :note => nil},
|
|
998 => {:name => "Sewer", :x => nil, :y => nil, :enabled => nil, :file => nil, :title => "Канализации Ноэра", :note => nil},
|
|
}.freeze
|
|
|
|
def self.[](id)
|
|
DATA[id]
|
|
end
|
|
end
|
|
|
|
# encoding: UTF-8
|
|
#==============================================================================
|
|
# Multiplayer TAB Overlay (hold TAB) - VX Ace (RGSS3)
|
|
#------------------------------------------------------------------------------
|
|
# Улучшения:
|
|
# - Фикс: вы/игроки на вашей карте всегда корректно синие
|
|
# - Фикс: иногда "онлайн 3, а показывает 2" (учёт srv_join/srv_quit + merge)
|
|
# - UI: онлайн по центру сверху, игроки в 3 колонки, подпись снизу
|
|
# - Меньше лагов: окно не пересоздаётся каждый раз, обновление реже
|
|
#==============================================================================
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Keyboard helper
|
|
# -----------------------------------------------------------------------------
|
|
unless defined?(MPKeyboard)
|
|
module MPKeyboard
|
|
def self.trigger?(vk)
|
|
begin
|
|
return !!Input.trigger?(vk)
|
|
rescue
|
|
end
|
|
false
|
|
end
|
|
|
|
def self.press?(vk)
|
|
begin
|
|
return !!Input.press?(vk)
|
|
rescue
|
|
end
|
|
false
|
|
end
|
|
end
|
|
end
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# WebSocket extension: robust player list for TAB
|
|
# -----------------------------------------------------------------------------
|
|
if defined?(WebSocket)
|
|
module WebSocket
|
|
# Cache of known players: pid => {nick:, map:, seen:, online:}
|
|
@mp_tab_known ||= {}
|
|
# Last server list snapshot: {time:, list:{pid=>{nick:, map:}}}
|
|
@mp_tab_server ||= nil
|
|
|
|
def self.mp_tab_now
|
|
begin
|
|
Time.now.to_f
|
|
rescue
|
|
0.0
|
|
end
|
|
end
|
|
|
|
def self.mp_tab_seen(pid, map_id=nil, nick=nil, online=true)
|
|
pid = pid.to_i
|
|
return if pid <= 0
|
|
@mp_tab_known ||= {}
|
|
e = (@mp_tab_known[pid] ||= {})
|
|
e[:seen] = mp_tab_now
|
|
e[:online] = online ? true : false
|
|
e[:map] = map_id.to_i if !map_id.nil?
|
|
|
|
if !nick.nil?
|
|
s = nick.to_s
|
|
s = s.gsub(/\r\n?/, " ").gsub("\n", " ")
|
|
s = s.gsub("\0", "")
|
|
s = s.strip
|
|
s = s[0, 16]
|
|
e[:nick] = s if s != ""
|
|
end
|
|
end
|
|
|
|
def self.mp_tab_set_server_list(list_hash)
|
|
@mp_tab_server = { time: mp_tab_now, list: (list_hash || {}) }
|
|
# также отмечаем seen/online по серверному списку
|
|
begin
|
|
(list_hash || {}).each do |pid, data|
|
|
mp_tab_seen(pid, (data[:map] || data['map']), (data[:nick] || data['nick']), true)
|
|
end
|
|
rescue
|
|
end
|
|
end
|
|
|
|
def self.mp_tab_server_fresh?(ttl=6.0)
|
|
return false unless @mp_tab_server && @mp_tab_server[:time]
|
|
(mp_tab_now - @mp_tab_server[:time].to_f) <= ttl
|
|
end
|
|
|
|
def self.mp_tab_request_who
|
|
return unless respond_to?(:send_line)
|
|
return unless connected?
|
|
send_line("who")
|
|
rescue
|
|
end
|
|
|
|
# удаляем "старых" игроков, чтобы не было вечных призраков и неверного total
|
|
def self.mp_tab_prune!(ttl=45.0)
|
|
return unless @mp_tab_known
|
|
now = mp_tab_now
|
|
@mp_tab_known.delete_if do |_pid, e|
|
|
seen = (e[:seen] || 0.0).to_f
|
|
(now - seen) > ttl
|
|
end
|
|
rescue
|
|
end
|
|
|
|
# Returns [total_count, entries]
|
|
# entries: array of [pid, nick, map_id, same_map]
|
|
def self.mp_tab_entries(current_map_id)
|
|
cur = current_map_id.to_i
|
|
mp_tab_prune!(45.0)
|
|
|
|
my_pid = nil
|
|
begin
|
|
my_pid = (respond_to?(:my_id) ? my_id : nil)
|
|
my_pid = my_pid.to_i if my_pid
|
|
rescue
|
|
my_pid = nil
|
|
end
|
|
|
|
# --- Source selection ---
|
|
server_list = nil
|
|
server_total = nil
|
|
|
|
if mp_tab_server_fresh?
|
|
server_list = @mp_tab_server[:list] || {}
|
|
server_total = server_list.size
|
|
end
|
|
|
|
known = @mp_tab_known || {}
|
|
|
|
# --- Merge list for drawing (server snapshot preferred, but fill gaps from known) ---
|
|
merged = {}
|
|
|
|
if server_list && !server_list.empty?
|
|
server_list.each { |pid, data| merged[pid.to_i] = data }
|
|
end
|
|
|
|
# add known players not in server snapshot (useful when who reply is delayed/lost)
|
|
known.each do |pid, e|
|
|
pid_i = pid.to_i
|
|
next if pid_i <= 0
|
|
next if merged.key?(pid_i)
|
|
merged[pid_i] = e
|
|
end
|
|
|
|
# ensure SELF always present and always has correct map for coloring
|
|
if my_pid && my_pid > 0
|
|
merged[my_pid] ||= {}
|
|
if merged[my_pid].is_a?(Hash)
|
|
merged[my_pid][:map] = cur
|
|
merged[my_pid][:seen] = mp_tab_now
|
|
merged[my_pid][:online] = true
|
|
end
|
|
end
|
|
|
|
# determine "same map" reliably:
|
|
# - self is always same map
|
|
# - OR if pid is in WebSocket @players (players currently synced on this map)
|
|
# - OR if map_id == cur (if we know it)
|
|
on_map = {}
|
|
begin
|
|
if instance_variable_defined?(:@players)
|
|
ps = instance_variable_get(:@players) rescue {}
|
|
if ps
|
|
ps.keys.each { |pid| on_map[pid.to_i] = true }
|
|
end
|
|
end
|
|
rescue
|
|
end
|
|
on_map[my_pid] = true if my_pid && my_pid > 0
|
|
|
|
entries = []
|
|
merged.each do |pid, data|
|
|
pid_i = pid.to_i
|
|
next if pid_i <= 0
|
|
|
|
nick = nil
|
|
map = nil
|
|
online = true
|
|
|
|
if data.is_a?(Hash)
|
|
nick = data[:nick] || data['nick']
|
|
map = data[:map] || data['map']
|
|
online = data.key?(:online) ? !!data[:online] : true
|
|
online = data.key?('online') ? !!data['online'] : online
|
|
end
|
|
|
|
# if nick missing, try core nickname store
|
|
begin
|
|
nick = nickname_for(pid_i) if (nick.nil? || nick.to_s.strip == "") && respond_to?(:nickname_for)
|
|
rescue
|
|
end
|
|
|
|
nick = nick.to_s
|
|
nick = "ID #{pid_i}" if nick.strip == ""
|
|
|
|
map_i = map.nil? ? 0 : map.to_i
|
|
|
|
same = false
|
|
if on_map[pid_i]
|
|
same = true
|
|
map_i = cur if map_i == 0 # если карта неизвестна, но мы точно видим его на карте
|
|
elsif map_i != 0 && map_i == cur
|
|
same = true
|
|
end
|
|
|
|
# если игрок явно оффлайн — пропускаем (на случай srv_quit)
|
|
next if online == false
|
|
|
|
entries << [pid_i, nick, map_i, same]
|
|
end
|
|
|
|
# total: prefer server total when fresh, otherwise merged size
|
|
total = (server_total && server_total > 0) ? server_total : entries.size
|
|
|
|
# sort: same-map first, then nick, then pid
|
|
entries.sort_by! do |pid_i, nick, _map_i, same|
|
|
[same ? 0 : 1, nick.downcase, pid_i]
|
|
end
|
|
|
|
[total, entries]
|
|
end
|
|
|
|
# -------------------------
|
|
# Parser extension
|
|
# -------------------------
|
|
class << self
|
|
unless method_defined?(:mp_tab__orig_parse)
|
|
alias mp_tab__orig_parse parse
|
|
end
|
|
end
|
|
|
|
def self.mp_tab_parse_custom(msg)
|
|
return false if msg.nil? || msg == ""
|
|
|
|
# who_list:pid:map:nick|pid:map:nick...
|
|
if msg.start_with?("who_list:")
|
|
payload = msg.sub("who_list:", "")
|
|
list = {}
|
|
payload.split("|").each do |chunk|
|
|
c = chunk.to_s
|
|
next if c.strip == ""
|
|
p = c.split(":", 3)
|
|
next if p.size < 3
|
|
pid = p[0].to_i
|
|
map = p[1].to_i
|
|
nick = nil
|
|
begin
|
|
nick = unesc(p[2].to_s)
|
|
rescue
|
|
nick = p[2].to_s
|
|
end
|
|
list[pid] = { nick: nick, map: map } if pid > 0
|
|
end
|
|
mp_tab_set_server_list(list) # even if empty (fresh timestamp)
|
|
return true
|
|
end
|
|
|
|
# server-level presence (helps total count)
|
|
if msg =~ /^srv_join:(\d+):(.+)$/
|
|
pid = $1.to_i
|
|
nick = $2.to_s
|
|
begin
|
|
nick = unesc(nick)
|
|
rescue
|
|
end
|
|
mp_tab_seen(pid, nil, nick, true)
|
|
return false
|
|
end
|
|
|
|
if msg =~ /^srv_quit:(\d+):/
|
|
pid = $1.to_i
|
|
mp_tab_seen(pid, 0, nil, false)
|
|
return false
|
|
end
|
|
|
|
# Track basics from existing packets (do not consume)
|
|
begin
|
|
cur_map = ($game_map ? $game_map.map_id : 0)
|
|
rescue
|
|
cur_map = 0
|
|
end
|
|
|
|
if msg =~ /^nick:(\d+):(.*)$/
|
|
pid = $1.to_i
|
|
nick = $2.to_s
|
|
begin
|
|
nick = unesc(nick)
|
|
rescue
|
|
end
|
|
mp_tab_seen(pid, nil, nick, true)
|
|
return false
|
|
end
|
|
|
|
if msg =~ /^welcome:(\d+)$/
|
|
pid = $1.to_i
|
|
# ВАЖНО: на welcome карта может быть ещё 0 — не полагаемся на неё для подсветки
|
|
mp_tab_seen(pid, nil, (respond_to?(:local_nickname) ? local_nickname : nil), true)
|
|
return false
|
|
end
|
|
|
|
if msg =~ /^join:(\d+)$/
|
|
pid = $1.to_i
|
|
mp_tab_seen(pid, cur_map, nil, true)
|
|
return false
|
|
end
|
|
|
|
if msg =~ /^pos:(\d+):/
|
|
pid = $1.to_i
|
|
mp_tab_seen(pid, cur_map, nil, true)
|
|
return false
|
|
end
|
|
|
|
if msg =~ /^quit:(\d+)$/
|
|
pid = $1.to_i
|
|
# игрок ушёл с нашей карты — карта неизвестна, но он может быть онлайн на сервере
|
|
mp_tab_seen(pid, 0, nil, true)
|
|
return false
|
|
end
|
|
|
|
false
|
|
end
|
|
|
|
def self.parse(msg)
|
|
return if mp_tab_parse_custom(msg)
|
|
mp_tab__orig_parse(msg)
|
|
end
|
|
|
|
class << self
|
|
begin
|
|
unless method_defined?(:mp_tab__orig_disconnect)
|
|
alias mp_tab__orig_disconnect disconnect
|
|
end
|
|
def disconnect
|
|
mp_tab__orig_disconnect
|
|
@mp_tab_known = {}
|
|
@mp_tab_server = nil
|
|
end
|
|
rescue
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Map name resolver for TAB.
|
|
# - normal game maps use MAP_INFO::DATA
|
|
# - mod maps are also found by RPG::MapInfo#id, even when $data_mapinfos is
|
|
# keyed by a String (the standard extra_map_register/mod-map pattern)
|
|
# - known mods may expose a localized/custom location name
|
|
# - fallback => a readable runtime name, then "Map <id>"
|
|
# -----------------------------------------------------------------------------
|
|
unless defined?(MPMapInfo)
|
|
module MPMapInfo
|
|
def self.clean_label(value)
|
|
text = value.to_s
|
|
text = text.gsub(/[\r\n\t\0]/, " ").gsub(/\s+/, " ").strip
|
|
text[0, 64].to_s
|
|
rescue
|
|
""
|
|
end
|
|
|
|
def self.static_name(map_id)
|
|
id = map_id.to_i
|
|
return nil if id <= 0
|
|
return nil unless defined?(MAP_INFO) && MAP_INFO.const_defined?(:DATA)
|
|
info = MAP_INFO::DATA[id]
|
|
return nil unless info
|
|
title = (info[:title] || info['title']) rescue nil
|
|
name = (info[:name] || info['name']) rescue nil
|
|
text = clean_label(title)
|
|
text = clean_label(name) if text == ""
|
|
text == "" ? nil : text
|
|
rescue
|
|
nil
|
|
end
|
|
|
|
# Returns [registry_key, RPG::MapInfo]. Mod maps commonly have a String
|
|
# registry key but only their MapInfo object contains the numeric map id
|
|
# received from the multiplayer server.
|
|
def self.runtime_entry(map_id)
|
|
id = map_id.to_i
|
|
return nil if id <= 0
|
|
return nil unless defined?($data_mapinfos) && $data_mapinfos
|
|
|
|
begin
|
|
direct = $data_mapinfos[id]
|
|
return [id, direct] if direct
|
|
rescue
|
|
end
|
|
|
|
# Prefer the exact key of the currently loaded map. This also covers
|
|
# save-created maps whose keys are restored lazily by a mod.
|
|
begin
|
|
if defined?($game_map) && $game_map && $game_map.map_id.to_i == id && $game_map.respond_to?(:map_id_rec)
|
|
key = $game_map.map_id_rec
|
|
info = $data_mapinfos[key]
|
|
return [key, info] if info
|
|
end
|
|
rescue
|
|
end
|
|
|
|
begin
|
|
$data_mapinfos.each_pair do |key, info|
|
|
next unless info
|
|
info_id = info.respond_to?(:id) ? info.id.to_i : 0
|
|
info_id = key.to_i if info_id <= 0 && key.is_a?(Integer)
|
|
return [key, info] if info_id == id
|
|
end
|
|
rescue
|
|
end
|
|
nil
|
|
end
|
|
|
|
# Raw runtime name is kept public because small compatibility patches can
|
|
# map a mod's technical map key to their own label without rescanning.
|
|
def self.runtime_name(map_id)
|
|
entry = runtime_entry(map_id)
|
|
return nil unless entry
|
|
key, info = entry
|
|
name = (info.name rescue nil)
|
|
text = clean_label(name)
|
|
return text unless text == ""
|
|
text = clean_label(key)
|
|
text == "" ? nil : text
|
|
rescue
|
|
nil
|
|
end
|
|
|
|
def self.readable_runtime_name(value)
|
|
text = clean_label(value)
|
|
return nil if text == ""
|
|
begin
|
|
# A registry key may be the full path of an .rvdata2 file.
|
|
if text.include?("/") || text.include?("\\")
|
|
text = File.basename(text.gsub("\\", "/"))
|
|
text = text.sub(/\.rvdata2\z/i, "")
|
|
end
|
|
rescue
|
|
end
|
|
text = text.sub(/\ALonaCraftHome_/, "")
|
|
text = text.gsub(/[_\-]+/, " ")
|
|
text = text.gsub(/([a-z0-9])([A-Z])/, '\\1 \\2')
|
|
text = clean_label(text)
|
|
text == "" ? nil : text
|
|
rescue
|
|
nil
|
|
end
|
|
|
|
# Optional localized names exposed by the installed mods. Generic mod maps
|
|
# still work through runtime_name/readable_runtime_name below.
|
|
def self.mod_name(map_id, raw_name=nil)
|
|
id = map_id.to_i
|
|
|
|
begin
|
|
entry = runtime_entry(id)
|
|
registry_key = entry ? entry[0].to_s : ""
|
|
lona_base = registry_key.start_with?("LonaCraftBase_") || raw_name.to_s == "LonaCraftDeepSewer"
|
|
if lona_base && defined?(LonaCraft::Bases) && LonaCraft::Bases.respond_to?(:list)
|
|
records = LonaCraft::Bases.list
|
|
record = records.find { |row| row.is_a?(Hash) && row["map_no"].to_i == id } if records.respond_to?(:find)
|
|
if record && LonaCraft::Bases.respond_to?(:name_of)
|
|
text = clean_label(LonaCraft::Bases.name_of(record))
|
|
return text unless text == ""
|
|
end
|
|
end
|
|
rescue
|
|
end
|
|
|
|
begin
|
|
if defined?(LonaCraft::Homes) && LonaCraft::Homes.respond_to?(:map_id_for)
|
|
locations = LonaCraft::Homes.const_get(:LOCATIONS)
|
|
locations.each do |loc|
|
|
next unless loc.is_a?(Hash)
|
|
next unless LonaCraft::Homes.map_id_for(loc[:id]).to_i == id
|
|
text_key = nil
|
|
interior = loc[:interior]
|
|
text_key = interior[1] if interior.is_a?(Array)
|
|
text_key = loc[:name] if text_key.nil? || text_key.to_s == ""
|
|
text = clean_label(LonaCraft::Homes.text(text_key))
|
|
return text unless text == "" || text.start_with?("LonaCraft:")
|
|
end
|
|
end
|
|
rescue
|
|
end
|
|
|
|
begin
|
|
if raw_name.to_s == "LonaCraftDeepSewer" && defined?(LonaCraft::Bases) && LonaCraft::Bases.respond_to?(:text)
|
|
text = clean_label(LonaCraft::Bases.text("Name/sewer"))
|
|
return text unless text == "" || text.start_with?("LonaCraft:")
|
|
end
|
|
rescue
|
|
end
|
|
|
|
# Other mods can put a user-facing title directly on their MapInfo.
|
|
begin
|
|
entry = runtime_entry(id) unless entry
|
|
info = entry ? entry[1] : nil
|
|
if info
|
|
[:display_name, :title].each do |method_name|
|
|
next unless info.respond_to?(method_name)
|
|
text = clean_label(info.send(method_name))
|
|
return text unless text == ""
|
|
end
|
|
end
|
|
rescue
|
|
end
|
|
nil
|
|
end
|
|
|
|
def self.display_name(map_id)
|
|
id = map_id.to_i
|
|
return "" if id <= 0
|
|
|
|
# The bundled table has the best localized labels for original maps.
|
|
text = static_name(id)
|
|
return text if text && text != ""
|
|
|
|
raw = runtime_name(id)
|
|
text = mod_name(id, raw)
|
|
return text if text && text != ""
|
|
|
|
text = readable_runtime_name(raw)
|
|
return text if text && text != ""
|
|
|
|
"Map #{id}"
|
|
rescue
|
|
id > 0 ? "Map #{id}" : ""
|
|
end
|
|
end
|
|
end
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# TAB overlay window (3 columns + centered header/footer)
|
|
# -----------------------------------------------------------------------------
|
|
class Window_MPTabList < Window_Base
|
|
BLUE = Color.new(40, 140, 255)
|
|
|
|
def initialize
|
|
w = [(Graphics.width * 0.70).to_i, 420].max
|
|
w = Graphics.width - 32 if w > Graphics.width - 32
|
|
|
|
# height: auto but capped
|
|
h = [(Graphics.height * 0.55).to_i, 280].max
|
|
h = Graphics.height - 32 if h > Graphics.height - 32
|
|
|
|
x = (Graphics.width - w) / 2
|
|
y = 16
|
|
|
|
super(x, y, w, h)
|
|
self.opacity = 180
|
|
self.z = 9999
|
|
self.visible = false
|
|
|
|
@last_sig = nil
|
|
refresh(0, [])
|
|
end
|
|
|
|
def build_sig(total, entries)
|
|
a = [total, entries.size]
|
|
entries.each do |e|
|
|
pid, nick, map, same = e
|
|
map_name = (MPMapInfo.display_name(map) rescue map.to_s)
|
|
a << pid << map.to_i << map_name << (same ? 1 : 0) << nick.to_s[0, 8]
|
|
end
|
|
a.join("|")
|
|
end
|
|
|
|
def refresh(total, entries)
|
|
sig = build_sig(total, entries)
|
|
return if sig == @last_sig
|
|
@last_sig = sig
|
|
|
|
contents.clear
|
|
lh = line_height
|
|
|
|
# ---- Header (centered) ----
|
|
contents.font.name = (defined?(MPSafeFont) ? MPSafeFont.tab_header_name : "2A03")
|
|
contents.font.size = 16 # Print () размер шрифта
|
|
contents.font.bold = true # Print () заголовки везде bold
|
|
contents.font.outline = false # Print () что бы буквы не слипались
|
|
contents.font.shadow = true # Print () меню полупрозрачное, поэтому доп подложка под буквы
|
|
contents.font.color = Color.new(255,255,255) # Print () Белый
|
|
#draw_text(0, 0, contents.width, lh, "Онлайн: #{total}", 1) # Print () Прошлая версия
|
|
draw_text(0, 0, contents.width, lh, "Онлайн: ", 1) # Print () Белый
|
|
contents.font.color = Color.new(55,255,55) # Print () Белый
|
|
draw_text(0, 0, contents.width, lh, " #{total}", 1) # Print () Белый
|
|
|
|
# ---- Grid area ----
|
|
grid_top = lh + 6
|
|
footer_h = lh + 4
|
|
grid_h = contents.height - grid_top - footer_h
|
|
grid_h = lh if grid_h < lh
|
|
|
|
cols = 3
|
|
col_w = (contents.width / cols)
|
|
|
|
# Font for names
|
|
contents.font.name = (defined?(MPSafeFont) ? MPSafeFont.tab_name : (System_Settings::MESSAGE_WINDOW_FONT_NAME rescue "VL Gothic"))
|
|
contents.font.size = 16 # Print () размер шрифта
|
|
contents.font.bold = false # Print () убираем bold после заголовка
|
|
contents.font.outline = false
|
|
contents.font.shadow = true # Print () меню полупрозрачное, поэтому доп подложка под буквы
|
|
|
|
# Each entry uses 2 lines (nick + map), so we shrink the number of rows
|
|
cell_h = (lh * 2) - 6
|
|
rows = (grid_h / cell_h).to_i
|
|
rows = 1 if rows < 1
|
|
max_draw = rows * cols
|
|
|
|
shown = entries[0, max_draw]
|
|
|
|
shown.each_with_index do |(pid, nick, map, same), i|
|
|
r = i / cols
|
|
c = i % cols
|
|
x = c * col_w
|
|
y = grid_top + r * cell_h
|
|
|
|
# clip nick a bit (still clips by draw_text)
|
|
s = nick.to_s
|
|
s = s[0, 16] if s.size > 16
|
|
|
|
# ---- Nick (main line) ----
|
|
contents.font.name = (defined?(MPSafeFont) ? MPSafeFont.tab_name : (System_Settings::MESSAGE_WINDOW_FONT_NAME rescue "VL Gothic"))
|
|
contents.font.size = 16
|
|
contents.font.bold = false
|
|
contents.font.outline = false
|
|
contents.font.shadow = true
|
|
contents.font.color = same ? Color.new(183, 164, 255) : Color.new(255, 213, 128)
|
|
draw_text(x + 2, y, col_w - 4, lh, s, 1) # centered in cell
|
|
|
|
# ---- Map name (small line under nick) ----
|
|
map_label = ""
|
|
begin
|
|
map_label = MPMapInfo.display_name(map)
|
|
rescue
|
|
map_label = map.to_i > 0 ? "Map #{map.to_i}" : ""
|
|
end
|
|
map_label = map_label.to_s
|
|
map_label = map_label[0, 18] + "…" if map_label.size > 19
|
|
|
|
contents.font.name = (defined?(MPSafeFont) ? MPSafeFont.tab_sub_name : "2A03")
|
|
contents.font.size = 16 # Print () 2026.02.26
|
|
#contents.font.color = same ? Color.new(255,125,55) : Color.new(255, 213, 128) # Print () 2026.02.26 (Оранж/Мед)
|
|
#contents.font.color = same ? Color.new(255, 255, 255) : Color.new(190, 190, 190) # Print () 2026.02.26 (Бел/Сер)
|
|
contents.font.color = same ? Color.new(183, 164, 255) : Color.new(255, 213, 128) # Print () 2026.02.26 (Лаванда/Мед) +++
|
|
draw_text(x + 2, y + lh - 8, col_w - 4, lh, map_label, 1)
|
|
end
|
|
|
|
|
|
|
|
# ---- Footer (centered) ----
|
|
contents.font.name = (defined?(MPSafeFont) ? MPSafeFont.tab_sub_name : "VL Gothic")
|
|
contents.font.size = 20 # Print () размер шрифта
|
|
change_color(normal_color)
|
|
draw_text(0, contents.height - lh, contents.width, lh, "Синие ники — игроки на вашей карте", 1)
|
|
end
|
|
end
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Controller
|
|
# -----------------------------------------------------------------------------
|
|
module MPTab
|
|
VK_TAB = 0x09
|
|
|
|
def self.active?
|
|
!!@active
|
|
end
|
|
|
|
def self.ensure_window
|
|
return if @window && !@window.disposed?
|
|
@window = Window_MPTabList.new
|
|
rescue
|
|
@window = nil
|
|
end
|
|
|
|
def self.open
|
|
return if @active
|
|
@active = true
|
|
@last_req = 0
|
|
@last_draw = 0
|
|
ensure_window
|
|
@window.visible = true if @window
|
|
|
|
begin
|
|
WebSocket.mp_tab_request_who if defined?(WebSocket)
|
|
rescue
|
|
end
|
|
end
|
|
|
|
def self.close
|
|
return unless @active
|
|
@active = false
|
|
if @window && !@window.disposed?
|
|
@window.visible = false
|
|
end
|
|
end
|
|
|
|
def self.dispose
|
|
if @window
|
|
@window.dispose rescue nil
|
|
@window = nil
|
|
end
|
|
end
|
|
|
|
def self.update
|
|
return unless defined?(WebSocket) && WebSocket.connected?
|
|
begin
|
|
return unless SceneManager.scene_is?(Scene_Map)
|
|
rescue
|
|
# если нет SceneManager.scene_is? — пропускаем проверку
|
|
end
|
|
|
|
# do not interfere with chat typing
|
|
begin
|
|
return if defined?(MPChat) && MPChat.active?
|
|
rescue
|
|
end
|
|
|
|
pressed = false
|
|
begin
|
|
pressed = MPKeyboard.press?(VK_TAB)
|
|
rescue
|
|
pressed = false
|
|
end
|
|
|
|
if pressed
|
|
open unless active?
|
|
else
|
|
close if active?
|
|
return
|
|
end
|
|
|
|
return unless @window && !@window.disposed?
|
|
|
|
# who request every ~2 sec while held
|
|
begin
|
|
if (Graphics.frame_count - (@last_req || 0)) >= 120
|
|
WebSocket.mp_tab_request_who
|
|
@last_req = Graphics.frame_count
|
|
end
|
|
rescue
|
|
end
|
|
|
|
# draw update throttled (~10 fps) + window does its own signature check
|
|
begin
|
|
return if (Graphics.frame_count - (@last_draw || 0)) < 6
|
|
@last_draw = Graphics.frame_count
|
|
|
|
cur_map = ($game_map ? $game_map.map_id : 0) rescue 0
|
|
total, entries = WebSocket.mp_tab_entries(cur_map)
|
|
@window.refresh(total, entries)
|
|
rescue
|
|
end
|
|
end
|
|
end
|
|
|
|
# -----------------------------------------------------------------------------
|
|
# Scene_Map hook
|
|
# -----------------------------------------------------------------------------
|
|
class Scene_Map < Scene_Base
|
|
alias mp_tab_update update
|
|
def update
|
|
MPTab.update if defined?(MPTab)
|
|
mp_tab_update
|
|
end
|
|
|
|
alias mp_tab_terminate terminate
|
|
def terminate
|
|
MPTab.dispose if defined?(MPTab)
|
|
mp_tab_terminate
|
|
end
|
|
end
|
|
|
|
# Place into: ModScripts/99999_NoerHome_TAB_names.rb
|
|
# Shows custom names for NoerHome maps in the TAB overlay.
|
|
|
|
module MPNoerHomeTabNames
|
|
HOUSE_LABEL = "Личный дом"
|
|
YARD_LABEL = "Личный участок"
|
|
|
|
MAP_NAME_LABELS = {
|
|
"NoerHome" => HOUSE_LABEL,
|
|
"NoerHomeOut" => YARD_LABEL,
|
|
}
|
|
|
|
def self.runtime_map_name(map_id)
|
|
begin
|
|
if defined?(MPMapInfo) && MPMapInfo.respond_to?(:runtime_name)
|
|
name = MPMapInfo.runtime_name(map_id)
|
|
return name if name && name != ""
|
|
end
|
|
rescue
|
|
end
|
|
|
|
id = map_id.to_i
|
|
return nil if id <= 0
|
|
return nil unless defined?($data_mapinfos) && $data_mapinfos
|
|
|
|
begin
|
|
$data_mapinfos.each_value do |info|
|
|
next unless info
|
|
info_id = (info.id rescue nil).to_i
|
|
next unless info_id == id
|
|
|
|
raw_name = (info.name rescue "").to_s.strip
|
|
return raw_name unless raw_name.empty?
|
|
end
|
|
rescue
|
|
end
|
|
|
|
nil
|
|
end
|
|
|
|
def self.label_for_runtime_name(name)
|
|
MAP_NAME_LABELS[name.to_s]
|
|
end
|
|
end
|
|
|
|
if defined?(MPMapInfo)
|
|
module MPMapInfo
|
|
class << self
|
|
unless method_defined?(:display_name_without_noerhome_patch)
|
|
alias display_name_without_noerhome_patch display_name
|
|
end
|
|
|
|
def display_name(map_id)
|
|
runtime_name = MPNoerHomeTabNames.runtime_map_name(map_id)
|
|
custom_label = MPNoerHomeTabNames.label_for_runtime_name(runtime_name)
|
|
return custom_label if custom_label && custom_label != ""
|
|
|
|
display_name_without_noerhome_patch(map_id)
|
|
end
|
|
end
|
|
end
|
|
end
|