From 53645925baef372b7501dbd860e09c1e39615607 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Wed, 12 Jan 2022 17:30:30 +0900 Subject: [PATCH] variable tool reach wip --- assets/mods/basegame/materials/materials.csv | 30 ++++++++++--------- .../terrarum/itemproperties/Material.kt | 3 ++ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/assets/mods/basegame/materials/materials.csv b/assets/mods/basegame/materials/materials.csv index 68cf3294b..19a161ba9 100644 --- a/assets/mods/basegame/materials/materials.csv +++ b/assets/mods/basegame/materials/materials.csv @@ -1,17 +1,17 @@ -"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" -"ARGN"; "170"; "595";"10490"; "9"; "0.91"; "1.0";"argentum/silver" -"STAL"; "531";"2520";"7874"; "14"; "1.73"; "1.0";"steel" -"EAUR"; "768"; "0";"8192"; "21"; "1.36"; "1.0";"elven aurichalcum" -"TIAL"; "900"; "0";"4420"; "33"; "2.16"; "1.0";"titanium alloy (Ti6Al4V)" -"ADMT";"2000";"4090";"2700"; "71"; "3.42"; "1.0";"adamant" -"OOZE"; "20"; "0";"1000"; "1"; "0.08"; "0.5";"genetic ooze; data is about human skin" -"BONE"; "130"; "0";"2000"; "1"; "0.23"; "0.55";"data is that of bovine bone" +"idst";"tens";"impf";"dsty";"fmod";"endurance";"tcond";"reach";"comments" +"ROCK"; "15"; "210";"3000"; "1"; "0.42"; "1.0"; "5";"data is that of marble" +"OORE"; "15"; "210";"3000"; "1"; "0.42"; "1.0"; "5";"data is that of marble" +"OGEM"; "15"; "210";"3000"; "1"; "0.42"; "1.0"; "5";"data is that of marble" +"CUPR"; "210"; "770";"8960"; "2"; "1.00";"401.0"; "5";"copper" +"EGLS"; "33";"1000";"2325"; "4"; "0.82"; "1.0"; "6";"elven glass/moldavite" +"IRON"; "350";"1085";"7874"; "5"; "1.42"; "1.0"; "6";"not wrought iron; just natural iron" +"ARGN"; "170"; "595";"10490"; "9"; "0.91"; "1.0"; "6";"argentum/silver" +"STAL"; "531";"2520";"7874"; "14"; "1.73"; "1.0"; "7";"steel" +"EAUR"; "768"; "0";"8192"; "21"; "1.36"; "1.0"; "7";"elven aurichalcum" +"TIAL"; "900"; "0";"4420"; "33"; "2.16"; "1.0"; "8";"titanium alloy (Ti6Al4V)" +"ADMT";"2000";"4090";"2700"; "71"; "3.42"; "1.0"; "8";"adamant" +"OOZE"; "20"; "0";"1000"; "1"; "0.08"; "0.5"; "0";"genetic ooze; data is about human skin" +"BONE"; "130"; "0";"2000"; "1"; "0.23"; "0.55"; "4";"data is that of bovine bone" # idst: ID_STRING, ALL CAPS # @@ -31,6 +31,8 @@ # # tcond: thermal conductivity # +# reach: Tool Reach in blocks. Default is 6 (iron) +# # Comments: do nothing; do not parse # diff --git a/src/net/torvald/terrarum/itemproperties/Material.kt b/src/net/torvald/terrarum/itemproperties/Material.kt index f38fb3ec4..a1679d879 100644 --- a/src/net/torvald/terrarum/itemproperties/Material.kt +++ b/src/net/torvald/terrarum/itemproperties/Material.kt @@ -28,6 +28,8 @@ class Material { var identifier: String = "Name not set" + var toolReach: Int = 6 + /** * Mainly intended to be used by third-party modules */ @@ -68,6 +70,7 @@ class MaterialCodex { prop.enduranceMod = it.floatVal("endurance") prop.thermalConductivity = it.floatVal("tcond") prop.identifier = it.get("idst").toUpperCase() + prop.toolReach = it.intVal("reach") materialProps[prop.identifier] = prop