mirror of
https://github.com/kuitoi/kuitoi-Server.git
synced 2025-08-18 08:45:37 +00:00
Compare commits
No commits in common. "2368fec501228b03b003edae4bf7c8569a4a08a5" and "ddcfa564673aa9cdf492439fbcc562b7216a2525" have entirely different histories.
2368fec501
...
ddcfa56467
10
README.md
10
README.md
@ -19,7 +19,7 @@ BeamingDrive Multiplayer (BeamMP) server compatible with BeamMP clients.
|
|||||||
- [x] Chat
|
- [x] Chat
|
||||||
- [x] Players online counter
|
- [x] Players online counter
|
||||||
- [x] Packets handled (Recursive finding second packet)
|
- [x] Packets handled (Recursive finding second packet)
|
||||||
- [ ] Client events
|
- [x] Client events
|
||||||
- [x] Car synchronizations:
|
- [x] Car synchronizations:
|
||||||
- [x] State packets
|
- [x] State packets
|
||||||
- [x] Spawn cars
|
- [x] Spawn cars
|
||||||
@ -51,12 +51,16 @@ BeamingDrive Multiplayer (BeamMP) server compatible with BeamMP clients.
|
|||||||
- [x] Return from events
|
- [x] Return from events
|
||||||
- [x] Async support
|
- [x] Async support
|
||||||
- [ ] Add all events
|
- [ ] Add all events
|
||||||
- [x] Plugins supports
|
- [x] Plugins support
|
||||||
- [x] Python part:
|
- [ ] Python part:
|
||||||
- [x] Load Python plugins
|
- [x] Load Python plugins
|
||||||
- [x] Async support
|
- [x] Async support
|
||||||
- [x] KuiToi class
|
- [x] KuiToi class
|
||||||
- [x] Client (Player) class
|
- [x] Client (Player) class
|
||||||
|
- [ ] JavaScript part:
|
||||||
|
- [ ] Load JavaScript plugins
|
||||||
|
- [ ] KuiToi class
|
||||||
|
- [ ] Client (Player) class
|
||||||
- [x] Lua part: (Original BeamMP compatibility)
|
- [x] Lua part: (Original BeamMP compatibility)
|
||||||
- [x] Load Lua plugins
|
- [x] Load Lua plugins
|
||||||
- [x] MP Class
|
- [x] MP Class
|
||||||
|
@ -35,7 +35,6 @@ class Client:
|
|||||||
self._ready = False
|
self._ready = False
|
||||||
self._identifiers = []
|
self._identifiers = []
|
||||||
self._cars = [None] * 21 # Max 20 cars per player + 1 snowman
|
self._cars = [None] * 21 # Max 20 cars per player + 1 snowman
|
||||||
self._focus_car = -1
|
|
||||||
self._snowman = {"id": -1, "packet": ""}
|
self._snowman = {"id": -1, "packet": ""}
|
||||||
self._connect_time = 0
|
self._connect_time = 0
|
||||||
self._last_position = {}
|
self._last_position = {}
|
||||||
@ -85,10 +84,6 @@ class Client:
|
|||||||
def cars(self):
|
def cars(self):
|
||||||
return {i: v for i, v in enumerate(self._cars) if v is not None}
|
return {i: v for i, v in enumerate(self._cars) if v is not None}
|
||||||
|
|
||||||
@property
|
|
||||||
def focus_car(self):
|
|
||||||
return self._focus_car
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def last_position(self):
|
def last_position(self):
|
||||||
return self._last_position
|
return self._last_position
|
||||||
@ -409,7 +404,6 @@ class Client:
|
|||||||
self.log.debug(f"Unicycle spawn accepted: car_id={car_id}")
|
self.log.debug(f"Unicycle spawn accepted: car_id={car_id}")
|
||||||
else:
|
else:
|
||||||
self.log.debug(f"Car spawn accepted: car_id={car_id}")
|
self.log.debug(f"Car spawn accepted: car_id={car_id}")
|
||||||
self._focus_car = car_id
|
|
||||||
self._cars[car_id] = {
|
self._cars[car_id] = {
|
||||||
"packet": pkt,
|
"packet": pkt,
|
||||||
"json": car_json,
|
"json": car_json,
|
||||||
@ -546,11 +540,8 @@ class Client:
|
|||||||
self.log.debug(f"Something changed/broken: {raw_data}")
|
self.log.debug(f"Something changed/broken: {raw_data}")
|
||||||
await self._send(raw_data, to_all=True, to_self=False)
|
await self._send(raw_data, to_all=True, to_self=False)
|
||||||
|
|
||||||
case "m": # Move focus car
|
case "m": # Move focus cat
|
||||||
self.log.debug(f"Move focus to: {raw_data}")
|
self.log.debug(f"Move focus to: {raw_data}")
|
||||||
cid, car_id = self._get_cid_vid(raw_data[5:])
|
|
||||||
if car_id != -1 and cid == self.cid and self._cars[car_id]:
|
|
||||||
self._focus_car = car_id
|
|
||||||
await self._send(raw_data, to_all=True, to_self=True)
|
await self._send(raw_data, to_all=True, to_self=True)
|
||||||
|
|
||||||
async def _connected_handler(self):
|
async def _connected_handler(self):
|
||||||
|
@ -33,7 +33,6 @@ class Client:
|
|||||||
self._guest = True
|
self._guest = True
|
||||||
self.__alive = True
|
self.__alive = True
|
||||||
self._ready = False
|
self._ready = False
|
||||||
self._focus_car = -1
|
|
||||||
self._identifiers = []
|
self._identifiers = []
|
||||||
self._cars: List[Optional[Dict[str, int]]] = []
|
self._cars: List[Optional[Dict[str, int]]] = []
|
||||||
self._snowman: Dict[str, Union[int, str]] = {"id": -1, "packet": ""}
|
self._snowman: Dict[str, Union[int, str]] = {"id": -1, "packet": ""}
|
||||||
@ -59,9 +58,6 @@ class Client:
|
|||||||
@property
|
@property
|
||||||
def cars(self) -> dict: ...
|
def cars(self) -> dict: ...
|
||||||
@property
|
@property
|
||||||
def focus_car(self):
|
|
||||||
return self._focus_car
|
|
||||||
@property
|
|
||||||
def last_position(self) -> dict: ...
|
def last_position(self) -> dict: ...
|
||||||
def is_disconnected(self) -> bool: ...
|
def is_disconnected(self) -> bool: ...
|
||||||
async def kick(self, reason: str) -> None: ...
|
async def kick(self, reason: str) -> None: ...
|
||||||
|
Loading…
x
Reference in New Issue
Block a user