aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-29 23:09:53 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-29 23:09:53 +0200
commite8c35eb2780cf17890f2905f44d1a1d170c40b37 (patch)
treed5e80c11f6ca1f46eb1ae3aa88a3e2c8e2507597 /spec
parent535595e9823f020b8f02ae657f259966814d1906 (diff)
downloadhydra-dragonfire-e8c35eb2780cf17890f2905f44d1a1d170c40b37.tar.xz
Implement sending of packets
Diffstat (limited to 'spec')
-rw-r--r--spec/casemap5
-rw-r--r--spec/client/pkt46
-rw-r--r--spec/server/enum7
-rw-r--r--spec/server/flag12
-rw-r--r--spec/server/pkt63
-rw-r--r--spec/server/struct8
6 files changed, 117 insertions, 24 deletions
diff --git a/spec/casemap b/spec/casemap
index c72df40..ab4c10a 100644
--- a/spec/casemap
+++ b/spec/casemap
@@ -18,6 +18,11 @@ hud_field HUDField
first_srp FirstSRP
csm_restriction_flags CSMRestrictionFlags
srp_bytes_salt_b SRPBytesSaltB
+srp_bytes_a SRPBytesA
+srp_bytes_m SRPBytesM
no_csms NoCSMs
join_ok JoinOK
leave_ok LeaveOK
+no_sha1 NoSHA1
+fov80 FOV80
+ids IDs
diff --git a/spec/client/pkt b/spec/client/pkt
index e7c609b..2a150e3 100644
--- a/spec/client/pkt
+++ b/spec/client/pkt
@@ -6,7 +6,6 @@ hello
string username
accept_auth
vec3 player_pos
- # int64
number map_seed
number send_interval
auth_methods sudo_auth_methods
@@ -14,9 +13,9 @@ accept_sudo_mode
deny_sudo_mode
kick
kick_reason reason
- [custom] val.Reason == mt.Custom || val.Reason == mt.Shutdown || val.Reason == mt.Crash
+ {custom} val.Reason == mt.Custom || val.Reason == mt.Shutdown || val.Reason == mt.Crash
string custom
- [reconnect] val.Reason == mt.Shutdown || val.Reason == mt.Crash
+ {reconnect} val.Reason == mt.Shutdown || val.Reason == mt.Crash
boolean reconnect
blk_data
vec3 blkpos
@@ -46,7 +45,6 @@ chat_msg
chat_msg_type type
string sender
string text
- # int64
number timestamp
ao_rm_add
# TODO
@@ -156,18 +154,18 @@ rm_hud
change_hud
number id
hud_field field
- [pos] val.Field == mt.HUDPos
- [name] val.Field == mt.HUDName
- [text] val.Field == mt.HUDText
- [number] val.Field == mt.HUDNumber
- [item] val.Field == mt.HUDItem
- [dir] val.Field == mt.HUDDir
- [align] val.Field == mt.HUDAlign
- [offset] val.Field == mt.HUDOffset
- [world_pos] val.Field == mt.HUDWorldPos
- [size] val.Field == mt.HUDSize
- [z_index] val.Field == mt.HUDZIndex
- [text_2] val.Field == mt.HUDText2
+ {pos} val.Field == mt.HUDPos
+ {name} val.Field == mt.HUDName
+ {text} val.Field == mt.HUDText
+ {number} val.Field == mt.HUDNumber
+ {item} val.Field == mt.HUDItem
+ {dir} val.Field == mt.HUDDir
+ {align} val.Field == mt.HUDAlign
+ {offset} val.Field == mt.HUDOffset
+ {world_pos} val.Field == mt.HUDWorldPos
+ {size} val.Field == mt.HUDSize
+ {z_index} val.Field == mt.HUDZIndex
+ {text_2} val.Field == mt.HUDText2
vec2 pos
string name
string text
@@ -196,15 +194,15 @@ sky_params
color sun_fog_tint
color moon_fog_tint
string fog_tint_type
- [textures] val.Type == "skybox"
+ {textures} val.Type == "skybox"
texture_list textures
- [day_sky] val.Type == "regular"
- [day_horizon] val.Type == "regular"
- [dawn_sky] val.Type == "regular"
- [dawn_horizon] val.Type == "regular"
- [night_sky] val.Type == "regular"
- [night_horizon] val.Type == "regular"
- [indoor] val.Type == "regular"
+ {day_sky} val.Type == "regular"
+ {day_horizon} val.Type == "regular"
+ {dawn_sky} val.Type == "regular"
+ {dawn_horizon} val.Type == "regular"
+ {night_sky} val.Type == "regular"
+ {night_horizon} val.Type == "regular"
+ {indoor} val.Type == "regular"
color day_sky
color day_horizon
color dawn_sky
diff --git a/spec/server/enum b/spec/server/enum
new file mode 100644
index 0000000..6f49e6d
--- /dev/null
+++ b/spec/server/enum
@@ -0,0 +1,7 @@
+interaction
+ dig
+ stop_digging
+ dug
+ place
+ use
+ activate
diff --git a/spec/server/flag b/spec/server/flag
new file mode 100644
index 0000000..4f8c164
--- /dev/null
+++ b/spec/server/flag
@@ -0,0 +1,12 @@
+keys
+ postfix Key
+ forward
+ backward
+ left
+ right
+ jump
+ special
+ sneak
+ dig
+ place
+ zoom
diff --git a/spec/server/pkt b/spec/server/pkt
new file mode 100644
index 0000000..5578d55
--- /dev/null
+++ b/spec/server/pkt
@@ -0,0 +1,63 @@
+nil
+init
+ uint8 serialize_ver
+ CompressionModes supported_compression
+ uint16 min_proto_ver
+ uint16 max_proto_ver
+ string player_name
+ bool send_full_item_meta
+init2
+ string lang
+join_mod_chan
+ string channel
+leave_mod_chan
+ string channel
+msg_mod_chan
+ string channel
+ string msg
+player_pos
+ PlayerPos pos
+got_blks
+ [][3]int16 blks
+deleted_blks
+ [][3]int16 blks
+inv_action
+ string action
+chat_msg
+ string msg
+fall_dmg
+ uint16 amount
+select_item
+ uint16 slot
+respawn
+interact
+ Interaction action
+ uint16 item_slot
+ PointedThing pointed
+ PlayerPos pos
+removed_sounds
+ []SoundID ids
+node_meta_fields
+ [3]int16 pos
+ string formname
+ []Field fields
+inv_fields
+ string formname
+ []Field fields
+req_media
+ []string filenames
+clt_ready
+ uint8 major
+ uint8 minor
+ uint8 patch
+ string version
+ uint16 formspec
+first_srp
+ []byte salt
+ []byte verifier
+ bool empty_passwd
+srp_bytes_a
+ []byte a
+ bool no_sha1
+srp_bytes_m
+ []byte m
diff --git a/spec/server/struct b/spec/server/struct
new file mode 100644
index 0000000..e971dbc
--- /dev/null
+++ b/spec/server/struct
@@ -0,0 +1,8 @@
+player_pos
+ [3]int32 pos100
+ [3]int32 vel100
+ int32 pitch100
+ int32 yaw100
+ Keys keys
+ uint8 fov80
+ uint8 wanted_range