first part for phy simluation #34
@ -309,6 +309,7 @@ class ClientWindow(Window):
|
||||
@_call_screen_after
|
||||
def on_command(self, command: line.CommandText):
|
||||
self.logger.info(tr().window.command.text().format(command))
|
||||
command.find('/')
|
||||
if command.find('stop'):
|
||||
# self.dispatch_event('on_exit')
|
||||
print("command stop!")
|
||||
|
@ -44,12 +44,12 @@ class CommandText:
|
||||
i += 1
|
||||
|
||||
def find(self, text: str) -> bool:
|
||||
print(f'text: {text} startswith: {self.text.startswith(text)} find: {self.text.find(text)}')
|
||||
startswitch = self.text.startswith(text)
|
||||
if startswitch:
|
||||
startswith = self.text.startswith(text)
|
||||
if startswith:
|
||||
find = self.text.find(text)
|
||||
if find != -1:
|
||||
self.text = self.text[find + len(text):] if not self.text[find+len(text)] == ' ' else self.text[find + len(text) + 1:]
|
||||
if not len(text) == len(self.text):
|
||||
self.text = self.text[find + len(text):] if not self.text[find+len(text)] == ' ' else self.text[find + len(text) + 1:]
|
||||
return True
|
||||
return False
|
||||
|
||||
|
0
mods/dr_game/lang/zh-CN.toml
Normal file
0
mods/dr_game/lang/zh-CN.toml
Normal file
@ -403,7 +403,6 @@ class SR1ShipRender(BaseScreen):
|
||||
return
|
||||
img_box = self.rust_ship.img_pos
|
||||
img_size = (img_box[2] - img_box[0] + 1000, img_box[3] - img_box[1] + 1000)
|
||||
# img_center = (abs(img_box[0]), abs(img_box[1]))
|
||||
# 中心点是左上角坐标
|
||||
img_center = (abs(img_box[0]), abs(img_box[3]))
|
||||
print(f"img_box: {img_box} img_size: {img_size} img_center: {img_center}")
|
||||
|
Loading…
Reference in New Issue
Block a user