Event/run_event
var/run_state/run_state
New(var/run_state/run_state)
src.run_state = run_state
start
New(var/run_state/run_state)
..(run_state)
fire()
run_state.make_run()
cancel
New(var/run_state/run_state)
..(run_state)
fire()
run_state.cancel_run()
walk
New(var/run_state/run_state)
..(run_state)
fire()
run_state.make_walk()
run_state
var
client/m
Event/run_event/cancel/cancel_run
Event/run_event/start/make_run
Event/run_event/walk/make_walk
make_run_scheduled = 0
running = 0
New(var/client/c)
m = c
cancel_run = new(src)
make_run = new(src)
make_walk = new(src)
proc
cancel_run()
reset_state(0)
make_run()
reset_state(1)
m.mob.icon_state = "run"
make_walk()
reset_state(0)
m.mob.icon_state = null
moved()
if(!running)
if(!make_run_scheduled)
run_scheduler.schedule(make_run, 20)
make_run_scheduled = 1
run_scheduler.reschedule(cancel_run, 5)
else
run_scheduler.reschedule(make_walk, 10)
reset_state(var/running)
run_scheduler.cancel(make_run)
run_scheduler.cancel(cancel_run)
run_scheduler.cancel(make_walk)
make_run_scheduled = 0
src.running = running
client
Move()
src.run_state.moved()
if (!src.run_state.running)
sleep(3)
..()
Problem description: I have disabled my diagonal movements (northwest, northeast, etc) and want to allow the combination of keys to enable them. EX: North + West = northwest movement, but I have no roundabout thought on how to enable that with the current running system in play.