This commit is contained in:
Rendo 2025-12-15 08:44:19 +05:00
commit a425f62267
9 changed files with 25 additions and 6 deletions

View file

@ -1,6 +1,6 @@
extends Node
class_name Inventory
@export var open_on_top: bool
var liquids
var solids
var gasses
var inventory: Array[RuntimeSubstanceData]

View file

@ -8,6 +8,7 @@ class_name Substance
@export var boiling_point: float
@export var color: Color
@export var prefer_scientific_name: bool
@export var is_solution: bool
func get_formula() -> StringName:
return scientific_name if prefer_scientific_name else formula

View file

@ -0,0 +1,7 @@
extends RefCounted
class_name RuntimeSubstanceData
var substance: Substance
var amount: float
var temperature: float = 20.0

View file

@ -0,0 +1 @@
uid://coq5iah4er0lc

View file

@ -7,5 +7,5 @@ func _ready() -> void:
if substance:
var jar_fill_material = $"../JarFill".material_override
jar_fill_material.albedo_color = substance.color
if substance.melting_point > 20:
if substance.melting_point > 20 and not substance.is_solution:
jar_fill_material.albedo_texture = preload("res://assets/textures/solid.png")