still wip modularisation, game somehow boots

This commit is contained in:
minjaesong
2018-06-21 17:33:22 +09:00
parent 391cbcff34
commit ac09fa50e2
266 changed files with 2409 additions and 1122 deletions

View File

@@ -2,6 +2,7 @@ package net.torvald.terrarum.itemproperties
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.gameactors.ai.toLua
import net.torvald.terrarum.modulebasegame.Ingame
import org.luaj.vm2.Globals
import org.luaj.vm2.LuaTable
import org.luaj.vm2.LuaValue
@@ -43,13 +44,13 @@ class ItemEffectsLuaAPI(g: Globals) {
class StrikeEarth : ThreeArgFunction() {
override fun call(x: LuaValue, y: LuaValue, power: LuaValue): LuaValue {
Terrarum.ingame!!.world.inflictTerrainDamage(x.checkint(), y.checkint(), power.checkdouble())
(Terrarum.ingame!! as Ingame).world.inflictTerrainDamage(x.checkint(), y.checkint(), power.checkdouble())
return LuaValue.NONE
}
}
class StrikeWall : ThreeArgFunction() {
override fun call(x: LuaValue, y: LuaValue, power: LuaValue): LuaValue {
Terrarum.ingame!!.world.inflictWallDamage(x.checkint(), y.checkint(), power.checkdouble())
(Terrarum.ingame!! as Ingame).world.inflictWallDamage(x.checkint(), y.checkint(), power.checkdouble())
return LuaValue.NONE
}
}