workign on the modloader in progress

This commit is contained in:
minjaesong
2021-12-03 16:39:46 +09:00
parent e5a42551e5
commit ebc762e90a
78 changed files with 483 additions and 356 deletions

View File

@@ -31,18 +31,18 @@
"85";"85";"BLOCK_SAND_GREEN";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"SAND";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"96";"96";"BLOCK_GRAVEL";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"GRVL";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"97";"97";"BLOCK_GRAVEL_GREY";"0.1252";"0.1252";"0.1252";"0.1252";"24";"2400";"GRVL";"1";"0";"0";"0";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"112";"112";"BLOCK_ORE_MALACHITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"113";"113";"BLOCK_ORE_HEMATITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"114";"114";"BLOCK_ORE_NATURAL_GOLD";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"115";"115";"BLOCK_ORE_NATURAL_SILVER";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"116";"116";"BLOCK_ORE_RUTILE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"117";"117";"BLOCK_ORE_AURICHALCUMITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"128";"128";"BLOCK_GEM_RUBY";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"129";"129";"BLOCK_GEM_EMERALD";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"130";"130";"BLOCK_GEM_SAPPHIRE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"131";"131";"BLOCK_GEM_TOPAZ";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"132";"132";"BLOCK_GEM_DIAMOND";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"133";"133";"BLOCK_GEM_AMETHYST";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"ROCK";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"112";"112";"BLOCK_ORE_MALACHITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"113";"113";"BLOCK_ORE_HEMATITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"114";"114";"BLOCK_ORE_NATURAL_GOLD";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"115";"115";"BLOCK_ORE_NATURAL_SILVER";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"116";"116";"BLOCK_ORE_RUTILE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"117";"117";"BLOCK_ORE_AURICHALCUMITE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OORE";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"128";"128";"BLOCK_GEM_RUBY";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"129";"129";"BLOCK_GEM_EMERALD";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"130";"130";"BLOCK_GEM_SAPPHIRE";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"131";"131";"BLOCK_GEM_TOPAZ";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"132";"132";"BLOCK_GEM_DIAMOND";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"133";"133";"BLOCK_GEM_AMETHYST";"0.1252";"0.1252";"0.1252";"0.1252";"48";"2400";"OGEM";"1";"0";"0";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"144";"144";"BLOCK_SNOW";"0.1252";"0.1252";"0.1252";"0.1252";"24";"500";"SNOW";"1";"0";"1";"N/A";"0";"4";"16";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"145";"0";"BLOCK_ICE_FRAGILE";"0.0508";"0.0508";"0.0508";"0.0508";"5";"930";"ICEI";"1";"0";"0";"N/A";"0";"0";"4";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
"146";"146";"BLOCK_ICE_NATURAL";"0.1016";"0.1016";"0.1016";"0.1016";"35";"930";"ICEI";"1";"0";"1";"N/A";"0";"0";"4";"0.0000";"0.0000";"0.0000";"0.0000";"N/A";"N/A";"0.0"
1 id drop name shdr shdg shdb shduv str dsty mate solid plat wall grav dlfn fv fr lumr lumg lumb lumuv colour vscs refl
31 85 85 BLOCK_SAND_GREEN 0.1252 0.1252 0.1252 0.1252 24 2400 SAND 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
32 96 96 BLOCK_GRAVEL 0.1252 0.1252 0.1252 0.1252 24 2400 GRVL 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
33 97 97 BLOCK_GRAVEL_GREY 0.1252 0.1252 0.1252 0.1252 24 2400 GRVL 1 0 0 0 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
34 112 112 BLOCK_ORE_MALACHITE 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
35 113 113 BLOCK_ORE_HEMATITE 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
36 114 114 BLOCK_ORE_NATURAL_GOLD 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
37 115 115 BLOCK_ORE_NATURAL_SILVER 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
38 116 116 BLOCK_ORE_RUTILE 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
39 117 117 BLOCK_ORE_AURICHALCUMITE 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OORE 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
40 128 128 BLOCK_GEM_RUBY 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
41 129 129 BLOCK_GEM_EMERALD 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
42 130 130 BLOCK_GEM_SAPPHIRE 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
43 131 131 BLOCK_GEM_TOPAZ 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
44 132 132 BLOCK_GEM_DIAMOND 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
45 133 133 BLOCK_GEM_AMETHYST 0.1252 0.1252 0.1252 0.1252 48 2400 ROCK OGEM 1 0 0 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
46 144 144 BLOCK_SNOW 0.1252 0.1252 0.1252 0.1252 24 500 SNOW 1 0 1 N/A 0 4 16 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
47 145 0 BLOCK_ICE_FRAGILE 0.0508 0.0508 0.0508 0.0508 5 930 ICEI 1 0 0 N/A 0 0 4 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0
48 146 146 BLOCK_ICE_NATURAL 0.1016 0.1016 0.1016 0.1016 35 930 ICEI 1 0 1 N/A 0 0 4 0.0000 0.0000 0.0000 0.0000 N/A N/A 0.0

View File

@@ -1,88 +0,0 @@
import net.torvald.terrarum.gameitem.GameItem
import net.torvald.terrarum.itemproperties.Material
import org.jetbrains.annotations.NotNull
import org.jetbrains.annotations.Nullable
/**
* Created by minjaesong on 2017-04-28.
*/
static GameItem invoke(int id) {
return new GameItem() {
@Override
int getDynamicID() {
return 0
}
@Override
void setDynamicID(int i) {
}
@Override
int getOriginalID() {
return 0
}
@Override
boolean isUnique() {
return false
}
@Override
String getOriginalName() {
return null
}
@Override
double getBaseMass() {
return 0
}
@Override
void setBaseMass(double v) {
}
@Override
Double getBaseToolSize() {
return null
}
@Override
void setBaseToolSize(@Nullable Double aDouble) {
}
@Override
String getInventoryCategory() {
return null
}
@Override
void setInventoryCategory(@NotNull String s) {
}
@Override
boolean getStackable() {
return false
}
@Override
void setStackable(boolean b) {
}
@Override
boolean isDynamic() {
return false
}
@Override
Material getMaterial() {
return null
}
}
}

View File

@@ -1,97 +0,0 @@
/**
* Created by minjaesong on 2017-04-26.
*/
import net.torvald.terrarum.Point2d
import net.torvald.terrarum.Terrarum
import net.torvald.terrarum.gameactors.AVKey
import net.torvald.terrarum.gameactors.ActorWBMovable
import net.torvald.terrarum.itemproperties.Calculate
import net.torvald.terrarum.gameitem.GameItem
import net.torvald.terrarum.itemproperties.Material
import net.torvald.terrarum.blockproperties.Block
// following two are NOT UNUSED!
import org.jetbrains.annotations.NotNull
static GameItem invoke(int id) {
return new TestPick(id)
}
class TestPick extends GameItem {
int originalID
int dynamicID
String originalName = "GROOVY_PICK"
double baseMass = 10.0
Double baseToolSize = 10.0
boolean stackable = true
int maxDurability = 147
float durability = maxDurability
int equipPosition = 9 //EquipPosition.HAND_GRIP
String inventoryCategory = "tool" //Category.TOOL
// !! TEST MATERIAL !!
Material material = new Material(0,0,0,0,0,0,0,0,1,0.0)
TestPick(int id) {
originalID = id
dynamicID = id
name = "Groovy Pickaxe"
}
@Override
boolean isUnique() {
return false
}
@Override
boolean isDynamic() {
return true
}
@Override
boolean startPrimaryUse(float delta) {
int mouseTileX = Terrarum.getMouseTileX()
int mouseTileY = Terrarum.getMouseTileY()
def mousePoint = new Point2d(mouseTileX, mouseTileY)
def actorvalue = Terrarum.ingame.playableActor.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({
if (it instanceof ActorWithPhysics && it.getHIntTilewiseHitbox.intersects(mousePoint))
return false
})
// return false if here's no tile
if (Block.AIR == Terrarum.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(
mouseTileX, mouseTileY,
Calculate.pickaxePower(Terrarum.ingame.playableActor, material) * swingDmgToFrameDmg
)
return true
}
@Override
boolean endPrimaryUse(float delta) {
using = false
// reset action timer to zero
Terrarum.ingame.playableActor.actorValue.set(AVKey.__ACTION_TIMER, 0.0)
return true
}
}

View File

@@ -1,5 +1,7 @@
"idst";"tens";"impf";"dsty";"fmod";"endurance";"tcond";"comments"
"ROCK"; "15"; "210";"3000"; "1"; "0.42"; "1.0";"data is that of marble"
"OORE"; "15"; "210";"3000"; "1"; "0.42"; "1.0";"data is that of marble"
"OGEM"; "15"; "210";"3000"; "1"; "0.42"; "1.0";"data is that of marble"
"CUPR"; "210"; "770";"8960"; "2"; "1.00";"401.0";"copper"
"EGLS"; "33";"1000";"2325"; "4"; "0.82"; "1.0";"elven glass/moldavite"
"IRON"; "350";"1085";"7874"; "5"; "1.42"; "1.0";"not wrought iron; just natural iron"
1 idst tens impf dsty fmod endurance tcond comments
2 ROCK 15 210 3000 1 0.42 1.0 data is that of marble
3 OORE 15 210 3000 1 0.42 1.0 data is that of marble
4 OGEM 15 210 3000 1 0.42 1.0 data is that of marble
5 CUPR 210 770 8960 2 1.00 401.0 copper
6 EGLS 33 1000 2325 4 0.82 1.0 elven glass/moldavite
7 IRON 350 1085 7874 5 1.42 1.0 not wrought iron; just natural iron

View File

@@ -21,8 +21,9 @@ releasedate=2017-07-14
# The version, must follow Semver 2.0.0 scheme (https://semver.org/)
version=0.2.0
# External JARs the module might use, separate multiple by semicolon (;)
libraries=
# External JAR that the module is compiled. If your module requires yet another library, the JAR must be compiled as a "Fatjar";
# Due to security reasons, loading an arbitrary JAR is not allowed.
jar=
# Modules that must be pre-installed, separate multiple by semicolon (;)
# Dependency syntax: "module's identification name (aka folder name) spaces allowed versionnumber"

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,13 @@
10 print("polling radar...")
20 s=cput(1,"POLL")
30 if s><0 then goto 900
40 l=cget(1,0)
41 REM print("length: "+l+", pixels: "+l/3)
50 for i=0 to l-1 step 3
60 m=peek(i)*160+peek(i+1)
62 p=peek(i+2)
63 poke(-1048576-m,p)
70 next
80 REM poke(-1070977,0)
90 goto 20
900 print("Polling failed: "+s)

View File

@@ -0,0 +1,2 @@
"id";"classname"
"1";"net.torvald.terrarum.modulecomputers.gameitems.ItemWearableWorldRadar"
1 id classname
2 1 net.torvald.terrarum.modulecomputers.gameitems.ItemWearableWorldRadar

View File

@@ -3,7 +3,7 @@ description=Dwarven technicians are emerged from their hiding
author=Terrarum
package=net.torvald.terrarum.modulecomputers
entrypoint=net.torvald.terrarum.modulecomputers.EntryPoint
releasedate=2017-07-14
version=0.2.0
libraries=
dependency=basegame 0.2.*
releasedate=2021-12-03
version=0.3.0
jar=ModuleComputers.jar
dependency=basegame 0.2.*