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

Index through chat messages and commands using the arrow keys. #172

Merged
merged 5 commits into from
Aug 10, 2023

Conversation

jmshgs
Copy link
Contributor

@jmshgs jmshgs commented Aug 8, 2023

Description

You can now index through chat messages and commands using the arrow keys. Fixes #160.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation comments
  • My changes generate no new warnings

Copy link
Owner

@stackotter stackotter left a comment

Choose a reason for hiding this comment

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

The logic looks fine to me for the most part, I've just left a bunch of suggestions to help you fix up the code's handling of optionals. By the end of applying all the suggestions you should be able to get rid of all of the force unwraps! (and the code will be much simpler too). Feel free to ask about any of the suggestions in the Discord if they're confusing 👍

Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Copy link
Owner

@stackotter stackotter left a comment

Choose a reason for hiding this comment

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

Just a few more suggestions to help you improve at handling optionals, I think you'll find the tip at line 175 very useful :)

Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
Sources/Core/Sources/ECS/Systems/PlayerInputSystem.swift Outdated Show resolved Hide resolved
jxhug added 2 commits August 9, 2023 21:42
?? IS SO USEFUL HAHA

Signed-off-by: jxhug <me@jxhug.me>
Copy link
Owner

@stackotter stackotter left a comment

Choose a reason for hiding this comment

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

Looks great to me! I'll just quickly test it out before merging.

@stackotter
Copy link
Owner

It works 🎉

@stackotter stackotter merged commit 535302b into stackotter:main Aug 10, 2023
5 checks passed
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.

Implement remaining chat input handling
2 participants