mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Implement minimal chat service, fix some implement bugs
This commit is contained in:
1 parent
2907376722
commit
2106613f62
21 files changed
+227
-194
No files matched your search
@@ -9,7 +9,7 @@ pub struct CubeInfo {
|
||||
pub grey_out_in_tutorial: bool,
|
||||
pub visibility: VisibilityMode,
|
||||
pub indestructible: bool,
|
||||
pub category: u32,
|
||||
pub category: super::weapon_list::ItemCategory,
|
||||
pub placements: u32, // default 63
|
||||
pub protonium: bool,
|
||||
pub unlocked_by_league: bool,
|
||||
|
||||
@@ -48,8 +48,8 @@ pub struct GarageSlotInfo {
|
||||
pub bay_cpu: u32,
|
||||
pub tutorial_robot: bool, // assumed to be false (when omitted)
|
||||
pub starter_robot_index: i32, // assumed to be -1 (whem omitted)
|
||||
pub control_type: i32, // enum???
|
||||
pub control_options: Vec<bool>,
|
||||
pub control_type: ControlType,
|
||||
pub control_options: ControlOptions,
|
||||
pub mastery_level: i32,
|
||||
pub bay_skin_id: String,
|
||||
pub weapon_order: Vec<i32>,
|
||||
@@ -75,10 +75,14 @@ impl GarageSlotInfo {
|
||||
(Typed::Str("bayCpu".into()), Typed::Int(self.bay_cpu as i32)),
|
||||
(Typed::Str("tutorialRobot".into()), Typed::Bool(self.tutorial_robot.into())),
|
||||
(Typed::Str("starterRobotIndex".into()), Typed::Int(self.starter_robot_index)),
|
||||
(Typed::Str("controlType".into()), Typed::Int(self.control_type)),
|
||||
(Typed::Str("controlType".into()), Typed::Int(self.control_type as i32)),
|
||||
(Typed::Str("controlOptions".into()), Typed::Arr(Arr {
|
||||
ty: 111, // bool
|
||||
items: self.control_options.iter().map(|&x| Typed::Bool(x.into())).collect(),
|
||||
items: vec![
|
||||
Typed::Bool(self.control_options.vertical_strafing.into()),
|
||||
Typed::Bool(self.control_options.sideways_driving.into()),
|
||||
Typed::Bool(self.control_options.tracks_turn_on_spot.into()),
|
||||
],
|
||||
})),
|
||||
(Typed::Str("masteryLevel".into()), Typed::Int(self.mastery_level)),
|
||||
(Typed::Str("baySkinId".into()), Typed::Str(self.bay_skin_id.clone().into())),
|
||||
@@ -90,4 +94,19 @@ impl GarageSlotInfo {
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(dead_code)]
|
||||
#[repr(i32)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum ControlType {
|
||||
Camera = 0,
|
||||
Keyboard = 1,
|
||||
Count = 2,
|
||||
}
|
||||
|
||||
pub struct ControlOptions {
|
||||
pub vertical_strafing: bool,
|
||||
pub sideways_driving: bool,
|
||||
pub tracks_turn_on_spot: bool,
|
||||
}
|
||||
|
||||
|
||||
@@ -145,19 +145,19 @@ impl WeaponData {
|
||||
#[repr(u32)]
|
||||
#[derive(Clone, Copy)]
|
||||
pub enum ItemCategory {
|
||||
NoFunction,
|
||||
Wheel,
|
||||
Hover,
|
||||
Wing,
|
||||
Rudder,
|
||||
Thruster,
|
||||
InsectLeg,
|
||||
MechLeg,
|
||||
Ski,
|
||||
TankTrack,
|
||||
Rotor,
|
||||
SrpinterLeg,
|
||||
Propeller,
|
||||
NoFunction = 0,
|
||||
Wheel = 1,
|
||||
Hover = 2,
|
||||
Wing = 3,
|
||||
Rudder = 4,
|
||||
Thruster = 5,
|
||||
InsectLeg = 6,
|
||||
MechLeg = 7,
|
||||
Ski = 8,
|
||||
TankTrack = 9,
|
||||
Rotor = 10,
|
||||
SrpinterLeg = 11,
|
||||
Propeller = 12,
|
||||
Laser = 100,
|
||||
Plasma = 200,
|
||||
Mortar = 250,
|
||||
@@ -169,10 +169,10 @@ pub enum ItemCategory {
|
||||
Seeker = 701,
|
||||
Chaingun = 750,
|
||||
ShieldModule = 800,
|
||||
GhostModule,
|
||||
BlinkModule,
|
||||
EmpModule,
|
||||
WindowmakerModule,
|
||||
GhostModule = 801,
|
||||
BlinkModule = 802,
|
||||
EmpModule = 803,
|
||||
WindowmakerModule = 804,
|
||||
EnergyModule = 900,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user