Resolve SteamIDs of Chat and Kill messages + some event loop changes#157
Merged
Resolve SteamIDs of Chat and Kill messages + some event loop changes#157
Conversation
Bash-09
commented
Jun 12, 2024
Comment on lines
+82
to
+86
| #[serde(serialize_with = "serialize_maybe_steamid_as_string")] | ||
| pub killer_steamid: Option<SteamID>, | ||
| pub victim_name: String, | ||
| pub victim_steamid: Option<String>, | ||
| #[serde(serialize_with = "serialize_maybe_steamid_as_string")] | ||
| pub victim_steamid: Option<SteamID>, |
Contributor
Author
There was a problem hiding this comment.
@lili7h Can you please check that this doesn't mess up the format you've got for the chat and kill SSE broadcasts?
Contributor
There was a problem hiding this comment.
(sse-sub-py3.11) PS F:\projects\mac\http-sse-event-viewer> python .\sse_sub\main.py
{"type":"ChatMessage","uuid":"8319d9f9-8502-47fc-8182-610cba47d174","time":"2024-06-20T11:51:37.442910500Z","event":{"player_name":"werewolf paws","steamid":"76561198071482715","message":"test"}}
{"type":"PlayerKill","uuid":"18ebb893-5d7f-4246-9c1f-297d3771c99a","time":"2024-06-20T11:51:59.143187700Z","event":{"killer_name":"The Administrator","killer_steamid":null,"victim_name":"SMELLY UNFORTUNATE","victim_steamid":null,"weapon":"tf_projectile_rocket","crit":false}}
{"type":"PlayerKill","uuid":"0f60b07b-d917-4f0c-b5f6-e2b706741641","time":"2024-06-20T11:52:00.073279900Z","event":{"killer_name":"werewolf paws","killer_steamid":"76561198071482715","victim_name":"A Professional With Standards","victim_steamid":null,"weapon":"pistol_scout","crit":false}}
{"type":"PlayerKill","uuid":"a8e7b4a6-1c14-42bc-8cd2-933f44623353","time":"2024-06-20T11:52:02.491183600Z","event":{"killer_name":"WITCH","killer_steamid":null,"victim_name":"Glorified Toaster with Legs","victim_steamid":null,"weapon":"tf_projectile_rocket","crit":true}}
{"type":"PlayerKill","uuid":"a6c63858-1f73-4292-bfa7-a254d57213e3","time":"2024-06-20T11:52:05.870727300Z","event":{"killer_name":"WITCH","killer_steamid":null,"victim_name":"Poopy Joe","victim_steamid":null,"weapon":"tf_projectile_rocket","crit":false}}
{"type":"PlayerKill","uuid":"8a6c1ba2-de4a-4643-966d-bae6b10f8cc8","time":"2024-06-20T11:52:05.870824800Z","event":{"killer_name":"The Administrator","killer_steamid":null,"victim_name":"WITCH","victim_steamid":null,"weapon":"world","crit":false}}
{"type":"PlayerKill","uuid":"2e305521-37d2-44e0-a60e-58fc46d47898","time":"2024-06-20T11:52:06.427960700Z","event":{"killer_name":"Ribs Grow Back","killer_steamid":null,"victim_name":"Archimedes!","victim_steamid":null,"weapon":"minigun","crit":false}}
{"type":"PlayerKill","uuid":"3b71ba0c-c7d3-4ced-8848-ec592bc47d2f","time":"2024-06-20T11:52:07.171984100Z","event":{"killer_name":"Kill Me","killer_steamid":null,"victim_name":"Chucklenuts","victim_steamid":null,"weapon":"pistol_scout","crit":false}}
{"type":"PlayerKill","uuid":"12e6aadc-0d5f-4e17-ba9f-7b82011c822b","time":"2024-06-20T11:52:13.960914600Z","event":{"killer_name":"Ribs Grow Back","killer_steamid":null,"victim_name":"The Administrator","victim_steamid":null,"weapon":"minigun","crit":false}}
{"type":"PlayerKill","uuid":"ef22439e-b8c7-424d-be3c-15a9a5f04e11","time":"2024-06-20T11:52:15.603965200Z","event":{"killer_name":"It's Filthy in There!","killer_steamid":null,"victim_name":"Ribs Grow Back","victim_steamid":null,"weapon":"tf_projectile_pipe","crit":false}}
{"type":"PlayerKill","uuid":"b9a2f4b2-cd0e-4882-959e-fe969cd5f340","time":"2024-06-20T11:52:18.642002600Z","event":{"killer_name":"werewolf paws","killer_steamid":"76561198071482715","victim_name":"Kill Me","victim_steamid":null,"weapon":"force_a_nature","crit":false}}
{"type":"PlayerKill","uuid":"06d844be-1689-47c9-9b42-aad26af5cbf8","time":"2024-06-20T11:52:22.765010700Z","event":{"killer_name":"werewolf paws","killer_steamid":"76561198071482715","victim_name":"CryBaby","victim_steamid":null,"weapon":"pistol_scout","crit":false}}
{"type":"PlayerKill","uuid":"849befcb-1931-4d42-aa73-0cd757b264a3","time":"2024-06-20T11:52:22.888971400Z","event":{"killer_name":"Mentlegen","killer_steamid":null,"victim_name":"It's Filthy in There!","victim_steamid":null,"weapon":"world","crit":false}}
{"type":"PlayerKill","uuid":"b9958b63-046f-4cc4-9060-5708a44d5bd4","time":"2024-06-20T11:52:33.863051700Z","event":{"killer_name":"SMELLY UNFORTUNATE","killer_steamid":null,"victim_name":"A Professional With Standards","victim_steamid":null,"weapon":"obj_sentrygun","crit":false}}
{"type":"PlayerKill","uuid":"1cd817a3-5e05-42a2-936e-944555cd520b","time":"2024-06-20T11:52:35.598970400Z","event":{"killer_name":"Mentlegen","killer_steamid":null,"victim_name":"Glorified Toaster with Legs","victim_steamid":null,"weapon":"tf_projectile_rocket","crit":false}}
{"type":"PlayerKill","uuid":"b7fd7829-afe2-4127-be61-727eae76ab21","time":"2024-06-20T11:52:36.590947400Z","event":{"killer_name":"werewolf paws","killer_steamid":"76561198071482715","victim_name":"Archimedes!","victim_steamid":null,"weapon":"nonnonviolent_protest","crit":false}}
{"type":"PlayerKill","uuid":"7591d7e2-342a-4355-b2a5-298fffbf7267","time":"2024-06-20T11:52:37.645047600Z","event":{"killer_name":"Poopy Joe","killer_steamid":null,"victim_name":"werewolf paws","victim_steamid":"76561198071482715","weapon":"syringegun_medic","crit":false}}
Looks good to me, noting that testing with bots kinda sucks because they dont have steam IDs, but mine got in there just fine!
lili7h
approved these changes
Jun 20, 2024
Contributor
lili7h
left a comment
There was a problem hiding this comment.
Seems to not be impacting SSE behaviour in any way. LGTM 👍
added 4 commits
June 22, 2024 14:47
2fb5f5b to
8caaf0c
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
StateUpdater->Message,HandlerStruct->MessageHandler)Message, now all types that are used as messages must implement it explicitly (couldn't find a nice way to work around this :c )