Created
September 29, 2016 10:32
-
-
Save chrivers/5d15b2897daf4cd5da11df0190f3e34a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// all cases are unit enums | |
pub enum ServerPacket | |
{ | |
AllShipSettings(AllShipSettingsPacket), | |
BeamFired(BeamFiredPacket), | |
CommsIncoming(CommsIncomingPacket), | |
ConsoleStatus(ConsoleStatusPacket), | |
DestroyObject(DestroyObjectPacket), | |
Difficulty(DifficultyPacket), | |
DmxMessage(DmxMessagePacket), | |
// .... | |
} | |
// all cases are struct enums | |
pub enum ServerPacket | |
{ | |
AllShipSettings | |
{ | |
/// A list of the eight available player ships. Each ship is structured as | |
/// follows: | |
ships: [Ship; 8], | |
}, | |
BeamFired | |
{ | |
/// A unique identifier for this beam. Each time a beam is fired, it gets | |
/// its own ID. | |
id: i32, | |
/// All ships that can fire beams have beam ports. These are defined in | |
/// vesselData.xml as <beam_port> entries. This value gives the index of | |
/// the beam port on the originating ship that fired the beam. This value | |
/// is zero-based; thus, vessels that only have one beam port will always | |
/// give 0 for this value. | |
beam_port_index: i32, | |
// ... | |
} | |
// ... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment