Colors
This commit is contained in:
parent
d520e5f67e
commit
a425f62267
9 changed files with 25 additions and 6 deletions
|
|
@ -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]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
7
src/runtime_substance_data.gd
Normal file
7
src/runtime_substance_data.gd
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
extends RefCounted
|
||||
|
||||
class_name RuntimeSubstanceData
|
||||
|
||||
var substance: Substance
|
||||
var amount: float
|
||||
var temperature: float = 20.0
|
||||
1
src/runtime_substance_data.gd.uid
Normal file
1
src/runtime_substance_data.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://coq5iah4er0lc
|
||||
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue