Solutions
This commit is contained in:
parent
cc7c6af33f
commit
fcdd47e200
28 changed files with 88 additions and 60 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Environment" load_steps=3 format=3 uid="uid://clgblxkcf822n"]
|
[gd_resource type="Environment" format=3 uid="uid://clgblxkcf822n"]
|
||||||
|
|
||||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nics3"]
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nics3"]
|
||||||
|
|
||||||
|
|
|
||||||
10
assets/reagents/H2O.tres
Normal file
10
assets/reagents/H2O.tres
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
[gd_resource type="Resource" script_class="Reagent" format=3 uid="uid://bbbrxgvfp4jvg"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_67pws"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://cw6v8kbi76qak" path="res://scenes/substance_jar.tscn" id="2_10oqd"]
|
||||||
|
[ext_resource type="Resource" uid="uid://dp0e62nxlnaeg" path="res://assets/substances/H2O.tres" id="3_10oqd"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_67pws")
|
||||||
|
substance = ExtResource("3_10oqd")
|
||||||
|
metadata/_custom_type_script = "uid://bditqax8ibmxw"
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://cb148scow5112"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://cb148scow5112"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_ntpww"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_ntpww"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Нитрат серебра"
|
||||||
melting_point = 209.7
|
melting_point = 209.7
|
||||||
boiling_point = 9999999999999.0
|
boiling_point = 9999999999999.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=3 format=3 uid="uid://dr65qbkum4emy"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://dr65qbkum4emy"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_551qc"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_551qc"]
|
||||||
[ext_resource type="Resource" uid="uid://dn10p6rbdd7qb" path="res://assets/substances/CH3COOH.tres" id="2_2qskh"]
|
[ext_resource type="Resource" uid="uid://dn10p6rbdd7qb" path="res://assets/substances/CH3COOH.tres" id="2_2qskh"]
|
||||||
|
|
@ -13,5 +13,4 @@ pHIonicOverrides = Dictionary[ExtResource("1_551qc"), float]({
|
||||||
ExtResource("2_2qskh"): 4.8
|
ExtResource("2_2qskh"): 4.8
|
||||||
})
|
})
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://ceq47d1v3l3ag"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://ceq47d1v3l3ag"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_7j6i3"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_7j6i3"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Сульфат меди (II)"
|
||||||
melting_point = 200.0
|
melting_point = 200.0
|
||||||
boiling_point = 21515.0
|
boiling_point = 21515.0
|
||||||
color = Color(0, 0.2166667, 1, 1)
|
color = Color(0, 0.2166667, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://cai5kwbx8gpst"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://cai5kwbx8gpst"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_5q6dl"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_5q6dl"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Сульфат железа (II)"
|
||||||
melting_point = 1e+16
|
melting_point = 1e+16
|
||||||
boiling_point = 1e+16
|
boiling_point = 1e+16
|
||||||
color = Color(0.35377085, 0.8262475, 0.78860706, 1)
|
color = Color(0.35377085, 0.8262475, 0.78860706, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://dp0e62nxlnaeg"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://dp0e62nxlnaeg"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_nb8j3"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_nb8j3"]
|
||||||
|
|
||||||
|
|
@ -7,5 +7,6 @@ script = ExtResource("1_nb8j3")
|
||||||
formula = &"H_2O"
|
formula = &"H_2O"
|
||||||
scientific_name = &"Вода"
|
scientific_name = &"Вода"
|
||||||
boiling_point = 100.0
|
boiling_point = 100.0
|
||||||
color = Color(1, 1, 1, 1)
|
color_influence = 0.1
|
||||||
|
color = Color(0.7529412, 1, 1, 0.12941177)
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://bj3cdfwvgksee"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://bj3cdfwvgksee"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_jqfn0"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_jqfn0"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,5 @@ scientific_name = &"Соляная кислота"
|
||||||
melting_point = -30.0
|
melting_point = -30.0
|
||||||
boiling_point = 48.0
|
boiling_point = 48.0
|
||||||
pH = -1.0
|
pH = -1.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 0.13725491)
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://dcygjcbfhw6vv"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://dcygjcbfhw6vv"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_vjdlt"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_vjdlt"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Хлорид калия"
|
||||||
melting_point = 776.0
|
melting_point = 776.0
|
||||||
boiling_point = 1407.0
|
boiling_point = 1407.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://catmteeotjc7v"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://catmteeotjc7v"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r3ou2"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r3ou2"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Йодид калия"
|
||||||
melting_point = 681.0
|
melting_point = 681.0
|
||||||
boiling_point = 1324.0
|
boiling_point = 1324.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://i6g736kto67i"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://i6g736kto67i"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_gc7wb"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_gc7wb"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Нитрат калия"
|
||||||
melting_point = 334.0
|
melting_point = 334.0
|
||||||
boiling_point = 12541256.0
|
boiling_point = 12541256.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://de3dl5upbt163"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://de3dl5upbt163"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_1rh8q"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_1rh8q"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Нитрат свинца"
|
||||||
melting_point = 270.0
|
melting_point = 270.0
|
||||||
boiling_point = 999999.0
|
boiling_point = 999999.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=3 format=3 uid="uid://bnywd2asdr3eo"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://bnywd2asdr3eo"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_iruga"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_iruga"]
|
||||||
|
|
||||||
|
|
@ -12,6 +12,7 @@ formula = &"C_14H_14N_3O_3SNa"
|
||||||
scientific_name = &"Метиловый оранжевый"
|
scientific_name = &"Метиловый оранжевый"
|
||||||
melting_point = 300.0
|
melting_point = 300.0
|
||||||
boiling_point = 520.0
|
boiling_point = 520.0
|
||||||
|
color_influence = 0.9
|
||||||
color = Color(1, 0.26666665, 0, 1)
|
color = Color(1, 0.26666665, 0, 1)
|
||||||
pHColor = SubResource("Gradient_iruga")
|
pHColor = SubResource("Gradient_iruga")
|
||||||
prefer_scientific_name = true
|
prefer_scientific_name = true
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=3 format=3 uid="uid://b0pdv8e1ybr8h"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://b0pdv8e1ybr8h"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r754y"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r754y"]
|
||||||
[ext_resource type="Resource" uid="uid://b2iqhriy265ik" path="res://assets/substances/NH4OH.tres" id="2_p1wre"]
|
[ext_resource type="Resource" uid="uid://b2iqhriy265ik" path="res://assets/substances/NH4OH.tres" id="2_p1wre"]
|
||||||
|
|
@ -13,5 +13,4 @@ pHIonicOverrides = Dictionary[ExtResource("1_r754y"), float]({
|
||||||
ExtResource("2_p1wre"): -5.0
|
ExtResource("2_p1wre"): -5.0
|
||||||
})
|
})
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://by8jsgsb5c7ly"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://by8jsgsb5c7ly"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_34ksu"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_34ksu"]
|
||||||
|
|
||||||
|
|
@ -10,5 +10,4 @@ melting_point = 1176.0
|
||||||
boiling_point = 1251256.0
|
boiling_point = 1251256.0
|
||||||
pH = 14.0
|
pH = 14.0
|
||||||
color = Color(0.9993965, 0.8914352, 0.79421496, 1)
|
color = Color(0.9993965, 0.8914352, 0.79421496, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://chhcvdy3o3vdk"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://chhcvdy3o3vdk"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_wk8wt"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_wk8wt"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Сульфат натрия"
|
||||||
melting_point = 883.0
|
melting_point = 883.0
|
||||||
boiling_point = 12154125.0
|
boiling_point = 12154125.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://chdrv5i45chwe"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://chdrv5i45chwe"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_77jso"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_77jso"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Хлорид натрия"
|
||||||
melting_point = 800.8
|
melting_point = 800.8
|
||||||
boiling_point = 1465.0
|
boiling_point = 1465.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://ctf0qqkoxvblc"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://ctf0qqkoxvblc"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_puicw"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_puicw"]
|
||||||
|
|
||||||
|
|
@ -9,5 +9,4 @@ scientific_name = &"Нитрат натрия"
|
||||||
melting_point = 308.0
|
melting_point = 308.0
|
||||||
boiling_point = 380.0
|
boiling_point = 380.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://30ym4xb0uu3y"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://30ym4xb0uu3y"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_m1aun"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_m1aun"]
|
||||||
|
|
||||||
|
|
@ -10,5 +10,4 @@ melting_point = 323.0
|
||||||
boiling_point = 1403.0
|
boiling_point = 1403.0
|
||||||
pH = 13.0
|
pH = 13.0
|
||||||
color = Color(1, 1, 1, 1)
|
color = Color(1, 1, 1, 1)
|
||||||
is_solution = true
|
|
||||||
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
metadata/_custom_type_script = "uid://b8q5buwgvppyh"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Substance" load_steps=3 format=3 uid="uid://brih4gryc1acx"]
|
[gd_resource type="Resource" script_class="Substance" format=3 uid="uid://brih4gryc1acx"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_td2hf"]
|
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_td2hf"]
|
||||||
|
|
||||||
|
|
@ -12,6 +12,7 @@ formula = &"C_20H_14O_4"
|
||||||
scientific_name = &"Фенолфталеин"
|
scientific_name = &"Фенолфталеин"
|
||||||
melting_point = 278.0
|
melting_point = 278.0
|
||||||
boiling_point = 557.8
|
boiling_point = 557.8
|
||||||
|
color_influence = 0.9
|
||||||
color = Color(1, 1, 1, 0.43529412)
|
color = Color(1, 1, 1, 0.43529412)
|
||||||
pHColor = SubResource("Gradient_td2hf")
|
pHColor = SubResource("Gradient_td2hf")
|
||||||
prefer_scientific_name = true
|
prefer_scientific_name = true
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_scene load_steps=6 format=3 uid="uid://c7r4rhgj3ucao"]
|
[gd_scene format=3 uid="uid://c7r4rhgj3ucao"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://c2vxq6kqhris0" path="res://scenes/camera_3d.tscn" id="1_hflkp"]
|
[ext_resource type="PackedScene" uid="uid://c2vxq6kqhris0" path="res://scenes/camera_3d.tscn" id="1_hflkp"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dfxlr4svnsdyx" path="res://scenes/ui.tscn" id="3_hflkp"]
|
[ext_resource type="PackedScene" uid="uid://dfxlr4svnsdyx" path="res://scenes/ui.tscn" id="3_hflkp"]
|
||||||
|
|
@ -9,29 +9,29 @@ size = Vector3(4, 1, 2)
|
||||||
|
|
||||||
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_hflkp"]
|
[sub_resource type="WorldBoundaryShape3D" id="WorldBoundaryShape3D_hflkp"]
|
||||||
|
|
||||||
[node name="Lab" type="Node3D"]
|
[node name="Lab" type="Node3D" unique_id=564060864]
|
||||||
|
|
||||||
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
|
[node name="MeshInstance3D" type="MeshInstance3D" parent="." unique_id=995740125]
|
||||||
transform = Transform3D(2.4088485, 0, 0, 0, 1, 0, 0, 0, 2.8214846, 0, 0, 0)
|
transform = Transform3D(2.4088485, 0, 0, 0, 1, 0, 0, 0, 2.8214846, 0, 0, 0)
|
||||||
mesh = SubResource("BoxMesh_cbcd7")
|
mesh = SubResource("BoxMesh_cbcd7")
|
||||||
|
|
||||||
[node name="Camera3D" parent="." instance=ExtResource("1_hflkp")]
|
[node name="Camera3D" parent="." unique_id=102166779 instance=ExtResource("1_hflkp")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.49999994, 0, -0.49999997, 0.8660254, -1.236948, 2.5364435, 3.1829531)
|
transform = Transform3D(1, 0, 0, 0, 0.86602545, 0.49999994, 0, -0.49999997, 0.8660254, -1.236948, 2.5364435, 3.1829531)
|
||||||
|
|
||||||
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="." unique_id=1477407753]
|
||||||
transform = Transform3D(1, 0, 0, 0, 0.8403207, 0.5420896, 0, -0.5420896, 0.8403207, 0, 1.9293891, 0)
|
transform = Transform3D(1, 0, 0, 0, 0.8403207, 0.5420896, 0, -0.5420896, 0.8403207, 0, 1.9293891, 0)
|
||||||
shadow_enabled = true
|
shadow_enabled = true
|
||||||
|
|
||||||
[node name="UI" type="CanvasLayer" parent="."]
|
[node name="UI" type="CanvasLayer" parent="." unique_id=783871594]
|
||||||
layer = 100
|
layer = 100
|
||||||
|
|
||||||
[node name="UserInterface" parent="UI" instance=ExtResource("3_hflkp")]
|
[node name="UserInterface" parent="UI" unique_id=1818027984 instance=ExtResource("3_hflkp")]
|
||||||
|
|
||||||
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="." unique_id=715700528]
|
||||||
environment = ExtResource("8_4kvtl")
|
environment = ExtResource("8_4kvtl")
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
[node name="StaticBody3D" type="StaticBody3D" parent="." unique_id=2121776712]
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D" unique_id=53608574]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||||
shape = SubResource("WorldBoundaryShape3D_hflkp")
|
shape = SubResource("WorldBoundaryShape3D_hflkp")
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ func _on_interaction_interacted(with: DraggableObject) -> void:
|
||||||
subs.amount = add_amount
|
subs.amount = add_amount
|
||||||
subs.substance = $"../../SubstanceData".substance
|
subs.substance = $"../../SubstanceData".substance
|
||||||
subs.temperature = 20
|
subs.temperature = 20
|
||||||
|
subs.is_solution = subs.substance.is_solution
|
||||||
with.get_node("%Inventory").add_substance(subs)
|
with.get_node("%Inventory").add_substance(subs)
|
||||||
$"../HBoxContainer/SpinBox".value = 0
|
$"../HBoxContainer/SpinBox".value = 0
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,12 @@ var total_amount: float:
|
||||||
signal inventory_changed(substances: Array[RuntimeSubstanceData])
|
signal inventory_changed(substances: Array[RuntimeSubstanceData])
|
||||||
signal temperature_changed(to: float)
|
signal temperature_changed(to: float)
|
||||||
|
|
||||||
|
func update_solutions():
|
||||||
|
var has_water = inventory.has("Вода")
|
||||||
|
if has_water:
|
||||||
|
for sub in inventory:
|
||||||
|
inventory[sub].is_solution = ReactionRegistry.is_water_solution(inventory[sub].substance)
|
||||||
|
|
||||||
func add_substance(data: RuntimeSubstanceData) -> void:
|
func add_substance(data: RuntimeSubstanceData) -> void:
|
||||||
if data.substance.scientific_name in inventory:
|
if data.substance.scientific_name in inventory:
|
||||||
inventory[data.substance.scientific_name].add(data)
|
inventory[data.substance.scientific_name].add(data)
|
||||||
|
|
@ -30,6 +36,7 @@ func add_substance(data: RuntimeSubstanceData) -> void:
|
||||||
inventory[data.substance.scientific_name] = data
|
inventory[data.substance.scientific_name] = data
|
||||||
check_for_reactions()
|
check_for_reactions()
|
||||||
recalculate_temperature()
|
recalculate_temperature()
|
||||||
|
update_solutions()
|
||||||
inventory_changed.emit(inventory.values())
|
inventory_changed.emit(inventory.values())
|
||||||
|
|
||||||
func add_substance_no_callback(data: RuntimeSubstanceData) -> void:
|
func add_substance_no_callback(data: RuntimeSubstanceData) -> void:
|
||||||
|
|
@ -41,7 +48,11 @@ func add_substance_no_callback(data: RuntimeSubstanceData) -> void:
|
||||||
|
|
||||||
func add_inventory(substances: Array[RuntimeSubstanceData]) -> void:
|
func add_inventory(substances: Array[RuntimeSubstanceData]) -> void:
|
||||||
for sub in substances:
|
for sub in substances:
|
||||||
add_substance(sub)
|
add_substance_no_callback(sub)
|
||||||
|
check_for_reactions()
|
||||||
|
recalculate_temperature()
|
||||||
|
update_solutions()
|
||||||
|
inventory_changed.emit(inventory.values())
|
||||||
|
|
||||||
func extract(amount: float) -> Array[RuntimeSubstanceData]:
|
func extract(amount: float) -> Array[RuntimeSubstanceData]:
|
||||||
if len(inventory) == 0:
|
if len(inventory) == 0:
|
||||||
|
|
@ -63,6 +74,7 @@ func extract(amount: float) -> Array[RuntimeSubstanceData]:
|
||||||
if inventory[result_substance.substance.scientific_name].amount == 0:
|
if inventory[result_substance.substance.scientific_name].amount == 0:
|
||||||
inventory.erase(result_substance.substance.scientific_name)
|
inventory.erase(result_substance.substance.scientific_name)
|
||||||
|
|
||||||
|
update_solutions()
|
||||||
inventory_changed.emit(inventory.values())
|
inventory_changed.emit(inventory.values())
|
||||||
|
|
||||||
return result
|
return result
|
||||||
|
|
@ -88,6 +100,7 @@ func extract_solid(amount: float) -> Array[RuntimeSubstanceData]:
|
||||||
if inventory[result_substance.substance.scientific_name].amount == 0:
|
if inventory[result_substance.substance.scientific_name].amount == 0:
|
||||||
inventory.erase(result_substance.substance.scientific_name)
|
inventory.erase(result_substance.substance.scientific_name)
|
||||||
|
|
||||||
|
update_solutions()
|
||||||
inventory_changed.emit(inventory.values())
|
inventory_changed.emit(inventory.values())
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
@ -102,6 +115,7 @@ func extract_substance(key: String, extract_amount: float) -> RuntimeSubstanceDa
|
||||||
if inventory[result_substance.substance.scientific_name].amount == 0:
|
if inventory[result_substance.substance.scientific_name].amount == 0:
|
||||||
inventory.erase(result_substance.substance.scientific_name)
|
inventory.erase(result_substance.substance.scientific_name)
|
||||||
|
|
||||||
|
update_solutions()
|
||||||
inventory_changed.emit(inventory.values())
|
inventory_changed.emit(inventory.values())
|
||||||
|
|
||||||
return result_substance
|
return result_substance
|
||||||
|
|
@ -160,5 +174,6 @@ func check_for_reactions() -> void:
|
||||||
add_substance_no_callback(data)
|
add_substance_no_callback(data)
|
||||||
check_for_reactions()
|
check_for_reactions()
|
||||||
recalculate_temperature()
|
recalculate_temperature()
|
||||||
|
update_solutions()
|
||||||
inventory_changed.emit(inventory.values())
|
inventory_changed.emit(inventory.values())
|
||||||
GuiSignalBus.push("Произошла реакция: " + found_reaction.formula())
|
GuiSignalBus.push("Произошла реакция: " + found_reaction.formula())
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@ extends Node
|
||||||
|
|
||||||
const REACTIONS_DIRECTORY = "res://assets/reactions/"
|
const REACTIONS_DIRECTORY = "res://assets/reactions/"
|
||||||
|
|
||||||
|
@export var water_soluable: Array[Substance] = [preload("res://assets/substances/AgNO3.tres"),preload("res://assets/substances/CaCl.tres"),preload("res://assets/substances/CaCO3.tres"),preload("res://assets/substances/CH3COONa.tres"),preload("res://assets/substances/CuSO4.tres"),preload("res://assets/substances/FeSO4.tres"),preload("res://assets/substances/KCl.tres"),preload("res://assets/substances/KI.tres"),preload("res://assets/substances/KNO3.tres"),preload("res://assets/substances/LeadNitrate.tres"),preload("res://assets/substances/MethylOrange.tres"),preload("res://assets/substances/Na2CO3.tres"),preload("res://assets/substances/Na2S.tres"),preload("res://assets/substances/Na2SO4.tres"),preload("res://assets/substances/NaCl.tres"),preload("res://assets/substances/NaNO3.tres"),preload("res://assets/substances/NaOH.tres"),preload("res://assets/substances/NH4CL.tres"),preload("res://assets/substances/NH4OH.tres"),preload("res://assets/substances/Phenolphtalein.tres")]
|
||||||
|
|
||||||
var reactions: Array[Reaction]
|
var reactions: Array[Reaction]
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
@ -27,3 +29,6 @@ func find_appropriate_reaction(input_substances: Array[Substance], temperature:
|
||||||
return filtered[0]
|
return filtered[0]
|
||||||
else:
|
else:
|
||||||
return null
|
return null
|
||||||
|
|
||||||
|
func is_water_solution(substance: Substance):
|
||||||
|
return water_soluable.has(substance)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ class_name Substance
|
||||||
@export var scientific_name: StringName
|
@export var scientific_name: StringName
|
||||||
@export var melting_point: float
|
@export var melting_point: float
|
||||||
@export var boiling_point: float
|
@export var boiling_point: float
|
||||||
@export var liquid_transparency: float = 0.5
|
@export_range(0,1,0.01) var color_influence: float = 0.5
|
||||||
@export var pH: float = 7.0
|
@export var pH: float = 7.0
|
||||||
@export var pHIonicOverrides: Dictionary[Substance,float]
|
@export var pHIonicOverrides: Dictionary[Substance,float]
|
||||||
@export var color: Color
|
@export var color: Color
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ class_name RuntimeSubstanceData
|
||||||
var substance: Substance
|
var substance: Substance
|
||||||
var amount: float
|
var amount: float
|
||||||
var temperature: float = 20.0
|
var temperature: float = 20.0
|
||||||
|
var is_solution: bool = false
|
||||||
|
|
||||||
func add(data: RuntimeSubstanceData) -> void:
|
func add(data: RuntimeSubstanceData) -> void:
|
||||||
temperature = (temperature + data.temperature)/2.0
|
temperature = (temperature + data.temperature)/2.0
|
||||||
|
|
|
||||||
|
|
@ -16,31 +16,37 @@ func update_material(substances: Array[RuntimeSubstanceData]) -> void:
|
||||||
visible = true
|
visible = true
|
||||||
|
|
||||||
var total_weight = 0
|
var total_weight = 0
|
||||||
|
var total_color = 0
|
||||||
|
|
||||||
for sub in substances:
|
for sub in substances:
|
||||||
total_weight += sub.amount
|
total_weight += sub.amount
|
||||||
|
total_color += sub.substance.color_influence
|
||||||
|
|
||||||
var pH: float = 0
|
var pH: float = 0
|
||||||
var color: Color = Color(0,0,0,0)
|
var color: Color = Color(0,0,0,0)
|
||||||
|
|
||||||
for sub: RuntimeSubstanceData in substances:
|
for sub: RuntimeSubstanceData in substances:
|
||||||
var weight: float = sub.amount/total_weight
|
var weight: float = sub.amount/total_weight
|
||||||
pH += sub.substance.get_ph_runtime(substances) * weight
|
pH += sub.substance.get_ph_runtime(substances) * weight
|
||||||
|
|
||||||
for sub: RuntimeSubstanceData in substances:
|
for sub: RuntimeSubstanceData in substances:
|
||||||
var weight: float = sub.amount/total_weight
|
var color_to_add: Color
|
||||||
if display_type == DisplayType.Fluid:
|
|
||||||
pass
|
|
||||||
if sub.substance.pHColor != null:
|
if sub.substance.pHColor != null:
|
||||||
color += sub.substance.pHColor.sample(pH/14.0) * weight
|
color_to_add = sub.substance.pHColor.sample(pH/14.0)
|
||||||
else:
|
else:
|
||||||
color += sub.substance.color * weight
|
color_to_add = sub.substance.color
|
||||||
|
|
||||||
if display_type == DisplayType.Fluid:
|
if display_type == DisplayType.Fluid and sub.is_solution:
|
||||||
pass
|
color_to_add.a = 0.5
|
||||||
|
|
||||||
|
#if color == Color(0,0,0,0):
|
||||||
|
# color = color_to_add
|
||||||
|
#else:
|
||||||
|
# color = color.lerp(color_to_add,sub.substance.color_influence)
|
||||||
|
color += color_to_add * sub.substance.color_influence
|
||||||
|
|
||||||
|
|
||||||
mat.albedo_color = color
|
mat.albedo_color = color / total_color
|
||||||
|
|
||||||
func update_material_unfiltered(substances: Array[RuntimeSubstanceData]):
|
func update_material_unfiltered(substances: Array[RuntimeSubstanceData]):
|
||||||
match display_type:
|
match display_type:
|
||||||
|
|
@ -51,5 +57,5 @@ func update_material_unfiltered(substances: Array[RuntimeSubstanceData]):
|
||||||
var solids = substances.filter(filter_solids)
|
var solids = substances.filter(filter_solids)
|
||||||
update_material(solids)
|
update_material(solids)
|
||||||
|
|
||||||
func filter_liquids(sub: RuntimeSubstanceData): return sub.substance.melting_point < sub.temperature or sub.substance.is_solution
|
func filter_liquids(sub: RuntimeSubstanceData): return sub.substance.melting_point < sub.temperature or sub.is_solution
|
||||||
func filter_solids(sub: RuntimeSubstanceData): return sub.substance.melting_point > sub.temperature and not sub.substance.is_solution
|
func filter_solids(sub: RuntimeSubstanceData): return sub.substance.melting_point > sub.temperature and not sub.is_solution
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,6 @@ func _ready() -> void:
|
||||||
|
|
||||||
get_parent().add_to_group("solid_source")
|
get_parent().add_to_group("solid_source")
|
||||||
else:
|
else:
|
||||||
jar_fill_material.albedo_color.a = substance.liquid_transparency
|
if substance.is_solution:
|
||||||
|
jar_fill_material.albedo_color.a = 0.5
|
||||||
get_parent().add_to_group("fluid_source")
|
get_parent().add_to_group("fluid_source")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue