minor changes

This commit is contained in:
minjaesong
2024-09-14 23:59:03 +09:00
parent c42f776f81
commit 94f4f1980a
3 changed files with 4 additions and 48 deletions

View File

@@ -16,7 +16,6 @@ class BlockProp : TaggedProp {
var nameKey: String = ""
/** 1.0f for 1023, 0.25f for 255 */
var shadeColR = 0f
var shadeColG = 0f
var shadeColB = 0f
@@ -46,7 +45,6 @@ class BlockProp : TaggedProp {
var isVertFriction: Boolean = false
/** 1.0f for 1023, 0.25f for 255 */
internal var baseLumColR = 0f // base value used to calculate dynamic luminosity
internal var baseLumColG = 0f // base value used to calculate dynamic luminosity
internal var baseLumColB = 0f // base value used to calculate dynamic luminosity

View File

@@ -96,13 +96,14 @@ class FluidCodex {
}
/**
* Created by minjaesong on 2023-10-11.
*/
class FluidProp {
var id: ItemID = ""
var numericID: Int = -1
var nameKey: String = ""
/** 1.0f for 1023, 0.25f for 255 */
var shadeColR = 0f
var shadeColG = 0f
var shadeColB = 0f
@@ -114,7 +115,6 @@ class FluidProp {
var material: String = ""
/** 1.0f for 1023, 0.25f for 255 */
var lumColR = 0f
var lumColG = 0f
var lumColB = 0f
@@ -132,4 +132,5 @@ class FluidProp {
@Transient var tags = HashSet<String>()
// TODO: if you're going to have a dynamicLuminosityFunction, simulate the way fireflies illuminate to make random "swirling" patterns
}

View File

@@ -1,43 +0,0 @@
package net.torvald.terrarum.gameworld
/**
* Created by minjaesong on 2018-12-29.
*/
/*class FluidProp {
var density: Int = 0
var dynamicLuminosityFunction: Int = 0
/** 1.0f for 1023, 0.25f for 255 */
var shadeColR = 0f
var shadeColG = 0f
var shadeColB = 0f
var shadeColA = 0f
/** 1.0f for 1023, 0.25f for 255 */
var lumColR = 0f
var lumColG = 0f
var lumColB = 0f
var lumColA = 0f
inline val opacity: Color
get() = Color(shadeColR, shadeColG, shadeColB, shadeColA)
inline val luminosity: Color
get() = BlockPropUtil.getDynamicLumFunc(Color(lumColR, lumColG, lumColB, lumColA), dynamicLuminosityFunction)
companion object {
fun getNullProp(): FluidProp {
val p = FluidProp()
p.shadeColR = BlockCodex[Block.AIR].shadeColR
p.shadeColG = BlockCodex[Block.AIR].shadeColG
p.shadeColB = BlockCodex[Block.AIR].shadeColB
p.shadeColA = BlockCodex[Block.AIR].shadeColA
return p
}
}
}*/