Skip to content

Commit

Permalink
README updates, changed day/night toggle key
Browse files Browse the repository at this point in the history
  • Loading branch information
cxreiff committed Jul 31, 2024
1 parent 33986c0 commit 49cf49f
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 19 deletions.
31 changes: 19 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,13 @@ jobs:
- name: download all packages
uses: actions/download-artifact@v4
with:
path: bin
path: tars

- name: folders for butler
run: |
for channel in $(ls tars); do
mkdir "upload/${channel%%.*}"; mv ${channel} "upload/${channel%%.*}"
done
- name: install butler
run: |
Expand All @@ -150,15 +156,16 @@ jobs:
chmod +x butler
./butler -V
- name: upload all packages to itch.io
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }}
run: |
for channel in $(ls bin); do
./butler push \
--fix-permissions \
--userversion='${{ env.VERSION }}' \
bin/"${channel}"/* \
'${{ env.ITCH_TARGET }}':"${channel#package-}"
done
# SKIPPING DURING JAM JUDGING PERIOD
# - name: upload all packages to itch.io
# env:
# BUTLER_API_KEY: ${{ secrets.BUTLER_CREDENTIALS }}
# run: |
# for channel in $(ls upload); do
# ./butler push \
# --fix-permissions \
# --userversion='${{ env.VERSION }}' \
# upload/"${channel}" \
# '${{ env.ITCH_TARGET }}':"${channel#package-}"
# done

2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "lifecycler"
description = "Bevy Game Jam #5 submission. Terminal aquarium."
version = "0.2.4"
version = "0.2.5"
edition = "2021"
license = "MIT OR Apache-2.0 OR CC0-1.0"
authors = ["cxreiff <[email protected]>"]
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,14 @@ lifecycler
| | |
|--------------------|----------------------------|
| Left Click or Drag | Dispense a food pellet. |
| Right click | $80 |
| Space Bar | Toggle day/night modes. |
| M | Mute/unmute sound effects. |
| Q | Quit the game. |

## note

The resolution is determined by the character-wise dimensions of your terminal- so zoom out in your terminal for more detail, zoom in for a more pixelated look.

## manual installation

Alternatively you can manually download an executable from the [itch.io page](https://cxreiff.itch.io/lifecycler) or [github releases](https://github.com/cxreiff/lifecycler/releases).
Expand Down
9 changes: 5 additions & 4 deletions src/input.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fn handle_keyboard_system(
mut ratatui_events: EventReader<KeyEvent>,
mut exit: EventWriter<AppExit>,
mut flags: ResMut<Flags>,
mut daylight_event: EventWriter<DaylightEvent>,
) {
for key_event in ratatui_events.read() {
match key_event.kind {
Expand All @@ -37,6 +38,10 @@ fn handle_keyboard_system(
flags.muted = !flags.muted;
}

KeyCode::Char(' ') => {
daylight_event.send_default();
}

_ => {}
},
_ => {}
Expand All @@ -48,7 +53,6 @@ fn handle_mouse_system(
ratatui: Res<RatatuiContext>,
mut events: EventReader<MouseEvent>,
mut pellet_event: EventWriter<PelletEvent>,
mut daylight_event: EventWriter<DaylightEvent>,
mut drag_threshold: ResMut<DragThreshold>,
camera: Query<&Transform, With<Camera>>,
) {
Expand All @@ -72,9 +76,6 @@ fn handle_mouse_system(
**drag_threshold -= 1;
}
}
MouseEventKind::Down(MouseButton::Right) => {
daylight_event.send_default();
}
_ => {}
}
}
Expand Down

0 comments on commit 49cf49f

Please sign in to comment.