[gd_scene load_steps=16 format=3 uid="uid://cc102xko0u6yj"]

[ext_resource type="Script" uid="uid://dngia2ldbccv7" path="res://src/equipment/point_spray/point_spray.gd" id="1_2yl2v"]
[ext_resource type="Material" uid="uid://c00gndxoepuqh" path="res://assets/materials/laser_spray.tres" id="2_0pfy3"]
[ext_resource type="Texture2D" uid="uid://bn0gcsy37ahto" path="res://assets/ui/hud/reticle_large.png" id="2_qcl8j"]
[ext_resource type="PackedScene" uid="uid://btq11kil0jcql" path="res://src/equipment/beam_sfx/spray_sfx.tscn" id="3_5h54c"]
[ext_resource type="PackedScene" uid="uid://b8vradbaw61ga" path="res://src/equipment/laser_cast/laser_cast.tscn" id="3_qmoff"]
[ext_resource type="Script" uid="uid://b274q7uvn0cvp" path="res://src/ui/rumbler_3d.gd" id="5_k4cg5"]
[ext_resource type="PackedScene" uid="uid://5y7gcq6igjpf" path="res://src/equipment/beam_sfx/beam_sfx.tscn" id="5_tpavj"]
[ext_resource type="Script" uid="uid://dj2x7x5qkbym1" path="res://src/ui/canvas_projector.gd" id="6_h2fjt"]
[ext_resource type="Texture2D" uid="uid://brcxorcpe2g56" path="res://assets/ui/hud/tools/point_sprayer.png" id="6_otnek"]

[sub_resource type="CylinderMesh" id="CylinderMesh_j5thb"]
material = ExtResource("2_0pfy3")
top_radius = 0.0
bottom_radius = 0.2
height = 3.2
radial_segments = 16

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_nc5qr"]
direction = Vector3(0, 0, -1)
spread = 4.0
initial_velocity_min = 3.5
initial_velocity_max = 3.5
gravity = Vector3(0, 0, 0)

[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_k4cg5"]
vertex_color_use_as_albedo = true
albedo_color = Color(0, 1, 0.301961, 0.392157)
emission_enabled = true
emission = Color(0, 1, 0.301961, 1)
emission_energy_multiplier = 10.0
texture_filter = 2
disable_receive_shadows = true
billboard_mode = 3
billboard_keep_scale = true
particles_anim_h_frames = 1
particles_anim_v_frames = 1
particles_anim_loop = false

[sub_resource type="QuadMesh" id="QuadMesh_fgb4j"]
material = SubResource("StandardMaterial3D_k4cg5")
size = Vector2(0.005, 0.005)

[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_vwgy4"]
direction = Vector3(0, 0, -1)
spread = 4.0
initial_velocity_min = 8.0
initial_velocity_max = 8.0
gravity = Vector3(0, 0, 0)

[sub_resource type="CapsuleMesh" id="CapsuleMesh_k4cg5"]
radius = 0.025
height = 0.3

[node name="PointSpray" type="Node3D"]
script = ExtResource("1_2yl2v")

[node name="Muzzle" type="Marker3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 0.997564, -0.0697565, 0, 0.0697565, 0.997564, 0, 0, -0.15)

[node name="LaserCast" parent="Muzzle" node_paths=PackedStringArray("parent_tool") instance=ExtResource("3_qmoff")]
unique_name_in_owner = true
target_position = Vector3(0, 0, -3)
parent_tool = NodePath("../..")

[node name="SpraySFX" parent="Muzzle/LaserCast" instance=ExtResource("3_5h54c")]
unique_name_in_owner = true
attenuation_model = 0

[node name="SprayEffect" type="MeshInstance3D" parent="Muzzle"]
unique_name_in_owner = true
transform = Transform3D(1, 0, 0, 0, -4.47035e-08, -1, 0, 1, -4.47035e-08, 0, 0, -1.6)
layers = 2
sorting_offset = 3.0
mesh = SubResource("CylinderMesh_j5thb")
skeleton = NodePath("../..")

[node name="BeamParticles1" type="GPUParticles3D" parent="Muzzle"]
unique_name_in_owner = true
layers = 2
cast_shadow = 0
amount = 16
lifetime = 0.5
local_coords = true
process_material = SubResource("ParticleProcessMaterial_nc5qr")
draw_pass_1 = SubResource("QuadMesh_fgb4j")

[node name="BeamParticles2" type="GPUParticles3D" parent="Muzzle"]
unique_name_in_owner = true
layers = 2
cast_shadow = 0
lifetime = 0.2
local_coords = true
process_material = SubResource("ParticleProcessMaterial_vwgy4")
draw_pass_1 = SubResource("QuadMesh_fgb4j")

[node name="Decal" type="Decal" parent="Muzzle"]
transform = Transform3D(1, 0, 0, 0, -4.47035e-08, -1, 0, 1, -4.47035e-08, 0, 0, -1)
size = Vector3(0.2, 2, 0.2)
texture_albedo = ExtResource("2_qcl8j")
texture_emission = ExtResource("2_qcl8j")
cull_mask = 1048573

[node name="BeamSFX" parent="Muzzle" instance=ExtResource("5_tpavj")]
unique_name_in_owner = true

[node name="HUDTool" type="Node3D" parent="."]
unique_name_in_owner = true
top_level = true

[node name="Rumbler" type="Node3D" parent="HUDTool"]
unique_name_in_owner = true
script = ExtResource("5_k4cg5")

[node name="SprayNozzle" type="MeshInstance3D" parent="HUDTool/Rumbler"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, 0, 0)
visible = false
layers = 2
mesh = SubResource("CapsuleMesh_k4cg5")
skeleton = NodePath("../../../..")

[node name="NozzleMarker" type="Marker3D" parent="HUDTool/Rumbler"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.15)
script = ExtResource("6_h2fjt")

[node name="HUDElement" type="Control" parent="HUDTool/Rumbler/NozzleMarker"]
layout_mode = 3
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
grow_horizontal = 2
grow_vertical = 2

[node name="NozzleTexture" type="TextureRect" parent="HUDTool/Rumbler/NozzleMarker/HUDElement"]
texture_filter = 3
layout_mode = 0
offset_left = -256.0
offset_top = -186.0
offset_right = -192.0
offset_bottom = -122.0
scale = Vector2(10, 10)
texture = ExtResource("6_otnek")
