Compare commits

..

No commits in common. "a425f6226722a374204a701a3aa846aec3bdfaa5" and "d98eb6335f3c6c7624ac4724109b02d67aa9b4a1" have entirely different histories.

16 changed files with 13 additions and 91 deletions

Binary file not shown.

View file

@ -10,5 +10,4 @@ melting_point = 300.0
boiling_point = 520.0
color = Color(1, 0.26666665, 0, 1)
prefer_scientific_name = true
is_solution = true
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

View file

@ -10,5 +10,4 @@ melting_point = 278.0
boiling_point = 557.8
color = Color(1, 1, 1, 0.43529412)
prefer_scientific_name = true
is_solution = true
metadata/_custom_type_script = "uid://b8q5buwgvppyh"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 582 KiB

View file

@ -1,41 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cw3jw8qbvj3fv"
path.s3tc="res://.godot/imported/solid.png-8966cbc3b9a90d3d5f9d92a3499b8110.s3tc.ctex"
metadata={
"imported_formats": ["s3tc_bptc"],
"vram_texture": true
}
[deps]
source_file="res://assets/textures/solid.png"
dest_files=["res://.godot/imported/solid.png-8966cbc3b9a90d3d5f9d92a3499b8110.s3tc.ctex"]
[params]
compress/mode=2
compress/high_quality=false
compress/lossy_quality=0.7
compress/uastc_level=0
compress/rdo_quality_loss=0.0
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=true
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/channel_remap/red=0
process/channel_remap/green=1
process/channel_remap/blue=2
process/channel_remap/alpha=3
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=0

View file

@ -36,5 +36,4 @@ drag_camera={
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
renderer/rendering_method="mobile"

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=12 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_0xufn"]
[ext_resource type="PackedScene" uid="uid://b6ydpkle2ol20" path="res://assets/models/FlaskNew.glb" id="2_h7awq"]
@ -6,7 +6,6 @@
[ext_resource type="Script" uid="uid://ctu7escah5lo1" path="res://src/interactible/interaction_source.gd" id="4_kkw7a"]
[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="6_wadb5"]
[ext_resource type="Script" uid="uid://82ettbegollp" path="res://src/inventory.gd" id="7_h7awq"]
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_vcwhe"]
radius = 0.1
@ -87,12 +86,6 @@ suffix = "%"
layout_mode = 2
size_flags_horizontal = 3
[node name="Inventory" type="Node" parent="."]
unique_name_in_owner = true
script = ExtResource("7_h7awq")
open_on_top = true
metadata/_custom_type_script = "uid://82ettbegollp"
[connection signal="drag_ended" from="." to="InteractionArea" method="request_interaction"]
[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

@ -24,6 +24,9 @@ script = ExtResource("1_hem3r")
[node name="Flask" parent="." instance=ExtResource("1_bb6uc")]
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="."]
transform = Transform3D(1, 0, 0, 0, 0.8403207, 0.5420896, 0, -0.5420896, 0.8403207, 0, 1.9293891, 0)
shadow_enabled = true

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=3 uid="uid://cw6v8kbi76qak"]
[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"]
@ -6,10 +6,6 @@
[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"]
[ext_resource type="Script" uid="uid://c8epd7gguvyop" path="res://src/substance_holder.gd" id="7_ymvgp"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_pcpcb"]
resource_local_to_scene = true
[sub_resource type="CylinderShape3D" id="CylinderShape3D_kfk5m"]
height = 0.5024414
@ -29,11 +25,6 @@ script = ExtResource("1_o7vug")
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.20877336, 0)
mesh = ExtResource("2_o7vug")
[node name="JarFill" type="MeshInstance3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, -0.20759426, 0)
material_override = SubResource("StandardMaterial3D_pcpcb")
mesh = ExtResource("6_kfk5m")
[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")
@ -80,13 +71,14 @@ 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("..")
[node name="SubstanceData" type="Node" parent="."]
script = ExtResource("7_ymvgp")
[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"]

View file

@ -1,6 +1,6 @@
extends Node
class_name Inventory
@export var open_on_top: bool
var inventory: Array[RuntimeSubstanceData]
var liquids
var solids
var gasses

View file

@ -8,7 +8,6 @@ class_name Substance
@export var boiling_point: float
@export var color: Color
@export var prefer_scientific_name: bool
@export var is_solution: bool
func get_formula() -> StringName:
return scientific_name if prefer_scientific_name else formula

View file

@ -1,7 +0,0 @@
extends RefCounted
class_name RuntimeSubstanceData
var substance: Substance
var amount: float
var temperature: float = 20.0

View file

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

View file

@ -1,11 +0,0 @@
extends Node
var substance: Substance
func _ready() -> void:
if substance:
var jar_fill_material = $"../JarFill".material_override
jar_fill_material.albedo_color = substance.color
if substance.melting_point > 20 and not substance.is_solution:
jar_fill_material.albedo_texture = preload("res://assets/textures/solid.png")

View file

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

View file

@ -11,7 +11,6 @@ func _on_button_down() -> void:
if scene is DraggableObject:
scene.dragged = true
scene.mouse_in = true
scene.get_node("SubstanceData").substance = reagent.substance
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)