2019-03-09 23:49:45 +00:00
|
|
|
( P E T E )
|
|
|
|
|
2019-03-10 00:59:52 +00:00
|
|
|
13 8 N ' {car} defentity car
|
2019-03-09 23:49:45 +00:00
|
|
|
|
2019-03-10 00:59:52 +00:00
|
|
|
car :touch
|
|
|
|
1 player.state DRIVING f!
|
|
|
|
car entity>pos player entity.pos!
|
2019-03-09 23:49:45 +00:00
|
|
|
;entity
|
|
|
|
|
|
|
|
:noname
|
2019-03-10 00:59:52 +00:00
|
|
|
:| player yield
|
|
|
|
player.driving? not if car yield then
|
|
|
|
0 |; ' entities redefine
|
2019-03-09 23:49:45 +00:00
|
|
|
|
2019-03-10 00:59:52 +00:00
|
|
|
( TODO: DSL for touch events? )
|
|
|
|
:| 2dup S leaving? player.driving? not and if
|
|
|
|
pete say" It's too far to walk to town." 1 else
|
|
|
|
2dup 12 7 2= if
|
|
|
|
player.driving? not if pete say" TODO: Go home" then 1
|
|
|
|
else 0 then then >rot drop drop
|
|
|
|
|; ' player-touch redefine
|
2019-03-09 23:49:45 +00:00
|
|
|
s" pete.map" load-map
|
|
|
|
; ' onload redefine
|
|
|
|
|