mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-17 14:04:05 +09:00
video card wip for virtual computer
Former-commit-id: 3c71eb0e8614e92e63fd3b29906a3cfd311c916f Former-commit-id: 3472d6eb7d03a29bfd859e9207f76aeb23cef89b
This commit is contained in:
@@ -84,14 +84,6 @@ internal class AILuaAPI(g: Globals, actor: ActorWithSprite) {
|
||||
return t
|
||||
}
|
||||
|
||||
fun Double.toLua() = LuaValue.valueOf(this)
|
||||
fun Int.toLua() = LuaValue.valueOf(this)
|
||||
fun String.toLua() = LuaValue.valueOf(this)
|
||||
fun Double?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun Int?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun String?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun Boolean.toInt() = if (this) 1 else 0
|
||||
|
||||
operator fun LuaTable.set(index: Int, value: Int) { this[index] = value.toLua() }
|
||||
}
|
||||
|
||||
@@ -405,3 +397,11 @@ internal class AILuaAPI(g: Globals, actor: ActorWithSprite) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun Double.toLua() = LuaValue.valueOf(this)
|
||||
fun Int.toLua() = LuaValue.valueOf(this)
|
||||
fun String.toLua() = LuaValue.valueOf(this)
|
||||
fun Double?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun Int?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun String?.toLua() = if (this == null) LuaValue.NIL else this.toLua()
|
||||
fun Boolean.toInt() = if (this) 1 else 0
|
||||
|
||||
Reference in New Issue
Block a user