finish basic access control system

This commit is contained in:
2025-10-09 14:09:47 +08:00
parent d3cbc15450
commit 11d138751a
32 changed files with 4687 additions and 345 deletions

25
src/lib/ccTime.ts Normal file
View File

@@ -0,0 +1,25 @@
class ccDate {
private _timestamp: number;
constructor() {
this._timestamp = os.time(os.date("*t"));
}
public static toDateTable(timestamp: number): LuaDate {
return os.date("*t", timestamp) as LuaDate;
}
public toDateTable(): LuaDate {
return os.date("*t", this._timestamp) as LuaDate;
}
public static toTimestamp(date: LuaDate): number {
return os.time(date);
}
public toTimestamp(): number {
return this._timestamp;
}
}
export { ccDate };