Labs resources
This commit is contained in:
parent
b7ce36ffd0
commit
a143c0291e
17 changed files with 144 additions and 0 deletions
5
src/resources/lab/experiment.gd
Normal file
5
src/resources/lab/experiment.gd
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
extends Resource
|
||||
|
||||
class_name LabExperiment
|
||||
|
||||
@export_multiline() var description: String
|
||||
1
src/resources/lab/experiment.gd.uid
Normal file
1
src/resources/lab/experiment.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://pwvqjgwse0wk
|
||||
11
src/resources/lab/lab_work.gd
Normal file
11
src/resources/lab/lab_work.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
extends Resource
|
||||
|
||||
class_name Labwork
|
||||
|
||||
static var current_lab: Labwork
|
||||
|
||||
@export var lab_name: String
|
||||
@export var experiments: Array[LabExperiment]
|
||||
@export var tests: Array[LabTest]
|
||||
@export var reagents: Array[Reagent]
|
||||
@export var tools: Array[Draggable]
|
||||
1
src/resources/lab/lab_work.gd.uid
Normal file
1
src/resources/lab/lab_work.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://cfxmgxmy24xf7
|
||||
6
src/resources/lab/test.gd
Normal file
6
src/resources/lab/test.gd
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extends Resource
|
||||
|
||||
class_name LabTest
|
||||
|
||||
@export var options: Array[String]
|
||||
@export var correct_anwser: int
|
||||
1
src/resources/lab/test.gd.uid
Normal file
1
src/resources/lab/test.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dpacehourck22
|
||||
16
src/ui/worktabs.gd
Normal file
16
src/ui/worktabs.gd
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
extends Node
|
||||
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
for i in range(len(Labwork.current_lab.experiments)):
|
||||
var container: PanelContainer = PanelContainer.new()
|
||||
container.name = "Опыт " + str(i + 1)
|
||||
var scroll: ScrollContainer = ScrollContainer.new()
|
||||
scroll.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED
|
||||
|
||||
var label: Label = Label.new()
|
||||
label.text = Labwork.current_lab.experiments[i].description
|
||||
scroll.add_child(label)
|
||||
container.add_child(scroll)
|
||||
add_child(container)
|
||||
1
src/ui/worktabs.gd.uid
Normal file
1
src/ui/worktabs.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dxtijlyrv0q57
|
||||
Loading…
Add table
Add a link
Reference in a new issue