1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use ;
// // This won't be able to handle includes.
// pub struct LuaProcess;
// impl Process for LuaProcess {
// type Settings = ();
// type OutputLoader = ScriptAssetLoader;
// async fn process(
// &self,
// context: &mut ProcessContext<'_>,
// meta: AssetMeta<(), Self>,
// writer: &mut bevy::asset::io::Writer,
// ) -> Result<<Self::OutputLoader as bevy::asset::AssetLoader>::Settings, ProcessError> {
// let mut code = std::str::from_utf8(context.asset_bytes()).unwrap();
// // dbg!(1);
// // #[cfg(feature = "pico8-to-lua")]
// // {
// // if context.path().path().extension().map(|x| x == "p8lua").unwrap_or(false) {
// // dbg!(2);
// // if let Some(patched_code) = pico8::translate_pico8_to_lua(&code, load_context).await? {
// // dbg!(3);
// // code = patched_code;
// // }
// // }
// // }
// warn!("WHAT");
// dbg!("processing");
// writer.write_all(code.as_bytes()).await.unwrap();
// Ok(())
// }
// }