mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-18 22:44:04 +09:00
colorutil update, some code cleanup
Former-commit-id: 47b13e7e899dc9151f7a1ae71977ed8d4b403345 Former-commit-id: 136f9c787b76aec75d76535891cf264170bd3b04
This commit is contained in:
@@ -274,8 +274,8 @@ open class ActorWithBody : Actor() {
|
||||
/**
|
||||
* @param w
|
||||
* @param h
|
||||
* @param tx +: translate drawn sprite to LEFT.
|
||||
* @param ty +: translate drawn sprite to DOWN.
|
||||
* @param tx positive: translate drawn sprite to LEFT.
|
||||
* @param ty positive: translate drawn sprite to DOWN.
|
||||
* @see ActorWithBody.drawBody
|
||||
* @see ActorWithBody.drawGlow
|
||||
*/
|
||||
@@ -1180,6 +1180,7 @@ open class ActorWithBody : Actor() {
|
||||
|
||||
fun Double.floorInt() = Math.floor(this).toInt()
|
||||
fun Float.floorInt() = FastMath.floor(this)
|
||||
fun Float.floor() = FastMath.floor(this).toFloat()
|
||||
fun Float.ceilInt() = FastMath.ceil(this)
|
||||
fun Double.round() = Math.round(this).toDouble()
|
||||
fun Double.floor() = Math.floor(this)
|
||||
|
||||
@@ -232,6 +232,9 @@ internal class AILuaAPI(g: Globals, actor: ActorWithBody) {
|
||||
if (radius < 0) {
|
||||
return LuaValue.NONE
|
||||
}
|
||||
else if (radius > 8) {
|
||||
throw IllegalArgumentException("Radius too large -- must be 8 or less")
|
||||
}
|
||||
else {
|
||||
val luatable = LuaTable()
|
||||
val feetTilePos = actor.feetPosTile
|
||||
|
||||
Reference in New Issue
Block a user