100 {
103 bool flag = true;
104 if (flag)
105 {
107 if (!flag)
108 {
109 key =
"Net.CannotTeleportToPylonBecausePlayerIsNotNearAPylon";
110 }
111 }
112 if (flag)
113 {
116 if (!flag)
117 {
118 key =
"Net.CannotTeleportToPylonBecauseNotEnoughNPCs";
119 }
120 }
121 if (flag)
122 {
124 if (!flag)
125 {
126 key =
"Net.CannotTeleportToPylonBecauseThereIsDanger";
127 }
128 }
129 if (flag)
130 {
131 if (!
NPC.downedPlantBoss && (
double)
info.PositionInTiles.Y > Main.worldSurface && Framing.GetTileSafely(
info.PositionInTiles.X,
info.PositionInTiles.Y).wall == 87)
132 {
133 flag = false;
134 }
135 if (!flag)
136 {
137 key =
"Net.CannotTeleportToPylonBecauseAccessingLihzahrdTempleEarly";
138 }
139 }
140 if (flag)
141 {
143 {
144 VisualScanArea = null,
145 BiomeScanCenterPositionInWorld =
info.PositionInTiles.ToWorldCoordinates(),
146 ScanOreFinderData = false
147 });
149 if (!flag)
150 {
151 key =
"Net.CannotTeleportToPylonBecauseNotMeetingBiomeRequirements";
152 }
153 }
154 if (flag)
155 {
157 int num = 0;
159 {
162 {
163 continue;
164 }
165 if (num < 1)
166 {
167 num = 1;
168 }
171 {
172 if (num < 2)
173 {
174 num = 2;
175 }
177 {
178 VisualScanArea = null,
179 BiomeScanCenterPositionInWorld =
info2.PositionInTiles.ToWorldCoordinates(),
180 ScanOreFinderData = false
181 });
183 {
185 break;
186 }
187 }
188 }
190 {
191 flag = false;
193 {
194 1 => "Net.CannotTeleportToPylonBecauseNotEnoughNPCsAtCurrentPylon",
195 2 => "Net.CannotTeleportToPylonBecauseNotMeetingBiomeRequirements",
196 _ =>
"Net.CannotTeleportToPylonBecausePlayerIsNotNearAPylon",
197 };
198 }
199 }
200 if (flag)
201 {
208 if (Main.netMode == 2)
209 {
210 RemoteClient.CheckSection(player.whoAmI, player.position);
211 NetMessage.SendData(65, -1, -1,
null, 0, player.whoAmI,
newPos.X,
newPos.Y,
num2,
number,
typeOfPylon);
212 }
213 }
214 else
215 {
217 }
218 }
static void SendChatMessageToClient(NetworkText text, Color color, int playerId)
SceneMetrics _sceneMetrics
int HowManyNPCsDoesPylonNeed(TeleportPylonInfo info, Player player)
bool DoesPylonAcceptTeleportation(TeleportPylonInfo info, Player player)
static bool IsPlayerNearAPylon(Player player)
bool DoesPylonHaveEnoughNPCsAroundIt(TeleportPylonInfo info, int necessaryNPCCount)
List< TeleportPylonInfo > _pylons
static NetworkText FromKey(string key, params object[] substitutions)
void ScanAndExportToMain(SceneMetricsScanSettings settings)
static TileReachCheckSettings Pylons