Compare commits

..

3 Commits

Author SHA1 Message Date
03e9d989f8 make scheduler into a crate feature 2024-10-16 20:55:42 -07:00
5ddb3dacfd run script as a thread 2024-10-16 20:55:42 -07:00
8950bcbf02 game ticks api 2024-10-16 20:55:42 -07:00

View File

@ -110,7 +110,7 @@ impl Runnable<'_>{
if let Some(threads)=scheduler_mut(&self.lua,|scheduler|Ok(scheduler.tick_threads()))?{
for thread in threads{
//TODO: return dt and total run time
let result=thread.resume::<mlua::MultiValue>((1.0/20.0,0.0))
let result=thread.resume::<mlua::MultiValue>((1.0/30.0,0.0))
.map_err(|error|Error::Lua{source:"source unavailable".to_owned(),error});
match result{
Ok(_)=>(),