teeworlds_network 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/teeworlds_client.rb +11 -11
- data/lib/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44430eb78b0d4285979d9175d20f15c944c19ae4974a8a2da31f24858ae42fc9
|
4
|
+
data.tar.gz: 0f7590ae3eab3a25d1f7c51921393b5365396265302b3276341039dc75791128
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f27a40a6eb10f66a309e2e7adb4d73fa4305abbe2f86d202b1858fc377362350778e08ce309db1b75dc5985ca1454e92ee4a1baa2f83623cd579652837167b75
|
7
|
+
data.tar.gz: 3a116e79f188867b9de788f1158027db91783b76bdc23c6d7c8cc8275048e095eb3cd0a987f715b37156796cad527f06dfb4475b5a1e527609edcb02698bc131
|
data/lib/teeworlds_client.rb
CHANGED
@@ -310,18 +310,18 @@ class TeeworldsClient
|
|
310
310
|
)
|
311
311
|
end
|
312
312
|
|
313
|
-
def send_input
|
313
|
+
def send_input(input = {})
|
314
314
|
inp = {
|
315
|
-
direction: -1,
|
316
|
-
target_x: 10,
|
317
|
-
target_y: 10,
|
318
|
-
jump: rand(0..1),
|
319
|
-
fire: 0,
|
320
|
-
hook: 0,
|
321
|
-
player_flags: 0,
|
322
|
-
wanted_weapon: 0,
|
323
|
-
next_weapon: 0,
|
324
|
-
prev_weapon: 0
|
315
|
+
direction: input[:direction] || -1,
|
316
|
+
target_x: input[:target_x] || 10,
|
317
|
+
target_y: input[:target_y] || 10,
|
318
|
+
jump: input[:jump] || rand(0..1),
|
319
|
+
fire: input[:fire] || 0,
|
320
|
+
hook: input[:hook] || 0,
|
321
|
+
player_flags: input[:player_flags] || 0,
|
322
|
+
wanted_weapon: input[:wanted_weapon] || 0,
|
323
|
+
next_weapon: input[:next_weapon] || 0,
|
324
|
+
prev_weapon: input[:prev_weapon] || 0
|
325
325
|
}
|
326
326
|
|
327
327
|
data = []
|
data/lib/version.rb
CHANGED