disable throwing

This commit is contained in:
Nico 2021-03-18 20:07:03 +00:00
parent 48a5e67be4
commit b201be5655
1 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@
\ some of these values (member cost, device count) have two cells. \ some of these values (member cost, device count) have two cells.
\ the second cell is used to store if the value has changed or not. \ the second cell is used to store if the value has changed or not.
\ for flexibility, these all take an offset of the cell the flag is stored in. \ for flexibility, these all take an offset of the cell the flag is stored in, so multiple values can be before the flag.
\ this is useful as it means we only redraw the display if a relevant value has changed. \ this is useful as it means we only redraw the display if a relevant value has changed.
\ the word "changed" sets one of these values as being changed. \ the word "changed" sets one of these values as being changed.
: changed ( addr offset -- ) cells + -1 swap ! ; : changed ( addr offset -- ) cells + -1 swap ! ;
@ -116,14 +116,14 @@ S" you feel like throwing some stuff into the pool." set-message
page ; page ;
\ throw-device throws a device into the pool. \ throw-device throws a device into the pool.
: throw-device 1 devices +! devices 1 changed ; \ : throw-device 1 devices +! devices 1 changed ;
\ the word handle-input handles input every time around the game loop. \ the word handle-input handles input every time around the game loop.
: handle-input : handle-input
key? if key case key? if key case
[char] q of exit-game endof [char] q of exit-game endof
[char] h of hire-chat-member endof [char] h of hire-chat-member endof
[char] t of throw-device endof \ [char] t of throw-device endof
[char] D of debug-console endof [char] D of debug-console endof
endcase then ; endcase then ;
@ -158,7 +158,7 @@ S" you feel like throwing some stuff into the pool." set-message
\ draw-actions draws a list of the actions you've unlocked. \ draw-actions draws a list of the actions you've unlocked.
: draw-actions : draw-actions
1 4 at-xy 1 4 at-xy
." (t)hrow a device into the pool" cr 1 move-right \ ." (t)hrow a device into the pool" cr 1 move-right
draw-members cr 1 move-right draw-members cr 1 move-right
." (q)uit (without saving)" ; ." (q)uit (without saving)" ;