sc2ai 0.4.1 → 0.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0e0b154fe7c1d86ed183b43f3a3ee0b915b1d745ca839a86f9150d571e792864
4
- data.tar.gz: 56a466963b5fd4b8d6ad7878bad675a270b90a53caf174b6abb749a4a4265b6d
3
+ metadata.gz: aaa51c5d8ef4ec90b0da920e6fee5b5aef436612b316da1f6f47b9fbb213bb78
4
+ data.tar.gz: c2a69316a5469f9074d471a0e3456d687f015148bb4f2483f7ef4945866fdce8
5
5
  SHA512:
6
- metadata.gz: 6de08591f8bfd744cac376b46aeb0eb4fe8027aadb31a7d9ce9eaee1e7b030636ca9b098e76383d879cd1b9f19e72fc5e1d7f8db5161ecde98be5ea8197994ce
7
- data.tar.gz: cfc3ecab272e6157dd26661e5a1d085e9b3bd41a98e32f788eab4d1955a6c82d179387f7bb05e214ece46ce93c847522e56ece97f251e5a021c5b91243475432
6
+ metadata.gz: 806ebc2a45c45bf69db2e25085a3e548cdc41cb97f7792603577d72e1e1e5db104dd5c0c82924ac1a2138ac1cd89770d29135688d75b266ee0fe2a9b784d768a
7
+ data.tar.gz: 338f46f6bdccc9e847c57d7d3abff6b450c2f2ad507582ab601806ba8bcc5d82ba850cd95488c7be85c870cee634ba741e02c408c31cfffbeb9544561d9f0178
@@ -88,8 +88,8 @@ message UnitTypeData {
88
88
  optional bool has_minerals = 20;
89
89
  optional float sight_range = 25; // Range unit reveals vision.
90
90
 
91
- repeated uint32 tech_alias = 21; // Other units that satisfy the same tech requirement.
92
- optional uint32 unit_alias = 22; // The morphed variant of this unit.
91
+ repeated uint32 tech_alias = 21 [packed=false]; // Other units that satisfy the same tech requirement.
92
+ optional uint32 unit_alias = 22 [packed=false]; // The morphed variant of this unit.
93
93
 
94
94
  optional uint32 tech_requirement = 23; // Structure required to build this unit. (Or any with the same tech_alias)
95
95
  optional bool require_attached = 24; // Whether tech_requirement is an add-on.
@@ -90,7 +90,7 @@ message DebugCreateUnit {
90
90
  }
91
91
 
92
92
  message DebugKillUnit {
93
- repeated uint64 tag = 1;
93
+ repeated uint64 tag = 1 [packed =false];
94
94
  }
95
95
 
96
96
  message DebugTestProcess {
@@ -46,7 +46,7 @@ message PowerSource {
46
46
  message PlayerRaw {
47
47
  repeated PowerSource power_sources = 1;
48
48
  optional Point camera = 2;
49
- repeated uint32 upgrade_ids = 3;
49
+ repeated uint32 upgrade_ids = 3 [packed=false];
50
50
  }
51
51
 
52
52
  message UnitOrder {
@@ -112,7 +112,7 @@ message Unit {
112
112
  optional float radius = 8;
113
113
  optional float build_progress = 9; // Range: [0.0, 1.0]
114
114
  optional CloakState cloak = 10;
115
- repeated uint32 buff_ids = 27;
115
+ repeated uint32 buff_ids = 27 [packed=false];
116
116
 
117
117
  optional float detect_range = 31;
118
118
  optional float radar_range = 32;
@@ -160,7 +160,7 @@ message MapState {
160
160
  }
161
161
 
162
162
  message Event {
163
- repeated uint64 dead_units = 1;
163
+ repeated uint64 dead_units = 1 [packed=false];
164
164
  }
165
165
 
166
166
  message Effect {
@@ -190,8 +190,8 @@ message ActionRawUnitCommand {
190
190
  Point2D target_world_space_pos = 2;
191
191
  uint64 target_unit_tag = 3;
192
192
  }
193
- repeated uint64 unit_tags = 4;
194
- optional bool queue_command = 5;
193
+ repeated uint64 unit_tags = 4 [packed=false];
194
+ optional bool queue_command = 5 [packed=false];
195
195
  }
196
196
 
197
197
  message ActionRawCameraMove {
@@ -200,5 +200,5 @@ message ActionRawCameraMove {
200
200
 
201
201
  message ActionRawToggleAutocast {
202
202
  optional int32 ability_id = 1;
203
- repeated uint64 unit_tags = 2;
203
+ repeated uint64 unit_tags = 2 [packed=false];
204
204
  }
@@ -689,7 +689,7 @@ message ActionObserverCameraFollowPlayer {
689
689
  }
690
690
 
691
691
  message ActionObserverCameraFollowUnits {
692
- repeated uint64 unit_tags = 1;
692
+ repeated uint64 unit_tags = 1 [packed=false];
693
693
  }
694
694
 
695
695
  enum Alert {
@@ -42,7 +42,7 @@ message SinglePanel {
42
42
  optional int32 attack_upgrade_level = 2;
43
43
  optional int32 armor_upgrade_level = 3;
44
44
  optional int32 shield_upgrade_level = 4;
45
- repeated int32 buffs = 5;
45
+ repeated int32 buffs = 5 [packed=false];
46
46
  }
47
47
 
48
48
  message MultiPanel {
@@ -9,7 +9,7 @@ ARG DEBIAN_DISABLE_RUBYGEMS_INTEGRATION=true
9
9
 
10
10
  # Deps - Ruby build
11
11
  RUN apt-get update
12
- RUN apt install --assume-yes rustc curl build-essential libssl-dev zlib1g-dev libgmp-dev uuid-dev
12
+ RUN apt install --assume-yes rustc curl build-essential libssl-dev zlib1g-dev libgmp-dev libffi-dev uuid-dev
13
13
 
14
14
  # Deps - libyaml from source
15
15
  RUN curl https://pyyaml.org/download/libyaml/yaml-0.2.5.tar.gz -o yaml-0.2.5.tar.gz
@@ -65,7 +65,7 @@ RUN /root/ruby-builder/.ruby/bin/bundle config set --global without test develop
65
65
  RUN apt-get update
66
66
  RUN apt-get purge $(aptitude search '~i!~M!~prequired!~pimportant!~R~prequired!~R~R~prequired!~R~pimportant!~R~R~pimportant!busybox!grub!initramfs-tools' | awk '{print $2}') --assume-yes
67
67
  RUN apt-get purge aptitude --assume-yes
68
- RUN apt-get install zip openssl build-essential libopenblas0-serial --assume-yes
68
+ RUN apt-get install zip openssl build-essential libopenblas0-serial libffi-dev --assume-yes
69
69
  RUN apt-get autoremove --assume-yes
70
70
  RUN apt-get clean --assume-yes
71
71
 
@@ -38,7 +38,7 @@ module Sc2
38
38
 
39
39
  def set_compose_file
40
40
  @compose_file = Sc2::Paths.gem_root
41
- .join("lib", "docker_build", "docker-compose-ladderzip.yml")
41
+ .join("docker_build", "docker-compose-ladderzip.yml")
42
42
  .expand_path.to_s
43
43
  end
44
44
 
@@ -29,7 +29,7 @@ module Sc2
29
29
  draw: Api::DebugDraw.new(
30
30
  text: [
31
31
  Api::DebugText.new(
32
- text:,
32
+ text: text.to_s,
33
33
  size:,
34
34
  virtual_pos: Api::Point.new(x: 0.01, y: 0.01) # unit or fixed position.
35
35
  )
@@ -50,7 +50,7 @@ module Sc2
50
50
  draw: Api::DebugDraw.new(
51
51
  text: [
52
52
  Api::DebugText.new(
53
- text:,
53
+ text: text.to_s,
54
54
  virtual_pos: Api::Point.new(
55
55
  x: left_percent.to_f / 100,
56
56
  y: top_percent.to_f / 100
@@ -74,7 +74,7 @@ module Sc2
74
74
  draw: Api::DebugDraw.new(
75
75
  text: [
76
76
  Api::DebugText.new(
77
- text:,
77
+ text: text.to_s,
78
78
  world_pos: point,
79
79
  color:,
80
80
  size:
@@ -273,7 +273,7 @@ module Sc2
273
273
 
274
274
  # Sets unit_value Energy, Life or Shields for a specific unit tag to given value
275
275
  # @param unit_tag [Integer]
276
- # @param unit_value [Integer] 1=Energy,2=Life,3=Shields one of Api::DebugSetUnitValue::UnitValue::*
276
+ # @param unit_value [Integer] 1=ENERGY,2=LIFE,3=SHIELDS one of Api::DebugSetUnitValue::UnitValue::*
277
277
  # @param value [Float] the value which the attribute will be set to
278
278
  # @return [void]
279
279
  def debug_set_unit_value(unit_tag:, unit_value:, value:)
@@ -570,6 +570,7 @@ module Sc2
570
570
 
571
571
  i += 1
572
572
  end
573
+ next if possible_points.empty?
573
574
  # Choose best fitting point
574
575
  best_point = possible_points.keys[possible_points.values.find_index(possible_points.values.min)]
575
576
  @expansions[best_point.to_p2d] = UnitGroup.new(clustered_resources)