reconstruct: autocraft algorithm; feature: rust-style result

reconstruct:
- move queue and sortedarray to dir datatype
- move semaphore and readwritelock to dir mutex
- reconstruct autocraft search algorithm, use hashmap instead of forloop
- adjust some code style
feature:
- add rust-style result lib
This commit is contained in:
2025-10-26 10:06:50 +08:00
parent ac70e1acd3
commit 119bc1997a
13 changed files with 1077 additions and 108 deletions

View File

@@ -0,0 +1,11 @@
export function toString(val: unknown): string {
let value = String(val);
if (value === "[object Object]") {
try {
value = textutils.serialize(val as object);
} catch {
return "";
}
}
return value;
}