diff options
| author | Fuwn <[email protected]> | 2024-06-12 06:53:52 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-06-12 06:53:52 -0700 |
| commit | f1d1e303a2ff0cd81001eb0283eeb3741c126588 (patch) | |
| tree | f1fdb613b7a7a5c57eeb7c6480d1cdae6c372799 | |
| parent | refactor: clearer network protobuf names (diff) | |
| download | worldserver-protobufs-f1d1e303a2ff0cd81001eb0283eeb3741c126588.tar.xz worldserver-protobufs-f1d1e303a2ff0cd81001eb0283eeb3741c126588.zip | |
refactor: clearer comamnd names
| -rw-r--r-- | AppInitCommand.proto (renamed from AppInitCmd.proto) | 2 | ||||
| -rw-r--r-- | AppearActorCommand.proto (renamed from AppearActorCmd.proto) | 2 | ||||
| -rw-r--r-- | BuddyListNotifyCommand.proto (renamed from BuddyListNotifyCmd.proto) | 2 | ||||
| -rw-r--r-- | BuddyListUpdateCommand.proto (renamed from BuddyListUpdateCmd.proto) | 2 | ||||
| -rw-r--r-- | ChannelCommand.proto (renamed from ChannelCmd.proto) | 2 | ||||
| -rw-r--r-- | DisappearActorCommand.proto (renamed from DisappearActorCmd.proto) | 2 | ||||
| -rw-r--r-- | FingerReplyCommand.proto (renamed from FingerReplyCmd.proto) | 2 | ||||
| -rw-r--r-- | FingerRequestCommand.proto (renamed from FingerRequestCmd.proto) | 2 | ||||
| -rw-r--r-- | LongLocationCommand.proto (renamed from LongLocationCmd.proto) | 2 | ||||
| -rw-r--r-- | NetworkPacket.proto | 104 | ||||
| -rw-r--r-- | PropCommand.proto (renamed from PropCmd.proto) | 2 | ||||
| -rw-r--r-- | PropRequestCommand.proto (renamed from PropRequestCmd.proto) | 2 | ||||
| -rw-r--r-- | PropertySetCommand.proto (renamed from PropertySetCmd.proto) | 2 | ||||
| -rw-r--r-- | PropertyUpdateCommand.proto (renamed from PropertyUpdateCmd.proto) | 2 | ||||
| -rw-r--r-- | RedirectCommand.proto (renamed from RedirectCmd.proto) | 2 | ||||
| -rw-r--r-- | RedirectIDCommand.proto (renamed from RedirectIDCmd.proto) | 2 | ||||
| -rw-r--r-- | RoomIDCommand.proto (renamed from RoomIDCmd.proto) | 2 | ||||
| -rw-r--r-- | RoomIDRequestCommand.proto (renamed from RoomIDRequestCmd.proto) | 2 | ||||
| -rw-r--r-- | SessionExitCommand.proto (renamed from SessionExitCmd.proto) | 2 | ||||
| -rw-r--r-- | SessionInitCommand.proto (renamed from SessionInitCmd.proto) | 2 | ||||
| -rw-r--r-- | ShortLocationCommand.proto (renamed from ShortLocationCmd.proto) | 2 | ||||
| -rw-r--r-- | SubscribeDistanceCommand.proto (renamed from SubscribeDistanceCmd.proto) | 2 | ||||
| -rw-r--r-- | SubscribeRoomCommand.proto (renamed from SubscribeRoomCmd.proto) | 2 | ||||
| -rw-r--r-- | TeleportCommand.proto (renamed from TeleportCmd.proto) | 2 | ||||
| -rw-r--r-- | TextCommand.proto (renamed from TextCmd.proto) | 2 | ||||
| -rw-r--r-- | UnsubscribeRoomCommand.proto (renamed from UnsubscribeRoomCmd.proto) | 2 | ||||
| -rw-r--r-- | WhisperCommand.proto (renamed from WhisperCmd.proto) | 2 | ||||
| -rw-r--r-- | build/test.py | 14 |
28 files changed, 86 insertions, 84 deletions
diff --git a/AppInitCmd.proto b/AppInitCommand.proto index d7c3bb9..a567a23 100644 --- a/AppInitCmd.proto +++ b/AppInitCommand.proto @@ -4,6 +4,6 @@ package whirl; import "NetworkProperty.proto"; -message AppInitCmd { +message AppInitCommand { repeated NetworkProperty property_list = 2; }
\ No newline at end of file diff --git a/AppearActorCmd.proto b/AppearActorCommand.proto index 5645124..718af2d 100644 --- a/AppearActorCmd.proto +++ b/AppearActorCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message AppearActorCmd { +message AppearActorCommand { int32 room_id = 1; int32 x = 2; int32 y = 3; diff --git a/BuddyListNotifyCmd.proto b/BuddyListNotifyCommand.proto index 7bf8942..34259ea 100644 --- a/BuddyListNotifyCmd.proto +++ b/BuddyListNotifyCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message BuddyListNotifyCmd { +message BuddyListNotifyCommand { string buddy_name = 1; int32 logged_on = 2; } diff --git a/BuddyListUpdateCmd.proto b/BuddyListUpdateCommand.proto index 59db845..d422f55 100644 --- a/BuddyListUpdateCmd.proto +++ b/BuddyListUpdateCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message BuddyListUpdateCmd { +message BuddyListUpdateCommand { string buddy = 1; int32 add = 2; } diff --git a/ChannelCmd.proto b/ChannelCommand.proto index 85fd9c8..b76f984 100644 --- a/ChannelCmd.proto +++ b/ChannelCommand.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package whirl; -message ChannelCmd { +message ChannelCommand { string channel = 1; } diff --git a/DisappearActorCmd.proto b/DisappearActorCommand.proto index 7a429e9..fe7770a 100644 --- a/DisappearActorCmd.proto +++ b/DisappearActorCommand.proto @@ -2,4 +2,4 @@ syntax = "proto3"; package whirl; -message DisappearActorCmd {}; +message DisappearActorCommand {}; diff --git a/FingerReplyCmd.proto b/FingerReplyCommand.proto index 2ad70ca..42d747c 100644 --- a/FingerReplyCmd.proto +++ b/FingerReplyCommand.proto @@ -4,7 +4,7 @@ package whirl; import "PropertyList.proto"; -message FingerReplyCmd { +message FingerReplyCommand { string user = 1; PropertyList property_list = 2; } diff --git a/FingerRequestCmd.proto b/FingerRequestCommand.proto index 2fac2d5..4727e9c 100644 --- a/FingerRequestCmd.proto +++ b/FingerRequestCommand.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package whirl; -message FingerRequestCmd { +message FingerRequestCommand { string user = 1; } diff --git a/LongLocationCmd.proto b/LongLocationCommand.proto index be70f7f..913dbd2 100644 --- a/LongLocationCmd.proto +++ b/LongLocationCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message LongLocationCmd { +message LongLocationCommand { int32 x = 1; int32 y = 2; int32 z = 3; 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/PropCommand.proto index 7903c8e..6f52c0c 100644 --- a/PropCmd.proto +++ b/PropCommand.proto @@ -4,6 +4,6 @@ package whirl; import "OldPropertyList.proto"; -message PropCmd { +message PropCommand { OldPropertyList property_list = 1; }
\ No newline at end of file diff --git a/PropRequestCmd.proto b/PropRequestCommand.proto index 0de7449..040bf4d 100644 --- a/PropRequestCmd.proto +++ b/PropRequestCommand.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package whirl; -message PropRequestCmd { +message PropRequestCommand { repeated int32 variable_ids = 1; } diff --git a/PropertySetCmd.proto b/PropertySetCommand.proto index 973eefb..76edf40 100644 --- a/PropertySetCmd.proto +++ b/PropertySetCommand.proto @@ -4,7 +4,7 @@ package whirl; import "PropertyList.proto"; -message PropertySetCmd { +message PropertySetCommand { string from_user = 1; PropertyList property_list = 2; } diff --git a/PropertyUpdateCmd.proto b/PropertyUpdateCommand.proto index 2ffd6d7..3ca0ada 100644 --- a/PropertyUpdateCmd.proto +++ b/PropertyUpdateCommand.proto @@ -4,6 +4,6 @@ package whirl; import "PropertyList.proto"; -message PropertyUpdateCmd { +message PropertyUpdateCommand { PropertyList property_list = 1; } diff --git a/RedirectCmd.proto b/RedirectCommand.proto index 60f55c4..7c1ce16 100644 --- a/RedirectCmd.proto +++ b/RedirectCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message RedirectCmd { +message RedirectCommand { int32 room_number = 1; int32 ip_1 = 2; int32 ip_2 = 3; diff --git a/RedirectIDCmd.proto b/RedirectIDCommand.proto index 2331a12..023377d 100644 --- a/RedirectIDCmd.proto +++ b/RedirectIDCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message RedirectIDCmd { +message RedirectIDCommand { string room_name = 1; int32 room_number = 2; int32 ip_1 = 3; diff --git a/RoomIDCmd.proto b/RoomIDCommand.proto index c7f5b0e..237a96f 100644 --- a/RoomIDCmd.proto +++ b/RoomIDCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message RoomIDCmd { +message RoomIDCommand { string room_name = 1; int32 room_number = 2; } diff --git a/RoomIDRequestCmd.proto b/RoomIDRequestCommand.proto index 2bb65d9..75f5d54 100644 --- a/RoomIDRequestCmd.proto +++ b/RoomIDRequestCommand.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package whirl; -message RoomIDRequestCmd { +message RoomIDRequestCommand { string room_name = 1; } diff --git a/SessionExitCmd.proto b/SessionExitCommand.proto index 5710179..da48f34 100644 --- a/SessionExitCmd.proto +++ b/SessionExitCommand.proto @@ -4,6 +4,6 @@ package whirl; import "OldPropertyList.proto"; -message SessionExitCmd { +message SessionExitCommand { OldPropertyList property_list = 1; } diff --git a/SessionInitCmd.proto b/SessionInitCommand.proto index 19a2462..477a9c2 100644 --- a/SessionInitCmd.proto +++ b/SessionInitCommand.proto @@ -4,6 +4,6 @@ package whirl; import "OldPropertyList.proto"; -message SessionInitCmd { +message SessionInitCommand { OldPropertyList property_list = 1; } diff --git a/ShortLocationCmd.proto b/ShortLocationCommand.proto index b26b8da..2be8ac1 100644 --- a/ShortLocationCmd.proto +++ b/ShortLocationCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message ShortLocationCmd { +message ShortLocationCommand { int32 dx = 1; int32 dy = 2; int32 ddirection = 3; diff --git a/SubscribeDistanceCmd.proto b/SubscribeDistanceCommand.proto index f21337a..5881a2e 100644 --- a/SubscribeDistanceCmd.proto +++ b/SubscribeDistanceCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message SubscribeDistanceCmd { +message SubscribeDistanceCommand { int32 room_number = 1; int32 distance = 2; } diff --git a/SubscribeRoomCmd.proto b/SubscribeRoomCommand.proto index f023700..9866e43 100644 --- a/SubscribeRoomCmd.proto +++ b/SubscribeRoomCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message SubscribeRoomCmd { +message SubscribeRoomCommand { int32 room_number = 1; int32 x = 2; int32 y = 3; diff --git a/TeleportCmd.proto b/TeleportCommand.proto index 554fd10..d0c92b9 100644 --- a/TeleportCmd.proto +++ b/TeleportCommand.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package whirl; -message TeleportCmd { +message TeleportCommand { int32 room_id = 1; int32 exit_type = 2; int32 entry_type = 3; diff --git a/TextCmd.proto b/TextCommand.proto index de94684..8da6086 100644 --- a/TextCmd.proto +++ b/TextCommand.proto @@ -4,7 +4,7 @@ package whirl; import "ObjID.proto"; -message TextCmd { +message TextCommand { ObjID sender_id = 1; string text = 2; } diff --git a/UnsubscribeRoomCmd.proto b/UnsubscribeRoomCommand.proto index 9d8a16c..a0bab2b 100644 --- a/UnsubscribeRoomCmd.proto +++ b/UnsubscribeRoomCommand.proto @@ -2,6 +2,6 @@ syntax = "proto3"; package whirl; -message UnsubscribeRoomCmd { +message UnsubscribeRoomCommand { int32 room_number = 1; } diff --git a/WhisperCmd.proto b/WhisperCommand.proto index ba88285..746b2fe 100644 --- a/WhisperCmd.proto +++ b/WhisperCommand.proto @@ -4,7 +4,7 @@ package whirl; import "ObjID.proto"; -message WhisperCmd { +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) |