Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Chat History and Server History #100

Closed
wants to merge 3 commits into from
Closed

Added Chat History and Server History #100

wants to merge 3 commits into from

Conversation

vulcan-dev
Copy link
Contributor

@vulcan-dev vulcan-dev commented Aug 2, 2021

I have added the server history tab back, along with that I also added chat history (use up and down arrows to cycle through previous messages you sent). There is also a clear button to clear the chat, can be useful when it's full.

I also added some checks for network because if you were to reload lua, there was a good chance this wouldn't load and you would just get spammed with errors. You would need to restart the game to fix it but now you can just reload lua twice via (CTRL + L) and you're good to go.

The UI colour issue when docking is also somewhat fixed. There is not full fix for this because BeamNG haven't updated it but what me and Carlen done was add some checks to see if the window is docked, if it is docked then don't apply any transparency.

Copy link
Contributor

@WhiteHusky WhiteHusky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cargo.lock needs to be removed. Not my call, but is what HB typically wants. He might have a clear reason about it but I'm not sure.

Also you touched some of the rust files, which is fine, but wasn't declared in the PR. Personally I'd make separate PRs for atomic reasons since it looks like you just did some stylistic changes, but this is fine for the moment. Okay it looks like a botched merge. I'll send over a incantation to help fix your history before you do your next push.

.dccache Outdated
@@ -0,0 +1 @@
[{}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove these files. Looks like residual files from a extension

@@ -0,0 +1 @@
[{}]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto.

Comment on lines 266 to 268

info!("Using default audio output device: {}", device.name().unwrap());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate message

@@ -55,6 +55,7 @@ impl crate::Server {

pub async fn set_current_vehicle(&mut self, client_id: u32, vehicle_id: u32) {
let connection = self.connections.get_mut(&client_id).unwrap();
info!("set_current_vehicle vehicle = {}", vehicle_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like a forgotten debug message.

@WhiteHusky
Copy link
Contributor

@vulcan-dev

There is not full fix for this because BeamNG haven't updated it [...]

For a bit of clarity, the source of the issue is here, ocornut/imgui#2700. For brevity, imgui doesn't support background colors for docked windows or misbehaves like it does with opacity. It's a upstream issue that has to be fixed and, in some point and time, be pulled in by BeamNG itself.

vulcan-dev and others added 2 commits August 2, 2021 13:04
Added chat history (use up and down arrows)
Added a clear button to clear chat
Semi-fixed reloading the mod, before you would have to restart the game but now you just have to reload lua twice

Co-authored-by: Carlen White <[email protected]>
@WhiteHusky
Copy link
Contributor

Sent a fixed history to @vulcan-dev over Discord.

@TheHellBox
Copy link
Owner

Chat history is useless in my opinion, but server history is a nice feature. Seperate pull request into chat history and server history, or just remove chat history from this one

@TheHellBox
Copy link
Owner

Also, keep your pull requests atomized. Some of the changes are controversial

@WhiteHusky
Copy link
Contributor

Chat history is useless in my opinion

I disagree. For just regular chatting sure, but it's useful for cases when someone needs to re-run a / command to the server or correct a long one.

Also, keep your pull requests atomized. Some of the changes are controversial

But for atomizing, yeah. Might be a good idea to keep the two separate for discussion purposes.

@vulcan-dev
Copy link
Contributor Author

Chat history is useless in my opinion, but server history is a nice feature. Seperate pull request into chat history and server history, or just remove chat history from this one

If you really want I can but me and a few others have wanted this for a long time, especially on my server where a lot of it is command based (I now have a UI but still aroung 80 or so commands). If someone enters an incorrect command they can't see their mistake, or say they want to do the command again then they can just press the up arrow.

It's not much to maintain, it's just an extra feature that is really helpful but as I said, if you really want this gone then I can.

@InsDel2113
Copy link

I personally like the idea of chat history, there's configuration details that people could put in there for vehicles and stuff.

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants