diff --git a/Assets/互锁解除钥匙 .png b/Assets/互锁解除钥匙 .png new file mode 100644 index 0000000..1cda414 Binary files /dev/null and b/Assets/互锁解除钥匙 .png differ diff --git a/Assets/互锁解除钥匙 .png.import b/Assets/互锁解除钥匙 .png.import new file mode 100644 index 0000000..16b8a40 --- /dev/null +++ b/Assets/互锁解除钥匙 .png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://vk0x5wxjwjlr" +path="res://.godot/imported/互锁解除钥匙 .png-1c7877fdc9a56fc01c22c7f7312179a5.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/互锁解除钥匙 .png" +dest_files=["res://.godot/imported/互锁解除钥匙 .png-1c7877fdc9a56fc01c22c7f7312179a5.ctex"] + +[params] + +compress/mode=0 +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/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=1 diff --git a/Assets/打开钥匙面板钥匙.png b/Assets/打开钥匙面板钥匙.png new file mode 100644 index 0000000..8598402 Binary files /dev/null and b/Assets/打开钥匙面板钥匙.png differ diff --git a/Assets/打开钥匙面板钥匙.png.import b/Assets/打开钥匙面板钥匙.png.import new file mode 100644 index 0000000..9150e20 --- /dev/null +++ b/Assets/打开钥匙面板钥匙.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cpmlwpev7rvbp" +path="res://.godot/imported/打开钥匙面板钥匙.png-26ecafd830e1fd3bb6ba7582fb4f4a84.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/打开钥匙面板钥匙.png" +dest_files=["res://.godot/imported/打开钥匙面板钥匙.png-26ecafd830e1fd3bb6ba7582fb4f4a84.ctex"] + +[params] + +compress/mode=0 +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/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=1 diff --git a/Model/train.blend b/Model/train.blend index 52cf3d8..957f1bf 100644 Binary files a/Model/train.blend and b/Model/train.blend differ diff --git a/Model/train.blend.import b/Model/train.blend.import index 33588a6..02dd24b 100644 --- a/Model/train.blend.import +++ b/Model/train.blend.import @@ -3,7 +3,7 @@ importer="scene" importer_version=1 type="PackedScene" -uid="uid://m2y2cnlkw1gu" +uid="uid://bx2pauh0lw0sq" path="res://.godot/imported/train.blend-6f027a2d68c6cb2bb7c5c9c597670061.scn" [deps] diff --git a/UI/LCB/lcb.gd b/UI/LCB/lcb.gd index b25cfb0..8298f69 100644 --- a/UI/LCB/lcb.gd +++ b/UI/LCB/lcb.gd @@ -14,6 +14,7 @@ func _on_screen_door_click_lcb_signal(screenDoor: Variant) -> void: func _on_close_requested() -> void: self.hide() + $"../stationKeys".hide() ## 旋钮的状态枚举 enum KNOB_STATE{ diff --git a/UI/psl/psl_window.gd b/UI/psl/psl_window.gd index 5f316b3..43ae8db 100644 --- a/UI/psl/psl_window.gd +++ b/UI/psl/psl_window.gd @@ -11,6 +11,7 @@ func _on_psl_click_signal() -> void: func _on_close_requested(): self.hide() + $"../stationKeys".hide() func shouPSLAllowHandleKey(): diff --git a/UI/station_keys/hsjc_key_control.tscn b/UI/station_keys/hsjc_key_control.tscn new file mode 100644 index 0000000..3306bb8 --- /dev/null +++ b/UI/station_keys/hsjc_key_control.tscn @@ -0,0 +1,37 @@ +[gd_scene load_steps=5 format=3 uid="uid://blixp06e6vnoe"] + +[ext_resource type="Script" path="res://UI/station_keys/outlined_key.gd" id="2_04vl8"] +[ext_resource type="Shader" path="res://shaders/outline.gdshader" id="3_cglet"] +[ext_resource type="Texture2D" uid="uid://vk0x5wxjwjlr" path="res://Assets/互锁解除钥匙 .png" id="3_wuvv5"] + +[sub_resource type="ShaderMaterial" id="ShaderMaterial_0dtby"] +shader = ExtResource("3_cglet") +shader_parameter/color = Color(0, 1, 1, 1) +shader_parameter/width = 3.0 +shader_parameter/pattern = 1 +shader_parameter/inside = false +shader_parameter/add_margins = true +shader_parameter/number_of_images = Vector2(1, 1) + +[node name="HSJC_Key" type="VBoxContainer"] +offset_right = 128.0 +offset_bottom = 155.0 +focus_mode = 1 +script = ExtResource("2_04vl8") +outline_material = SubResource("ShaderMaterial_0dtby") + +[node name="Key" type="TextureRect" parent="."] +unique_name_in_owner = true +layout_mode = 2 +focus_mode = 2 +texture = ExtResource("3_wuvv5") + +[node name="Label" type="Label" parent="."] +layout_mode = 2 +size_flags_horizontal = 4 +text = "互锁解除钥匙" + +[connection signal="focus_entered" from="Key" to="." method="_on_focus_entered"] +[connection signal="focus_exited" from="Key" to="." method="_on_focus_exited"] +[connection signal="mouse_entered" from="Key" to="." method="_on_area_2d_mouse_entered"] +[connection signal="mouse_exited" from="Key" to="." method="_on_area_2d_mouse_exited"] diff --git a/UI/station_keys/station_keys_window.gd b/UI/station_keys/station_keys_window.gd index f8ba4f8..cbfe270 100644 --- a/UI/station_keys/station_keys_window.gd +++ b/UI/station_keys/station_keys_window.gd @@ -18,9 +18,11 @@ func _on_button_pressed(): $"../LCB".shouHandleKey() $"../LCB".grab_focus() elif (current_focus.name.contains('PSL')): - $"../psl".shouInterlockReleaseSwitchHandleKey() $"../psl".shouPSLAllowHandleKey() $"../psl".grab_focus() + elif (current_focus.name.contains('HSJC')): + $"../psl".shouInterlockReleaseSwitchHandleKey() + $"../psl".grab_focus() func _on_close_requested(): diff --git a/UI/station_keys/station_keys_window.tscn b/UI/station_keys/station_keys_window.tscn index d3593c8..ee4f9f0 100644 --- a/UI/station_keys/station_keys_window.tscn +++ b/UI/station_keys/station_keys_window.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=12 format=3 uid="uid://d167och8l6jms"] +[gd_scene load_steps=13 format=3 uid="uid://d167och8l6jms"] [ext_resource type="Theme" uid="uid://bycedcl2nwwlu" path="res://ui_theme.tres" id="1_gct42"] [ext_resource type="PackedScene" uid="uid://dnmfwdvba6td3" path="res://UI/station_keys/psl_key_control.tscn" id="1_pwbsc"] @@ -9,6 +9,7 @@ [ext_resource type="FontFile" uid="uid://bkbpyidjguavf" path="res://Assets/FeiHuaSongTi-2.ttf" id="2_mlqh2"] [ext_resource type="PackedScene" uid="uid://biwdpy5pifxgi" path="res://UI/station_keys/lcb_key_control.tscn" id="2_xelwb"] [ext_resource type="PackedScene" uid="uid://63r8gueubu2q" path="res://UI/station_keys/lcb2_key_control.tscn" id="3_0e67u"] +[ext_resource type="PackedScene" uid="uid://blixp06e6vnoe" path="res://UI/station_keys/hsjc_key_control.tscn" id="9_q6qly"] [ext_resource type="AudioStream" uid="uid://di5nwer0mdafr" path="res://Assets/music/箭头提示音.mp3" id="10_cspe3"] [sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_1w22c"] @@ -16,7 +17,7 @@ [node name="Window" type="Window"] title = "请选择钥匙" position = Vector2i(10, 36) -size = Vector2i(532, 426) +size = Vector2i(656, 534) wrap_controls = true unresizable = true transparent = true @@ -57,6 +58,9 @@ layout_mode = 2 [node name="PSL_Key" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_pwbsc")] layout_mode = 2 +[node name="HSJC_Key" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("9_q6qly")] +layout_mode = 2 + [node name="SDJS_Key" parent="PanelContainer/VBoxContainer/GridContainer" instance=ExtResource("1_wmags")] layout_mode = 2 @@ -83,5 +87,6 @@ stream = ExtResource("10_cspe3") [connection signal="on_focus" from="PanelContainer/VBoxContainer/GridContainer/LCB2_Key2" to="." method="_on_key_focus_entered"] [connection signal="on_focus" from="PanelContainer/VBoxContainer/GridContainer/LCB3_Key" to="." method="_on_key_focus_entered"] [connection signal="on_focus" from="PanelContainer/VBoxContainer/GridContainer/PSL_Key" to="." method="_on_key_focus_entered"] +[connection signal="on_focus" from="PanelContainer/VBoxContainer/GridContainer/HSJC_Key" to="." method="_on_key_focus_entered"] [connection signal="on_focus" from="PanelContainer/VBoxContainer/GridContainer/SDJS_Key" to="." method="_on_key_focus_entered"] [connection signal="pressed" from="PanelContainer/VBoxContainer/MarginContainer/Button" to="." method="_on_button_pressed"]