mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-17 16:25:36 +00:00
Compare commits
4 Commits
abbd64184e
...
cb6adde7c2
Author | SHA1 | Date | |
---|---|---|---|
cb6adde7c2 | |||
422dd35a8f | |||
2c2bd1cb4a | |||
7eba3d5877 |
3
.gitignore
vendored
3
.gitignore
vendored
@ -140,3 +140,6 @@ dmypy.json
|
|||||||
logs/
|
logs/
|
||||||
*.yml
|
*.yml
|
||||||
*.toml
|
*.toml
|
||||||
|
|
||||||
|
/win-ver_info.txt
|
||||||
|
/output/
|
@ -325,7 +325,7 @@ class Client:
|
|||||||
self._split_load(half_size, size, True, file, speed)
|
self._split_load(half_size, size, True, file, speed)
|
||||||
]
|
]
|
||||||
sl0, sl1 = await asyncio.gather(*uploads)
|
sl0, sl1 = await asyncio.gather(*uploads)
|
||||||
tr = time.monotonic() - t
|
tr = (time.monotonic() - t) or 0.0001
|
||||||
if self.__Core.lock_upload:
|
if self.__Core.lock_upload:
|
||||||
self.__Core.lock_upload = False
|
self.__Core.lock_upload = False
|
||||||
msg = i18n.client_mod_sent.format(round(size / MB, 3), math.ceil(size / tr / MB), int(tr))
|
msg = i18n.client_mod_sent.format(round(size / MB, 3), math.ceil(size / tr / MB), int(tr))
|
||||||
@ -515,6 +515,12 @@ class Client:
|
|||||||
else:
|
else:
|
||||||
self.log.debug(f"Invalid car: car_id={car_id}")
|
self.log.debug(f"Invalid car: car_id={car_id}")
|
||||||
|
|
||||||
|
async def reset_car(self, car_id, x, y, z, rot=None):
|
||||||
|
# TODO: reset_car
|
||||||
|
self.log.debug(f"Resetting car from plugin")
|
||||||
|
if rot is None:
|
||||||
|
rot = {"y": 0, "w": 0, "x": 0, "z": 0}
|
||||||
|
|
||||||
async def _reset_car(self, raw_data):
|
async def _reset_car(self, raw_data):
|
||||||
cid, car_id = self._get_cid_vid(raw_data)
|
cid, car_id = self._get_cid_vid(raw_data)
|
||||||
if car_id != -1 and cid == self.cid and self._cars[car_id]:
|
if car_id != -1 and cid == self.cid and self._cars[car_id]:
|
||||||
|
@ -30,7 +30,7 @@ from modules import ConfigProvider, EventsSystem
|
|||||||
from modules import Console
|
from modules import Console
|
||||||
from modules import MultiLanguage
|
from modules import MultiLanguage
|
||||||
|
|
||||||
args = parser.parse_args()
|
args, _ = parser.parse_known_args()
|
||||||
if args.version:
|
if args.version:
|
||||||
print(f"{__title__}:\n\tVersion: {__version__}\n\tBuild: {__build__}")
|
print(f"{__title__}:\n\tVersion: {__version__}\n\tBuild: {__build__}")
|
||||||
exit(0)
|
exit(0)
|
||||||
|
@ -73,6 +73,11 @@ class EventsSystem:
|
|||||||
self.log.debug("used builtins_hook")
|
self.log.debug("used builtins_hook")
|
||||||
builtins.ev = self
|
builtins.ev = self
|
||||||
|
|
||||||
|
def is_event(self, event_name):
|
||||||
|
return (event_name in self.__async_events.keys() or
|
||||||
|
event_name in self.__events.keys() or
|
||||||
|
event_name in self.__lua_events.keys())
|
||||||
|
|
||||||
def register_event(self, event_name, event_func, async_event=False, lua=None):
|
def register_event(self, event_name, event_func, async_event=False, lua=None):
|
||||||
self.log.debug(f"register_event(event_name='{event_name}', event_func='{event_func}', "
|
self.log.debug(f"register_event(event_name='{event_name}', event_func='{event_func}', "
|
||||||
f"async_event={async_event}, lua_event={lua}):")
|
f"async_event={async_event}, lua_event={lua}):")
|
||||||
@ -112,7 +117,7 @@ class EventsSystem:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error(i18n.events_calling_error.format(event_name, func.__name__))
|
self.log.error(i18n.events_calling_error.format(event_name, func.__name__))
|
||||||
self.log.exception(e)
|
self.log.exception(e)
|
||||||
else:
|
elif not self.is_event(event_name):
|
||||||
self.log.warning(i18n.events_not_found.format(event_name, "kt.call_event()"))
|
self.log.warning(i18n.events_not_found.format(event_name, "kt.call_event()"))
|
||||||
|
|
||||||
return funcs_data
|
return funcs_data
|
||||||
@ -130,7 +135,7 @@ class EventsSystem:
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error(i18n.events_calling_error.format(event_name, func.__name__))
|
self.log.error(i18n.events_calling_error.format(event_name, func.__name__))
|
||||||
self.log.exception(e)
|
self.log.exception(e)
|
||||||
else:
|
elif not self.is_event(event_name):
|
||||||
self.log.warning(i18n.events_not_found.format(event_name, "kt.call_async_event()"))
|
self.log.warning(i18n.events_not_found.format(event_name, "kt.call_async_event()"))
|
||||||
|
|
||||||
return funcs_data
|
return funcs_data
|
||||||
@ -151,7 +156,7 @@ class EventsSystem:
|
|||||||
funcs_data.append(fd)
|
funcs_data.append(fd)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.log.error(i18n.events_lua_calling_error.format(f"{e}", event_name, func_name, f"{args}"))
|
self.log.error(i18n.events_lua_calling_error.format(f"{e}", event_name, func_name, f"{args}"))
|
||||||
else:
|
elif not self.is_event(event_name):
|
||||||
self.log.warning(i18n.events_not_found.format(event_name, "ev.call_lua_event(), MP.Trigger<>Event()"))
|
self.log.warning(i18n.events_not_found.format(event_name, "ev.call_lua_event(), MP.Trigger<>Event()"))
|
||||||
|
|
||||||
return funcs_data
|
return funcs_data
|
||||||
|
BIN
win-logo.ico
Normal file
BIN
win-logo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.0 KiB |
19
win-metadata.yml
Normal file
19
win-metadata.yml
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# pip install pyinstaller-versionfile
|
||||||
|
# create-version-file win-metadata.yml --outfile win-ver_info.txt
|
||||||
|
Version: 0.4.3
|
||||||
|
CompanyName: KuiToi
|
||||||
|
FileDescription: KuiToi Server
|
||||||
|
InternalName: KuiToi Server
|
||||||
|
LegalCopyright: © Maxim Khomutov
|
||||||
|
OriginalFilename: KuiToi-Server.exe
|
||||||
|
ProductName: KuiToi Server
|
||||||
|
Translation:
|
||||||
|
# ru-RU
|
||||||
|
- langID: 1049
|
||||||
|
charsetID: 1251
|
||||||
|
# en-US
|
||||||
|
- langID: 1033
|
||||||
|
charsetID: 1251
|
||||||
|
# zh-CN
|
||||||
|
- langID: 2052
|
||||||
|
charsetID: 950
|
85
win-pyinstaller.json
Normal file
85
win-pyinstaller.json
Normal file
@ -0,0 +1,85 @@
|
|||||||
|
{
|
||||||
|
"version": "auto-py-to-exe-configuration_v1",
|
||||||
|
"pyinstallerOptions": [
|
||||||
|
{
|
||||||
|
"optionDest": "noconfirm",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "filenames",
|
||||||
|
"value": "C:/Users/Santa/PycharmProjects/kuitoi-Server/src/main.py"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "onefile",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "console",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "icon_file",
|
||||||
|
"value": "C:/Users/Santa/PycharmProjects/kuitoi-Server/win-logo.ico"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "name",
|
||||||
|
"value": "KuiToi-Server"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "ascii",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "clean_build",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "strip",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "noupx",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "disable_windowed_traceback",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "version_file",
|
||||||
|
"value": "C:/Users/Santa/PycharmProjects/kuitoi-Server/win-ver_info.txt"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "embed_manifest",
|
||||||
|
"value": true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "uac_admin",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "uac_uiaccess",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "win_private_assemblies",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "win_no_prefer_redirects",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "bootloader_ignore_signals",
|
||||||
|
"value": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"optionDest": "argv_emulation",
|
||||||
|
"value": false
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"nonPyinstallerOptions": {
|
||||||
|
"increaseRecursionLimit": true,
|
||||||
|
"manualArguments": ""
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user