Lab data
This commit is contained in:
parent
a143c0291e
commit
e1e7c70147
39 changed files with 279 additions and 60 deletions
|
|
@ -6,4 +6,5 @@
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_bi20d")
|
script = ExtResource("1_bi20d")
|
||||||
scene_to_spawn = ExtResource("1_welab")
|
scene_to_spawn = ExtResource("1_welab")
|
||||||
|
text = "Горелка"
|
||||||
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Draggable" load_steps=4 format=3 uid="uid://cay05wpketmny"]
|
[gd_resource type="Resource" script_class="Draggable" format=3 uid="uid://cay05wpketmny"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://b3i73cilpra74" path="res://src/resources/draggable.gd" id="1_62sy8"]
|
[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="Texture2D" uid="uid://bdyc1cwthn845" path="res://icon.svg" id="1_kgkdo"]
|
||||||
|
|
@ -8,4 +8,5 @@
|
||||||
script = ExtResource("1_62sy8")
|
script = ExtResource("1_62sy8")
|
||||||
scene_to_spawn = ExtResource("2_jkgu4")
|
scene_to_spawn = ExtResource("2_jkgu4")
|
||||||
icon = ExtResource("1_kgkdo")
|
icon = ExtResource("1_kgkdo")
|
||||||
|
text = "Пробирка"
|
||||||
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_51n86")
|
script = ExtResource("2_51n86")
|
||||||
scene_to_spawn = ExtResource("1_7g7il")
|
scene_to_spawn = ExtResource("1_7g7il")
|
||||||
|
text = "Держатель для пробирок"
|
||||||
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
[gd_resource type="Resource" script_class="Draggable" load_steps=4 format=3 uid="uid://6vpr6n7yruie"]
|
[gd_resource type="Resource" script_class="Draggable" format=3 uid="uid://6vpr6n7yruie"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://bdyc1cwthn845" path="res://icon.svg" id="1_d0umj"]
|
[ext_resource type="Texture2D" uid="uid://bdyc1cwthn845" path="res://icon.svg" id="1_d0umj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://emm545mj0kba" path="res://scenes/spoon.tscn" id="2_d0umj"]
|
[ext_resource type="PackedScene" uid="uid://emm545mj0kba" path="res://scenes/spoon.tscn" id="2_d0umj"]
|
||||||
|
|
@ -8,4 +8,5 @@
|
||||||
script = ExtResource("3_bov6l")
|
script = ExtResource("3_bov6l")
|
||||||
scene_to_spawn = ExtResource("2_d0umj")
|
scene_to_spawn = ExtResource("2_d0umj")
|
||||||
icon = ExtResource("1_d0umj")
|
icon = ExtResource("1_d0umj")
|
||||||
|
text = "Ложка"
|
||||||
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,5 @@
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_3vd4e")
|
script = ExtResource("2_3vd4e")
|
||||||
scene_to_spawn = ExtResource("1_fqoq4")
|
scene_to_spawn = ExtResource("1_fqoq4")
|
||||||
|
text = "Штатив"
|
||||||
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
metadata/_custom_type_script = "uid://b3i73cilpra74"
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
[ext_resource type="Resource" uid="uid://drcsxqrfgtklt" path="res://assets/reagents/CuSO4.tres" id="7_x21in"]
|
[ext_resource type="Resource" uid="uid://drcsxqrfgtklt" path="res://assets/reagents/CuSO4.tres" id="7_x21in"]
|
||||||
[ext_resource type="Resource" uid="uid://pofsgpx0irdn" path="res://assets/reagents/FeSO4.tres" id="8_54yhc"]
|
[ext_resource type="Resource" uid="uid://pofsgpx0irdn" path="res://assets/reagents/FeSO4.tres" id="8_54yhc"]
|
||||||
[ext_resource type="Resource" uid="uid://dy6b5n8gadtf0" path="res://labs/lab-electrolyte/experiment-7.tres" id="8_cpwlt"]
|
[ext_resource type="Resource" uid="uid://dy6b5n8gadtf0" path="res://labs/lab-electrolyte/experiment-7.tres" id="8_cpwlt"]
|
||||||
[ext_resource type="Resource" uid="uid://bbbrxgvfp4jvg" path="res://assets/reagents/H2O.tres" id="9_0vi5e"]
|
[ext_resource type="Resource" path="res://assets/reagents/H2O.tres" id="9_0vi5e"]
|
||||||
[ext_resource type="Resource" uid="uid://cxpovcqviqurr" path="res://assets/reagents/HCl.tres" id="10_nk7ls"]
|
[ext_resource type="Resource" uid="uid://cxpovcqviqurr" path="res://assets/reagents/HCl.tres" id="10_nk7ls"]
|
||||||
[ext_resource type="Resource" uid="uid://ic4x25e5j8o" path="res://assets/reagents/KCl.tres" id="11_gdam5"]
|
[ext_resource type="Resource" uid="uid://ic4x25e5j8o" path="res://assets/reagents/KCl.tres" id="11_gdam5"]
|
||||||
[ext_resource type="Resource" uid="uid://gn654lim8gy6" path="res://assets/reagents/KI.tres" id="12_187c3"]
|
[ext_resource type="Resource" uid="uid://gn654lim8gy6" path="res://assets/reagents/KI.tres" id="12_187c3"]
|
||||||
|
|
@ -35,11 +35,18 @@
|
||||||
[ext_resource type="Resource" uid="uid://cm2is1qooywkf" path="res://assets/draggables/holder.tres" id="26_lp3qm"]
|
[ext_resource type="Resource" uid="uid://cm2is1qooywkf" path="res://assets/draggables/holder.tres" id="26_lp3qm"]
|
||||||
[ext_resource type="Resource" uid="uid://6vpr6n7yruie" path="res://assets/draggables/spoon.tres" id="27_ytmy7"]
|
[ext_resource type="Resource" uid="uid://6vpr6n7yruie" path="res://assets/draggables/spoon.tres" id="27_ytmy7"]
|
||||||
[ext_resource type="Resource" uid="uid://dnxpw2metn0oq" path="res://assets/draggables/stand.tres" id="28_fsm27"]
|
[ext_resource type="Resource" uid="uid://dnxpw2metn0oq" path="res://assets/draggables/stand.tres" id="28_fsm27"]
|
||||||
|
[ext_resource type="Resource" uid="uid://38g2jgwy6hcb" path="res://labs/lab-electrolyte/test-1.tres" id="30_je2gp"]
|
||||||
|
[ext_resource type="Resource" uid="uid://3udi5fpewxx8" path="res://labs/lab-electrolyte/test-2.tres" id="31_cpwlt"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ignwsng3bt4e" path="res://labs/lab-electrolyte/test-3.tres" id="32_anse4"]
|
||||||
|
[ext_resource type="Resource" uid="uid://ber4xlsqegke0" path="res://labs/lab-electrolyte/test-4.tres" id="33_vgv2h"]
|
||||||
|
[ext_resource type="Resource" uid="uid://d13fl2bs8o6oa" path="res://labs/lab-electrolyte/test-5.tres" id="34_eolar"]
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("3_pogou")
|
script = ExtResource("3_pogou")
|
||||||
lab_name = "Лабораторная работа №8 - Растворы электролитов"
|
lab_name = "Лабораторная работа №8 - Растворы электролитов"
|
||||||
|
tasks = "Ознакомиться с методами получения слабых кислот и оснований. Изучить влияние введения одноименного иона на смещение равновесия диссоциации слабого электролита. Ознакомиться с различными типами реакций обмена в водных растворах электролитов."
|
||||||
|
equipment = "Пробирки. Кислоты, основания, соли, индикаторы."
|
||||||
experiments = Array[ExtResource("1_28qla")]([ExtResource("2_nk7ls"), ExtResource("3_gdam5"), ExtResource("4_187c3"), ExtResource("5_ujot4"), ExtResource("6_w3d37"), ExtResource("7_je2gp"), ExtResource("8_cpwlt")])
|
experiments = Array[ExtResource("1_28qla")]([ExtResource("2_nk7ls"), ExtResource("3_gdam5"), ExtResource("4_187c3"), ExtResource("5_ujot4"), ExtResource("6_w3d37"), ExtResource("7_je2gp"), ExtResource("8_cpwlt")])
|
||||||
|
tests = Array[ExtResource("4_6s74a")]([ExtResource("30_je2gp"), ExtResource("31_cpwlt"), ExtResource("32_anse4"), ExtResource("33_vgv2h"), ExtResource("34_eolar")])
|
||||||
reagents = Array[ExtResource("2_mabxg")]([ExtResource("3_nu2d0"), ExtResource("4_83o17"), ExtResource("5_4xn0j"), ExtResource("6_fg475"), ExtResource("7_x21in"), ExtResource("8_54yhc"), ExtResource("9_0vi5e"), ExtResource("10_nk7ls"), ExtResource("11_gdam5"), ExtResource("12_187c3"), ExtResource("13_ujot4"), ExtResource("14_w3d37"), ExtResource("15_je2gp"), ExtResource("16_cpwlt"), ExtResource("17_anse4"), ExtResource("18_vgv2h"), ExtResource("19_eolar"), ExtResource("20_eh3kp")])
|
reagents = Array[ExtResource("2_mabxg")]([ExtResource("3_nu2d0"), ExtResource("4_83o17"), ExtResource("5_4xn0j"), ExtResource("6_fg475"), ExtResource("7_x21in"), ExtResource("8_54yhc"), ExtResource("9_0vi5e"), ExtResource("10_nk7ls"), ExtResource("11_gdam5"), ExtResource("12_187c3"), ExtResource("13_ujot4"), ExtResource("14_w3d37"), ExtResource("15_je2gp"), ExtResource("16_cpwlt"), ExtResource("17_anse4"), ExtResource("18_vgv2h"), ExtResource("19_eolar"), ExtResource("20_eh3kp")])
|
||||||
tools = Array[ExtResource("5_v8c5p")]([ExtResource("24_530yt"), ExtResource("25_nk60r"), ExtResource("26_lp3qm"), ExtResource("27_ytmy7"), ExtResource("28_fsm27")])
|
tools = Array[ExtResource("5_v8c5p")]([ExtResource("24_530yt"), ExtResource("25_nk60r"), ExtResource("26_lp3qm"), ExtResource("27_ytmy7"), ExtResource("28_fsm27")])
|
||||||
metadata/_custom_type_script = "uid://cfxmgxmy24xf7"
|
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,7 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_xhr77")
|
script = ExtResource("1_xhr77")
|
||||||
|
description = "Получение слабой кислоты и слабого основания.
|
||||||
|
а) В пробирку налейте раствор (примерно ⅓ объёма) ацетата натрия CH₃COONa. Добавьте несколько капель концентрированной соляной кислоты HCl. Раствор перемешайте стекляной палочкой и слегка подогрейте. Определите по запаху образование уксусной кислоты. Напишите молекулярное и ионно-молекулярное уравнения реакции. Пользуясь данными табл. 12 найдите значения Кд для уксусной и соляной кислот. ПО величине Кд определите, какая из кислот слабая? Чем отличается слабая кислота от сильной?
|
||||||
|
б) В пробирку налейте раствор хлорида аммония NH₄Cl (примерно ⅕ объёма). Добавьте несколько капель концентрированного раствора щелочи NaOH. Раствор слегка подогрейте. Определите по запаху выделение аммиака. Напишите молекулярное и ионно-молекулярное уравнения реакции образованияч NH₄OH. Пользуясь данными табл. 6, найдите значние Кд для NH₄OH и NaOH. По величине Кд установите, какое из оснований слабое? Чем отличается слабое основание от сильного?"
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,7 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_8fyg2")
|
script = ExtResource("1_8fyg2")
|
||||||
|
description = "Смещение равновесия диссоциации слабой кислоты и слабого основания.
|
||||||
|
а) Налейте в пробирку 5 мл (примерно ½ объёма) раствора уксуснеой кислоты и добавьте две капли раствора метилового оранжевого. Какова окраска раствора? Окрашенный раствор разлейте в две пробирки. Одна пробирка используется для контроля. Во вторую пробирку бростье несколько кристалликов ацетата натрия. Раствор размешайте. Сравните окраску раствора в обеих пробирках. Напишите уравнения диссоциации CH₃COOH и CH₃COONa. Объясните изменение окраски раствора, пользуясь выражением константы диссоциации уксусной кислоты. Что надо прибавить к раствору слабой кислоты, чтобы сместить равновесие в сторону образования недиссоциированных молекул (см. пример 2)?
|
||||||
|
б) Налейте в пробирку 5 мл (примерно ½ объёма) раствора аммиака NH₄OH и добавьте две капли раствора фенолфталеина. Какова окраска раствора? Окрашенный раствор разлейте в две пробирки. Одна пробирка используется для контроля, а в другую бросьте несколько кристалликов хлорида аммония NH₄Cl. Раствор переммешайте. Сравните окраску раствора в обеих пробирках. Напишите уравнения диссоциации NH₄OH и NH₄Cl. Объясните изменение окраски раствора, пользуясь выражением константы диссоциации гидроксида аммония. Что надо прибавить к раствору слаббого основания, чтобы сместить равновесие в сторону ообразования недиссоциированных молекул (см. пример 2)?"
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_ouon1")
|
script = ExtResource("1_ouon1")
|
||||||
|
description = "Реакции нейтрализации.
|
||||||
|
Налейте в две пробирки по 2..3 мл (примерноо ⅓ объёма) 2 М раствора едкого натра и добавьте по одной капле фенолфталеина. Почему изменилась окраска раствора? В первую пробирку по каплям добавьте 2 М раствора соляной кислоты, во вторую - 2М раствор уксусной кислоты до обесцвечивания раствора. Почему растворы обесцветились? Напишите молекулярные и ионно-молекулярные уравнения реакций. Какая из реакций нейтрализации является ообратимой, а какая - необратимой и почему? Используя данные табл 12, объясните смещение равновесия для обратимой реакции."
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_0qubr")
|
script = ExtResource("1_0qubr")
|
||||||
|
description = "Условие выпадения осадка.
|
||||||
|
В две пробирки налейте по 2..3 мл (примерно ⅓ объёма) 0,005 М раствора нитрата свинца Pb(NO₃)₂. В одну из них добавьте такой же объём 0,05 М раствора хлорида калия KCl, а в другую - такой же объём 0,05 М раствора йодида калия KJ. В какой из пробирок выпал осадок? Объясните полученные результаты, используя произведение концентраций ионов в растворе и значения произведений раастворимости для PbCl₂ и PbJJ₂ (табл. 13). Составьте молекулярные и ионно-молекулярные уравнения реакций (см. пример 3)."
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_y1wtt")
|
script = ExtResource("1_y1wtt")
|
||||||
|
description = "Влияние величины прооизведения растворимости электролита на его способность к химическому взаимодействию.
|
||||||
|
Налейте в одну пробирку 2..3 мл (примерно⅓ объёма) раствора сульфата железа (II) FeSO₄, а в другую - такой же объём раствора сульфата меди (II) CuSO₄. Налейте в обе пробирки по 3..4 мл раствора сульфида натрия Na₂S. Что получилось? Напишите молекулярные и ионно-молекулярные уравнения реакций. К полученным осадкам FeS и CuS прилейте немного 2 М раствора соляной кислоты. Какой из осадков растворился? Напишите молекулярное и ионно-молекулярное уравнения реакции растворения сульфида железа (II). Объясните различие в растворимости осадков, используя значения ПР (табл. 13) и суммарную Кд сероводородной кислоты (табл. 12). Выводы также подтвердите расчётом ΔG⁰ реакции FeS и CuS с соляной кислотой, используя данные табл. 15 (см. пример 7)"
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_yhikh")
|
script = ExtResource("1_yhikh")
|
||||||
|
description = "Необратимая реакция обмена, идущая с образованием газообразного продукта реакции.
|
||||||
|
В две пробирки налейте по 2..3 (примерно ⅓ объёмма) раствора соды Na₂CO₃. Проверьте наличие в растворе иона CO₃²⁻. Для этого в одну пробирку добавьте немного раствора хлорида кальция CaCl₂. Какое вещество выпало в осадок? Напишите молекулярное и ионно-молекулярное уравнения реакции. Во вторую пробирку налейте немного разбавленного раствора солляной кислоты и наблюдайте выделение газа. Напишите молекулярное и ионно-молекулярное уравнения реакции. Рассчитайте ΔG⁰ реакции, используя данные табл. 15 (см. пример 5). Подогрейте слегка пробирку, доожидаясь конца выделения газа, и добавьте немного раствра хлорида кальция. Почему не выпадает осадок CaCO₃?"
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,6 @@
|
||||||
|
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("1_wspkr")
|
script = ExtResource("1_wspkr")
|
||||||
|
description = "Обрратимая реакция обмена, идущая с образованием менее растворимого соединения, чем исходное.
|
||||||
|
В пробирку налейте немного раствора нитрата серебра AgNO₃ и добавьте раствор хлорида натрия NaCl. Какое вещество выпало в осадок? Напишите молекулярное и ионно-молекулярное уравнения реакции. Затем в ту же пробирку налейте немного раствора сульфида натрия Na₂S. Почему цвет осадка изменился? Напишите молекулярное и ионно-молекулярное уравнения реакции. На основании значений ПР (см. табл. 13) объясните в каком направлении смещено равновесие. Рассчитайте ΔG⁰ реакции, используя данные табл. 15 (см пример 6)."
|
||||||
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
metadata/_custom_type_script = "uid://pwvqjgwse0wk"
|
||||||
|
|
|
||||||
9
labs/lab-electrolyte/test-1.tres
Normal file
9
labs/lab-electrolyte/test-1.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="LabTest" format=3 uid="uid://38g2jgwy6hcb"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dpacehourck22" path="res://src/resources/lab/test.gd" id="1_mujbh"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_mujbh")
|
||||||
|
question = "Что такое сильные и слабые электролиты?"
|
||||||
|
options = Array[String](["Сильные электролиты полностью диссоциируют на ионы в растворе, слабые — частично.", "Сильные электролиты не растворяются в воде, слабые — растворяются хорошо.", "Сильные электролиты проводят ток только в твёрдом состоянии, слабые — в растворе.", "Сильные электролиты образуют осадок, слабые — газ."])
|
||||||
|
metadata/_custom_type_script = "uid://dpacehourck22"
|
||||||
9
labs/lab-electrolyte/test-2.tres
Normal file
9
labs/lab-electrolyte/test-2.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="LabTest" format=3 uid="uid://3udi5fpewxx8"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dpacehourck22" path="res://src/resources/lab/test.gd" id="1_tocw5"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_tocw5")
|
||||||
|
question = "Какая величина характеризует силу электролита?"
|
||||||
|
options = Array[String](["Степень электролитической диссоциации.", "Массовая доля вещества в растворе.", "Молярная масса вещества.", "Плотность раствора."])
|
||||||
|
metadata/_custom_type_script = "uid://dpacehourck22"
|
||||||
9
labs/lab-electrolyte/test-3.tres
Normal file
9
labs/lab-electrolyte/test-3.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="LabTest" format=3 uid="uid://ignwsng3bt4e"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dpacehourck22" path="res://src/resources/lab/test.gd" id="1_o8p71"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_o8p71")
|
||||||
|
question = "Что такое произведение растворимости?"
|
||||||
|
options = Array[String](["Произведение концентраций ионов малорастворимого электролита в насыщенном растворе, возведённых в степени их коэффициентов.", "Произведение массы растворённого вещества на объём раствора.", "Отношение растворимости вещества к температуре.", "Сумма концентраций всех ионов в растворе."])
|
||||||
|
metadata/_custom_type_script = "uid://dpacehourck22"
|
||||||
9
labs/lab-electrolyte/test-4.tres
Normal file
9
labs/lab-electrolyte/test-4.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="LabTest" format=3 uid="uid://ber4xlsqegke0"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dpacehourck22" path="res://src/resources/lab/test.gd" id="1_5d6hp"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_5d6hp")
|
||||||
|
question = "Что такое водородный показатель?"
|
||||||
|
options = Array[String](["Отрицательный десятичный логарифм концентрации ионов водорода в растворе.", "Концентрация молекул воды в растворе.", "Количество гидроксид-ионов в щелочи.", "Массовая доля кислоты в растворе."])
|
||||||
|
metadata/_custom_type_script = "uid://dpacehourck22"
|
||||||
9
labs/lab-electrolyte/test-5.tres
Normal file
9
labs/lab-electrolyte/test-5.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
[gd_resource type="Resource" script_class="LabTest" format=3 uid="uid://d13fl2bs8o6oa"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dpacehourck22" path="res://src/resources/lab/test.gd" id="1_3bllg"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("1_3bllg")
|
||||||
|
question = "Какие реакции обмена в растворах электролитов относятся к братимым и необратимым реакциям?"
|
||||||
|
options = Array[String](["Обратимые — протекают не до конца и устанавливают равновесие; необратимые — идут до конца с образованием осадка, газа или слабого электролита.", "Обратимые — идут только при нагревании, необратимые — только при охлаждении.", "Обратимые — протекают без изменения цвета, необратимые — с изменением цвета.", "Обратимые — идут только в щелочной среде, необратимые — только в кислой среде."])
|
||||||
|
metadata/_custom_type_script = "uid://dpacehourck22"
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://vhn8h4mhb6nh"]
|
[gd_scene format=3 uid="uid://vhn8h4mhb6nh"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://ds5u02jdtxyd4" path="res://src/ui/drag_and_drop.gd" id="1_33df7"]
|
[ext_resource type="Script" uid="uid://ds5u02jdtxyd4" path="res://src/ui/drag_and_drop.gd" id="1_33df7"]
|
||||||
|
|
||||||
[node name="DragAndDrop" type="Button"]
|
[node name="DragAndDrop" type="Button" unique_id=1396027085]
|
||||||
anchors_preset = -1
|
anchors_preset = -1
|
||||||
anchor_right = 0.043
|
anchor_right = 0.043
|
||||||
anchor_bottom = 0.07700001
|
anchor_bottom = 0.07700001
|
||||||
|
|
|
||||||
|
|
@ -157,6 +157,11 @@ transform = Transform3D(0, 0.81564164, 7.79495e-08, 1.7832766, -1.5584348e-15, 7
|
||||||
mesh = SubResource("ArrayMesh_0gv3x")
|
mesh = SubResource("ArrayMesh_0gv3x")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
|
[node name="RemoteTransform3D" type="RemoteTransform3D" parent="Holder/Cylinder_001" unique_id=47310226]
|
||||||
|
transform = Transform3D(-4.2336617e-07, 5.607655, 1.12113185e-07, 3.8971154e-07, 2.4511846e-07, -12.260285, 5.607655, 4.2336617e-07, 1.7824777e-07, -3.2521849, -0.6642422, -4.1857553)
|
||||||
|
remote_path = NodePath("../../../FlaskHoldArea")
|
||||||
|
update_scale = false
|
||||||
|
|
||||||
[node name="Cylinder_003" type="MeshInstance3D" parent="Holder/Cylinder_001" unique_id=1374051037]
|
[node name="Cylinder_003" type="MeshInstance3D" parent="Holder/Cylinder_001" unique_id=1374051037]
|
||||||
transform = Transform3D(3.1641225e-08, 0.7428574, 7.2952147e-09, -0.3648906, -3.103231e-15, 1.5826247, -0.72386676, 3.247133e-08, -0.16689502, -3.113039, -0.4727633, -4.1781373)
|
transform = Transform3D(3.1641225e-08, 0.7428574, 7.2952147e-09, -0.3648906, -3.103231e-15, 1.5826247, -0.72386676, 3.247133e-08, -0.16689502, -3.113039, -0.4727633, -4.1781373)
|
||||||
mesh = SubResource("ArrayMesh_ifupq")
|
mesh = SubResource("ArrayMesh_ifupq")
|
||||||
|
|
@ -180,4 +185,4 @@ shape = SubResource("BoxShape3D_yplmy")
|
||||||
script = ExtResource("3_yplmy")
|
script = ExtResource("3_yplmy")
|
||||||
|
|
||||||
[node name="FlaskHoldArea" parent="." unique_id=1519161328 instance=ExtResource("4_ig37s")]
|
[node name="FlaskHoldArea" parent="." unique_id=1519161328 instance=ExtResource("4_ig37s")]
|
||||||
transform = Transform3D(-4.371139e-08, 0, -1, 0, 1, 0, 1, 0, -4.371139e-08, 0.010895464, 0.5656636, -0.7496213)
|
transform = Transform3D(7.5497894e-08, 1.9992886e-08, -0.99999994, -3.178651e-08, 1, 1.9992886e-08, 1, 3.178651e-08, 7.549791e-08, 3.2653322e-08, 0, -0.74702096)
|
||||||
|
|
|
||||||
42
scenes/questions.tscn
Normal file
42
scenes/questions.tscn
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
[gd_scene format=3 uid="uid://be746nxgkc5ay"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://bosx1bhaka185" path="res://src/ui/questions_generator.gd" id="1_rdw2t"]
|
||||||
|
|
||||||
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_faf07"]
|
||||||
|
content_margin_left = 0.0
|
||||||
|
content_margin_top = 0.0
|
||||||
|
content_margin_right = 0.0
|
||||||
|
content_margin_bottom = 0.0
|
||||||
|
bg_color = Color(0.1, 0.1, 0.1, 1)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
|
[node name="Questions" type="Panel" unique_id=2060279649]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_faf07")
|
||||||
|
|
||||||
|
[node name="CloseButton" type="Button" parent="." unique_id=728079508]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 1
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = -31.0
|
||||||
|
offset_bottom = 31.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "X"
|
||||||
|
|
||||||
|
[node name="Questions" type="Control" parent="." unique_id=975580098]
|
||||||
|
anchors_preset = 0
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
script = ExtResource("1_rdw2t")
|
||||||
|
|
||||||
|
[connection signal="pressed" from="CloseButton" to="Questions" method="_on_close_button_pressed"]
|
||||||
12
scenes/tool_generator.gd
Normal file
12
scenes/tool_generator.gd
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
extends Node
|
||||||
|
|
||||||
|
const dnd_button = preload("res://scenes/drag_and_drop.tscn")
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
for tool in ReactionRegistry.current_lab.tools:
|
||||||
|
var button = dnd_button.instantiate()
|
||||||
|
button.draggable = tool
|
||||||
|
button.text = tool.text
|
||||||
|
get_parent().add_element.call_deferred(button)
|
||||||
|
|
||||||
|
|
||||||
1
scenes/tool_generator.gd.uid
Normal file
1
scenes/tool_generator.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://cfl3n0ihnpd2v
|
||||||
|
|
@ -3,13 +3,11 @@
|
||||||
[ext_resource type="Script" uid="uid://cqdtgvrotvjhb" path="res://src/ui/logger.gd" id="1_8dubc"]
|
[ext_resource type="Script" uid="uid://cqdtgvrotvjhb" path="res://src/ui/logger.gd" id="1_8dubc"]
|
||||||
[ext_resource type="Script" uid="uid://457xdl1tsmde" path="res://src/ui/control_buttons_holder.gd" id="1_ktti3"]
|
[ext_resource type="Script" uid="uid://457xdl1tsmde" path="res://src/ui/control_buttons_holder.gd" id="1_ktti3"]
|
||||||
[ext_resource type="PackedScene" uid="uid://bcj0mesdlfsfj" path="res://scenes/popup_container.tscn" id="1_nt7q6"]
|
[ext_resource type="PackedScene" uid="uid://bcj0mesdlfsfj" path="res://scenes/popup_container.tscn" id="1_nt7q6"]
|
||||||
|
[ext_resource type="Script" uid="uid://14snb0pu3b1t" path="res://src/ui/lab_tabs.gd" id="1_p7vwb"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://opfal5aq2p5e" path="res://scenes/worktabs.tscn" id="2_p7vwb"]
|
||||||
[ext_resource type="Script" uid="uid://c5pv2idedy1oy" path="res://src/ui/reagents_gen.gd" id="2_x4jx1"]
|
[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="PackedScene" uid="uid://be746nxgkc5ay" path="res://scenes/questions.tscn" id="3_ktti3"]
|
||||||
[ext_resource type="Resource" uid="uid://cay05wpketmny" path="res://assets/draggables/flask.tres" id="4_gdt2y"]
|
[ext_resource type="Script" uid="uid://cfl3n0ihnpd2v" path="res://scenes/tool_generator.gd" id="11_vdcm2"]
|
||||||
[ext_resource type="Resource" uid="uid://6vpr6n7yruie" path="res://assets/draggables/spoon.tres" id="5_wm3ai"]
|
|
||||||
[ext_resource type="Resource" uid="uid://kg34c4105ssp" path="res://assets/draggables/burner.tres" id="6_p7vwb"]
|
|
||||||
[ext_resource type="Resource" uid="uid://dnxpw2metn0oq" path="res://assets/draggables/stand.tres" id="8_7dvkv"]
|
|
||||||
[ext_resource type="Resource" uid="uid://cm2is1qooywkf" path="res://assets/draggables/holder.tres" id="9_vdcm2"]
|
|
||||||
|
|
||||||
[node name="UserInterface" type="Control" unique_id=1780432093]
|
[node name="UserInterface" type="Control" unique_id=1780432093]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
|
|
@ -40,6 +38,17 @@ tab_0/title = "Ход работы"
|
||||||
tab_1/title = "Вопросы для самопроверки"
|
tab_1/title = "Вопросы для самопроверки"
|
||||||
tab_2/title = "Отчёт"
|
tab_2/title = "Отчёт"
|
||||||
tab_3/title = "Очистить"
|
tab_3/title = "Очистить"
|
||||||
|
script = ExtResource("1_p7vwb")
|
||||||
|
|
||||||
|
[node name="Worktabs" parent="HSplitContainer/TabBar" unique_id=468314618 instance=ExtResource("2_p7vwb")]
|
||||||
|
visible = false
|
||||||
|
top_level = true
|
||||||
|
layout_mode = 1
|
||||||
|
|
||||||
|
[node name="Questions" parent="HSplitContainer/TabBar" unique_id=2060279649 instance=ExtResource("3_ktti3")]
|
||||||
|
visible = false
|
||||||
|
top_level = true
|
||||||
|
layout_mode = 1
|
||||||
|
|
||||||
[node name="InspectorPanel" type="PanelContainer" parent="HSplitContainer" unique_id=918152974]
|
[node name="InspectorPanel" type="PanelContainer" parent="HSplitContainer" unique_id=918152974]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
@ -101,32 +110,6 @@ metadata/_edit_use_anchors_ = true
|
||||||
[node name="ScrollContainer" parent="Intruments" index="0"]
|
[node name="ScrollContainer" parent="Intruments" index="0"]
|
||||||
offset_right = -20.904999
|
offset_right = -20.904999
|
||||||
|
|
||||||
[node name="Flask" parent="Intruments/ScrollContainer/VBoxContainer" index="0" unique_id=852024836 instance=ExtResource("3_yev5y")]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Пробирка"
|
|
||||||
draggable = ExtResource("4_gdt2y")
|
|
||||||
|
|
||||||
[node name="Burner" parent="Intruments/ScrollContainer/VBoxContainer" index="1" unique_id=1243872558 instance=ExtResource("3_yev5y")]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Спиртовка"
|
|
||||||
draggable = ExtResource("6_p7vwb")
|
|
||||||
|
|
||||||
[node name="Stand" parent="Intruments/ScrollContainer/VBoxContainer" index="2" unique_id=653836695 instance=ExtResource("3_yev5y")]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Штатив"
|
|
||||||
draggable = ExtResource("8_7dvkv")
|
|
||||||
|
|
||||||
[node name="Holder" parent="Intruments/ScrollContainer/VBoxContainer" index="3" unique_id=878085834 instance=ExtResource("3_yev5y")]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Держатель пробирок"
|
|
||||||
autowrap_mode = 2
|
|
||||||
draggable = ExtResource("9_vdcm2")
|
|
||||||
|
|
||||||
[node name="Spoon" parent="Intruments/ScrollContainer/VBoxContainer" index="4" unique_id=1377215067 instance=ExtResource("3_yev5y")]
|
|
||||||
layout_mode = 2
|
|
||||||
text = "Ложка"
|
|
||||||
draggable = ExtResource("5_wm3ai")
|
|
||||||
|
|
||||||
[node name="Label" parent="Intruments" index="1"]
|
[node name="Label" parent="Intruments" index="1"]
|
||||||
anchor_left = 0.8717948
|
anchor_left = 0.8717948
|
||||||
anchor_top = 0.040587522
|
anchor_top = 0.040587522
|
||||||
|
|
@ -137,5 +120,10 @@ offset_top = 199.64479
|
||||||
offset_right = 175.22977
|
offset_right = 175.22977
|
||||||
offset_bottom = 49.03595
|
offset_bottom = 49.03595
|
||||||
|
|
||||||
|
[node name="Generator" type="Node" parent="Intruments" unique_id=1693437228]
|
||||||
|
script = ExtResource("11_vdcm2")
|
||||||
|
|
||||||
|
[connection signal="tab_clicked" from="HSplitContainer/TabBar" to="HSplitContainer/TabBar" method="_on_tab_clicked"]
|
||||||
|
|
||||||
[editable path="Reagents"]
|
[editable path="Reagents"]
|
||||||
[editable path="Intruments"]
|
[editable path="Intruments"]
|
||||||
|
|
|
||||||
14
scenes/worktab.tscn
Normal file
14
scenes/worktab.tscn
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_scene format=3 uid="uid://ce4a3scprw3c7"]
|
||||||
|
|
||||||
|
[node name="Worktab" type="ScrollContainer" unique_id=1421870413]
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
horizontal_scroll_mode = 0
|
||||||
|
|
||||||
|
[node name="Text" type="Label" parent="." unique_id=1337050557]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
size_flags_vertical = 3
|
||||||
|
autowrap_mode = 2
|
||||||
|
|
@ -1,8 +1,45 @@
|
||||||
[gd_scene format=3 uid="uid://baqryu8dqil1x"]
|
[gd_scene format=3 uid="uid://opfal5aq2p5e"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://dxtijlyrv0q57" path="res://src/ui/worktabs.gd" id="1_xfim1"]
|
[ext_resource type="Script" uid="uid://dxtijlyrv0q57" path="res://src/ui/worktabs.gd" id="1_xfim1"]
|
||||||
|
|
||||||
[node name="Worktabs" type="TabContainer" unique_id=468314618]
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_xfim1"]
|
||||||
offset_right = 8.0
|
content_margin_left = 0.0
|
||||||
offset_bottom = 40.0
|
content_margin_top = 0.0
|
||||||
|
content_margin_right = 0.0
|
||||||
|
content_margin_bottom = 0.0
|
||||||
|
bg_color = Color(0.1, 0.1, 0.1, 1)
|
||||||
|
corner_radius_top_left = 3
|
||||||
|
corner_radius_top_right = 3
|
||||||
|
corner_radius_bottom_right = 3
|
||||||
|
corner_radius_bottom_left = 3
|
||||||
|
corner_detail = 5
|
||||||
|
|
||||||
|
[node name="Worktabs" type="Panel" unique_id=666307058]
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_styles/panel = SubResource("StyleBoxFlat_xfim1")
|
||||||
|
|
||||||
|
[node name="TabContainer" type="TabContainer" parent="." unique_id=513419076]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
script = ExtResource("1_xfim1")
|
script = ExtResource("1_xfim1")
|
||||||
|
|
||||||
|
[node name="CloseButton" type="Button" parent="." unique_id=1683733206]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 1
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = -31.0
|
||||||
|
offset_bottom = 31.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
theme_override_font_sizes/font_size = 16
|
||||||
|
text = "X"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="CloseButton" to="TabContainer" method="_on_close_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ var filtered_draggables: Array[DraggableObject]
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
area_entered.connect(on_area_entered)
|
area_entered.connect(on_area_entered)
|
||||||
area_exited.connect(on_area_exited)
|
area_exited.connect(on_area_exited)
|
||||||
|
GuiSignalBus.clear_table.connect(queue_free)
|
||||||
|
|
||||||
func _mouse_enter() -> void:
|
func _mouse_enter() -> void:
|
||||||
mouse_in = true
|
mouse_in = true
|
||||||
|
|
|
||||||
|
|
@ -26,5 +26,5 @@ func snap_flask(flask: DraggableObject) -> void:
|
||||||
|
|
||||||
func unsnap_flask(flask: DraggableObject) -> void:
|
func unsnap_flask(flask: DraggableObject) -> void:
|
||||||
held_flask = null
|
held_flask = null
|
||||||
flask.reparent(flask_parent)
|
flask.reparent(get_tree().current_scene)
|
||||||
flask.drag_ended_on.disconnect(unsnap_flask)
|
flask.drag_ended_on.disconnect(unsnap_flask)
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ signal interaction_confirmed(data: Dictionary)
|
||||||
signal log_pushed(log_data: String)
|
signal log_pushed(log_data: String)
|
||||||
signal clear_buttons
|
signal clear_buttons
|
||||||
signal add_buttons(buttons: Control)
|
signal add_buttons(buttons: Control)
|
||||||
|
signal clear_table
|
||||||
|
|
||||||
func push(log_data: String):
|
func push(log_data: String):
|
||||||
log_pushed.emit(log_data)
|
log_pushed.emit(log_data)
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ 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")]
|
@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 current_lab: Labwork = preload("res://labs/lab-electrolyte.tres")
|
||||||
var reactions: Array[Reaction]
|
var reactions: Array[Reaction]
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ class_name Draggable
|
||||||
|
|
||||||
@export var scene_to_spawn: PackedScene
|
@export var scene_to_spawn: PackedScene
|
||||||
@export var icon: Texture2D
|
@export var icon: Texture2D
|
||||||
|
@export var text: String
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,9 @@ extends Resource
|
||||||
|
|
||||||
class_name Labwork
|
class_name Labwork
|
||||||
|
|
||||||
static var current_lab: Labwork
|
|
||||||
|
|
||||||
@export var lab_name: String
|
@export var lab_name: String
|
||||||
|
@export_multiline() var tasks: String
|
||||||
|
@export_multiline() var equipment: String
|
||||||
@export var experiments: Array[LabExperiment]
|
@export var experiments: Array[LabExperiment]
|
||||||
@export var tests: Array[LabTest]
|
@export var tests: Array[LabTest]
|
||||||
@export var reagents: Array[Reagent]
|
@export var reagents: Array[Reagent]
|
||||||
|
|
|
||||||
|
|
@ -2,5 +2,6 @@ extends Resource
|
||||||
|
|
||||||
class_name LabTest
|
class_name LabTest
|
||||||
|
|
||||||
|
@export var question: String
|
||||||
@export var options: Array[String]
|
@export var options: Array[String]
|
||||||
@export var correct_anwser: int
|
@export var correct_anwser: int
|
||||||
|
|
|
||||||
13
src/ui/lab_tabs.gd
Normal file
13
src/ui/lab_tabs.gd
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
extends TabBar
|
||||||
|
|
||||||
|
|
||||||
|
func _on_tab_clicked(tab: int) -> void:
|
||||||
|
match tab:
|
||||||
|
0:
|
||||||
|
$Worktabs.visible = true
|
||||||
|
1:
|
||||||
|
$Questions.visible = true
|
||||||
|
2:
|
||||||
|
pass
|
||||||
|
3:
|
||||||
|
GuiSignalBus.clear_table.emit()
|
||||||
1
src/ui/lab_tabs.gd.uid
Normal file
1
src/ui/lab_tabs.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://14snb0pu3b1t
|
||||||
30
src/ui/questions_generator.gd
Normal file
30
src/ui/questions_generator.gd
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var current: int = -1
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
for question in ReactionRegistry.current_lab.tests:
|
||||||
|
var options = question.options.duplicate()
|
||||||
|
options.shuffle()
|
||||||
|
var vbox = VBoxContainer.new()
|
||||||
|
var description = Label.new()
|
||||||
|
description.text = question.question
|
||||||
|
vbox.add_child(description)
|
||||||
|
vbox.visible = false
|
||||||
|
for option in options:
|
||||||
|
var button = Button.new()
|
||||||
|
button.text = option
|
||||||
|
vbox.add_child(button)
|
||||||
|
button.pressed.connect(next)
|
||||||
|
add_child(vbox)
|
||||||
|
next()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_close_button_pressed() -> void:
|
||||||
|
get_parent().visible = false
|
||||||
|
|
||||||
|
func next() -> void:
|
||||||
|
get_child(current).visible = false
|
||||||
|
if current < get_child_count() - 1:
|
||||||
|
current += 1
|
||||||
|
get_child(current).visible = true
|
||||||
1
src/ui/questions_generator.gd.uid
Normal file
1
src/ui/questions_generator.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bosx1bhaka185
|
||||||
|
|
@ -1,12 +1,11 @@
|
||||||
extends Node
|
extends Node
|
||||||
|
|
||||||
const dnd_button = preload("res://scenes/reactives_drag_and_drop.tscn")
|
const dnd_button = preload("res://scenes/reactives_drag_and_drop.tscn")
|
||||||
const reagent_dir = "res://assets/reagents/"
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
for file in ResourceLoader.list_directory(reagent_dir):
|
for reagent in ReactionRegistry.current_lab.reagents:
|
||||||
var button = dnd_button.instantiate()
|
var button = dnd_button.instantiate()
|
||||||
button.reagent = load(reagent_dir+file)
|
button.reagent = reagent
|
||||||
get_parent().add_element.call_deferred(button)
|
get_parent().add_element.call_deferred(button)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,14 +3,12 @@ extends Node
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
for i in range(len(Labwork.current_lab.experiments)):
|
for i in range(len(ReactionRegistry.current_lab.experiments)):
|
||||||
var container: PanelContainer = PanelContainer.new()
|
var tab = preload("uid://ce4a3scprw3c7").instantiate()
|
||||||
container.name = "Опыт " + str(i + 1)
|
tab.name = "Опыт " + str(i + 1)
|
||||||
var scroll: ScrollContainer = ScrollContainer.new()
|
add_child(tab)
|
||||||
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
tab.get_node("Text").text = ReactionRegistry.current_lab.experiments[i].description
|
||||||
|
|
||||||
var label: Label = Label.new()
|
|
||||||
label.text = Labwork.current_lab.experiments[i].description
|
func _on_close_button_pressed() -> void:
|
||||||
scroll.add_child(label)
|
get_parent().visible = false
|
||||||
container.add_child(scroll)
|
|
||||||
add_child(container)
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue