mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-09 18:14:06 +09:00
LibGDX, here I am.
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/LatinExtA_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/LatinExtA_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/LatinExtB_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/LatinExtB_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_bulgarian_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_bulgarian_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_serbian_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_serbian_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/cyrilic_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/hangul_johab.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/hayeren_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/hayeren_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/insular_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/insular_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/ipa_ext_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/ipa_ext_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/kartuli_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/kartuli_variable.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/puae000-e0ff.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/fonts/terrarum-sans-bitmap/thai_variable.tga
LFS
Normal file
BIN
assets/graphics/fonts/terrarum-sans-bitmap/thai_variable.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 123 B |
Binary file not shown.
BIN
assets/graphics/gui/message_black.tga
LFS
Normal file
BIN
assets/graphics/gui/message_black.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/graphics/gui/message_white.tga
LFS
Normal file
BIN
assets/graphics/gui/message_white.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/gui/tooltip_black.tga
LFS
Normal file
BIN
assets/graphics/gui/tooltip_black.tga
LFS
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
assets/graphics/gui/tooltip_white.tga
LFS
Normal file
BIN
assets/graphics/gui/tooltip_white.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/ortho_line_tex_2px.tga
LFS
Normal file
BIN
assets/graphics/ortho_line_tex_2px.tga
LFS
Normal file
Binary file not shown.
BIN
assets/graphics/ortho_line_tex_3px.tga
LFS
Normal file
BIN
assets/graphics/ortho_line_tex_3px.tga
LFS
Normal file
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
|
||||
|
||||
import net.torvald.point.Point2d
|
||||
import net.torvald.terrarum.Terrarum
|
||||
import net.torvald.terrarum.TerrarumGDX
|
||||
import net.torvald.terrarum.gameactors.AVKey
|
||||
import net.torvald.terrarum.gameactors.ActorWithPhysics
|
||||
import net.torvald.terrarum.itemproperties.Calculate
|
||||
@@ -14,7 +14,6 @@ import net.torvald.terrarum.itemproperties.Material
|
||||
import net.torvald.terrarum.blockproperties.Block
|
||||
// following two are NOT UNUSED!
|
||||
import org.jetbrains.annotations.NotNull
|
||||
import org.newdawn.slick.GameContainer
|
||||
|
||||
|
||||
|
||||
@@ -56,42 +55,42 @@ class TestPick extends GameItem {
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean primaryUse(@NotNull GameContainer gc, int delta) {
|
||||
int mouseTileX = Terrarum.getMouseTileX()
|
||||
int mouseTileY = Terrarum.getMouseTileY()
|
||||
boolean primaryUse(float delta) {
|
||||
int mouseTileX = TerrarumGdx.getMouseTileX()
|
||||
int mouseTileY = TerrarumGdx.getMouseTileY()
|
||||
|
||||
def mousePoint = new Point2d(mouseTileX, mouseTileY)
|
||||
def actorvalue = Terrarum.ingame.player.actorValue
|
||||
def actorvalue = TerrarumGDX.ingame.player.actorValue
|
||||
|
||||
using = true
|
||||
|
||||
// linear search filter (check for intersection with tilewise mouse point and tilewise hitbox)
|
||||
// return false if hitting actors
|
||||
Terrarum.ingame.actorContainer.forEach({
|
||||
TerrarumGDX.ingame.actorContainer.forEach({
|
||||
if (it instanceof ActorWithPhysics && it.tilewiseHitbox.intersects(mousePoint))
|
||||
return false
|
||||
})
|
||||
|
||||
// return false if here's no tile
|
||||
if (Block.AIR == Terrarum.ingame.world.getTileFromTerrain(mouseTileX, mouseTileY))
|
||||
if (Block.AIR == TerrarumGDX.ingame.world.getTileFromTerrain(mouseTileX, mouseTileY))
|
||||
return false
|
||||
|
||||
// filter passed, do the job
|
||||
double swingDmgToFrameDmg = delta.toDouble() / actorvalue.getAsDouble(AVKey.ACTION_INTERVAL)
|
||||
|
||||
Terrarum.ingame.world.inflictTerrainDamage(
|
||||
TerrarumGDX.ingame.world.inflictTerrainDamage(
|
||||
mouseTileX, mouseTileY,
|
||||
Calculate.pickaxePower(Terrarum.ingame.player, material) * swingDmgToFrameDmg
|
||||
Calculate.pickaxePower(TerrarumGDX.ingame.player, material) * swingDmgToFrameDmg
|
||||
)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
@Override
|
||||
boolean endPrimaryUse(@NotNull GameContainer gc, int delta) {
|
||||
boolean endPrimaryUse(float delta) {
|
||||
using = false
|
||||
// reset action timer to zero
|
||||
Terrarum.ingame.player.actorValue.set(AVKey.__ACTION_TIMER, 0.0)
|
||||
TerrarumGDX.ingame.player.actorValue.set(AVKey.__ACTION_TIMER, 0.0)
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,3 +1,12 @@
|
||||
## Note to modders
|
||||
|
||||
- You DON'T just edit built-in modules; you must make your own module even if you want to replace defaults.
|
||||
|
||||
### To devs
|
||||
|
||||
- make that happen :\
|
||||
|
||||
|
||||
## Register modules
|
||||
|
||||
Only the modules that enlisted in LoadOrder.csv will be loaded.
|
||||
|
||||
Reference in New Issue
Block a user