Fix reading vertical_top_speed for movement data in config, rebalance movement to 2025 stats

This commit is contained in:
NG (Graham) committed 2025-08-17 10:50:55 -04:00
1 parent 8786a2139b
commit a721aac418
6 files changed
+312 -308

No files matched your search

+1
View File
@@ -4,3 +4,4 @@
# files generated by running servers # files generated by running servers
steam_appid.txt steam_appid.txt
/data /data
/assets/robocraft/config.dump.json
File diff suppressed because it is too large. Load diff
-2
View File
@@ -81,7 +81,6 @@ pub struct HoverCategoryData {
pub force_y_offset: f32, pub force_y_offset: f32,
pub turning_scale: f32, pub turning_scale: f32,
pub small_angle_turning_scale: f32, pub small_angle_turning_scale: f32,
pub max_vertical_velocity: f32,
pub hover_damping: f32, pub hover_damping: f32,
pub angular_damping: f32, pub angular_damping: f32,
pub deceleration_multiplier: f32, pub deceleration_multiplier: f32,
@@ -94,7 +93,6 @@ impl HoverCategoryData {
(Typed::Str("forceYOffset".into()), Typed::Float(self.force_y_offset)), (Typed::Str("forceYOffset".into()), Typed::Float(self.force_y_offset)),
(Typed::Str("turningScale".into()), Typed::Float(self.turning_scale)), (Typed::Str("turningScale".into()), Typed::Float(self.turning_scale)),
(Typed::Str("smallAngleTurningScale".into()), Typed::Float(self.small_angle_turning_scale)), (Typed::Str("smallAngleTurningScale".into()), Typed::Float(self.small_angle_turning_scale)),
(Typed::Str("verticalTopSpeed".into()), Typed::Float(self.max_vertical_velocity)),
(Typed::Str("hoverDamping".into()), Typed::Float(self.hover_damping)), (Typed::Str("hoverDamping".into()), Typed::Float(self.hover_damping)),
(Typed::Str("angularDamping".into()), Typed::Float(self.angular_damping)), (Typed::Str("angularDamping".into()), Typed::Float(self.angular_damping)),
(Typed::Str("decelerationMultiplier".into()), Typed::Float(self.deceleration_multiplier)), (Typed::Str("decelerationMultiplier".into()), Typed::Float(self.deceleration_multiplier)),
+7
View File
@@ -25,6 +25,13 @@ impl CubeConfig {
let file = std::fs::File::open(root.as_ref().join(CUBE_CONFIG_FILENAME))?; let file = std::fs::File::open(root.as_ref().join(CUBE_CONFIG_FILENAME))?;
let buffered = std::io::BufReader::new(file); let buffered = std::io::BufReader::new(file);
let result = serde_json::from_reader(buffered)?; let result = serde_json::from_reader(buffered)?;
#[cfg(debug_assertions)]
{
let filename = root.as_ref().join(format!("{}.dump.json", CUBE_CONFIG_FILENAME.trim_end_matches(".json")));
let file = std::fs::File::create(filename)?;
let buffered = std::io::BufWriter::new(file);
serde_json::to_writer_pretty(buffered, &result)?;
}
Ok(result) Ok(result)
} }
} }
-2
View File
@@ -74,7 +74,6 @@ pub struct HoverCategoryData {
pub force_y_offset: f32, pub force_y_offset: f32,
pub turning_scale: f32, pub turning_scale: f32,
pub small_angle_turning_scale: f32, pub small_angle_turning_scale: f32,
pub max_vertical_velocity: f32,
pub hover_damping: f32, pub hover_damping: f32,
pub angular_damping: f32, pub angular_damping: f32,
pub deceleration_multiplier: f32, pub deceleration_multiplier: f32,
@@ -87,7 +86,6 @@ impl std::convert::Into<crate::data::movement_list::HoverCategoryData> for Hover
force_y_offset: self.force_y_offset, force_y_offset: self.force_y_offset,
turning_scale: self.turning_scale, turning_scale: self.turning_scale,
small_angle_turning_scale: self.small_angle_turning_scale, small_angle_turning_scale: self.small_angle_turning_scale,
max_vertical_velocity: self.max_vertical_velocity,
hover_damping: self.hover_damping, hover_damping: self.hover_damping,
angular_damping: self.angular_damping, angular_damping: self.angular_damping,
deceleration_multiplier: self.deceleration_multiplier, deceleration_multiplier: self.deceleration_multiplier,
+1 -1
View File
@@ -322,7 +322,7 @@ def is_variant_guess(name: str, sprite: str) -> bool:
return False return False
FIELD_NAME_EXCEPTIONS = { FIELD_NAME_EXCEPTIONS = {
"verticalTopSpeed": "max_vertical_velocity", #"verticalTopSpeed": "vertical_top_speed",
} }
def rename_field(original: str) -> str: def rename_field(original: str) -> str: