sc2ai 0.1.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. checksums.yaml +4 -4
  2. data/data/sc2ai/protocol/common.proto +6 -6
  3. data/data/sc2ai/protocol/data.proto +23 -20
  4. data/data/sc2ai/protocol/debug.proto +25 -21
  5. data/data/sc2ai/protocol/error.proto +217 -215
  6. data/data/sc2ai/protocol/query.proto +1 -1
  7. data/data/sc2ai/protocol/raw.proto +16 -14
  8. data/data/sc2ai/protocol/sc2api.proto +108 -94
  9. data/data/sc2ai/protocol/score.proto +4 -3
  10. data/data/sc2ai/protocol/spatial.proto +6 -5
  11. data/data/sc2ai/protocol/ui.proto +17 -14
  12. data/exe/sc2ai +0 -3
  13. data/lib/docker_build/Dockerfile.ruby +4 -2
  14. data/lib/sc2ai/api/ability_id.rb +6 -1
  15. data/lib/sc2ai/api/data.rb +18 -3
  16. data/lib/sc2ai/api/tech_tree.rb +1 -1
  17. data/lib/sc2ai/api/tech_tree_data.rb +54 -3
  18. data/lib/sc2ai/connection/connection_listener.rb +3 -3
  19. data/lib/sc2ai/connection/requests.rb +31 -35
  20. data/lib/sc2ai/connection/status_listener.rb +1 -1
  21. data/lib/sc2ai/connection.rb +1 -2
  22. data/lib/sc2ai/local_play/client.rb +2 -2
  23. data/lib/sc2ai/local_play/match.rb +7 -2
  24. data/lib/sc2ai/overrides/async/process/child.rb +1 -1
  25. data/lib/sc2ai/paths.rb +12 -2
  26. data/lib/sc2ai/player/actions.rb +54 -35
  27. data/lib/sc2ai/player/debug.rb +54 -20
  28. data/lib/sc2ai/player/game_state.rb +11 -18
  29. data/lib/sc2ai/player/geo.rb +56 -66
  30. data/lib/sc2ai/player/units.rb +41 -17
  31. data/lib/sc2ai/player.rb +104 -47
  32. data/lib/sc2ai/ports.rb +1 -2
  33. data/lib/sc2ai/protocol/_meta_documentation.rb +270 -25
  34. data/lib/sc2ai/protocol/common_pb.rb +3862 -33
  35. data/lib/sc2ai/protocol/data_pb.rb +9106 -36
  36. data/lib/sc2ai/protocol/debug_pb.rb +10434 -45
  37. data/lib/sc2ai/protocol/error_pb.rb +1084 -29
  38. data/lib/sc2ai/protocol/extensions/ability_remapable.rb +9 -9
  39. data/lib/sc2ai/protocol/extensions/action.rb +60 -0
  40. data/lib/sc2ai/protocol/extensions/point_2_d.rb +9 -0
  41. data/lib/sc2ai/protocol/extensions/position.rb +11 -36
  42. data/lib/sc2ai/protocol/extensions/power_source.rb +3 -0
  43. data/lib/sc2ai/protocol/extensions/unit.rb +61 -36
  44. data/lib/sc2ai/protocol/extensions/unit_type_data.rb +8 -0
  45. data/lib/sc2ai/protocol/query_pb.rb +5022 -36
  46. data/lib/sc2ai/protocol/raw_pb.rb +18347 -46
  47. data/lib/sc2ai/protocol/sc2api_pb.rb +48424 -126
  48. data/lib/sc2ai/protocol/score_pb.rb +5965 -30
  49. data/lib/sc2ai/protocol/spatial_pb.rb +11941 -37
  50. data/lib/sc2ai/protocol/ui_pb.rb +12924 -46
  51. data/lib/sc2ai/unit_group/action_ext.rb +0 -2
  52. data/lib/sc2ai/unit_group/filter_ext.rb +24 -8
  53. data/lib/sc2ai/unit_group/geo_ext.rb +0 -2
  54. data/lib/sc2ai/unit_group.rb +1 -1
  55. data/lib/sc2ai/version.rb +2 -3
  56. data/lib/sc2ai.rb +10 -11
  57. data/lib/templates/ladderzip/bin/ladder.tt +0 -3
  58. data/lib/templates/new/.ladderignore +15 -5
  59. data/lib/templates/new/api/common.proto +6 -6
  60. data/lib/templates/new/api/data.proto +23 -20
  61. data/lib/templates/new/api/debug.proto +25 -21
  62. data/lib/templates/new/api/error.proto +217 -215
  63. data/lib/templates/new/api/query.proto +1 -1
  64. data/lib/templates/new/api/raw.proto +16 -14
  65. data/lib/templates/new/api/sc2api.proto +108 -94
  66. data/lib/templates/new/api/score.proto +4 -3
  67. data/lib/templates/new/api/spatial.proto +6 -5
  68. data/lib/templates/new/api/ui.proto +17 -14
  69. data/lib/templates/new/boot.rb.tt +1 -1
  70. data/lib/templates/new/my_bot.rb.tt +2 -2
  71. data/lib/templates/new/run_example_match.rb.tt +2 -2
  72. data/sig/sc2ai.rbs +11072 -1651
  73. metadata +31 -26
  74. data/lib/sc2ai/overrides/kernel.rb +0 -33
  75. data/lib/sc2ai/protocol/extensions/unit_type.rb +0 -9
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sc2ai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dyson Returns
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-09-27 00:00:00.000000000 Z
11
+ date: 2024-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 2.17.0
19
+ version: '2.21'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 2.17.0
26
+ version: '2.21'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: async-websocket
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,21 +39,21 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.30'
41
41
  - !ruby/object:Gem::Dependency
42
- name: google-protobuf
42
+ name: async-process
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '4.28'
47
+ version: '1.4'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '4.28'
54
+ version: '1.4'
55
55
  - !ruby/object:Gem::Dependency
56
- name: async-process
56
+ name: thor
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
@@ -67,61 +67,61 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '1.3'
69
69
  - !ruby/object:Gem::Dependency
70
- name: thor
70
+ name: numo-narray
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '1.3'
75
+ version: '0.9'
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '1.3'
82
+ version: '0.9'
83
83
  - !ruby/object:Gem::Dependency
84
- name: numo-narray
84
+ name: numo-linalg
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.9.2.1
89
+ version: '0.1'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.9.2.1
96
+ version: '0.1'
97
97
  - !ruby/object:Gem::Dependency
98
- name: numo-linalg
98
+ name: rumale
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 0.1.7
103
+ version: '0.29'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 0.1.7
110
+ version: '0.29'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rumale
112
+ name: csv
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - "~>"
115
+ - - ">="
116
116
  - !ruby/object:Gem::Version
117
- version: '0.29'
117
+ version: '0'
118
118
  type: :runtime
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - "~>"
122
+ - - ">="
123
123
  - !ruby/object:Gem::Version
124
- version: '0.29'
124
+ version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: sc2ai-kdtree
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -356,7 +356,6 @@ files:
356
356
  - lib/sc2ai/local_play/match.rb
357
357
  - lib/sc2ai/overrides/array.rb
358
358
  - lib/sc2ai/overrides/async/process/child.rb
359
- - lib/sc2ai/overrides/kernel.rb
360
359
  - lib/sc2ai/paths.rb
361
360
  - lib/sc2ai/player.rb
362
361
  - lib/sc2ai/player/actions.rb
@@ -372,6 +371,7 @@ files:
372
371
  - lib/sc2ai/protocol/debug_pb.rb
373
372
  - lib/sc2ai/protocol/error_pb.rb
374
373
  - lib/sc2ai/protocol/extensions/ability_remapable.rb
374
+ - lib/sc2ai/protocol/extensions/action.rb
375
375
  - lib/sc2ai/protocol/extensions/color.rb
376
376
  - lib/sc2ai/protocol/extensions/point.rb
377
377
  - lib/sc2ai/protocol/extensions/point_2_d.rb
@@ -379,7 +379,6 @@ files:
379
379
  - lib/sc2ai/protocol/extensions/position.rb
380
380
  - lib/sc2ai/protocol/extensions/power_source.rb
381
381
  - lib/sc2ai/protocol/extensions/unit.rb
382
- - lib/sc2ai/protocol/extensions/unit_type.rb
383
382
  - lib/sc2ai/protocol/extensions/unit_type_data.rb
384
383
  - lib/sc2ai/protocol/query_pb.rb
385
384
  - lib/sc2ai/protocol/raw_pb.rb
@@ -417,7 +416,13 @@ metadata:
417
416
  homepage_uri: https://sc2ai.pages.dev/
418
417
  source_code_uri: https://gitlab.com/dysonreturns/sc2ai
419
418
  changelog_uri: https://sc2ai.pages.dev/file.CHANGELOG
420
- post_install_message:
419
+ post_install_message: "BREAKING CHANGE: We upgraded to protoboeuf.\nApi constants
420
+ are now capitalized, i.e.\n\e[1;91m:Air\e[0m is now \e[1;92m:AIR\e[0m, \e[1;91mApi::Race::Zerg\e[0m
421
+ is now \e[1;92mApi::Race::ZERG\e[0m, etc.\nThe mild refactor is worth the speed.\n\n
422
+ \ %@@% CHECK\n %++++% YOUR\n *+**++ ENUMS!\n %*+#\n
423
+ \ *@#***%%\n #%@%*++%%%%%\n %%%@%%%%%%%%%%\n %%@%%%%%%%%@%%\n ++*@@%%%%%%@+**\n
424
+ \ *+*%@@%%%%%%@#**\n *+*@@%%%%%%%@ **\n *+@@@@%%%%@@*+\n *+@@@@@@@@*+\n %@++++%@@+*%#\n
425
+ \ %@@@***@#++*%%%\n %%%@@@@++@@@@@@%#\n @@@@@ @@@%%\n@@@@@ @@@@=\n"
421
426
  rdoc_options: []
422
427
  require_paths:
423
428
  - lib
@@ -425,7 +430,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
425
430
  requirements:
426
431
  - - ">="
427
432
  - !ruby/object:Gem::Version
428
- version: 3.2.5
433
+ version: 3.2.6
429
434
  required_rubygems_version: !ruby/object:Gem::Requirement
430
435
  requirements:
431
436
  - - ">="
@@ -1,33 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # @private
4
- # Patched from: rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb
5
- # https://github.com/rails/rails/blob/04972d9b9ef60796dc8f0917817b5392d61fcf09/activesupport/lib/active_support/core_ext/kernel/reporting.rb#L26
6
-
7
- # Kernel extensions
8
- module Kernel
9
- module_function
10
-
11
- # Sets $VERBOSE to +nil+ for the duration of the block and back to its original
12
- # value afterwards.
13
- #
14
- # silence_warnings do
15
- # value = noisy_call # no warning voiced
16
- # end
17
- #
18
- # noisy_call # warning voiced
19
- def silence_warnings(&)
20
- with_warnings(nil, &)
21
- end
22
-
23
- # Sets $VERBOSE for the duration of the block and back to its original
24
- # value afterwards.
25
- # noinspection RubyGlobalVariableNamingConvention
26
- def with_warnings(flag)
27
- old_verbose = $VERBOSE
28
- $VERBOSE = flag
29
- yield
30
- ensure
31
- $VERBOSE = old_verbose
32
- end
33
- end
@@ -1,9 +0,0 @@
1
- module Api
2
- # Adds additional functionality to message object Api::Unit
3
- module UnitTypeExtension
4
- # def mood
5
- # "Crafty"
6
- # end
7
- end
8
- end
9
- Api::UnitTypeData.prepend Api::UnitTypeExtension