@@ -42,7 +42,7 @@ def teleport(self, data):
42
42
Player teleportation system. By default, this system will teleport a
43
43
player to another player. Use subcommands to modify this behavior.
44
44
Available subcommands are:
45
- ^cyan;player, ship, home, ^gray;outpost, bookmark, poi
45
+ ^cyan;player, home, ^gray;ship, outpost, bookmark, poi
46
46
"""
47
47
self .logger .vdebug ('Teleport command called' )
48
48
if not data :
@@ -61,7 +61,7 @@ def tp(self, data):
61
61
Player teleportation system. By default, this system will teleport a
62
62
player to another player. Use subcommands to modify this behavior.
63
63
Available subcommands are:
64
- ^cyan;player, ship, home
64
+ ^cyan;player, home
65
65
"""
66
66
self .teleport (data )
67
67
@@ -71,7 +71,7 @@ def teleport_help(self, data):
71
71
Player teleportation system. By default, this system will teleport a
72
72
player to another player. Use subcommands to modify this behavior.
73
73
Available subcommands are:
74
- ^cyan;player, ship, home
74
+ ^cyan;player, home
75
75
"""
76
76
self .protocol .send_chat_message (self .teleport .__doc__ )
77
77
@@ -159,69 +159,71 @@ def teleport_to_ship(self, data):
159
159
Syntax: /teleport ship (destination player) [source player]
160
160
"""
161
161
usage = 'Syntax: /teleport ship (destination player) [source player]'
162
- if not data :
163
- self .protocol .send_chat_message (self .teleport_to_ship .__doc__ )
164
- return
165
-
166
- destination , rest = extract_name (data )
167
- if not self ._validate_player (destination ):
168
- self .protocol .send_chat_message (usage )
169
- return
170
- destination = destination .lower ()
171
-
172
- if not rest :
173
- source = self .protocol .player .name
174
- source = source .lower ()
175
- else :
176
- source , rest = extract_name (rest )
177
- if not self ._validate_player (source ):
178
- self .protocol .send_chat_message (usage )
179
- return
180
- source = source .lower ()
181
-
182
- if source == destination :
183
- self .teleport_to_own_ship (None )
184
- return
185
-
186
- destination_player = self .player_manager .get_logged_in_by_name (
187
- destination
188
- )
189
- if destination_player is None :
190
- self .logger .debug (
191
- 'Error: Player %s is not logged in.' , destination
192
- )
193
- self .protocol .send_chat_message (
194
- 'Error: Player {} is not logged in.' .format (destination )
195
- )
196
- return
197
-
198
- source_player = self .player_manager .get_logged_in_by_name (source )
199
- if source_player is None :
200
- self .logger .debug ('Error: Player %s is not logged in.' , source )
201
- self .protocol .send_chat_message (
202
- 'Error: Player {} is not logged in.' .format (source )
203
- )
204
- return
205
-
206
- source_protocol = self .factory .protocols [source_player .protocol ]
207
- teleport_packet = build_packet (
208
- Packets .PLAYER_WARP ,
209
- player_warp_toplayerworld_write (
210
- destination = destination_player .uuid
211
- )
212
- )
213
-
214
- source_protocol .client_protocol .transport .write (teleport_packet )
162
+ self .protocol .send_chat_message ('This is not yet implemented.' )
215
163
216
- self .logger .debug (
217
- "Teleport command called by %s. Teleporting %s to %s's ship" ,
218
- self .protocol .player .name , source , destination
219
- )
220
- self .protocol .send_chat_message (
221
- "Teleported ^green;{}^yellow; to ^green;{}^yellow;'s ship." .format (
222
- source , destination
223
- )
224
- )
164
+ # if not data:
165
+ # self.protocol.send_chat_message(self.teleport_to_ship.__doc__)
166
+ # return
167
+
168
+ # destination, rest = extract_name(data)
169
+ # if not self._validate_player(destination):
170
+ # self.protocol.send_chat_message(usage)
171
+ # return
172
+ # destination = destination.lower()
173
+
174
+ # if not rest:
175
+ # source = self.protocol.player.name
176
+ # source = source.lower()
177
+ # else:
178
+ # source, rest = extract_name(rest)
179
+ # if not self._validate_player(source):
180
+ # self.protocol.send_chat_message(usage)
181
+ # return
182
+ # source = source.lower()
183
+
184
+ # if source == destination:
185
+ # self.teleport_to_own_ship(None)
186
+ # return
187
+
188
+ # destination_player = self.player_manager.get_logged_in_by_name(
189
+ # destination
190
+ # )
191
+ # if destination_player is None:
192
+ # self.logger.debug(
193
+ # 'Error: Player %s is not logged in.', destination
194
+ # )
195
+ # self.protocol.send_chat_message(
196
+ # 'Error: Player {} is not logged in.'.format(destination)
197
+ # )
198
+ # return
199
+
200
+ # source_player = self.player_manager.get_logged_in_by_name(source)
201
+ # if source_player is None:
202
+ # self.logger.debug('Error: Player %s is not logged in.', source)
203
+ # self.protocol.send_chat_message(
204
+ # 'Error: Player {} is not logged in.'.format(source)
205
+ # )
206
+ # return
207
+
208
+ # source_protocol = self.factory.protocols[source_player.protocol]
209
+ # teleport_packet = build_packet(
210
+ # Packets.PLAYER_WARP,
211
+ # player_warp_toplayerworld_write(
212
+ # destination=destination_player.uuid
213
+ # )
214
+ # )
215
+
216
+ # source_protocol.client_protocol.transport.write(teleport_packet)
217
+
218
+ # self.logger.debug(
219
+ # "Teleport command called by %s. Teleporting %s to %s's ship",
220
+ # self.protocol.player.name, source, destination
221
+ # )
222
+ # self.protocol.send_chat_message(
223
+ # "Teleported ^green;{}^yellow; to ^green;{}^yellow;'s ship.".format(
224
+ # source, destination
225
+ # )
226
+ # )
225
227
226
228
@permissions (UserLevels .REGISTERED )
227
229
def teleport_to_own_ship (self , data ):
0 commit comments