aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/YSplayer.py6
-rw-r--r--lib/YSundead.py9
2 files changed, 14 insertions, 1 deletions
diff --git a/lib/YSplayer.py b/lib/YSplayer.py
index c71f12e..53c9092 100644
--- a/lib/YSplayer.py
+++ b/lib/YSplayer.py
@@ -1,6 +1,7 @@
class Player:
def __init__(self,username, playerId, x, y, z, throttle, aam, agm,
- gunAmmo, rktAmmo, fuel, ipAddr, life, vx, vy, vz, gValue):
+ gunAmmo, rktAmmo, fuel, ipAddr, life, vx, vy, vz, gValue,
+ streamWriterObject=None, warningSent=False, smokedAdded=False):
self.username = username
self.ip = ipAddr
self.playerId = playerId
@@ -18,6 +19,9 @@ class Player:
self.vy = vy
self.vz = vz
self.gValue = gValue
+ self.streamWriterObject = streamWriterObject
+ self.warningSent = warningSent
+ self.smokeAdded = smokedAdded
def __str__(self):
return f"Username: {self.username}, IP: {self.ip}, " \
diff --git a/lib/YSundead.py b/lib/YSundead.py
new file mode 100644
index 0000000..2b68ed6
--- /dev/null
+++ b/lib/YSundead.py
@@ -0,0 +1,9 @@
+# Black smoke, 50 fuel, no load extra
+# Comptaible with every type of plane
+# just before their death
+#
+from struct import pack
+
+def undeadPatch(id:int, data:bytes):
+ buffer = data[0:8] + pack("I", id) + data[12:]
+ return buffer