From f1d1e303a2ff0cd81001eb0283eeb3741c126588 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Wed, 12 Jun 2024 06:53:52 -0700 Subject: refactor: clearer comamnd names --- AppInitCmd.proto | 9 ---- AppInitCommand.proto | 9 ++++ AppearActorCmd.proto | 11 ----- AppearActorCommand.proto | 11 +++++ BuddyListNotifyCmd.proto | 8 ---- BuddyListNotifyCommand.proto | 8 ++++ BuddyListUpdateCmd.proto | 8 ---- BuddyListUpdateCommand.proto | 8 ++++ ChannelCmd.proto | 7 --- ChannelCommand.proto | 7 +++ DisappearActorCmd.proto | 5 -- DisappearActorCommand.proto | 5 ++ FingerReplyCmd.proto | 10 ---- FingerReplyCommand.proto | 10 ++++ FingerRequestCmd.proto | 7 --- FingerRequestCommand.proto | 7 +++ LongLocationCmd.proto | 10 ---- LongLocationCommand.proto | 10 ++++ NetworkPacket.proto | 104 ++++++++++++++++++++--------------------- PropCmd.proto | 9 ---- PropCommand.proto | 9 ++++ PropRequestCmd.proto | 7 --- PropRequestCommand.proto | 7 +++ PropertySetCmd.proto | 10 ---- PropertySetCommand.proto | 10 ++++ PropertyUpdateCmd.proto | 9 ---- PropertyUpdateCommand.proto | 9 ++++ RedirectCmd.proto | 12 ----- RedirectCommand.proto | 12 +++++ RedirectIDCmd.proto | 13 ------ RedirectIDCommand.proto | 13 ++++++ RoomIDCmd.proto | 8 ---- RoomIDCommand.proto | 8 ++++ RoomIDRequestCmd.proto | 7 --- RoomIDRequestCommand.proto | 7 +++ SessionExitCmd.proto | 9 ---- SessionExitCommand.proto | 9 ++++ SessionInitCmd.proto | 9 ---- SessionInitCommand.proto | 9 ++++ ShortLocationCmd.proto | 9 ---- ShortLocationCommand.proto | 9 ++++ SubscribeDistanceCmd.proto | 8 ---- SubscribeDistanceCommand.proto | 8 ++++ SubscribeRoomCmd.proto | 11 ----- SubscribeRoomCommand.proto | 11 +++++ TeleportCmd.proto | 13 ------ TeleportCommand.proto | 13 ++++++ TextCmd.proto | 10 ---- TextCommand.proto | 10 ++++ UnsubscribeRoomCmd.proto | 7 --- UnsubscribeRoomCommand.proto | 7 +++ WhisperCmd.proto | 11 ----- WhisperCommand.proto | 11 +++++ build/test.py | 14 +++--- 54 files changed, 297 insertions(+), 295 deletions(-) delete mode 100644 AppInitCmd.proto create mode 100644 AppInitCommand.proto delete mode 100644 AppearActorCmd.proto create mode 100644 AppearActorCommand.proto delete mode 100644 BuddyListNotifyCmd.proto create mode 100644 BuddyListNotifyCommand.proto delete mode 100644 BuddyListUpdateCmd.proto create mode 100644 BuddyListUpdateCommand.proto delete mode 100644 ChannelCmd.proto create mode 100644 ChannelCommand.proto delete mode 100644 DisappearActorCmd.proto create mode 100644 DisappearActorCommand.proto delete mode 100644 FingerReplyCmd.proto create mode 100644 FingerReplyCommand.proto delete mode 100644 FingerRequestCmd.proto create mode 100644 FingerRequestCommand.proto delete mode 100644 LongLocationCmd.proto create mode 100644 LongLocationCommand.proto delete mode 100644 PropCmd.proto create mode 100644 PropCommand.proto delete mode 100644 PropRequestCmd.proto create mode 100644 PropRequestCommand.proto delete mode 100644 PropertySetCmd.proto create mode 100644 PropertySetCommand.proto delete mode 100644 PropertyUpdateCmd.proto create mode 100644 PropertyUpdateCommand.proto delete mode 100644 RedirectCmd.proto create mode 100644 RedirectCommand.proto delete mode 100644 RedirectIDCmd.proto create mode 100644 RedirectIDCommand.proto delete mode 100644 RoomIDCmd.proto create mode 100644 RoomIDCommand.proto delete mode 100644 RoomIDRequestCmd.proto create mode 100644 RoomIDRequestCommand.proto delete mode 100644 SessionExitCmd.proto create mode 100644 SessionExitCommand.proto delete mode 100644 SessionInitCmd.proto create mode 100644 SessionInitCommand.proto delete mode 100644 ShortLocationCmd.proto create mode 100644 ShortLocationCommand.proto delete mode 100644 SubscribeDistanceCmd.proto create mode 100644 SubscribeDistanceCommand.proto delete mode 100644 SubscribeRoomCmd.proto create mode 100644 SubscribeRoomCommand.proto delete mode 100644 TeleportCmd.proto create mode 100644 TeleportCommand.proto delete mode 100644 TextCmd.proto create mode 100644 TextCommand.proto delete mode 100644 UnsubscribeRoomCmd.proto create mode 100644 UnsubscribeRoomCommand.proto delete mode 100644 WhisperCmd.proto create mode 100644 WhisperCommand.proto diff --git a/AppInitCmd.proto b/AppInitCmd.proto deleted file mode 100644 index d7c3bb9..0000000 --- a/AppInitCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "NetworkProperty.proto"; - -message AppInitCmd { - repeated NetworkProperty property_list = 2; -} \ No newline at end of file diff --git a/AppInitCommand.proto b/AppInitCommand.proto new file mode 100644 index 0000000..a567a23 --- /dev/null +++ b/AppInitCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "NetworkProperty.proto"; + +message AppInitCommand { + repeated NetworkProperty property_list = 2; +} \ No newline at end of file diff --git a/AppearActorCmd.proto b/AppearActorCmd.proto deleted file mode 100644 index 5645124..0000000 --- a/AppearActorCmd.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message AppearActorCmd { - int32 room_id = 1; - int32 x = 2; - int32 y = 3; - int32 z = 4; - int32 direction = 5; -} diff --git a/AppearActorCommand.proto b/AppearActorCommand.proto new file mode 100644 index 0000000..718af2d --- /dev/null +++ b/AppearActorCommand.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +message AppearActorCommand { + int32 room_id = 1; + int32 x = 2; + int32 y = 3; + int32 z = 4; + int32 direction = 5; +} diff --git a/BuddyListNotifyCmd.proto b/BuddyListNotifyCmd.proto deleted file mode 100644 index 7bf8942..0000000 --- a/BuddyListNotifyCmd.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message BuddyListNotifyCmd { - string buddy_name = 1; - int32 logged_on = 2; -} diff --git a/BuddyListNotifyCommand.proto b/BuddyListNotifyCommand.proto new file mode 100644 index 0000000..34259ea --- /dev/null +++ b/BuddyListNotifyCommand.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message BuddyListNotifyCommand { + string buddy_name = 1; + int32 logged_on = 2; +} diff --git a/BuddyListUpdateCmd.proto b/BuddyListUpdateCmd.proto deleted file mode 100644 index 59db845..0000000 --- a/BuddyListUpdateCmd.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message BuddyListUpdateCmd { - string buddy = 1; - int32 add = 2; -} diff --git a/BuddyListUpdateCommand.proto b/BuddyListUpdateCommand.proto new file mode 100644 index 0000000..d422f55 --- /dev/null +++ b/BuddyListUpdateCommand.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message BuddyListUpdateCommand { + string buddy = 1; + int32 add = 2; +} diff --git a/ChannelCmd.proto b/ChannelCmd.proto deleted file mode 100644 index 85fd9c8..0000000 --- a/ChannelCmd.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message ChannelCmd { - string channel = 1; -} diff --git a/ChannelCommand.proto b/ChannelCommand.proto new file mode 100644 index 0000000..b76f984 --- /dev/null +++ b/ChannelCommand.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message ChannelCommand { + string channel = 1; +} diff --git a/DisappearActorCmd.proto b/DisappearActorCmd.proto deleted file mode 100644 index 7a429e9..0000000 --- a/DisappearActorCmd.proto +++ /dev/null @@ -1,5 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message DisappearActorCmd {}; diff --git a/DisappearActorCommand.proto b/DisappearActorCommand.proto new file mode 100644 index 0000000..fe7770a --- /dev/null +++ b/DisappearActorCommand.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +package whirl; + +message DisappearActorCommand {}; diff --git a/FingerReplyCmd.proto b/FingerReplyCmd.proto deleted file mode 100644 index 2ad70ca..0000000 --- a/FingerReplyCmd.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message FingerReplyCmd { - string user = 1; - PropertyList property_list = 2; -} diff --git a/FingerReplyCommand.proto b/FingerReplyCommand.proto new file mode 100644 index 0000000..42d747c --- /dev/null +++ b/FingerReplyCommand.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "PropertyList.proto"; + +message FingerReplyCommand { + string user = 1; + PropertyList property_list = 2; +} diff --git a/FingerRequestCmd.proto b/FingerRequestCmd.proto deleted file mode 100644 index 2fac2d5..0000000 --- a/FingerRequestCmd.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message FingerRequestCmd { - string user = 1; -} diff --git a/FingerRequestCommand.proto b/FingerRequestCommand.proto new file mode 100644 index 0000000..4727e9c --- /dev/null +++ b/FingerRequestCommand.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message FingerRequestCommand { + string user = 1; +} diff --git a/LongLocationCmd.proto b/LongLocationCmd.proto deleted file mode 100644 index be70f7f..0000000 --- a/LongLocationCmd.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message LongLocationCmd { - int32 x = 1; - int32 y = 2; - int32 z = 3; - int32 direction = 4; -} diff --git a/LongLocationCommand.proto b/LongLocationCommand.proto new file mode 100644 index 0000000..913dbd2 --- /dev/null +++ b/LongLocationCommand.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +message LongLocationCommand { + int32 x = 1; + int32 y = 2; + int32 z = 3; + int32 direction = 4; +} diff --git a/NetworkPacket.proto b/NetworkPacket.proto index 3922ea9..86876a7 100644 --- a/NetworkPacket.proto +++ b/NetworkPacket.proto @@ -2,32 +2,32 @@ syntax = "proto3"; package whirl; -import "AppearActorCmd.proto"; -import "AppInitCmd.proto"; -import "PropCmd.proto"; -import "BuddyListNotifyCmd.proto"; -import "BuddyListUpdateCmd.proto"; -import "ChannelCmd.proto"; -import "DisappearActorCmd.proto"; -import "FingerReplyCmd.proto"; -import "FingerRequestCmd.proto"; -import "LongLocationCmd.proto"; -import "PropertySetCmd.proto"; -import "PropertyUpdateCmd.proto"; -import "PropRequestCmd.proto"; -import "RedirectCmd.proto"; -import "RedirectIDCmd.proto"; -import "RoomIDCmd.proto"; -import "RoomIDRequestCmd.proto"; -import "SessionExitCmd.proto"; -import "SessionInitCmd.proto"; -import "ShortLocationCmd.proto"; -import "SubscribeDistanceCmd.proto"; -import "SubscribeRoomCmd.proto"; -import "TeleportCmd.proto"; -import "TextCmd.proto"; -import "UnsubscribeRoomCmd.proto"; -import "WhisperCmd.proto"; +import "AppearActorCommand.proto"; +import "AppInitCommand.proto"; +import "PropCommand.proto"; +import "BuddyListNotifyCommand.proto"; +import "BuddyListUpdateCommand.proto"; +import "ChannelCommand.proto"; +import "DisappearActorCommand.proto"; +import "FingerReplyCommand.proto"; +import "FingerRequestCommand.proto"; +import "LongLocationCommand.proto"; +import "PropertySetCommand.proto"; +import "PropertyUpdateCommand.proto"; +import "PropRequestCommand.proto"; +import "RedirectCommand.proto"; +import "RedirectIDCommand.proto"; +import "RoomIDCommand.proto"; +import "RoomIDRequestCommand.proto"; +import "SessionExitCommand.proto"; +import "SessionInitCommand.proto"; +import "ShortLocationCommand.proto"; +import "SubscribeDistanceCommand.proto"; +import "SubscribeRoomCommand.proto"; +import "TeleportCommand.proto"; +import "TextCommand.proto"; +import "UnsubscribeRoomCommand.proto"; +import "WhisperCommand.proto"; message NetworkPacket { uint32 length = 1; @@ -37,31 +37,31 @@ message NetworkPacket { } uint32 type = 4; oneof command { - AppearActorCmd appear_actor_cmd = 5; - AppInitCmd app_init_cmd = 6; - PropCmd prop_cmd = 7; - BuddyListNotifyCmd buddy_list_notify_cmd = 8; - BuddyListUpdateCmd buddy_list_update_cmd = 9; - ChannelCmd channel_cmd = 10; - DisappearActorCmd disappear_actor_cmd = 11; - FingerReplyCmd finger_reply_cmd = 12; - FingerRequestCmd finger_request_cmd = 13; - LongLocationCmd long_location_cmd = 14; - PropertySetCmd property_set_cmd = 15; - PropertyUpdateCmd property_update_cmd = 16; - PropRequestCmd prop_request_cmd = 17; - RedirectCmd redirect_cmd = 18; - RedirectIDCmd redirect_id_cmd = 19; - RoomIDCmd room_id_cmd = 20; - RoomIDRequestCmd room_id_request_cmd = 21; - SessionExitCmd session_exit_cmd = 22; - SessionInitCmd session_init_cmd = 23; - ShortLocationCmd short_location_cmd = 24; - SubscribeDistanceCmd subscribe_distance_cmd = 25; - SubscribeRoomCmd subscribe_room_cmd = 26; - TeleportCmd teleport_cmd = 27; - TextCmd text_cmd = 28; - UnsubscribeRoomCmd unsubscribe_room_cmd = 29; - WhisperCmd whisper_cmd = 30; + AppearActorCommand appear_actor_command = 5; + AppInitCommand app_init_command = 6; + PropCommand prop_command = 7; + BuddyListNotifyCommand buddy_list_notify_command = 8; + BuddyListUpdateCommand buddy_list_update_command = 9; + ChannelCommand channel_command = 10; + DisappearActorCommand disappear_actor_command = 11; + FingerReplyCommand finger_reply_command = 12; + FingerRequestCommand finger_request_command = 13; + LongLocationCommand long_location_command = 14; + PropertySetCommand property_set_command = 15; + PropertyUpdateCommand property_update_command = 16; + PropRequestCommand prop_request_command = 17; + RedirectCommand redirect_command = 18; + RedirectIDCommand redirect_id_command = 19; + RoomIDCommand room_id_command = 20; + RoomIDRequestCommand room_id_request_command = 21; + SessionExitCommand session_exit_command = 22; + SessionInitCommand session_init_command = 23; + ShortLocationCommand short_location_command = 24; + SubscribeDistanceCommand subscribe_distance_command = 25; + SubscribeRoomCommand subscribe_room_command = 26; + TeleportCommand teleport_command = 27; + TextCommand text_command = 28; + UnsubscribeRoomCommand unsubscribe_room_command = 29; + WhisperCommand whisper_command = 30; } } diff --git a/PropCmd.proto b/PropCmd.proto deleted file mode 100644 index 7903c8e..0000000 --- a/PropCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message PropCmd { - OldPropertyList property_list = 1; -} \ No newline at end of file diff --git a/PropCommand.proto b/PropCommand.proto new file mode 100644 index 0000000..6f52c0c --- /dev/null +++ b/PropCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "OldPropertyList.proto"; + +message PropCommand { + OldPropertyList property_list = 1; +} \ No newline at end of file diff --git a/PropRequestCmd.proto b/PropRequestCmd.proto deleted file mode 100644 index 0de7449..0000000 --- a/PropRequestCmd.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message PropRequestCmd { - repeated int32 variable_ids = 1; -} diff --git a/PropRequestCommand.proto b/PropRequestCommand.proto new file mode 100644 index 0000000..040bf4d --- /dev/null +++ b/PropRequestCommand.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message PropRequestCommand { + repeated int32 variable_ids = 1; +} diff --git a/PropertySetCmd.proto b/PropertySetCmd.proto deleted file mode 100644 index 973eefb..0000000 --- a/PropertySetCmd.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message PropertySetCmd { - string from_user = 1; - PropertyList property_list = 2; -} diff --git a/PropertySetCommand.proto b/PropertySetCommand.proto new file mode 100644 index 0000000..76edf40 --- /dev/null +++ b/PropertySetCommand.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "PropertyList.proto"; + +message PropertySetCommand { + string from_user = 1; + PropertyList property_list = 2; +} diff --git a/PropertyUpdateCmd.proto b/PropertyUpdateCmd.proto deleted file mode 100644 index 2ffd6d7..0000000 --- a/PropertyUpdateCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "PropertyList.proto"; - -message PropertyUpdateCmd { - PropertyList property_list = 1; -} diff --git a/PropertyUpdateCommand.proto b/PropertyUpdateCommand.proto new file mode 100644 index 0000000..3ca0ada --- /dev/null +++ b/PropertyUpdateCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "PropertyList.proto"; + +message PropertyUpdateCommand { + PropertyList property_list = 1; +} diff --git a/RedirectCmd.proto b/RedirectCmd.proto deleted file mode 100644 index 60f55c4..0000000 --- a/RedirectCmd.proto +++ /dev/null @@ -1,12 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RedirectCmd { - int32 room_number = 1; - int32 ip_1 = 2; - int32 ip_2 = 3; - int32 ip_3 = 4; - int32 ip_4 = 5; - int32 port = 6; -} diff --git a/RedirectCommand.proto b/RedirectCommand.proto new file mode 100644 index 0000000..7c1ce16 --- /dev/null +++ b/RedirectCommand.proto @@ -0,0 +1,12 @@ +syntax = "proto3"; + +package whirl; + +message RedirectCommand { + int32 room_number = 1; + int32 ip_1 = 2; + int32 ip_2 = 3; + int32 ip_3 = 4; + int32 ip_4 = 5; + int32 port = 6; +} diff --git a/RedirectIDCmd.proto b/RedirectIDCmd.proto deleted file mode 100644 index 2331a12..0000000 --- a/RedirectIDCmd.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RedirectIDCmd { - string room_name = 1; - int32 room_number = 2; - int32 ip_1 = 3; - int32 ip_2 = 4; - int32 ip_3 = 5; - int32 ip_4 = 6; - int32 port = 7; -} diff --git a/RedirectIDCommand.proto b/RedirectIDCommand.proto new file mode 100644 index 0000000..023377d --- /dev/null +++ b/RedirectIDCommand.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package whirl; + +message RedirectIDCommand { + string room_name = 1; + int32 room_number = 2; + int32 ip_1 = 3; + int32 ip_2 = 4; + int32 ip_3 = 5; + int32 ip_4 = 6; + int32 port = 7; +} diff --git a/RoomIDCmd.proto b/RoomIDCmd.proto deleted file mode 100644 index c7f5b0e..0000000 --- a/RoomIDCmd.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RoomIDCmd { - string room_name = 1; - int32 room_number = 2; -} diff --git a/RoomIDCommand.proto b/RoomIDCommand.proto new file mode 100644 index 0000000..237a96f --- /dev/null +++ b/RoomIDCommand.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message RoomIDCommand { + string room_name = 1; + int32 room_number = 2; +} diff --git a/RoomIDRequestCmd.proto b/RoomIDRequestCmd.proto deleted file mode 100644 index 2bb65d9..0000000 --- a/RoomIDRequestCmd.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message RoomIDRequestCmd { - string room_name = 1; -} diff --git a/RoomIDRequestCommand.proto b/RoomIDRequestCommand.proto new file mode 100644 index 0000000..75f5d54 --- /dev/null +++ b/RoomIDRequestCommand.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message RoomIDRequestCommand { + string room_name = 1; +} diff --git a/SessionExitCmd.proto b/SessionExitCmd.proto deleted file mode 100644 index 5710179..0000000 --- a/SessionExitCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message SessionExitCmd { - OldPropertyList property_list = 1; -} diff --git a/SessionExitCommand.proto b/SessionExitCommand.proto new file mode 100644 index 0000000..da48f34 --- /dev/null +++ b/SessionExitCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "OldPropertyList.proto"; + +message SessionExitCommand { + OldPropertyList property_list = 1; +} diff --git a/SessionInitCmd.proto b/SessionInitCmd.proto deleted file mode 100644 index 19a2462..0000000 --- a/SessionInitCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "OldPropertyList.proto"; - -message SessionInitCmd { - OldPropertyList property_list = 1; -} diff --git a/SessionInitCommand.proto b/SessionInitCommand.proto new file mode 100644 index 0000000..477a9c2 --- /dev/null +++ b/SessionInitCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +import "OldPropertyList.proto"; + +message SessionInitCommand { + OldPropertyList property_list = 1; +} diff --git a/ShortLocationCmd.proto b/ShortLocationCmd.proto deleted file mode 100644 index b26b8da..0000000 --- a/ShortLocationCmd.proto +++ /dev/null @@ -1,9 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message ShortLocationCmd { - int32 dx = 1; - int32 dy = 2; - int32 ddirection = 3; -} diff --git a/ShortLocationCommand.proto b/ShortLocationCommand.proto new file mode 100644 index 0000000..2be8ac1 --- /dev/null +++ b/ShortLocationCommand.proto @@ -0,0 +1,9 @@ +syntax = "proto3"; + +package whirl; + +message ShortLocationCommand { + int32 dx = 1; + int32 dy = 2; + int32 ddirection = 3; +} diff --git a/SubscribeDistanceCmd.proto b/SubscribeDistanceCmd.proto deleted file mode 100644 index f21337a..0000000 --- a/SubscribeDistanceCmd.proto +++ /dev/null @@ -1,8 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message SubscribeDistanceCmd { - int32 room_number = 1; - int32 distance = 2; -} diff --git a/SubscribeDistanceCommand.proto b/SubscribeDistanceCommand.proto new file mode 100644 index 0000000..5881a2e --- /dev/null +++ b/SubscribeDistanceCommand.proto @@ -0,0 +1,8 @@ +syntax = "proto3"; + +package whirl; + +message SubscribeDistanceCommand { + int32 room_number = 1; + int32 distance = 2; +} diff --git a/SubscribeRoomCmd.proto b/SubscribeRoomCmd.proto deleted file mode 100644 index f023700..0000000 --- a/SubscribeRoomCmd.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message SubscribeRoomCmd { - int32 room_number = 1; - int32 x = 2; - int32 y = 3; - int32 z = 4; - int32 distance = 5; -} diff --git a/SubscribeRoomCommand.proto b/SubscribeRoomCommand.proto new file mode 100644 index 0000000..9866e43 --- /dev/null +++ b/SubscribeRoomCommand.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +message SubscribeRoomCommand { + int32 room_number = 1; + int32 x = 2; + int32 y = 3; + int32 z = 4; + int32 distance = 5; +} diff --git a/TeleportCmd.proto b/TeleportCmd.proto deleted file mode 100644 index 554fd10..0000000 --- a/TeleportCmd.proto +++ /dev/null @@ -1,13 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message TeleportCmd { - int32 room_id = 1; - int32 exit_type = 2; - int32 entry_type = 3; - int32 x = 4; - int32 y = 5; - int32 z = 6; - int32 direction = 7; -} diff --git a/TeleportCommand.proto b/TeleportCommand.proto new file mode 100644 index 0000000..d0c92b9 --- /dev/null +++ b/TeleportCommand.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; + +package whirl; + +message TeleportCommand { + int32 room_id = 1; + int32 exit_type = 2; + int32 entry_type = 3; + int32 x = 4; + int32 y = 5; + int32 z = 6; + int32 direction = 7; +} diff --git a/TextCmd.proto b/TextCmd.proto deleted file mode 100644 index de94684..0000000 --- a/TextCmd.proto +++ /dev/null @@ -1,10 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "ObjID.proto"; - -message TextCmd { - ObjID sender_id = 1; - string text = 2; -} diff --git a/TextCommand.proto b/TextCommand.proto new file mode 100644 index 0000000..8da6086 --- /dev/null +++ b/TextCommand.proto @@ -0,0 +1,10 @@ +syntax = "proto3"; + +package whirl; + +import "ObjID.proto"; + +message TextCommand { + ObjID sender_id = 1; + string text = 2; +} diff --git a/UnsubscribeRoomCmd.proto b/UnsubscribeRoomCmd.proto deleted file mode 100644 index 9d8a16c..0000000 --- a/UnsubscribeRoomCmd.proto +++ /dev/null @@ -1,7 +0,0 @@ -syntax = "proto3"; - -package whirl; - -message UnsubscribeRoomCmd { - int32 room_number = 1; -} diff --git a/UnsubscribeRoomCommand.proto b/UnsubscribeRoomCommand.proto new file mode 100644 index 0000000..a0bab2b --- /dev/null +++ b/UnsubscribeRoomCommand.proto @@ -0,0 +1,7 @@ +syntax = "proto3"; + +package whirl; + +message UnsubscribeRoomCommand { + int32 room_number = 1; +} diff --git a/WhisperCmd.proto b/WhisperCmd.proto deleted file mode 100644 index ba88285..0000000 --- a/WhisperCmd.proto +++ /dev/null @@ -1,11 +0,0 @@ -syntax = "proto3"; - -package whirl; - -import "ObjID.proto"; - -message WhisperCmd { - ObjID sender_id = 1; - string text = 2; - ObjID receiver_id = 3; -} diff --git a/WhisperCommand.proto b/WhisperCommand.proto new file mode 100644 index 0000000..746b2fe --- /dev/null +++ b/WhisperCommand.proto @@ -0,0 +1,11 @@ +syntax = "proto3"; + +package whirl; + +import "ObjID.proto"; + +message WhisperCommand { + ObjID sender_id = 1; + string text = 2; + ObjID receiver_id = 3; +} diff --git a/build/test.py b/build/test.py index 417e9eb..f23bbc4 100644 --- a/build/test.py +++ b/build/test.py @@ -1,14 +1,16 @@ import NetworkPacket_pb2 -import BuddyListNotifyCmd_pb2 +import BuddyListNotifyCommand_pb2 request = NetworkPacket_pb2.NetworkPacket() request.length = 3 request.short_object_id = 0xFF request.type = 0x0A -request.buddy_list_notify_cmd.CopyFrom(BuddyListNotifyCmd_pb2.BuddyListNotifyCmd()) -request.buddy_list_notify_cmd.buddy_name = "Whirl" -request.buddy_list_notify_cmd.logged_on = 1 +request.buddy_list_notify_command.CopyFrom( + BuddyListNotifyCommand_pb2.BuddyListNotifyCommand() +) +request.buddy_list_notify_command.buddy_name = "Whirl" +request.buddy_list_notify_command.logged_on = 1 print(request.SerializeToString()) print(request.WhichOneof("command")) @@ -20,5 +22,5 @@ deserialised_request.ParseFromString(request.SerializeToString()) print(deserialised_request.length) print(deserialised_request.short_object_id) print(deserialised_request.type) -print(deserialised_request.buddy_list_notify_cmd.buddy_name) -print(deserialised_request.buddy_list_notify_cmd.logged_on) +print(deserialised_request.buddy_list_notify_command.buddy_name) +print(deserialised_request.buddy_list_notify_command.logged_on) -- cgit v1.2.3