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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '0917309ae467aafcdef2b1702b59c9729034958a3558391a2c1db0e33affab7d'
4
- data.tar.gz: 61b27d40bd5911485d66822ccc10627d6dfce535609f1ec5c89b4898b064441d
3
+ metadata.gz: 44430eb78b0d4285979d9175d20f15c944c19ae4974a8a2da31f24858ae42fc9
4
+ data.tar.gz: 0f7590ae3eab3a25d1f7c51921393b5365396265302b3276341039dc75791128
5
5
  SHA512:
6
- metadata.gz: 94e0e1be27b60ad6f235f7ba4147ef8b967caab99600b86d102fb4a498eb035e57ca510fa2eb236ed461987c1d656b683e60f53161771bb5a5650bf412ff6fa7
7
- data.tar.gz: efd4698d4f273212367481d341c864837e86c7be6fb9829bcb4720c03bd61ec9c0d7d66745e8be577a21a9c79701fb2302568a8bc28d1413c46e90948ae9f22d
6
+ metadata.gz: f27a40a6eb10f66a309e2e7adb4d73fa4305abbe2f86d202b1858fc377362350778e08ce309db1b75dc5985ca1454e92ee4a1baa2f83623cd579652837167b75
7
+ data.tar.gz: 3a116e79f188867b9de788f1158027db91783b76bdc23c6d7c8cc8275048e095eb3cd0a987f715b37156796cad527f06dfb4475b5a1e527609edcb02698bc131
@@ -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
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- TEEWORLDS_NETWORK_VERSION = 'v0.0.3'
3
+ TEEWORLDS_NETWORK_VERSION = 'v0.0.4'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: teeworlds_network
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChillerDragon