Compare commits

..

2 commits

Author SHA1 Message Date
d98eb6335f interaction 2025-12-05 10:25:31 +05:00
5e20eeb8bf reactions 2025-12-05 10:03:45 +05:00
79 changed files with 1029 additions and 36 deletions

12
assets/Environment.tres Normal file
View file

@ -0,0 +1,12 @@
[gd_resource type="Environment" load_steps=3 format=3 uid="uid://clgblxkcf822n"]
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_nics3"]
[sub_resource type="Sky" id="Sky_ei11o"]
sky_material = SubResource("ProceduralSkyMaterial_nics3")
[resource]
background_mode = 2
sky = SubResource("Sky_ei11o")
tonemap_mode = 3
tonemap_white = 13.39

View file

@ -0,0 +1,11 @@
[gd_resource type="Resource" script_class="Draggable" load_steps=4 format=3 uid="uid://cay05wpketmny"]
[ext_resource type="Script" uid="uid://b3i73cilpra74" path="res://src/resources/draggable.gd" id="1_62sy8"]
[ext_resource type="Texture2D" uid="uid://bdyc1cwthn845" path="res://icon.svg" id="1_kgkdo"]
[ext_resource type="PackedScene" uid="uid://bjxjcx2qu16q5" path="res://scenes/flask.tscn" id="2_jkgu4"]
[resource]
script = ExtResource("1_62sy8")
scene_to_spawn = ExtResource("2_jkgu4")
icon = ExtResource("1_kgkdo")
metadata/_custom_type_script = "uid://b3i73cilpra74"

BIN
assets/meshes/jar.res Normal file

Binary file not shown.

BIN
assets/meshes/jar_fill.res Normal file

Binary file not shown.

BIN
assets/models/Chemistry.glb Normal file

Binary file not shown.

View file

@ -0,0 +1,74 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bx5wihgk668w1"
path="res://.godot/imported/Chemistry.glb-8fa27a23d9fb0d06abbb958b7e8c5388.scn"
[deps]
source_file="res://assets/models/Chemistry.glb"
dest_files=["res://.godot/imported/Chemistry.glb-8fa27a23d9fb0d06abbb958b7e8c5388.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"@MATERIAL:3": {
"use_external/enabled": true,
"use_external/path": "uid://64m17act0kwu"
},
"mat_glass": {
"use_external/enabled": true,
"use_external/fallback_path": "res://assets/materials/mat_glass.tres",
"use_external/path": "uid://64m17act0kwu"
}
},
"meshes": {
"Chemistry_Circle_001": {
"generate/lightmap_uv": 0,
"generate/lods": 0,
"generate/shadow_meshes": 0,
"lods/normal_merge_angle": 20.0,
"save_to_file/enabled": true,
"save_to_file/fallback_path": "res://assets/meshes/jar_fill.res",
"save_to_file/path": "uid://dxeseuqcwne1m"
},
"Chemistry_Circle_003": {
"generate/lightmap_uv": 0,
"generate/lods": 0,
"generate/shadow_meshes": 0,
"lods/normal_merge_angle": 20.0,
"save_to_file/enabled": true,
"save_to_file/fallback_path": "res://assets/meshes/jar.res",
"save_to_file/path": "uid://dddqboph2ygmw"
}
}
}
gltf/naming_version=2
gltf/embedded_image_handling=1

BIN
assets/models/Drip.glb Normal file

Binary file not shown.

View file

@ -0,0 +1,50 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://bg8y4u2a4hx3p"
path="res://.godot/imported/Drip.glb-91c932019939c0c57a2bbeb7aa92f14a.scn"
[deps]
source_file="res://assets/models/Drip.glb"
dest_files=["res://.godot/imported/Drip.glb-91c932019939c0c57a2bbeb7aa92f14a.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={
"materials": {
"mat_glass": {
"use_external/enabled": true,
"use_external/fallback_path": "res://assets/materials/mat_glass.tres",
"use_external/path": "uid://64m17act0kwu"
}
}
}
gltf/naming_version=2
gltf/embedded_image_handling=1

Binary file not shown.

View file

@ -0,0 +1,42 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dwtaqdacgcysa"
path="res://.godot/imported/FlaskHolder.glb-686e08202ed3950f10d7e2c9519a8428.scn"
[deps]
source_file="res://assets/models/FlaskHolder.glb"
dest_files=["res://.godot/imported/FlaskHolder.glb-686e08202ed3950f10d7e2c9519a8428.scn"]
[params]
nodes/root_type=""
nodes/root_name=""
nodes/root_script=null
nodes/apply_root_scale=true
nodes/root_scale=1.0
nodes/import_as_skeleton_bones=false
nodes/use_name_suffixes=true
nodes/use_node_type_suffixes=true
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
meshes/force_disable_compression=false
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
animation/import_rest_as_RESET=false
import_script/path=""
materials/extract=0
materials/extract_format=0
materials/extract_path=""
_subresources={}
gltf/naming_version=2
gltf/embedded_image_handling=1

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://ctpbdqi5rvll5"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_8kg0o"]
[ext_resource type="Resource" uid="uid://cb148scow5112" path="res://assets/substances/AgNO3.tres" id="2_dkaga"]
[resource]
script = ExtResource("1_8kg0o")
substance = ExtResource("2_dkaga")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://bdbme26jh0616"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_x5037"]
[ext_resource type="Resource" uid="uid://dn10p6rbdd7qb" path="res://assets/substances/CH3COOH.tres" id="2_1mds3"]
[resource]
script = ExtResource("1_x5037")
substance = ExtResource("2_1mds3")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://wq4jmaqio5tj"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_gl6ue"]
[ext_resource type="Resource" uid="uid://dr65qbkum4emy" path="res://assets/substances/CH3COONa.tres" id="2_agk2i"]
[resource]
script = ExtResource("1_gl6ue")
substance = ExtResource("2_agk2i")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://dkj0be8n8hqrd"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_0mtjn"]
[ext_resource type="Resource" uid="uid://gs5ikp6h02kx" path="res://assets/substances/CaCl.tres" id="2_s10r6"]
[resource]
script = ExtResource("1_0mtjn")
substance = ExtResource("2_s10r6")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://drcsxqrfgtklt"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_jvmcm"]
[ext_resource type="Resource" uid="uid://ceq47d1v3l3ag" path="res://assets/substances/CuSO4.tres" id="2_uvje5"]
[resource]
script = ExtResource("1_jvmcm")
substance = ExtResource("2_uvje5")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://pofsgpx0irdn"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_cyap5"]
[ext_resource type="Resource" uid="uid://cai5kwbx8gpst" path="res://assets/substances/FeSO4.tres" id="2_725bo"]
[resource]
script = ExtResource("1_cyap5")
substance = ExtResource("2_725bo")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

9
assets/reagents/HCl.tres Normal file
View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://cxpovcqviqurr"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_5si53"]
[ext_resource type="Resource" uid="uid://bj3cdfwvgksee" path="res://assets/substances/HCl.tres" id="2_no7s4"]
[resource]
script = ExtResource("1_5si53")
substance = ExtResource("2_no7s4")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

9
assets/reagents/KCl.tres Normal file
View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://ic4x25e5j8o"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_av563"]
[ext_resource type="Resource" uid="uid://dcygjcbfhw6vv" path="res://assets/substances/KCl.tres" id="2_omcss"]
[resource]
script = ExtResource("1_av563")
substance = ExtResource("2_omcss")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

9
assets/reagents/KI.tres Normal file
View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://gn654lim8gy6"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_psyvl"]
[ext_resource type="Resource" uid="uid://catmteeotjc7v" path="res://assets/substances/KI.tres" id="2_33y5b"]
[resource]
script = ExtResource("1_psyvl")
substance = ExtResource("2_33y5b")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://bwvdeux5lbcmk"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_t5esp"]
[ext_resource type="Resource" uid="uid://de3dl5upbt163" path="res://assets/substances/LeadNitrate.tres" id="2_xaep7"]
[resource]
script = ExtResource("1_t5esp")
substance = ExtResource("2_xaep7")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://c24arc3ll2bpu"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_4peq4"]
[ext_resource type="Resource" uid="uid://bnywd2asdr3eo" path="res://assets/substances/MethylOrange.tres" id="2_8or78"]
[resource]
script = ExtResource("1_4peq4")
substance = ExtResource("2_8or78")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://u6wygb054jp5"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_6e5yj"]
[ext_resource type="Resource" uid="uid://b0pdv8e1ybr8h" path="res://assets/substances/NH4CL.tres" id="2_dvcpb"]
[resource]
script = ExtResource("1_6e5yj")
substance = ExtResource("2_dvcpb")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://dbq6clr3srk14"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_ebm1s"]
[ext_resource type="Resource" uid="uid://df17c818irsju" path="res://assets/substances/Na2CO3.tres" id="2_l80fk"]
[resource]
script = ExtResource("1_ebm1s")
substance = ExtResource("2_l80fk")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://bjp7cj6q4jpib"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_u8eof"]
[ext_resource type="Resource" uid="uid://by8jsgsb5c7ly" path="res://assets/substances/Na2S.tres" id="2_odsfk"]
[resource]
script = ExtResource("1_u8eof")
substance = ExtResource("2_odsfk")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://cr6nenbh0pufd"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_hmltd"]
[ext_resource type="Resource" uid="uid://chdrv5i45chwe" path="res://assets/substances/NaCl.tres" id="2_xtjyv"]
[resource]
script = ExtResource("1_hmltd")
substance = ExtResource("2_xtjyv")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://wlki8ccdmx5"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_twy2e"]
[ext_resource type="Resource" uid="uid://30ym4xb0uu3y" path="res://assets/substances/NaOH.tres" id="2_ymi7t"]
[resource]
script = ExtResource("1_twy2e")
substance = ExtResource("2_ymi7t")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,9 @@
[gd_resource type="Resource" script_class="Reagent" load_steps=3 format=3 uid="uid://dia0grmva8062"]
[ext_resource type="Script" uid="uid://bditqax8ibmxw" path="res://src/resources/reagent.gd" id="1_v8ev6"]
[ext_resource type="Resource" uid="uid://brih4gryc1acx" path="res://assets/substances/Phenolphtalein.tres" id="2_ikqma"]
[resource]
script = ExtResource("1_v8ev6")
substance = ExtResource("2_ikqma")
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://cb148scow5112"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_ntpww"]
[resource]
script = ExtResource("1_ntpww")
formula = &"AgNO_3"
scientific_name = &"Нитрат серебра"
melting_point = 209.7
boiling_point = 9999999999999.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://dn10p6rbdd7qb"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_2ft8j"]
[resource]
script = ExtResource("1_2ft8j")
formula = &"CH_3COOH"
scientific_name = &"Уксусная кислота"
melting_point = 16.75
boiling_point = 118.1
color = Color(1, 1, 1, 0.3372549)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://dr65qbkum4emy"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_551qc"]
[resource]
script = ExtResource("1_551qc")
formula = &"CH_3COONa"
scientific_name = &"Ацетат натрия"
melting_point = 328.0
boiling_point = 9999999999.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://gs5ikp6h02kx"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_iebgm"]
[resource]
script = ExtResource("1_iebgm")
formula = &"CaCl"
scientific_name = &"Хлорид кальция"
melting_point = 772.0
boiling_point = 1935.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://ceq47d1v3l3ag"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_7j6i3"]
[resource]
script = ExtResource("1_7j6i3")
formula = &"CuSO_4"
scientific_name = &"Сульфат меди (II)"
melting_point = 200.0
boiling_point = 21515.0
color = Color(0, 0.2166667, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://cai5kwbx8gpst"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_5q6dl"]
[resource]
script = ExtResource("1_5q6dl")
formula = &"FeSO_4"
scientific_name = &"Сульфат железа (II)"
melting_point = 1e+16
boiling_point = 1e+16
color = Color(0.35377085, 0.8262475, 0.78860706, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://bj3cdfwvgksee"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_jqfn0"]
[resource]
script = ExtResource("1_jqfn0")
formula = &"HCl"
scientific_name = &"Соляная кислота"
melting_point = -30.0
boiling_point = 48.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://dcygjcbfhw6vv"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_vjdlt"]
[resource]
script = ExtResource("1_vjdlt")
formula = &"KCl"
scientific_name = &"Хлорид калия"
melting_point = 776.0
boiling_point = 1407.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

12
assets/substances/KI.tres Normal file
View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://catmteeotjc7v"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r3ou2"]
[resource]
script = ExtResource("1_r3ou2")
formula = &"KI"
scientific_name = &"Йодид калия"
melting_point = 681.0
boiling_point = 1324.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://de3dl5upbt163"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_1rh8q"]
[resource]
script = ExtResource("1_1rh8q")
formula = &"Pb(NO_3)_2"
scientific_name = &"Нитрат свинца"
melting_point = 270.0
boiling_point = 999999.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://bnywd2asdr3eo"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_iruga"]
[resource]
script = ExtResource("1_iruga")
formula = &"C_14H_14N_3O_3SNa"
scientific_name = &"Метиловый оранжевый"
melting_point = 300.0
boiling_point = 520.0
color = Color(1, 0.26666665, 0, 1)
prefer_scientific_name = true
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://b0pdv8e1ybr8h"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_r754y"]
[resource]
script = ExtResource("1_r754y")
formula = &"NH_4Cl"
scientific_name = &"Соляная кислота"
melting_point = 337.6
boiling_point = 520.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://df17c818irsju"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_bi0ti"]
[resource]
script = ExtResource("1_bi0ti")
formula = &"Na_2CO_3"
scientific_name = &"Карбонат кария"
melting_point = 854.0
boiling_point = 1000.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://by8jsgsb5c7ly"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_34ksu"]
[resource]
script = ExtResource("1_34ksu")
formula = &"Na_2S"
scientific_name = &"Сульфид натрия"
melting_point = 1176.0
boiling_point = 99999999999.0
color = Color(0.9993091, 0.8301688, 0.668, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://chdrv5i45chwe"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_77jso"]
[resource]
script = ExtResource("1_77jso")
formula = &"NaCl"
scientific_name = &"Хлорид натрия"
melting_point = 800.8
boiling_point = 1465.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,12 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://30ym4xb0uu3y"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_m1aun"]
[resource]
script = ExtResource("1_m1aun")
formula = &"NaOH"
scientific_name = &"Гидроксид натрия"
melting_point = 323.0
boiling_point = 1403.0
color = Color(1, 1, 1, 1)
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -0,0 +1,13 @@
[gd_resource type="Resource" script_class="Substance" load_steps=2 format=3 uid="uid://brih4gryc1acx"]
[ext_resource type="Script" uid="uid://b8q5buwgvppyh" path="res://src/resources/substance.gd" id="1_td2hf"]
[resource]
script = ExtResource("1_td2hf")
formula = &"C_20H_14O_4"
scientific_name = &"Фенолфталеин"
melting_point = 278.0
boiling_point = 557.8
color = Color(1, 1, 1, 0.43529412)
prefer_scientific_name = true
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

67
export_presets.cfg Normal file
View file

@ -0,0 +1,67 @@
[preset.0]
name="Windows Desktop"
platform="Windows Desktop"
runnable=true
advanced_options=false
dedicated_server=false
custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="exports/lab-electrolyte.exe"
patches=PackedStringArray()
encryption_include_filters=""
encryption_exclude_filters=""
seed=0
encrypt_pck=false
encrypt_directory=false
script_export_mode=2
[preset.0.options]
custom_template/debug=""
custom_template/release=""
debug/export_console_wrapper=1
binary_format/embed_pck=true
texture_format/s3tc_bptc=true
texture_format/etc2_astc=false
shader_baker/enabled=false
binary_format/architecture="x86_64"
codesign/enable=false
codesign/timestamp=true
codesign/timestamp_server_url=""
codesign/digest_algorithm=1
codesign/description=""
codesign/custom_options=PackedStringArray()
application/modify_resources=true
application/icon=""
application/console_wrapper_icon=""
application/icon_interpolation=4
application/file_version=""
application/product_version=""
application/company_name=""
application/product_name=""
application/file_description=""
application/copyright=""
application/trademarks=""
application/export_angle=0
application/export_d3d12=0
application/d3d12_agility_sdk_multiarch=true
ssh_remote_deploy/enabled=false
ssh_remote_deploy/host="user@host_ip"
ssh_remote_deploy/port="22"
ssh_remote_deploy/extra_args_ssh=""
ssh_remote_deploy/extra_args_scp=""
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
Start-ScheduledTask -TaskName godot_remote_debug
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
Remove-Item -Recurse -Force '{temp_dir}'"

Binary file not shown.

BIN
exports/lab-electrolyte.exe Normal file

Binary file not shown.

BIN
exports/test.zip Normal file

Binary file not shown.

View file

@ -18,6 +18,7 @@ config/icon="res://icon.svg"
[autoload] [autoload]
GuiSignalBus="*res://src/gui_signal_bus.gd" GuiSignalBus="*res://src/gui_signal_bus.gd"
ReactionRegistry="*res://src/reaction_registry.gd"
[input] [input]
@ -31,6 +32,7 @@ drag_camera={
3d_physics/layer_1="Drag" 3d_physics/layer_1="Drag"
3d_physics/layer_2="Interaction" 3d_physics/layer_2="Interaction"
3d_physics/layer_3="FlaskInteraction"
[rendering] [rendering]

14
scenes/drag_and_drop.tscn Normal file
View file

@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://vhn8h4mhb6nh"]
[ext_resource type="Script" uid="uid://ds5u02jdtxyd4" path="res://src/ui/drag_and_drop.gd" id="1_33df7"]
[node name="DragAndDrop" type="Button"]
anchors_preset = -1
anchor_right = 0.043
anchor_bottom = 0.07700001
offset_right = 0.4639969
offset_bottom = 0.10399628
mouse_filter = 1
script = ExtResource("1_33df7")
[connection signal="button_down" from="." to="." method="_on_button_down"]

View file

@ -1,46 +1,61 @@
[gd_scene load_steps=9 format=3 uid="uid://bjxjcx2qu16q5"] [gd_scene load_steps=11 format=3 uid="uid://bjxjcx2qu16q5"]
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_vcwhe"] [ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_0xufn"]
[ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="2_627mb"] [ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_h7awq"]
[ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_qf1og"] [ext_resource type="Script" uid="uid://mjx50qh1bwv3" path="res://src/interactible/interaction_reciever.gd" id="3_ailwx"]
[ext_resource type="Script" uid="uid://e8xu57ewvb5a" path="res://src/interactible/proximity_rotator.gd" id="3_00eeh"] [ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="4_kkw7a"]
[ext_resource type="Script" uid="uid://b1gv6dt8bwj2p" path="res://src/interactible/returner.gd" id="5_bqclg"] [ext_resource type="Script" uid="uid://e8xu57ewvb5a" path="res://src/interactible/proximity_rotator.gd" id="5_rqua0"]
[ext_resource type="Script" uid="uid://dteb2xxl8gixp" path="res://src/ui/slider_display.gd" id="5_qb0nw"] [ext_resource type="Script" uid="uid://dteb2xxl8gixp" path="res://src/ui/slider_display.gd" id="6_wadb5"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"]
radius = 0.1 radius = 0.1
height = 0.9921875 height = 0.9921875
[sub_resource type="CylinderShape3D" id="CylinderShape3D_0xufn"]
height = 0.16210938
radius = 0.625
[sub_resource type="SphereShape3D" id="SphereShape3D_vcwhe"] [sub_resource type="SphereShape3D" id="SphereShape3D_vcwhe"]
radius = 0.49649125 radius = 0.49649125
[node name="DraggableObject" type="Area3D"] [sub_resource type="Curve" id="Curve_qb0nw"]
script = ExtResource("1_vcwhe") _data = [Vector2(0, 0), 0.0, 0.067761436, 0, 0, Vector2(0.75, 1), 0.0, 0.0, 0, 0]
point_count = 2
[node name="Flask" type="Area3D"]
script = ExtResource("1_0xufn")
[node name="DragArea" type="CollisionShape3D" parent="."] [node name="DragArea" type="CollisionShape3D" parent="."]
shape = SubResource("CapsuleShape3D_vcwhe") shape = SubResource("CapsuleShape3D_vcwhe")
[node name="FlaskNew" parent="." instance=ExtResource("2_qf1og")] [node name="FlaskNew" parent="." instance=ExtResource("2_h7awq")]
transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, -0.38859487, 0) transform = Transform3D(0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1, 0, -0.38859487, 0)
[node name="InteractibleArea" type="Area3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6011598, 0)
collision_layer = 6
collision_mask = 0
script = ExtResource("3_ailwx")
metadata/_custom_type_script = "uid://mjx50qh1bwv3"
[node name="CollisionShape3D" type="CollisionShape3D" parent="InteractibleArea"]
shape = SubResource("CylinderShape3D_0xufn")
[node name="InteractionArea" type="Area3D" parent="." node_paths=PackedStringArray("interaction_dialog")] [node name="InteractionArea" type="Area3D" parent="." node_paths=PackedStringArray("interaction_dialog")]
collision_layer = 2 collision_layer = 2
collision_mask = 2 collision_mask = 2
input_ray_pickable = false input_ray_pickable = false
script = ExtResource("2_627mb") script = ExtResource("4_kkw7a")
interaction_dialog = NodePath("../InteractionDialog") interaction_dialog = NodePath("../InteractionDialog")
[node name="InteractionArea" type="CollisionShape3D" parent="InteractionArea"] [node name="InteractionArea" type="CollisionShape3D" parent="InteractionArea"]
shape = SubResource("SphereShape3D_vcwhe") shape = SubResource("SphereShape3D_vcwhe")
[node name="ProximityRotator" type="Node" parent="." node_paths=PackedStringArray("rotated")] [node name="ProximityRotator" type="Node" parent="." node_paths=PackedStringArray("rotated")]
script = ExtResource("3_00eeh") script = ExtResource("5_rqua0")
rotated = NodePath("..") rotated = NodePath("..")
proximity_radius = 0.746 proximity_radius = 0.1
modification_curve = SubResource("Curve_qb0nw")
[node name="Returner" type="Node" parent="." node_paths=PackedStringArray("node")]
script = ExtResource("5_bqclg")
node = NodePath("..")
[node name="InteractionDialog" type="ConfirmationDialog" parent="."] [node name="InteractionDialog" type="ConfirmationDialog" parent="."]
oversampling_override = 1.0 oversampling_override = 1.0
@ -56,14 +71,14 @@ offset_bottom = 82.0
[node name="Label" type="Label" parent="InteractionDialog/VBoxContainer"] [node name="Label" type="Label" parent="InteractionDialog/VBoxContainer"]
layout_mode = 2 layout_mode = 2
text = "Введите объём" text = "Введите количество"
[node name="HBoxContainer" type="HBoxContainer" parent="InteractionDialog/VBoxContainer"] [node name="HBoxContainer" type="HBoxContainer" parent="InteractionDialog/VBoxContainer"]
layout_mode = 2 layout_mode = 2
[node name="AmountLabel" type="Label" parent="InteractionDialog/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("slider")] [node name="AmountLabel" type="Label" parent="InteractionDialog/VBoxContainer/HBoxContainer" node_paths=PackedStringArray("slider")]
layout_mode = 2 layout_mode = 2
script = ExtResource("5_qb0nw") script = ExtResource("6_wadb5")
slider = NodePath("../HSlider") slider = NodePath("../HSlider")
suffix = "%" suffix = "%"
@ -72,6 +87,5 @@ layout_mode = 2
size_flags_horizontal = 3 size_flags_horizontal = 3
[connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"] [connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"]
[connection signal="interaction_closed" from="InteractionArea" to="Returner" method="return_to_start"]
[connection signal="interaction_reciever_entered" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_entered"] [connection signal="interaction_reciever_entered" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_entered"]
[connection signal="interaction_reciever_exited" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_exited"] [connection signal="interaction_reciever_exited" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_exited"]

View file

@ -11,7 +11,7 @@ cap_top = false
[sub_resource type="CylinderShape3D" id="CylinderShape3D_auicg"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_auicg"]
height = 0.7128906 height = 0.7128906
radius = 0.75 radius = 0.49804688
[node name="InteractibleObject" type="Area3D"] [node name="InteractibleObject" type="Area3D"]
collision_layer = 2 collision_layer = 2

View file

@ -1,9 +1,12 @@
[gd_scene load_steps=6 format=3 uid="uid://c7r4rhgj3ucao"] [gd_scene load_steps=9 format=3 uid="uid://c7r4rhgj3ucao"]
[ext_resource type="PackedScene" uid="uid://bjxjcx2qu16q5" path="res://scenes/draggable_object.tscn" id="1_bb6uc"] [ext_resource type="PackedScene" uid="uid://bjxjcx2qu16q5" path="res://scenes/flask.tscn" id="1_bb6uc"]
[ext_resource type="Script" uid="uid://crjao0jjv5yqs" path="res://src/drag/draggable_camera.gd" id="1_hem3r"] [ext_resource type="Script" uid="uid://crjao0jjv5yqs" path="res://src/drag/draggable_camera.gd" id="1_hem3r"]
[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"]
[ext_resource type="PackedScene" uid="uid://q1y0r2rn0qb4" path="res://scenes/interactible_object.tscn" id="4_f680m"] [ext_resource type="PackedScene" uid="uid://bx5wihgk668w1" path="res://assets/models/Chemistry.glb" id="5_q4uld"]
[ext_resource type="PackedScene" uid="uid://bg8y4u2a4hx3p" path="res://assets/models/Drip.glb" id="6_gipex"]
[ext_resource type="PackedScene" uid="uid://dwtaqdacgcysa" path="res://assets/models/FlaskHolder.glb" id="7_064jp"]
[ext_resource type="Environment" uid="uid://clgblxkcf822n" path="res://assets/Environment.tres" id="8_4kvtl"]
[sub_resource type="BoxMesh" id="BoxMesh_cbcd7"] [sub_resource type="BoxMesh" id="BoxMesh_cbcd7"]
size = Vector3(3.535, 1, 1) size = Vector3(3.535, 1, 1)
@ -11,23 +14,36 @@ size = Vector3(3.535, 1, 1)
[node name="Lab" type="Node3D"] [node name="Lab" type="Node3D"]
[node name="MeshInstance3D" type="MeshInstance3D" parent="."] [node name="MeshInstance3D" type="MeshInstance3D" parent="."]
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" type="Camera3D" parent="."] [node name="Camera3D" type="Camera3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.236948, 0.9448395, 1.8294222) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.236948, 0.9448395, 1.8294222)
script = ExtResource("1_hem3r") script = ExtResource("1_hem3r")
[node name="DraggableObject" parent="." instance=ExtResource("1_bb6uc")] [node name="Flask" parent="." instance=ExtResource("1_bb6uc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.7153518, 0.9448395, 0.0039073825) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.6518283, 1.0920403, 0.0039073825)
[node name="Flask2" parent="." instance=ExtResource("1_bb6uc")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -3.542716, 1.0920403, 0.20219529)
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."] [node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
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="InteractibleObject" parent="." instance=ExtResource("4_f680m")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.11957906, 0.87858754, -0.0035084486)
[node name="UI" type="CanvasLayer" parent="."] [node name="UI" type="CanvasLayer" parent="."]
layer = 100 layer = 100
[node name="UserInterface" parent="UI" instance=ExtResource("3_hflkp")] [node name="UserInterface" parent="UI" instance=ExtResource("3_hflkp")]
[node name="Chemistry" parent="." instance=ExtResource("5_q4uld")]
transform = Transform3D(-1.0927847e-08, 0, -0.25, 0, 0.25, 0, 0.25, 0, -1.0927847e-08, -3.030859, 0.55043614, -0.9607215)
[node name="Drip2" parent="." instance=ExtResource("6_gipex")]
transform = Transform3D(0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 1.3666252, 0.06701976, 0.014619827)
[node name="FlaskHolder2" parent="." instance=ExtResource("7_064jp")]
transform = Transform3D(0.09002048, 0, -0.04354668, 0, 0.1, 0, 0.04354668, 0, 0.09002048, -3.3602376, 1.0968089, 0.2888375)
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = ExtResource("8_4kvtl")

View file

@ -0,0 +1,46 @@
[gd_scene load_steps=2 format=3 uid="uid://bcj0mesdlfsfj"]
[ext_resource type="Script" uid="uid://c4tsyohkw45p4" path="res://src/ui/popup_container.gd" id="1_xul1r"]
[node name="PopupContainer" type="Panel"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_right = 25.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_xul1r")
[node name="ScrollContainer" type="ScrollContainer" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_right = 0.97900003
anchor_bottom = 1.0
offset_right = -0.28308105
grow_horizontal = 2
grow_vertical = 2
horizontal_scroll_mode = 0
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 3
[node name="Label" type="Label" parent="."]
layout_mode = 1
anchors_preset = -1
anchor_left = 1.0
anchor_top = 0.0014401659
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -25.0
offset_top = 647.0668
offset_right = 622.0668
offset_bottom = 49.0
grow_vertical = 2
rotation = -1.5707964
text = "Инструменты
"
horizontal_alignment = 1
vertical_alignment = 1
metadata/_edit_use_anchors_ = true

View file

@ -0,0 +1,14 @@
[gd_scene load_steps=2 format=3 uid="uid://blj2j7a4uyr05"]
[ext_resource type="Script" uid="uid://b2w4adq02ywrl" path="res://src/ui/reagent_drag_and_drop.gd" id="1_1whj1"]
[node name="DragAndDrop" type="Button"]
anchors_preset = -1
anchor_right = 0.043
anchor_bottom = 0.07700001
offset_right = 0.4639969
offset_bottom = 0.10399628
mouse_filter = 1
script = ExtResource("1_1whj1")
[connection signal="button_down" from="." to="." method="_on_button_down"]

85
scenes/substance_jar.tscn Normal file
View file

@ -0,0 +1,85 @@
[gd_scene load_steps=10 format=3 uid="uid://cw6v8kbi76qak"]
[ext_resource type="Script" uid="uid://bjnv2g1ni0525" path="res://src/drag/draggable_object.gd" id="1_o7vug"]
[ext_resource type="ArrayMesh" uid="uid://dddqboph2ygmw" path="res://assets/meshes/jar.res" id="2_o7vug"]
[ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="3_00jpx"]
[ext_resource type="Script" uid="uid://e8xu57ewvb5a" path="res://src/interactible/proximity_rotator.gd" id="4_ymvgp"]
[ext_resource type="ArrayMesh" uid="uid://dxeseuqcwne1m" path="res://assets/meshes/jar_fill.res" id="6_kfk5m"]
[ext_resource type="Script" uid="uid://co33kqhl3n06u" path="res://src/interactible/destructor.gd" id="7_00jpx"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_kfk5m"]
height = 0.5024414
radius = 0.22460938
[sub_resource type="SphereShape3D" id="SphereShape3D_vcwhe"]
radius = 0.49649125
[sub_resource type="Curve" id="Curve_qb0nw"]
_data = [Vector2(0, 0), 0.0, 0.067761436, 0, 0, Vector2(0.75, 1), 0.0, 0.0, 0, 0]
point_count = 2
[node name="Flask" type="Area3D"]
script = ExtResource("1_o7vug")
[node name="Jar" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.20877336, 0)
mesh = ExtResource("2_o7vug")
[node name="DragArea" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.04284668, 0)
shape = SubResource("CylinderShape3D_kfk5m")
[node name="InteractionArea" type="Area3D" parent="." node_paths=PackedStringArray("interaction_dialog")]
collision_layer = 4
collision_mask = 4
input_ray_pickable = false
script = ExtResource("3_00jpx")
interaction_dialog = NodePath("../InteractionDialog")
[node name="InteractionArea" type="CollisionShape3D" parent="InteractionArea"]
shape = SubResource("SphereShape3D_vcwhe")
[node name="ProximityRotator" type="Node" parent="." node_paths=PackedStringArray("rotated")]
script = ExtResource("4_ymvgp")
rotated = NodePath("..")
proximity_radius = 0.1
modification_curve = SubResource("Curve_qb0nw")
[node name="InteractionDialog" type="ConfirmationDialog" parent="."]
oversampling_override = 1.0
position = Vector2i(0, 36)
size = Vector2i(200, 131)
borderless = true
[node name="VBoxContainer" type="VBoxContainer" parent="InteractionDialog"]
offset_left = 8.0
offset_top = 8.0
offset_right = 192.0
offset_bottom = 82.0
[node name="Label" type="Label" parent="InteractionDialog/VBoxContainer"]
layout_mode = 2
text = "Введите объём"
[node name="HBoxContainer" type="HBoxContainer" parent="InteractionDialog/VBoxContainer"]
layout_mode = 2
[node name="SpinBox" type="SpinBox" parent="InteractionDialog/VBoxContainer/HBoxContainer"]
layout_mode = 2
max_value = 10.0
step = 0.01
allow_greater = true
suffix = "мг"
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.20759426, 0)
mesh = ExtResource("6_kfk5m")
[node name="DestructorOnStop" type="Node" parent="." node_paths=PackedStringArray("node")]
script = ExtResource("7_00jpx")
node = NodePath("..")
[connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"]
[connection signal="interaction_closed" from="InteractionArea" to="DestructorOnStop" method="destruct"]
[connection signal="interaction_reciever_entered" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_entered"]
[connection signal="interaction_reciever_exited" from="InteractionArea" to="ProximityRotator" method="_on_interaction_area_interaction_reciever_exited"]

View file

@ -1,4 +1,9 @@
[gd_scene format=3 uid="uid://dfxlr4svnsdyx"] [gd_scene load_steps=5 format=3 uid="uid://dfxlr4svnsdyx"]
[ext_resource type="PackedScene" uid="uid://bcj0mesdlfsfj" path="res://scenes/popup_container.tscn" id="1_nt7q6"]
[ext_resource type="Script" uid="uid://c5pv2idedy1oy" path="res://src/ui/reagents_gen.gd" id="2_x4jx1"]
[ext_resource type="PackedScene" uid="uid://vhn8h4mhb6nh" path="res://scenes/drag_and_drop.tscn" id="3_yev5y"]
[ext_resource type="Resource" uid="uid://cay05wpketmny" path="res://assets/draggables/test_draggable.tres" id="4_gdt2y"]
[node name="UserInterface" type="Control"] [node name="UserInterface" type="Control"]
layout_mode = 3 layout_mode = 3
@ -17,6 +22,36 @@ anchor_right = 1.0
offset_bottom = 31.0 offset_bottom = 31.0
grow_horizontal = 2 grow_horizontal = 2
deselect_enabled = true deselect_enabled = true
tab_count = 2 tab_count = 3
tab_0/title = "Реагенты" tab_0/title = "Ход работы"
tab_1/title = "Отчёт" tab_1/title = "Вопросы для самопроверки"
tab_2/title = "Отчёт"
[node name="Reagents" parent="." instance=ExtResource("1_nt7q6")]
layout_mode = 1
anchors_preset = -1
anchor_left = -0.14756945
anchor_top = 0.047839507
anchor_right = 0.0
anchor_bottom = 0.69753087
text = "Вещества"
metadata/_edit_use_anchors_ = true
[node name="Generator" type="Node" parent="Reagents"]
script = ExtResource("2_x4jx1")
[node name="Intruments" parent="." instance=ExtResource("1_nt7q6")]
layout_mode = 1
anchors_preset = -1
anchor_left = -0.14756945
anchor_top = 0.69753087
anchor_right = 0.0
text = "Инструменты"
metadata/_edit_use_anchors_ = true
[node name="DragAndDrop" parent="Intruments/ScrollContainer/VBoxContainer" index="0" instance=ExtResource("3_yev5y")]
layout_mode = 2
text = "Пробирка"
draggable = ExtResource("4_gdt2y")
[editable path="Intruments"]

View file

@ -14,7 +14,7 @@ func _mouse_enter() -> void:
func _mouse_exit() -> void: func _mouse_exit() -> void:
mouse_in = false mouse_in = false
func _process(delta: float) -> void: func _process(_delta: float) -> void:
if dragged == false: if dragged == false:
return return
var camera: Camera3D = get_viewport().get_camera_3d() var camera: Camera3D = get_viewport().get_camera_3d()

View file

@ -0,0 +1,6 @@
extends Node
@export var node: Node3D
func destruct() -> void:
node.queue_free()

View file

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

View file

@ -2,9 +2,13 @@ extends Node
@export var rotated: Node3D @export var rotated: Node3D
@export var proximity_radius: float @export var proximity_radius: float
@onready var start_rotation = rotated.quaternion @export var modification_curve: Curve
var start_rotation
var reciever: InteractionReciever var reciever: InteractionReciever
func _ready() -> void:
start_rotation = rotated.quaternion
func _on_interaction_area_interaction_reciever_entered(rec: InteractionReciever) -> void: func _on_interaction_area_interaction_reciever_entered(rec: InteractionReciever) -> void:
if reciever == null: if reciever == null:
reciever = rec reciever = rec
@ -23,5 +27,6 @@ func _process(_delta: float) -> void:
var camera: Camera3D = get_viewport().get_camera_3d() var camera: Camera3D = get_viewport().get_camera_3d()
var rotation_direction : float = -sign(camera.basis.x.dot(reciever.global_position - rotated.global_position)) var rotation_direction : float = -sign(camera.basis.x.dot(reciever.global_position - rotated.global_position))
var result_quaternion: Quaternion = Quaternion(-camera.basis.z,PI + 1.5707963267948966 * rotation_direction) var result_quaternion: Quaternion = Quaternion(-camera.basis.z,PI + 1.5707963267948966 * rotation_direction)
var calculated_angle: Quaternion = start_rotation.slerp(result_quaternion,clamp(proximity_radius/rotated.global_position.distance_to(reciever.global_position),0,1)) var distance_without_y: float = Vector2(rotated.global_position.x,rotated.global_position.z).distance_to(Vector2(reciever.global_position.x,reciever.global_position.z))
var calculated_angle: Quaternion = start_rotation.slerp(result_quaternion,modification_curve.sample(clamp(proximity_radius/distance_without_y,0,1)))
rotated.quaternion = calculated_angle rotated.quaternion = calculated_angle

23
src/reaction_registry.gd Normal file
View file

@ -0,0 +1,23 @@
extends Node
const REACTIONS_DIRECTORY = "res://assets/reactions/"
var reactions: Array[Reaction]
func _ready() -> void:
for file in ResourceLoader.list_directory(REACTIONS_DIRECTORY):
reactions.append(load(REACTIONS_DIRECTORY + file))
func react(input_substances: Array[Substance], temperature: float) -> Array[Substance]:
var filter_func: Callable = func(reaction: Reaction) -> bool:
if reaction.reaction_temperature != -1:
return (reaction.input_substances == input_substances) and temperature >= reaction.reaction_temperature
else:
return reaction.input_substances == input_substances
var filtered: Array[Reaction] = reactions.filter(filter_func)
if len(filtered) > 0:
return filtered[0].output_substances.duplicate()
else:
return []

View file

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

View file

@ -0,0 +1,7 @@
extends Resource
class_name Draggable
@export var scene_to_spawn: PackedScene
@export var icon: Texture2D

View file

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

View file

@ -0,0 +1,7 @@
extends Resource
class_name Reaction
@export var input_substances: Array[Substance]
@export var output_substances: Array[Substance]
@export var reaction_temperature: float = -1

View file

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

6
src/resources/reagent.gd Normal file
View file

@ -0,0 +1,6 @@
extends Resource
class_name Reagent
@export var substance: Substance
@export var storage: PackedScene = preload("res://scenes/substance_jar.tscn")

View file

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

View file

@ -0,0 +1,13 @@
extends Resource
class_name Substance
@export var formula: StringName
@export var scientific_name: StringName
@export var melting_point: float
@export var boiling_point: float
@export var color: Color
@export var prefer_scientific_name: bool
func get_formula() -> StringName:
return scientific_name if prefer_scientific_name else formula

View file

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

13
src/ui/drag_and_drop.gd Normal file
View file

@ -0,0 +1,13 @@
extends Button
@export var draggable: Draggable
func _on_button_down() -> void:
var scene = draggable.scene_to_spawn.instantiate()
if scene is DraggableObject:
scene.dragged = true
scene.mouse_in = true
get_tree().current_scene.add_child(scene)
var camera = get_viewport().get_camera_3d()
scene.global_position = camera.project_position(get_global_mouse_position(),1.8)

View file

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

34
src/ui/popup_container.gd Normal file
View file

@ -0,0 +1,34 @@
extends Control
@export var show_animation_time: float = 0.25
@export var text: String = ""
var tween: Tween
@onready var default_left_anchor: float = anchor_left
@onready var default_right_anchor: float = anchor_right
func _ready() -> void:
mouse_entered.connect(show_menu)
mouse_exited.connect(hide_menu)
$Label.text = text
func show_menu() -> void:
if tween:
tween.kill()
tween = create_tween()
tween.tween_property(self,"anchor_right",default_right_anchor + abs(default_left_anchor),show_animation_time)
tween.parallel()
tween.tween_property(self,"anchor_left",default_right_anchor,show_animation_time)
func hide_menu() -> void:
if tween:
tween.kill()
tween = create_tween()
tween.tween_property(self,"anchor_right",default_right_anchor,show_animation_time)
tween.parallel()
tween.tween_property(self,"anchor_left",default_left_anchor,show_animation_time)
func add_element(node: Node):
$ScrollContainer/VBoxContainer.add_child(node)

View file

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

View file

@ -0,0 +1,16 @@
extends Button
var reagent: Reagent
func _ready() -> void:
text = reagent.substance.get_formula()
func _on_button_down() -> void:
var scene = reagent.storage.instantiate()
if scene is DraggableObject:
scene.dragged = true
scene.mouse_in = true
get_tree().current_scene.add_child(scene)
var camera = get_viewport().get_camera_3d()
scene.global_position = camera.project_position(get_global_mouse_position(),1.8)

View file

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

12
src/ui/reagents_gen.gd Normal file
View file

@ -0,0 +1,12 @@
extends Node
const dnd_button = preload("res://scenes/reactives_drag_and_drop.tscn")
const reagent_dir = "res://assets/reagents/"
func _ready() -> void:
for file in ResourceLoader.list_directory(reagent_dir):
var button = dnd_button.instantiate()
button.reagent = load(reagent_dir+file)
get_parent().add_element.call_deferred(button)

View file

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