diff --git a/Blends/Pot/brick.jpg.import b/Blends/Pot/brick.jpg.import index 94654c7..51ef9e4 100644 --- a/Blends/Pot/brick.jpg.import +++ b/Blends/Pot/brick.jpg.import @@ -3,25 +3,26 @@ importer="texture" type="CompressedTexture2D" uid="uid://boomg3nx6bcqy" -path="res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.ctex" +path.s3tc="res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.s3tc.ctex" metadata={ -"vram_texture": false +"imported_formats": ["s3tc_bptc"], +"vram_texture": true } [deps] source_file="res://Blends/Pot/brick.jpg" -dest_files=["res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.ctex"] +dest_files=["res://.godot/imported/brick.jpg-7607d78125be038893033b483e357a65.s3tc.ctex"] [params] -compress/mode=0 +compress/mode=2 compress/high_quality=false compress/lossy_quality=0.7 compress/hdr_compression=1 compress/normal_map=0 compress/channel_pack=0 -mipmaps/generate=false +mipmaps/generate=true mipmaps/limit=-1 roughness/mode=0 roughness/src_normal="" @@ -31,4 +32,4 @@ process/normal_map_invert_y=false process/hdr_as_srgb=false process/hdr_clamp_exposure=false process/size_limit=0 -detect_3d/compress_to=1 +detect_3d/compress_to=0 diff --git a/Blends/Pot/pot.blend b/Blends/Pot/pot.blend index 6434f8b..b91bca8 100644 Binary files a/Blends/Pot/pot.blend and b/Blends/Pot/pot.blend differ diff --git a/Blends/Pot/pot.blend1 b/Blends/Pot/pot.blend1 index e3b13ad..195deb6 100644 Binary files a/Blends/Pot/pot.blend1 and b/Blends/Pot/pot.blend1 differ diff --git a/Blends/Pot/pot_uv.jpg b/Blends/Pot/pot_uv.jpg new file mode 100644 index 0000000..1286348 Binary files /dev/null and b/Blends/Pot/pot_uv.jpg differ diff --git a/Blends/Pot/pot_uv.jpg.import b/Blends/Pot/pot_uv.jpg.import new file mode 100644 index 0000000..bab7b8a --- /dev/null +++ b/Blends/Pot/pot_uv.jpg.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://8qyuw0q5luju" +path.s3tc="res://.godot/imported/pot_uv.jpg-c3f5f910b203bcfdf16fec6b59103278.s3tc.ctex" +metadata={ +"imported_formats": ["s3tc_bptc"], +"vram_texture": true +} + +[deps] + +source_file="res://Blends/Pot/pot_uv.jpg" +dest_files=["res://.godot/imported/pot_uv.jpg-c3f5f910b203bcfdf16fec6b59103278.s3tc.ctex"] + +[params] + +compress/mode=2 +compress/high_quality=false +compress/lossy_quality=0.7 +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/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 diff --git a/Scenes/Prefabs/Pot.tscn b/Scenes/Prefabs/Pot.tscn index ac505a8..17cecad 100644 --- a/Scenes/Prefabs/Pot.tscn +++ b/Scenes/Prefabs/Pot.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=14 format=3 uid="uid://bcme5mx8nf5kf"] +[gd_scene load_steps=15 format=3 uid="uid://bcme5mx8nf5kf"] [ext_resource type="Script" uid="uid://c61rr6to3q566" path="res://Scripts/build_object.gd" id="1_c5d30"] [ext_resource type="ArrayMesh" uid="uid://dqs5joeucls8u" path="res://Blends/Pot/pot.obj" id="1_ps8qt"] @@ -7,6 +7,7 @@ [ext_resource type="Texture2D" uid="uid://fom8shxpn476" path="res://Blends/Pot/pot_brick.jpg" id="3_ocdig"] [ext_resource type="Texture2D" uid="uid://bw8k6hmfrwj60" path="res://Blends/Pot/rougness_m.png" id="4_vv7mx"] [ext_resource type="Texture2D" uid="uid://cdb7b2ef31ixv" path="res://Blends/Pot/pot_wood.jpg" id="5_gtq0i"] +[ext_resource type="Texture2D" uid="uid://8qyuw0q5luju" path="res://Blends/Pot/pot_uv.jpg" id="5_vv7mx"] [ext_resource type="Texture2D" uid="uid://bxgm6oovlxdjq" path="res://Blends/Pot/wood_n.png" id="6_r71lq"] [ext_resource type="Texture2D" uid="uid://run700pxmcyc" path="res://Blends/Pot/brick_t.png" id="7_e7ek7"] @@ -22,6 +23,9 @@ roughness_texture = ExtResource("4_vv7mx") normal_enabled = true normal_scale = -2.6 normal_texture = ExtResource("3_ocdig") +detail_albedo = ExtResource("5_vv7mx") +detail_normal = ExtResource("3_ocdig") +uv1_scale = Vector3(0.5, 0.4, 1) [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_uhv8u"] albedo_texture = ExtResource("5_gtq0i") diff --git a/Scripts/build_manager.gd b/Scripts/build_manager.gd index 421749a..fa06ef7 100644 --- a/Scripts/build_manager.gd +++ b/Scripts/build_manager.gd @@ -3,14 +3,18 @@ extends Node @onready var DoubleBeds = preload("res://Scenes/Prefabs/DoubleBeds.tscn") @onready var Pot = preload("res://Scenes/Prefabs/Pot.tscn") -var selected_object_id: int +signal build_object_selected +var selected_object_id: int +var is_object_selected: bool + var global_y = 2.903 func _ready() -> void: - print(DoubleBeds) + is_object_selected = false + build_object_selected.connect(_on_object_selected) func get_preview_object(): var selected_object @@ -20,3 +24,7 @@ func get_preview_object(): 1: selected_object = Pot return selected_object + + +func _on_object_selected(): + is_object_selected = true diff --git a/Scripts/building_area.gd b/Scripts/building_area.gd index 180f140..fccbfb6 100644 --- a/Scripts/building_area.gd +++ b/Scripts/building_area.gd @@ -23,7 +23,7 @@ func _input_event(camera: Camera3D, event: InputEvent, event_position: Vector3, func _mouse_enter() -> void: - if !is_placed and Global.build_mode: + if !is_placed and Global.build_mode and BuildManager.is_object_selected: show_preview() func _mouse_exit() -> void: diff --git a/Scripts/button_select_build.gd b/Scripts/button_select_build.gd index 5df024b..96f3cb2 100644 --- a/Scripts/button_select_build.gd +++ b/Scripts/button_select_build.gd @@ -3,8 +3,12 @@ extends Button @export var id: int +func _ready() -> void: + pass + func _on_pressed() -> void: BuildManager.selected_object_id = id + BuildManager.build_object_selected.emit() print(BuildManager.selected_object_id)