mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-16 08:36:07 +09:00
thermal tags for buckets and fluids
This commit is contained in:
@@ -86,6 +86,8 @@ class FluidCodex {
|
||||
|
||||
prop.material = record.get("mate")
|
||||
|
||||
prop.therm = record.intVal("therm")
|
||||
|
||||
fluidProps[prop.id] = prop
|
||||
|
||||
printdbg(this, "Setting fluid prop ${prop.id} ->>\t${prop.nameKey}")
|
||||
@@ -126,6 +128,8 @@ class FluidProp {
|
||||
|
||||
var reflectance = 0f // the exact colour of the reflected light depends on the texture
|
||||
|
||||
var therm = 0
|
||||
|
||||
@Transient var tags = HashSet<String>()
|
||||
|
||||
}
|
||||
@@ -1,8 +1,6 @@
|
||||
package net.torvald.terrarum.modulebasegame.gameitems
|
||||
|
||||
import net.torvald.terrarum.BlockCodex
|
||||
import net.torvald.terrarum.CommonResourcePool
|
||||
import net.torvald.terrarum.INGAME
|
||||
import net.torvald.terrarum.*
|
||||
import net.torvald.terrarum.blockproperties.Fluid
|
||||
import net.torvald.terrarum.gameactors.ActorWithBody
|
||||
import net.torvald.terrarum.gameitems.GameItem
|
||||
@@ -54,6 +52,7 @@ open class ItemFluidStoragePrototype(originalID: ItemID, sheetX: Int, sheetY: In
|
||||
|
||||
// empty bucket -> filled bucket
|
||||
if (fluid == null) {
|
||||
if (ItemCodex[originalID]!!.hasTag("NOEXTREMETHERM") && FluidCodex[fluidAtWorld.type].therm !in 0..1) return@mouseInInteractableRange -1L
|
||||
if (fluidAtWorld.amount < 1f - FLUID_MIN_MASS) return@mouseInInteractableRange -1L
|
||||
|
||||
// TODO respect the FLUIDROOMTEMP tag
|
||||
|
||||
Reference in New Issue
Block a user