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

Redo mouse/keyboard logic #367

Closed
20 tasks done
stefanhendriks opened this issue Dec 8, 2021 · 0 comments
Closed
20 tasks done

Redo mouse/keyboard logic #367

stefanhendriks opened this issue Dec 8, 2021 · 0 comments
Labels
improvement Quality of life or general improvement of a game mechanic technical A purely technical task which does not give the player anything gameplay wise.

Comments

@stefanhendriks
Copy link
Owner

stefanhendriks commented Dec 8, 2021

(originally: Holding CTRL and pressing somewhere for rally-point simply no longer works.)

Changes for #290 broke setting rally-point behavior. While trying to fix that it became obvious that event-driven vs 'everything in one big mess' driven bite each other. In other words, it is best to redo this using the event-driven way.

TODO

  • select structure
  • select structure while having a group of units selected
  • deselect structure (won't do)
  • select / deselect unit (single click)
  • select multiple units (box-selecting) from "normal" mouse state
  • select multiple units (box-selecting) from "units already selected" mouse state
  • repair state
    • repair unit (press R to switch to that state, press R again, or right-mouse click to leave Repair state)
    • repair structure
  • add units to selection when holding SHIFT
  • place structure (mouse state)
  • deploy super weapon (mouse state) (deferred to Redo "Select target" mouse/keyboard logic #399)
  • force attack (hold key: CTRL)
  • force move (?)
  • set rally-point (with right-mouse button instead of CTRL-click)
  • react to keypress (key observer, like mouse)?
    • create groups (CTRL-1/5)
    • add to group (hold SHIFT)
    • select units by group nr
    • (required: report all keys pressed, or held for event, so that we can know if CTRL-1 is pressed for instance))
@stefanhendriks stefanhendriks added the playtesting A bug or task related to playtesting label Dec 8, 2021
stefanhendriks added a commit that referenced this issue Dec 22, 2021
- the move mouse logic determines the mouse tile
- the click logic then depends on the mouse tile to know what to do
- this fixes setting rally point, for #367
- while at it, might as well untangle all the things?
stefanhendriks added a commit that referenced this issue Dec 23, 2021
- this makes our lives easier for sure
- bonus for #367
stefanhendriks added a commit that referenced this issue Dec 25, 2021
- does not select units within the box yet, but it does work via a "Normal mouse state" object.
- while working on #367
stefanhendriks added a commit that referenced this issue Dec 26, 2021
- move units
- repair units, by sending them to repair pad or by holding R and click on unit
- set rally point
- select units with boxselect, while having units selected
- while working on #367
@stefanhendriks stefanhendriks changed the title Set rally-point broken Redo mouse/keyboard logic Dec 27, 2021
@stefanhendriks stefanhendriks added technical A purely technical task which does not give the player anything gameplay wise. improvement Quality of life or general improvement of a game mechanic and removed playtesting A bug or task related to playtesting labels Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Quality of life or general improvement of a game mechanic technical A purely technical task which does not give the player anything gameplay wise.
Projects
Status: Version 0.7.0 (Released)
Development

No branches or pull requests

1 participant