extends Node


var substance: Substance

func _ready() -> void:
	if substance:
		var jar_fill_material = $"../JarFill".material_override
		jar_fill_material.albedo_color = substance.color
		if substance.melting_point > 20 and not substance.is_solution:
			jar_fill_material.albedo_texture = preload("res://assets/textures/solid.png")
			
			get_parent().add_to_group("solid_source")
		else:
			if substance.is_solution:
				jar_fill_material.albedo_color.a = 0.5
			get_parent().add_to_group("fluid_source")
