Skip to content

Commit f40fcd4

Browse files
committed
Update to newest flatbuffers spec
1 parent e1b4a51 commit f40fcd4

6 files changed

Lines changed: 39 additions & 36 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "rlbot_flatbuffers"
3-
version = "0.12.0"
3+
version = "0.13.0"
44
edition = "2021"
55
description = "A Python module implemented in Rust for serializing and deserializing RLBot's flatbuffers"
66
repository = "https://github.com/VirxEC/rlbot_flatbuffers_py"

codegen/main.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(clippy::literal_string_with_formatting_args)]
2+
13
mod class_inject;
24
mod enums;
35
mod generator;
@@ -37,7 +39,7 @@ impl PythonBindType {
3739
"SphereShape",
3840
"CylinderShape",
3941
"BoostPadState",
40-
"GameInfo",
42+
"MatchInfo",
4143
"TeamInfo",
4244
"Physics",
4345
"Vector2",
@@ -184,8 +186,9 @@ fn mod_rs_generator(type_data: &[PythonBindType]) -> io::Result<()> {
184186

185187
fn run_flatc() -> io::Result<()> {
186188
println!("cargo:rerun-if-changed=flatbuffers-schema/comms.fbs");
187-
println!("cargo:rerun-if-changed=flatbuffers-schema/gamestate.fbs");
188-
println!("cargo:rerun-if-changed=flatbuffers-schema/matchstart.fbs");
189+
println!("cargo:rerun-if-changed=flatbuffers-schema/gamedata.fbs");
190+
println!("cargo:rerun-if-changed=flatbuffers-schema/gamestatemanip.fbs");
191+
println!("cargo:rerun-if-changed=flatbuffers-schema/matchconfig.fbs");
189192
println!("cargo:rerun-if-changed=flatbuffers-schema/rendering.fbs");
190193
println!("cargo:rerun-if-changed=flatbuffers-schema/rlbot.fbs");
191194

pytest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,12 +121,12 @@ def random_script_config():
121121
except InvalidFlatbuffer as e:
122122
print(e)
123123

124-
match_settings = MatchSettings(
125-
game_path=random_string(),
124+
match_settings = MatchConfiguration(
125+
launcher_arg=random_string(),
126126
game_map_upk=random_string(),
127127
player_configurations=[random_player_config() for _ in range(128)],
128128
script_configurations=[random_script_config() for _ in range(8)],
129-
mutator_settings=MutatorSettings(),
129+
mutators=MutatorSettings(),
130130
)
131131

132132
data = match_settings.pack()
@@ -151,7 +151,7 @@ def random_script_config():
151151

152152
print()
153153

154-
ballPred = BallPrediction([PredictionSlice(1) for _ in range(5 * 120)])
154+
ballPred = BallPrediction([PredictionSlice(1) for _ in range(6 * 120)])
155155
data = ballPred.pack()
156156
print(f"BallPrediction size: {len(data)} bytes")
157157

src/lib.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
)]
1212
pub mod generated;
1313

14-
#[allow(clippy::enum_variant_names, unused_imports)]
14+
#[allow(clippy::enum_variant_names, clippy::useless_conversion, unused_imports)]
1515
mod python;
1616

1717
use pyo3::{create_exception, exceptions::PyValueError, prelude::*, PyClass};
@@ -165,20 +165,20 @@ pynamedmodule! {
165165
name: rlbot_flatbuffers,
166166
classes: [
167167
AirState,
168-
AudioOption,
168+
AudioMutator,
169169
BallAnchor,
170-
BallBouncinessOption,
170+
BallBouncinessMutator,
171171
BallInfo,
172-
BallMaxSpeedOption,
172+
BallMaxSpeedMutator,
173173
BallPrediction,
174-
BallSizeOption,
175-
BallTypeOption,
176-
BallWeightOption,
174+
BallSizeMutator,
175+
BallTypeMutator,
176+
BallWeightMutator,
177177
Bool,
178-
BoostOption,
178+
BoostMutator,
179179
BoostPad,
180180
BoostPadState,
181-
BoostStrengthOption,
181+
BoostStrengthMutator,
182182
BoxShape,
183183
CarAnchor,
184184
CollisionShape,
@@ -190,7 +190,7 @@ pynamedmodule! {
190190
ControllerState,
191191
CustomBot,
192192
CylinderShape,
193-
DemolishOption,
193+
DemolishMutator,
194194
DesiredBallState,
195195
DesiredBoostState,
196196
DesiredCarState,
@@ -200,26 +200,26 @@ pynamedmodule! {
200200
ExistingMatchBehavior,
201201
FieldInfo,
202202
Float,
203-
GameEventOption,
204-
GameInfo,
203+
GameEventMutator,
205204
GameMode,
206205
GamePacket,
207-
GameSpeedOption,
208-
GameStatus,
206+
GameSpeedMutator,
209207
GoalInfo,
210-
GravityOption,
208+
GravityMutator,
211209
Human,
212210
Launcher,
213211
Line3D,
214212
LoadoutPaint,
215213
MatchComm,
216-
MatchLength,
217-
MatchSettings,
218-
MaxScore,
219-
MaxTimeOption,
220-
MultiBall,
214+
MatchConfiguration,
215+
MatchInfo,
216+
MatchLengthMutator,
217+
MatchPhase,
218+
MaxScoreMutator,
219+
MaxTimeMutator,
220+
MultiBallMutator,
221221
MutatorSettings,
222-
OvertimeOption,
222+
OvertimeMutator,
223223
PartyMember,
224224
Physics,
225225
PlayerClass,
@@ -239,13 +239,13 @@ pynamedmodule! {
239239
RenderGroup,
240240
RenderMessage,
241241
RenderType,
242-
RespawnTimeOption,
242+
RespawnTimeMutator,
243243
Rotator,
244244
RotatorPartial,
245-
RumbleOption,
245+
RumbleMutator,
246246
ScoreInfo,
247247
ScriptConfiguration,
248-
SeriesLengthOption,
248+
SeriesLengthMutator,
249249
SetLoadout,
250250
SphereShape,
251251
StartCommand,

0 commit comments

Comments
 (0)