{"id":"9WZZh4rCFa","url":"https://pastebin.ca/9WZZh4rCFa","raw_url":"https://raw.anybin.ca/9WZZh4rCFa","visibility":"public","access":"public","created_at":1780973317390,"expires_at":null,"fetch_limit":null,"fetches_used":0,"reads_remaining":null,"size_bytes":165177,"syntax_hint":"text","title":null,"filename":null,"change_note":null,"cipher":null,"cipher_meta":null,"parent_id":"5HVjBMJzAk","root_id":"2zCq9jaR4r","version":3,"owner_id":"06FABC0FA0AWSQK6XGQQSF08BD","recipient_id":null,"body":"# 项目目录结构树\r\n\r\n- **根目录**: `D:\\godot project\\aowoo_qiaoqiao_shouzhang`\r\n- **导出时间**: 2026/06/09 周二 10:47:27.07\r\n\r\n```text\r\naowoo_qiaoqiao_shouzhang/\r\n├── .editorconfig\r\n├── .gitattributes\r\n├── .gitignore\r\n├── GlobalInputHook.cs\r\n├── GlobalInputHook.cs.uid\r\n├── LICENSE\r\n├── README.md\r\n├── aowoo_qiaoqiao_shouzhang.csproj\r\n├── aowoo_qiaoqiao_shouzhang.sln\r\n├── assets\r\n│   ├── audio\r\n│   │   ├── ComfyUI_00033_.wav\r\n│   │   ├── ComfyUI_00033_.wav.import\r\n│   │   └── sfx\r\n│   │       ├── Bell Church 2.wav\r\n│   │       ├── Bell Church 2.wav.import\r\n│   │       ├── Bubbles00.wav\r\n│   │       └── Bubbles00.wav.import\r\n│   ├── sprites\r\n│   │   ├── environment\r\n│   │   │   ├── house.png\r\n│   │   │   ├── house.png.import\r\n│   │   │   ├── plus_one.png\r\n│   │   │   ├── plus_one.png.import\r\n│   │   │   ├── prop_car.png\r\n│   │   │   ├── prop_car.png.import\r\n│   │   │   ├── prop_站立aowoo.png\r\n│   │   │   ├── prop_站立aowoo.png.import\r\n│   │   │   ├── 下层水.png\r\n│   │   │   ├── 下层水.png.import\r\n│   │   │   ├── 下层草.png\r\n│   │   │   ├── 下层草.png.import\r\n│   │   │   ├── 云1.png\r\n│   │   │   ├── 云1.png.import\r\n│   │   │   ├── 云10.png\r\n│   │   │   ├── 云10.png.import\r\n│   │   │   ├── 云2.png\r\n│   │   │   ├── 云2.png.import\r\n│   │   │   ├── 云3.png\r\n│   │   │   ├── 云3.png.import\r\n│   │   │   ├── 云4.png\r\n│   │   │   ├── 云4.png.import\r\n│   │   │   ├── 云5.png\r\n│   │   │   ├── 云5.png.import\r\n│   │   │   ├── 云6.png\r\n│   │   │   ├── 云6.png.import\r\n│   │   │   ├── 云7.png\r\n│   │   │   ├── 云7.png.import\r\n│   │   │   ├── 云8.png\r\n│   │   │   ├── 云8.png.import\r\n│   │   │   ├── 云9.png\r\n│   │   │   ├── 云9.png.import\r\n│   │   │   ├── 前景兔秋花01.png\r\n│   │   │   ├── 前景兔秋花01.png.import\r\n│   │   │   ├── 前景兔秋花02.png\r\n│   │   │   ├── 前景兔秋花02.png.import\r\n│   │   │   ├── 前景兔秋花03.png\r\n│   │   │   ├── 前景兔秋花03.png.import\r\n│   │   │   ├── 前景右01.png\r\n│   │   │   ├── 前景右01.png.import\r\n│   │   │   ├── 前景右02.png\r\n│   │   │   ├── 前景右02.png.import\r\n│   │   │   ├── 前景右03.png\r\n│   │   │   ├── 前景右03.png.import\r\n│   │   │   ├── 前景右04.png\r\n│   │   │   ├── 前景右04.png.import\r\n│   │   │   ├── 前景左01.png\r\n│   │   │   ├── 前景左01.png.import\r\n│   │   │   ├── 前景左02.png\r\n│   │   │   ├── 前景左02.png.import\r\n│   │   │   ├── 前景左03.png\r\n│   │   │   ├── 前景左03.png.import\r\n│   │   │   ├── 前景左04.png\r\n│   │   │   ├── 前景左04.png.import\r\n│   │   │   ├── 前景左05.png\r\n│   │   │   ├── 前景左05.png.import\r\n│   │   │   ├── 背景.png\r\n│   │   │   ├── 背景.png.import\r\n│   │   │   ├── 背景小树01.png\r\n│   │   │   ├── 背景小树01.png.import\r\n│   │   │   ├── 背景小树02.png\r\n│   │   │   ├── 背景小树02.png.import\r\n│   │   │   ├── 背景小树03.png\r\n│   │   │   ├── 背景小树03.png.import\r\n│   │   │   ├── 背景山.png\r\n│   │   │   ├── 背景山.png.import\r\n│   │   │   ├── 花洒.png\r\n│   │   │   ├── 花洒.png.import\r\n│   │   │   ├── 花花01.png\r\n│   │   │   ├── 花花01.png.import\r\n│   │   │   ├── 花花02.png\r\n│   │   │   ├── 花花02.png.import\r\n│   │   │   ├── 花花03.png\r\n│   │   │   ├── 花花03.png.import\r\n│   │   │   ├── 花花04.png\r\n│   │   │   ├── 花花04.png.import\r\n│   │   │   ├── 草坪.png\r\n│   │   │   ├── 草坪.png.import\r\n│   │   │   ├── 键盘定位.png\r\n│   │   │   └── 键盘定位.png.import\r\n│   │   ├── items\r\n│   │   │   ├── theme_00_default\r\n│   │   │   │   ├── crops\r\n│   │   │   │   │   ├── chest\r\n│   │   │   │   │   │   ├── chest_stage_0.png\r\n│   │   │   │   │   │   ├── chest_stage_0.png.import\r\n│   │   │   │   │   │   ├── chest_stage_1.png\r\n│   │   │   │   │   │   ├── chest_stage_1.png.import\r\n│   │   │   │   │   │   ├── chest_stage_2.png\r\n│   │   │   │   │   │   ├── chest_stage_2.png.import\r\n│   │   │   │   │   │   ├── chest_stage_3.png\r\n│   │   │   │   │   │   ├── chest_stage_3.png.import\r\n│   │   │   │   │   │   ├── chest_stage_4.png\r\n│   │   │   │   │   │   ├── chest_stage_4.png.import\r\n│   │   │   │   │   │   ├── chest_stage_5.png\r\n│   │   │   │   │   │   └── chest_stage_5.png.import\r\n│   │   │   │   │   ├── luobobo\r\n│   │   │   │   │   │   ├── luobobo_stage_0.png\r\n│   │   │   │   │   │   ├── luobobo_stage_0.png.import\r\n│   │   │   │   │   │   ├── luobobo_stage_1.png\r\n│   │   │   │   │   │   ├── luobobo_stage_1.png.import\r\n│   │   │   │   │   │   ├── luobobo_stage_2.png\r\n│   │   │   │   │   │   ├── luobobo_stage_2.png.import\r\n│   │   │   │   │   │   ├── luobobo_stage_3.png\r\n│   │   │   │   │   │   ├── luobobo_stage_3.png.import\r\n│   │   │   │   │   │   ├── luobobo_stage_4.png\r\n│   │   │   │   │   │   ├── luobobo_stage_4.png.import\r\n│   │   │   │   │   │   ├── luobobo_stage_5.png\r\n│   │   │   │   │   │   └── luobobo_stage_5.png.import\r\n│   │   │   │   │   ├── tuqiuhua\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_0.png\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_0.png.import\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_1.png\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_1.png.import\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_2.png\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_2.png.import\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_3.png\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_3.png.import\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_4.png\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_4.png.import\r\n│   │   │   │   │   │   ├── tuqiuhua_stage_5.png\r\n│   │   │   │   │   │   └── tuqiuhua_stage_5.png.import\r\n│   │   │   │   │   └── yayajun\r\n│   │   │   │   │       ├── yayajun_stage_0.png\r\n│   │   │   │   │       ├── yayajun_stage_0.png.import\r\n│   │   │   │   │       ├── yayajun_stage_1.png\r\n│   │   │   │   │       ├── yayajun_stage_1.png.import\r\n│   │   │   │   │       ├── yayajun_stage_2.png\r\n│   │   │   │   │       ├── yayajun_stage_2.png.import\r\n│   │   │   │   │       ├── yayajun_stage_3.png\r\n│   │   │   │   │       ├── yayajun_stage_3.png.import\r\n│   │   │   │   │       ├── yayajun_stage_4.png\r\n│   │   │   │   │       ├── yayajun_stage_4.png.import\r\n│   │   │   │   │       ├── yayajun_stage_5.png\r\n│   │   │   │   │       └── yayajun_stage_5.png.import\r\n│   │   │   │   ├── pots\r\n│   │   │   │   │   ├── pot_default_size_0.png\r\n│   │   │   │   │   ├── pot_default_size_0.png.import\r\n│   │   │   │   │   ├── pot_default_size_1.png\r\n│   │   │   │   │   ├── pot_default_size_1.png.import\r\n│   │   │   │   │   ├── pot_default_size_2.png\r\n│   │   │   │   │   ├── pot_default_size_2.png.import\r\n│   │   │   │   │   ├── pot_default_size_3.png\r\n│   │   │   │   │   ├── pot_default_size_3.png.import\r\n│   │   │   │   │   ├── pot_default_size_4.png\r\n│   │   │   │   │   └── pot_default_size_4.png.import\r\n│   │   │   │   └── stickers\r\n│   │   │   ├── theme_01_spring\r\n│   │   │   │   ├── crops\r\n│   │   │   │   ├── pots\r\n│   │   │   │   └── stickers\r\n│   │   │   ├── theme_02_summer\r\n│   │   │   │   ├── crops\r\n│   │   │   │   ├── pots\r\n│   │   │   │   └── stickers\r\n│   │   │   ├── theme_03_autumn\r\n│   │   │   │   ├── crops\r\n│   │   │   │   ├── pots\r\n│   │   │   │   └── stickers\r\n│   │   │   └── theme_04_winter\r\n│   │   │       ├── crops\r\n│   │   │       ├── pots\r\n│   │   │       └── stickers\r\n│   │   ├── letters\r\n│   │   │   ├── 0.png\r\n│   │   │   ├── 0.png.import\r\n│   │   │   ├── 1.png\r\n│   │   │   ├── 1.png.import\r\n│   │   │   ├── 2.png\r\n│   │   │   ├── 2.png.import\r\n│   │   │   ├── 3.png\r\n│   │   │   ├── 3.png.import\r\n│   │   │   ├── 4.png\r\n│   │   │   ├── 4.png.import\r\n│   │   │   ├── 5.png\r\n│   │   │   ├── 5.png.import\r\n│   │   │   ├── 6.png\r\n│   │   │   ├── 6.png.import\r\n│   │   │   ├── 7.png\r\n│   │   │   ├── 7.png.import\r\n│   │   │   ├── 8.png\r\n│   │   │   ├── 8.png.import\r\n│   │   │   ├── 9.png\r\n│   │   │   ├── 9.png.import\r\n│   │   │   ├── a.png\r\n│   │   │   ├── a.png.import\r\n│   │   │   ├── alt.png\r\n│   │   │   ├── alt.png.import\r\n│   │   │   ├── apostrophe.png\r\n│   │   │   ├── apostrophe.png.import\r\n│   │   │   ├── b.png\r\n│   │   │   ├── b.png.import\r\n│   │   │   ├── backslash.png\r\n│   │   │   ├── backslash.png.import\r\n│   │   │   ├── backspace.png\r\n│   │   │   ├── backspace.png.import\r\n│   │   │   ├── bracketleft.png\r\n│   │   │   ├── bracketleft.png.import\r\n│   │   │   ├── bracketright.png\r\n│   │   │   ├── bracketright.png.import\r\n│   │   │   ├── c.png\r\n│   │   │   ├── c.png.import\r\n│   │   │   ├── capslock.png\r\n│   │   │   ├── capslock.png.import\r\n│   │   │   ├── comma.png\r\n│   │   │   ├── comma.png.import\r\n│   │   │   ├── ctrl.png\r\n│   │   │   ├── ctrl.png.import\r\n│   │   │   ├── d.png\r\n│   │   │   ├── d.png.import\r\n│   │   │   ├── down.png\r\n│   │   │   ├── down.png.import\r\n│   │   │   ├── e.png\r\n│   │   │   ├── e.png.import\r\n│   │   │   ├── enter.png\r\n│   │   │   ├── enter.png.import\r\n│   │   │   ├── equal.png\r\n│   │   │   ├── equal.png.import\r\n│   │   │   ├── f.png\r\n│   │   │   ├── f.png.import\r\n│   │   │   ├── g.png\r\n│   │   │   ├── g.png.import\r\n│   │   │   ├── h.png\r\n│   │   │   ├── h.png.import\r\n│   │   │   ├── i.png\r\n│   │   │   ├── i.png.import\r\n│   │   │   ├── j.png\r\n│   │   │   ├── j.png.import\r\n│   │   │   ├── k.png\r\n│   │   │   ├── k.png.import\r\n│   │   │   ├── l.png\r\n│   │   │   ├── l.png.import\r\n│   │   │   ├── left.png\r\n│   │   │   ├── left.png.import\r\n│   │   │   ├── m.png\r\n│   │   │   ├── m.png.import\r\n│   │   │   ├── minus.png\r\n│   │   │   ├── minus.png.import\r\n│   │   │   ├── mouse.png\r\n│   │   │   ├── mouse.png.import\r\n│   │   │   ├── n.png\r\n│   │   │   ├── n.png.import\r\n│   │   │   ├── o.png\r\n│   │   │   ├── o.png.import\r\n│   │   │   ├── p.png\r\n│   │   │   ├── p.png.import\r\n│   │   │   ├── period.png\r\n│   │   │   ├── period.png.import\r\n│   │   │   ├── q.png\r\n│   │   │   ├── q.png.import\r\n│   │   │   ├── quoteleft.png\r\n│   │   │   ├── quoteleft.png.import\r\n│   │   │   ├── r.png\r\n│   │   │   ├── r.png.import\r\n│   │   │   ├── right.png\r\n│   │   │   ├── right.png.import\r\n│   │   │   ├── s.png\r\n│   │   │   ├── s.png.import\r\n│   │   │   ├── semicolon.png\r\n│   │   │   ├── semicolon.png.import\r\n│   │   │   ├── shift.png\r\n│   │   │   ├── shift.png.import\r\n│   │   │   ├── slash.png\r\n│   │   │   ├── slash.png.import\r\n│   │   │   ├── space.png\r\n│   │   │   ├── space.png.import\r\n│   │   │   ├── t.png\r\n│   │   │   ├── t.png.import\r\n│   │   │   ├── tab.png\r\n│   │   │   ├── tab.png.import\r\n│   │   │   ├── u.png\r\n│   │   │   ├── u.png.import\r\n│   │   │   ├── up.png\r\n│   │   │   ├── up.png.import\r\n│   │   │   ├── v.png\r\n│   │   │   ├── v.png.import\r\n│   │   │   ├── w.png\r\n│   │   │   ├── w.png.import\r\n│   │   │   ├── windows.png\r\n│   │   │   ├── windows.png.import\r\n│   │   │   ├── x.png\r\n│   │   │   ├── x.png.import\r\n│   │   │   ├── y.png\r\n│   │   │   ├── y.png.import\r\n│   │   │   ├── z.png\r\n│   │   │   └── z.png.import\r\n│   │   ├── ui\r\n│   │   │   ├── icon_basket.png\r\n│   │   │   ├── icon_basket.png.import\r\n│   │   │   ├── icon_nav_journal.png\r\n│   │   │   ├── icon_nav_journal.png.import\r\n│   │   │   ├── icon_nav_keyboard.png\r\n│   │   │   ├── icon_nav_keyboard.png.import\r\n│   │   │   ├── icon_nav_settings.png\r\n│   │   │   ├── icon_nav_settings.png.import\r\n│   │   │   ├── journal_guide_bg.png\r\n│   │   │   ├── journal_guide_bg.png.import\r\n│   │   │   ├── journal_page_bg.png\r\n│   │   │   ├── journal_page_bg.png.import\r\n│   │   │   └── warehouse\r\n│   │   │       ├── Gold_Bar.png\r\n│   │   │       ├── Gold_Bar.png.import\r\n│   │   │       ├── btn_sort_amount.png\r\n│   │   │       ├── btn_sort_amount.png.import\r\n│   │   │       ├── btn_sort_rarity.png\r\n│   │   │       ├── btn_sort_rarity.png.import\r\n│   │   │       ├── btn_sort_theme.png\r\n│   │   │       ├── btn_sort_theme.png.import\r\n│   │   │       ├── marketplace.png\r\n│   │   │       ├── marketplace.png.import\r\n│   │   │       ├── slider_grabber.png\r\n│   │   │       ├── slider_grabber.png.import\r\n│   │   │       ├── slot_rarity_0.png\r\n│   │   │       ├── slot_rarity_0.png.import\r\n│   │   │       ├── slot_rarity_1.png\r\n│   │   │       ├── slot_rarity_1.png.import\r\n│   │   │       ├── slot_rarity_2.png\r\n│   │   │       ├── slot_rarity_2.png.import\r\n│   │   │       ├── slot_rarity_3.png\r\n│   │   │       ├── slot_rarity_3.png.import\r\n│   │   │       ├── slot_sale.png\r\n│   │   │       ├── slot_sale.png.import\r\n│   │   │       ├── tab_category_crop.png\r\n│   │   │       ├── tab_category_crop.png.import\r\n│   │   │       ├── tab_category_pot.png\r\n│   │   │       ├── tab_category_pot.png.import\r\n│   │   │       ├── tab_category_sticker.png\r\n│   │   │       ├── tab_category_sticker.png.import\r\n│   │   │       ├── warehouse_bg.png\r\n│   │   │       └── warehouse_bg.png.import\r\n│   │   ├── 小怪兽键帽03.png\r\n│   │   ├── 小怪兽键帽03.png.import\r\n│   │   ├── 鳄鳄键帽04.png\r\n│   │   └── 鳄鳄键帽04.png.import\r\n│   ├── wave_noise.gdshader\r\n│   └── wave_noise.gdshader.uid\r\n├── export_presets.cfg\r\n├── export_tree.py\r\n├── main_keyboard.tscn\r\n├── main_keyboard.tscn15041061776.tmp\r\n├── pot_data.gd\r\n├── pot_data.gd.uid\r\n├── project.godot\r\n├── resources\r\n│   ├── base_item_data.gd\r\n│   ├── base_item_data.gd.uid\r\n│   ├── crop_master_database.tres\r\n│   ├── crop_master_db.gd\r\n│   ├── crop_master_db.gd.uid\r\n│   ├── crop_weights.gd\r\n│   ├── crop_weights.gd.uid\r\n│   ├── default_weights.tres\r\n│   └── pot_data_standard.tres\r\n├── scenes\r\n│   ├── game_prop.tscn\r\n│   ├── global_warehouse.gd\r\n│   ├── global_warehouse.gd.uid\r\n│   ├── juice_jiggler.gd\r\n│   ├── juice_jiggler.gd.uid\r\n│   ├── key.gd\r\n│   ├── key.gd.uid\r\n│   ├── key.tscn\r\n│   ├── main_keyboard.gd\r\n│   ├── main_keyboard.gd.uid\r\n│   └── ui\r\n│       ├── inventory_slot.gd\r\n│       ├── inventory_slot.gd.uid\r\n│       ├── inventory_slot.tscn\r\n│       ├── warehouse_window.gd\r\n│       └── warehouse_window.gd.uid\r\n├── warehouse_window.tscn\r\n├── window_controller.gd\r\n└── window_controller.gd.uid\r\n```\r\n\r\n-------------------\r\n# File: res://GlobalInputHook.cs\r\n\r\nusing Godot;\r\nusing System;\r\nusing System.Runtime.InteropServices;\r\n\r\npublic partial class GlobalInputHook : Node\r\n{\r\n\t// Win32 API 导入\r\n\t[DllImport(\"user32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\r\n\tprivate static extern IntPtr SetWindowsHookEx(int idHook, LowLevelProc lpfn, IntPtr hMod, uint dwThreadId);\r\n\r\n\t[DllImport(\"user32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\r\n\t[return: MarshalAs(UnmanagedType.Bool)]\r\n\tprivate static extern bool UnhookWindowsHookEx(IntPtr hhk);\r\n\r\n\t[DllImport(\"user32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\r\n\tprivate static extern IntPtr CallNextHookEx(IntPtr hhk, int nCode, IntPtr wParam, IntPtr lParam);\r\n\r\n\t[DllImport(\"kernel32.dll\", CharSet = CharSet.Auto, SetLastError = true)]\r\n\tprivate static extern IntPtr GetModuleHandle(string lpModuleName);\r\n\r\n\t// 钩子类型常量\r\n\tprivate const int WH_KEYBOARD_LL = 13;\r\n\tprivate const int WH_MOUSE_LL = 14;\r\n\r\n\t// 消息类型常量\r\n\tprivate const int WM_KEYDOWN = 0x0100;\r\n\tprivate const int WM_KEYUP = 0x0101;\r\n\tprivate const int WM_SYSKEYDOWN = 0x0104;\r\n\tprivate const int WM_SYSKEYUP = 0x0105;\r\n\r\n\tprivate const int WM_LBUTTONDOWN = 0x0201;\r\n\tprivate const int WM_LBUTTONUP = 0x0202;\r\n\tprivate const int WM_RBUTTONDOWN = 0x0204;\r\n\tprivate const int WM_RBUTTONUP = 0x0205;\r\n\tprivate const int WM_MBUTTONDOWN = 0x0206;\r\n\tprivate const int WM_MBUTTONUP = 0x0208;\r\n\tprivate const int WM_MOUSEWHEEL = 0x020A;\r\n\r\n\t// ==================== 核心新增：用于过滤长按自动重复的按键状态集合 ====================\r\n\tprivate System.Collections.Generic.HashSet<int> _pressedKeys = new System.Collections.Generic.HashSet<int>();\r\n\r\n\t[Signal]\r\n\tpublic delegate void GlobalKeyPressedEventHandler(int vkCode);\r\n\t[Signal]\r\n\tpublic delegate void GlobalMousePressedEventHandler(int buttonId, int x, int y);\r\n\r\n\tprivate delegate IntPtr LowLevelProc(int nCode, IntPtr wParam, IntPtr lParam);\r\n\r\n\tprivate LowLevelProc _keyboardProc;\r\n\tprivate LowLevelProc _mouseProc;\r\n\tprivate IntPtr _keyboardHookId = IntPtr.Zero;\r\n\tprivate IntPtr _mouseHookId = IntPtr.Zero;\r\n\r\n\t[StructLayout(LayoutKind.Sequential)]\r\n\tprivate struct POINT\r\n\t{\r\n\t\tpublic int x;\r\n\t\tpublic int y;\r\n\t}\r\n\r\n\t[StructLayout(LayoutKind.Sequential)]\r\n\tprivate struct MSLLHOOKSTRUCT\r\n\t{\r\n\t\tpublic POINT pt;\r\n\t\tpublic uint mouseData;\r\n\t\tpublic uint flags;\r\n\t\tpublic uint time;\r\n\t\tpublic IntPtr dwExtraInfo;\r\n\t}\r\n\r\n\tpublic override void _Ready()\r\n\t{\r\n\t\t// 保持委托引用，防止被垃圾回收\r\n\t\t_keyboardProc = LowLevelKeyboardProc;\r\n\t\t_mouseProc = LowLevelMouseProc;\r\n\r\n\t\t_keyboardHookId = SetHook(_keyboardProc, WH_KEYBOARD_LL);\r\n\t\t_mouseHookId = SetHook(_mouseProc, WH_MOUSE_LL);\r\n\t}\r\n\r\n\tpublic override void _ExitTree()\r\n\t{\r\n\t\tif (_keyboardHookId != IntPtr.Zero)\r\n\t\t\tUnhookWindowsHookEx(_keyboardHookId);\r\n\t\tif (_mouseHookId != IntPtr.Zero)\r\n\t\t\tUnhookWindowsHookEx(_mouseHookId);\r\n\t}\r\n\r\n\tprivate IntPtr SetHook(LowLevelProc proc, int hookType)\r\n\t{\r\n\t\tusing (var curProcess = System.Diagnostics.Process.GetCurrentProcess())\r\n\t\tusing (var curModule = curProcess.MainModule)\r\n\t\t{\r\n\t\t\treturn SetWindowsHookEx(hookType, proc, GetModuleHandle(curModule.ModuleName), 0);\r\n\t\t}\r\n\t}\r\n\r\n\t// 键盘钩子回调函数\r\n\tprivate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam)\r\n\t{\r\n\t\tif (nCode >= 0)\r\n\t\t{\r\n\t\t\tint vkCode = Marshal.ReadInt32(lParam);\r\n\t\t\tint message = (int)wParam;\r\n\r\n\t\t\t// ===== 过滤逻辑：判断是否为系统自动重复触发的连续 KEYDOWN =====\r\n\t\t\tif (message == WM_KEYDOWN || message == WM_SYSKEYDOWN)\r\n\t\t\t{\r\n\t\t\t\t// 如果 _pressedKeys 里还没有这个键，说明是玩家第一次真正“按下”\r\n\t\t\t\tif (!_pressedKeys.Contains(vkCode))\r\n\t\t\t\t{\r\n\t\t\t\t\t_pressedKeys.Add(vkCode); // 将按键记入集合，拦截随后的长按自动重复消息\r\n\t\t\t\t\tCallDeferred(MethodName.EmitSignal, SignalName.GlobalKeyPressed, vkCode);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if (message == WM_KEYUP || message == WM_SYSKEYUP)\r\n\t\t\t{\r\n\t\t\t\t// 玩家真正松开按键时，将按键从集合中移除，允许下一次点击\r\n\t\t\t\t_pressedKeys.Remove(vkCode);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn CallNextHookEx(_keyboardHookId, nCode, wParam, lParam);\r\n\t}\r\n\r\n\t// 鼠标钩子回调函数\r\n\tprivate IntPtr LowLevelMouseProc(int nCode, IntPtr wParam, IntPtr lParam)\r\n\t{\r\n\t\tif (nCode >= 0)\r\n\t\t{\r\n\t\t\tint message = (int)wParam;\r\n\t\t\tif (message == WM_LBUTTONDOWN || message == WM_RBUTTONDOWN || message == WM_MBUTTONDOWN)\r\n\t\t\t{\r\n\t\t\t\tMSLLHOOKSTRUCT hookStruct = Marshal.PtrToStructure<MSLLHOOKSTRUCT>(lParam);\r\n\t\t\t\tint buttonId = 0;\r\n\t\t\t\tif (message == WM_LBUTTONDOWN) buttonId = 1;\r\n\t\t\t\telse if (message == WM_RBUTTONDOWN) buttonId = 2;\r\n\t\t\t\telse if (message == WM_MBUTTONDOWN) buttonId = 3;\r\n\r\n\t\t\t\tCallDeferred(MethodName.EmitSignal, SignalName.GlobalMousePressed, buttonId, hookStruct.pt.x, hookStruct.pt.y);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn CallNextHookEx(_mouseHookId, nCode, wParam, lParam);\r\n\t}\r\n}\r\n\r\n-------------------\r\n# File: res://assets/wave_noise.gdshader\r\n\r\nshader_type canvas_item;\r\n\r\n// 💡 核心机制：直接向大世界索要全局共享的时间，确保全场景所有物体共享同一个噪声场\r\nglobal uniform float global_noise_time;\r\n\r\n// 🎛️ 暴露在面板上的 Blender 几何节点微调参数\r\n// 🎛️ 💡 精准替换：完全按照你最新的截图数据同步锁定默认初始值，并取消了100的上限硬限制\r\nuniform float wave_amplitude_x : hint_range(0.0, 0.2) = 0.01;   // Wave Amplitude X -> 默认 0.01\r\nuniform float wave_amplitude_y : hint_range(0.0, 0.2) = 0.01;   // Wave Amplitude Y -> 默认 0.01\r\nuniform float wave_frequency : hint_range(0.1, 20.0) = 1.915;   // Wave Frequency   -> 默认 0.836\r\nuniform float noise_scale : hint_range(1.0, 1000.0, 0.1) = 206.6; // Noise Scale      -> 默认 100.0 (支持输入任意大数值)\r\n\r\n\r\n// 💡 传送带变量：负责将 vertex 算好的世界坐标，安全合法地跨函数传递给 fragment 像素渲染\r\nvarying vec2 world_pos;\r\n\r\n// 一种快速生成 2D 伪柏林噪波的经典数学函数（等同于 Blender 里的 Noise Texture 节点）\r\nvec2 rand_noise(vec2 p) {\r\n\tp = vec2(dot(p, vec2(127.1, 311.7)), dot(p, vec2(269.5, 183.3)));\r\n\treturn -1.0 + 2.0 * fract(sin(p) * 43758.5453123);\r\n}\r\n\r\nfloat perlin_noise(vec2 p) {\r\n\tvec2 i = floor(p);\r\n\tvec2 f = fract(p);\r\n\tvec2 u = f * f * (3.0 - 2.0 * f);\r\n\treturn mix(mix(dot(rand_noise(i + vec2(0.0,0.0)), f - vec2(0.0,0.0)),\r\n\t               dot(rand_noise(i + vec2(1.0,0.0)), f - vec2(1.0,0.0)), u.x),\r\n\t           mix(dot(rand_noise(i + vec2(0.0,1.0)), f - vec2(0.0,1.0)),\r\n\t               dot(rand_noise(i + vec2(1.0,1.0)), f - vec2(1.0,1.0)), u.x), u.y);\r\n}\r\n\r\n\r\nvoid vertex() {\r\n\t// 💡 工业级强固方案：提取当前 Canvas 项在整个大世界大屏幕中的绝对像素坐标\r\n\t// 使用 MODEL_MATRIX 结合 CANVAS_MATRIX，彻底斩断任何父节点局部形变带来的干扰\r\n\tworld_pos = (CANVAS_MATRIX * MODEL_MATRIX * vec4(VERTEX, 0.0, 1.0)).xy;\r\n}\r\n\r\n\r\nvoid fragment() {\r\n\t// 计算噪波采样点：世界绝对坐标 / 噪波缩放 + 全局时间 * 频率速度\r\n\tvec2 noise_uv = world_pos / noise_scale + vec2(global_noise_time * wave_frequency);\r\n\t\r\n\t// 动态采样出当前坐标点在噪声纹理场里的扭曲位移量\r\n\tfloat noise_val_x = perlin_noise(noise_uv);\r\n\tfloat noise_val_y = perlin_noise(noise_uv + vec2(99.0)); // 偏移采样点防止XY完全等价连体扭曲\r\n\t\r\n\t// 将噪波偏移量等比叠加应用到物体原本的美术贴图 UV 上\r\n\tvec2 shifted_uv = UV;\r\n\tshifted_uv.x += noise_val_x * wave_amplitude_x;\r\n\tshifted_uv.y += noise_val_y * wave_amplitude_y;\r\n\t\r\n\t// 输出最终受到波浪噪波扭曲后的画面像素\r\n\tCOLOR = texture(TEXTURE, shifted_uv);\r\n}\r\n\r\n-------------------\r\n# File: res://main_keyboard.tscn\r\n\r\n[gd_scene format=3 uid=\"uid://b5l7m6caa252b\"]\r\n\r\n[ext_resource type=\"PackedScene\" uid=\"uid://c2n76yquwpiy2\" path=\"res://scenes/key.tscn\" id=\"1_kr6jc\"]\r\n[ext_resource type=\"Script\" uid=\"uid://cxvuddquaminc\" path=\"res://scenes/main_keyboard.gd\" id=\"1_nk3ru\"]\r\n[ext_resource type=\"PackedScene\" uid=\"uid://bpbanvymb1cmw\" path=\"res://scenes/game_prop.tscn\" id=\"2_t0ika\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://kkj0gfb337s3\" path=\"res://assets/sprites/environment/背景.png\" id=\"2_w6krq\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cig1o0tdgbl5y\" path=\"res://assets/sprites/items/theme_00_default/pots/pot_default_size_1.png\" id=\"3_i4w03\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ceakvpmwofvja\" path=\"res://assets/sprites/environment/草坪.png\" id=\"3_nk3ru\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dbbeyxdom1t84\" path=\"res://assets/sprites/items/theme_00_default/pots/pot_default_size_2.png\" id=\"4_2kwox\"]\r\n[ext_resource type=\"Shader\" uid=\"uid://bh0qpokppaj6p\" path=\"res://assets/wave_noise.gdshader\" id=\"4_cm383\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://csir761ao8o4k\" path=\"res://assets/sprites/environment/背景山.png\" id=\"4_nk78p\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cxekr7is1l300\" path=\"res://assets/sprites/environment/前景兔秋花02.png\" id=\"5_8jng3\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cnwuxhdopfau6\" path=\"res://assets/sprites/environment/前景兔秋花01.png\" id=\"5_23e38\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://tlqw75uui5wy\" path=\"res://assets/sprites/environment/下层水.png\" id=\"5_kr0tg\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://byvr3lv0k50wg\" path=\"res://assets/sprites/environment/前景兔秋花03.png\" id=\"6_gobuu\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cpwb2dmfh7ho3\" path=\"res://assets/sprites/environment/house.png\" id=\"6_n443a\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://u31dw1uvmsrp\" path=\"res://assets/sprites/environment/云1.png\" id=\"6_pya6j\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://b3spkhu1d0yf4\" path=\"res://assets/sprites/environment/prop_car.png\" id=\"7_fqwq4\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dlgfb1drowd0l\" path=\"res://assets/sprites/environment/云3.png\" id=\"9_8urr1\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://d3ltykpkcenhy\" path=\"res://assets/sprites/environment/prop_站立aowoo.png\" id=\"9_gq25e\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bw1qw32020v83\" path=\"res://assets/sprites/environment/花洒.png\" id=\"10_57ie1\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bvu08yk2prhvc\" path=\"res://assets/sprites/environment/云2.png\" id=\"10_43475\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dthjeqnjtb5pa\" path=\"res://assets/sprites/environment/云4.png\" id=\"11_m81xy\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bcdeajehlgevb\" path=\"res://assets/sprites/environment/前景左05.png\" id=\"11_wvmf6\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dkv5im0nkss4e\" path=\"res://assets/sprites/environment/云5.png\" id=\"12_v116j\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dkx10y6g5xr4m\" path=\"res://assets/sprites/environment/云6.png\" id=\"13_tlsoy\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://45qwqfw1jm7h\" path=\"res://assets/sprites/letters/mouse.png\" id=\"14_2uspe\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c30hr4ixq3p1h\" path=\"res://assets/sprites/environment/云7.png\" id=\"14_h4gtp\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ixptsvdlwo78\" path=\"res://assets/sprites/小怪兽键帽03.png\" id=\"15_8jng3\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://mdaeepeg346s\" path=\"res://assets/sprites/鳄鳄键帽04.png\" id=\"15_57ie1\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cj0mhsvo5tcp2\" path=\"res://assets/sprites/environment/云8.png\" id=\"15_ufd0j\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://r8bx5q5fmtt5\" path=\"res://assets/sprites/environment/云9.png\" id=\"16_ee2ur\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bcya33rs6dr1t\" path=\"res://assets/sprites/environment/前景左04.png\" id=\"16_owqlj\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ki4td81gy8td\" path=\"res://assets/sprites/environment/前景左03.png\" id=\"17_gfwsj\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cshj4xj7edh4g\" path=\"res://assets/sprites/environment/下层草.png\" id=\"17_mvx3b\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bcuctuby31jio\" path=\"res://assets/sprites/environment/云10.png\" id=\"17_t184x\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cms3acy043q34\" path=\"res://assets/sprites/environment/花花01.png\" id=\"24_v116j\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cq05kqx7xv6n4\" path=\"res://assets/sprites/environment/花花02.png\" id=\"25_ufd0j\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://btxtsi2h27k0j\" path=\"res://assets/sprites/environment/花花03.png\" id=\"26_ee2ur\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://q3orph2io0h2\" path=\"res://assets/sprites/environment/前景左02.png\" id=\"26_fex6b\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://d3cecegydyve3\" path=\"res://assets/sprites/environment/前景左01.png\" id=\"27_sko6c\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bhbmcectins34\" path=\"res://assets/sprites/environment/花花04.png\" id=\"27_t184x\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cwy71ig1q4o63\" path=\"res://assets/sprites/environment/背景小树01.png\" id=\"28_ee2ur\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://crvoy72f50bhu\" path=\"res://assets/sprites/environment/前景右04.png\" id=\"28_sko6c\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bhekru8ab5v2\" path=\"res://assets/sprites/environment/前景右03.png\" id=\"29_kr0tg\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://0spnj4rg8ixi\" path=\"res://assets/sprites/environment/背景小树02.png\" id=\"29_w6krq\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dfknnxbf7dmn7\" path=\"res://assets/sprites/environment/背景小树03.png\" id=\"30_hmxrr\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bvh423tes0nib\" path=\"res://assets/sprites/environment/前景右02.png\" id=\"30_mvx3b\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bvd5q0pmtxpqq\" path=\"res://assets/sprites/environment/前景右01.png\" id=\"31_po3vl\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c44fmo1eqqdoy\" path=\"res://assets/sprites/ui/icon_nav_keyboard.png\" id=\"34_po3vl\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dh0yxi575caud\" path=\"res://assets/sprites/ui/icon_nav_journal.png\" id=\"35_1sb26\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://m673828me4py\" path=\"res://assets/sprites/ui/icon_nav_settings.png\" id=\"36_ledu6\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dwlwo3bjx7h12\" path=\"res://assets/sprites/ui/icon_basket.png\" id=\"42_hmxrr\"]\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_fqwq4\"]\r\nshader = ExtResource(\"4_cm383\")\r\nshader_parameter/wave_amplitude_x = 0.010000000475\r\nshader_parameter/wave_amplitude_y = 0.010000000475\r\nshader_parameter/wave_frequency = 0.80000003474012\r\nshader_parameter/noise_scale = 371.5000055208946\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_n443a\"]\r\nshader = ExtResource(\"4_cm383\")\r\nshader_parameter/wave_amplitude_x = 0.002000000095\r\nshader_parameter/wave_amplitude_y = 0.002000000095\r\nshader_parameter/wave_frequency = 0.71700003079762\r\nshader_parameter/noise_scale = 286.90000426025307\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_2uspe\"]\r\nshader = ExtResource(\"4_cm383\")\r\nshader_parameter/wave_amplitude_x = 0.010000000475\r\nshader_parameter/wave_amplitude_y = 0.010000000475\r\nshader_parameter/wave_frequency = 0.83600003645012\r\nshader_parameter/noise_scale = 373.9000055566575\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_v116j\"]\r\nshader = ExtResource(\"4_cm383\")\r\nshader_parameter/wave_amplitude_x = 0.0210000009975\r\nshader_parameter/wave_amplitude_y = 0.0210000009975\r\nshader_parameter/wave_frequency = 1.99300009140762\r\nshader_parameter/noise_scale = 229.60000340641432\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_hmxrr\"]\r\nshader = ExtResource(\"4_cm383\")\r\nshader_parameter/wave_amplitude_x = 0.010000000475\r\nshader_parameter/wave_amplitude_y = 0.010000000475\r\nshader_parameter/wave_frequency = 0.38000001479012\r\nshader_parameter/noise_scale = 308.3000045791388\r\n\r\n[node name=\"main_keyboard\" type=\"Node2D\" unique_id=135033407]\r\nscript = ExtResource(\"1_nk3ru\")\r\n\r\n[node name=\"_group_backgrounds\" type=\"Node2D\" parent=\".\" unique_id=1296964689]\r\nvisible = false\r\n\r\n[node name=\"CanvasLayer\" type=\"CanvasLayer\" parent=\"_group_backgrounds\" unique_id=2100031870]\r\nlayer = -10\r\nvisible = false\r\n\r\n[node name=\"TextureRect\" type=\"TextureRect\" parent=\"_group_backgrounds/CanvasLayer\" unique_id=1442067626]\r\noffset_right = 3840.0\r\noffset_bottom = 2160.0\r\ntexture = ExtResource(\"2_w6krq\")\r\nstretch_mode = 2\r\nmetadata/_edit_lock_ = true\r\n\r\n[node name=\"_group_props\" type=\"Node2D\" parent=\".\" unique_id=595259724]\r\n\r\n[node name=\"prop_down01\" parent=\"_group_props\" unique_id=1924461588 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1961.0001, 1967.0002)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_down01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"5_kr0tg\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_cloud03\" parent=\"_group_props\" unique_id=818559680 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3559.0002, 1192)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"9_8urr1\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud04\" parent=\"_group_props\" unique_id=2007690134 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(563.00006, 818)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud04\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"11_m81xy\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud05\" parent=\"_group_props\" unique_id=276716972 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(140, 1021.00006)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud05\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"12_v116j\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud06\" parent=\"_group_props\" unique_id=889473280 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(124, 1230.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud06\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"13_tlsoy\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud07\" parent=\"_group_props\" unique_id=659098496 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(67.000015, 1705)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud07\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"14_h4gtp\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud08\" parent=\"_group_props\" unique_id=1517841495 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3522.9998, 864.00006)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud08\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"15_ufd0j\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud09\" parent=\"_group_props\" unique_id=1120739872 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3404, 1450)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud09\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"16_ee2ur\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud10\" parent=\"_group_props\" unique_id=1510477675 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3381, 1517)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 2.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud10\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"17_t184x\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_cloud01\" parent=\"_group_props\" unique_id=668470827 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(529, 571.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"6_pya6j\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_tuqiuhua02\" parent=\"_group_props\" unique_id=1578688765 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(550, 1539.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tuqiuhua02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"5_8jng3\")\r\noffset = Vector2(-100.61749, -316.4425)\r\n\r\n[node name=\"prop_mountain\" parent=\"_group_props\" unique_id=1544944606 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1918, 1135)\r\nscale = Vector2(1.21, 0.85)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_mountain\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_n443a\")\r\nposition = Vector2(-31.168945, 757.5342)\r\ntexture = ExtResource(\"4_nk78p\")\r\noffset = Vector2(31.168945, -757.5342)\r\n\r\n[node name=\"prop_house\" parent=\"_group_props\" unique_id=1242648082 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1020, 868)\r\nscale = Vector2(0.95, 0.95)\r\nsquash_stretch_max_x = 1.01\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 0.985\r\njuice_speed_override = 1.0\r\ntime_offset_override = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_house\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"6_n443a\")\r\noffset = Vector2(-11, -221.36084)\r\n\r\n[node name=\"prop_car\" parent=\"_group_props\" unique_id=1124300276 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1658, 889)\r\nscale = Vector2(0.94, 0.94)\r\nsquash_stretch_max_x = 1.002\r\nsquash_stretch_max_y = 1.005\r\njuice_speed_override = 5.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_car\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"7_fqwq4\")\r\noffset = Vector2(-7.808511, -146.89276)\r\n\r\n[node name=\"prop_grass\" parent=\"_group_props\" unique_id=1482026029 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1914, 1380)\r\nscale = Vector2(1.25, 0.665)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_grass\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_2uspe\")\r\nposition = Vector2(8, 744.36084)\r\ntexture = ExtResource(\"3_nk3ru\")\r\noffset = Vector2(-8, -744.36084)\r\n\r\n[node name=\"prop_tuqiuhua03\" parent=\"_group_props\" unique_id=1629400034 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3484, 1831)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 3.395\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tuqiuhua03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"6_gobuu\")\r\noffset = Vector2(67.68817, -247.58997)\r\n\r\n[node name=\"prop_tuqiuhua01\" parent=\"_group_props\" unique_id=1392977615 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(398.00003, 1786.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tuqiuhua01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"5_23e38\")\r\noffset = Vector2(-35.04373, -231.1969)\r\n\r\n[node name=\"prop_left05\" parent=\"_group_props\" unique_id=1819660 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(399, 1957)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_left05\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"11_wvmf6\")\r\noffset = Vector2(-0.071014404, -110.97815)\r\n\r\n[node name=\"prop_cloud02\" parent=\"_group_props\" unique_id=2115279233 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3277, 727)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.02\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.5\r\ntime_offset_override = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_cloud02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"10_43475\")\r\noffset = Vector2(7.5792236, 0.4975586)\r\n\r\n[node name=\"prop_huahua01\" parent=\"_group_props\" unique_id=388333503 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1369, 898)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_huahua01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"24_v116j\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_huahua02\" parent=\"_group_props\" unique_id=119665447 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2698, 878)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_huahua02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"25_ufd0j\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_huahua03\" parent=\"_group_props\" unique_id=875513102 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1030, 1958)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_huahua03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"26_ee2ur\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_huahua04\" parent=\"_group_props\" unique_id=2101183212 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2875, 1945)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_huahua04\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"27_t184x\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_tree01\" parent=\"_group_props\" unique_id=1521400257 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1358, 495)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tree01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"28_ee2ur\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_tree02\" parent=\"_group_props\" unique_id=888885610 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2675, 460)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tree02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"29_w6krq\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_tree03\" parent=\"_group_props\" unique_id=1295421271 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3043, 555)\r\nsquash_stretch_max_x = 1.0\r\nsquash_stretch_max_y = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_tree03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_v116j\")\r\ntexture = ExtResource(\"30_hmxrr\")\r\noffset = Vector2(-7, -0.36083984)\r\n\r\n[node name=\"prop_down02\" parent=\"_group_props\" unique_id=2098158156 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1883.0001, 2059)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_down02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"17_mvx3b\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_left04\" parent=\"_group_props\" unique_id=1282373959 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(610, 2008)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_left04\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"16_owqlj\")\r\noffset = Vector2(-25.207672, -36.661255)\r\n\r\n[node name=\"prop_left03\" parent=\"_group_props\" unique_id=56561865 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(385.00003, 1966)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 2.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_left03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"17_gfwsj\")\r\noffset = Vector2(-30.672058, -72.72693)\r\n\r\n[node name=\"prop_huasa\" parent=\"_group_props\" unique_id=1304154750 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2244, 954)\r\nsquash_stretch_max_x = 1.01\r\nsquash_stretch_max_y = 1.01\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 3.0\r\ntime_offset_override = 9.635\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_huasa\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"10_57ie1\")\r\noffset = Vector2(-1.1639347, -47.590363)\r\n\r\n[node name=\"prop_aowoo\" parent=\"_group_props\" unique_id=1834444511 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2453, 957)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.002\r\nsquash_stretch_max_y = 1.005\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 1.0\r\ntime_offset_override = 9.675\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_aowoo\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"9_gq25e\")\r\noffset = Vector2(-11, -221.36084)\r\n\r\n[node name=\"prop_left02\" parent=\"_group_props\" unique_id=1739137350 instance=ExtResource(\"2_t0ika\")]\r\nz_index = 1\r\nposition = Vector2(629, 1990.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_left02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"26_fex6b\")\r\noffset = Vector2(-30.672058, -72.72693)\r\n\r\n[node name=\"prop_left01\" parent=\"_group_props\" unique_id=1016735187 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(599, 1991)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_left01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"27_sko6c\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_right04\" parent=\"_group_props\" unique_id=1833064780 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3619.0002, 1876.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_right04\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"28_sko6c\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_right03\" parent=\"_group_props\" unique_id=376651383 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3305.0002, 1914)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_right03\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"29_kr0tg\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_right02\" parent=\"_group_props\" unique_id=1807933103 instance=ExtResource(\"2_t0ika\")]\r\nz_index = 1\r\nposition = Vector2(3399, 1884.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_right02\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"30_mvx3b\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"prop_right01\" parent=\"_group_props\" unique_id=1624386981 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3380.0002, 1963.0001)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 0.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_props/prop_right01\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"31_po3vl\")\r\noffset = Vector2(-20.835999, -8.245972)\r\n\r\n[node name=\"_group_keys\" type=\"Node2D\" parent=\".\" unique_id=1549740572]\r\n\r\n[node name=\"Key_quoteleft\" parent=\"_group_keys\" unique_id=245655917 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(701, 1096)\r\ntrigger_keycode = 96\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_1\" parent=\"_group_keys\" unique_id=1081271230 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(888, 1098)\r\ntrigger_keycode = 49\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_2\" parent=\"_group_keys\" unique_id=87680295 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1075, 1100)\r\ntrigger_keycode = 50\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_3\" parent=\"_group_keys\" unique_id=258082773 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1261, 1099)\r\ntrigger_keycode = 51\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_4\" parent=\"_group_keys\" unique_id=1009311297 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1450, 1097)\r\ntrigger_keycode = 52\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_5\" parent=\"_group_keys\" unique_id=77171198 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1635, 1099)\r\ntrigger_keycode = 53\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_6\" parent=\"_group_keys\" unique_id=967583619 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1823, 1100)\r\ntrigger_keycode = 54\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_7\" parent=\"_group_keys\" unique_id=703521213 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2010, 1099)\r\ntrigger_keycode = 55\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_8\" parent=\"_group_keys\" unique_id=1082758035 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2197, 1098)\r\ntrigger_keycode = 56\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_9\" parent=\"_group_keys\" unique_id=1437049644 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2382, 1098)\r\ntrigger_keycode = 57\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_0\" parent=\"_group_keys\" unique_id=1416491498 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2571, 1099)\r\ntrigger_keycode = 48\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_minus\" parent=\"_group_keys\" unique_id=310069765 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2757, 1098)\r\ntrigger_keycode = 45\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_equal\" parent=\"_group_keys\" unique_id=596755751 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2944, 1097)\r\ntrigger_keycode = 61\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_backspace\" parent=\"_group_keys\" unique_id=730604625 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(3146, 1097)\r\ntrigger_keycode = 4194308\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_backspace\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"3_i4w03\")\r\n\r\n[node name=\"Key_w\" parent=\"_group_keys\" unique_id=171227285 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1104, 1270)\r\ntrigger_keycode = 87\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_tab\" parent=\"_group_keys\" unique_id=1868288919 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(717, 1267)\r\ntrigger_keycode = 4194306\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_tab\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"3_i4w03\")\r\n\r\n[node name=\"Key_q\" parent=\"_group_keys\" unique_id=213287225 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(917, 1268)\r\ntrigger_keycode = 81\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_e\" parent=\"_group_keys\" unique_id=303514236 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1293, 1270)\r\ntrigger_keycode = 69\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_r\" parent=\"_group_keys\" unique_id=1159572304 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1479, 1270)\r\ntrigger_keycode = 82\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_t\" parent=\"_group_keys\" unique_id=486300965 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1664, 1271)\r\ntrigger_keycode = 84\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_y\" parent=\"_group_keys\" unique_id=57052073 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1849, 1271)\r\ntrigger_keycode = 89\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_u\" parent=\"_group_keys\" unique_id=731782878 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2034, 1271)\r\ntrigger_keycode = 85\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_i\" parent=\"_group_keys\" unique_id=91817080 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2220, 1270)\r\ntrigger_keycode = 73\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_o\" parent=\"_group_keys\" unique_id=632693816 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2409, 1270)\r\ntrigger_keycode = 79\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_p\" parent=\"_group_keys\" unique_id=122516468 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2596, 1267)\r\ntrigger_keycode = 80\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_bracketleft\" parent=\"_group_keys\" unique_id=1223124325 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2783, 1269)\r\ntrigger_keycode = 91\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_bracketright\" parent=\"_group_keys\" unique_id=1171410325 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2970, 1268)\r\ntrigger_keycode = 93\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_backslash\" parent=\"_group_keys\" unique_id=1802758610 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(3157, 1271)\r\ntrigger_keycode = 92\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_capslock\" parent=\"_group_keys\" unique_id=1653389966 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(755, 1445)\r\ntrigger_keycode = 4194329\r\nis_big_key = true\r\nbig_key_press_multiplier = 0.9\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_capslock\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"4_2kwox\")\r\n\r\n[node name=\"Key_a\" parent=\"_group_keys\" unique_id=1936597654 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(998, 1446)\r\n\r\n[node name=\"Key_s\" parent=\"_group_keys\" unique_id=74336307 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1186, 1448)\r\ntrigger_keycode = 83\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_d\" parent=\"_group_keys\" unique_id=692742412 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1372, 1447)\r\ntrigger_keycode = 68\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_f\" parent=\"_group_keys\" unique_id=1452751855 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1557, 1445)\r\ntrigger_keycode = 70\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_g\" parent=\"_group_keys\" unique_id=666335527 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1743, 1443)\r\ntrigger_keycode = 71\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_h\" parent=\"_group_keys\" unique_id=1801077912 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1928, 1446)\r\ntrigger_keycode = 72\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_j\" parent=\"_group_keys\" unique_id=190039992 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2117, 1445)\r\ntrigger_keycode = 74\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_k\" parent=\"_group_keys\" unique_id=317756079 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2302, 1445)\r\ntrigger_keycode = 75\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_l\" parent=\"_group_keys\" unique_id=254085653 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2488, 1445)\r\ntrigger_keycode = 76\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_semicolon\" parent=\"_group_keys\" unique_id=1980350345 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2675, 1444)\r\ntrigger_keycode = 59\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_apostrophe\" parent=\"_group_keys\" unique_id=871482648 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2863, 1445)\r\ntrigger_keycode = 39\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_enter\" parent=\"_group_keys\" unique_id=517807502 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(3093, 1445)\r\ntrigger_keycode = 4194309\r\nis_big_key = true\r\nbig_key_press_multiplier = 0.9\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_enter\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"4_2kwox\")\r\n\r\n[node name=\"Key_shift\" parent=\"_group_keys\" unique_id=58243440 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(794.00006, 1603)\r\nscale = Vector2(0.835, 0.835)\r\ntrigger_keycode = 4194325\r\nis_big_key = true\r\nbig_key_press_multiplier = 0.8\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_shift\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"15_8jng3\")\r\n\r\n[node name=\"Key_z\" parent=\"_group_keys\" unique_id=1017615829 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1084, 1624)\r\ntrigger_keycode = 90\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_x\" parent=\"_group_keys\" unique_id=1233212075 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1272, 1621)\r\ntrigger_keycode = 88\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_c\" parent=\"_group_keys\" unique_id=1421290090 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1457, 1623)\r\ntrigger_keycode = 67\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_v\" parent=\"_group_keys\" unique_id=1504695635 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1644, 1621)\r\ntrigger_keycode = 86\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_b\" parent=\"_group_keys\" unique_id=1466637927 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1830, 1621)\r\ntrigger_keycode = 66\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_n\" parent=\"_group_keys\" unique_id=284537359 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2015, 1622)\r\ntrigger_keycode = 78\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_m\" parent=\"_group_keys\" unique_id=788865391 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2205, 1622)\r\ntrigger_keycode = 77\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_comma\" parent=\"_group_keys\" unique_id=1018036177 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2390, 1623)\r\ntrigger_keycode = 44\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_period\" parent=\"_group_keys\" unique_id=1769734329 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2575, 1623)\r\ntrigger_keycode = 46\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_slash\" parent=\"_group_keys\" unique_id=79685727 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2764, 1622)\r\ntrigger_keycode = 47\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_ctrl\" parent=\"_group_keys\" unique_id=1482296527 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(703, 1789)\r\ntrigger_keycode = 4194326\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_windows\" parent=\"_group_keys\" unique_id=13582433 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(889, 1789)\r\ntrigger_keycode = 4194327\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_alt\" parent=\"_group_keys\" unique_id=1235268488 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1074, 1790)\r\ntrigger_keycode = 4194328\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_space\" parent=\"_group_keys\" unique_id=2083454545 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(1549.0001, 1832)\r\nscale = Vector2(0.835, 0.835)\r\ntrigger_keycode = 32\r\nis_big_key = true\r\nbig_key_press_multiplier = 0.5\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"FlowerPot\" parent=\"_group_keys/Key_space\" index=\"0\" unique_id=558943612]\r\ntexture = ExtResource(\"15_57ie1\")\r\noffset = Vector2(0, -104.205635)\r\n\r\n[node name=\"Key_mouse\" parent=\"_group_keys\" unique_id=257631760 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2022, 1799)\r\ntrigger_keycode = 0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"LetterSprite\" parent=\"_group_keys/Key_mouse/FlowerPot\" parent_id_path=PackedInt32Array(257631760, 558943612) index=\"0\" unique_id=1176971840]\r\ntexture = ExtResource(\"14_2uspe\")\r\n\r\n[node name=\"Key_left2\" parent=\"_group_keys\" unique_id=1155209040 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2208, 1801)\r\ntrigger_keycode = 4194319\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_up\" parent=\"_group_keys\" unique_id=105452037 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2397, 1800)\r\ntrigger_keycode = 4194320\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_dwon\" parent=\"_group_keys\" unique_id=1011333952 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2584, 1802)\r\ntrigger_keycode = 4194322\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"Key_right\" parent=\"_group_keys\" unique_id=560560694 instance=ExtResource(\"1_kr6jc\")]\r\nposition = Vector2(2769, 1805)\r\ntrigger_keycode = 4194321\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"_group_ui\" type=\"CanvasLayer\" parent=\".\" unique_id=1963499652]\r\nlayer = 0\r\n\r\n[node name=\"WarehouseButton\" parent=\"_group_ui\" unique_id=1485830037 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(3051, 1846)\r\nscale = Vector2(0.95, 0.95)\r\nsquash_stretch_max_x = 1.01\r\nsquash_stretch_max_y = 1.01\r\njuice_phase_offset = 0.985\r\njuice_speed_override = 0.5\r\ntime_offset_override = 1.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_ui/WarehouseButton\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_hmxrr\")\r\ntexture = ExtResource(\"42_hmxrr\")\r\noffset = Vector2(20.579102, -178.20264)\r\n\r\n[node name=\"ClickDetector\" type=\"TextureButton\" parent=\"_group_ui/WarehouseButton\" unique_id=1956160058]\r\noffset_left = -158.94748\r\noffset_top = -334.73682\r\noffset_right = 187.36844\r\noffset_bottom = 5.2631836\r\nfocus_mode = 0\r\n\r\n[node name=\"icon_keyboard\" parent=\"_group_ui\" unique_id=1516980508 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1564, 2063.0002)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 1.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_ui/icon_keyboard\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"34_po3vl\")\r\noffset = Vector2(8.672302, -88.02722)\r\n\r\n[node name=\"icon_journal\" parent=\"_group_ui\" unique_id=1144165561 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(1876.0001, 2067.0002)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 1.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_ui/icon_journal\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"35_1sb26\")\r\noffset = Vector2(8.672302, -88.02722)\r\n\r\n[node name=\"icon_settings\" parent=\"_group_ui\" unique_id=629849824 instance=ExtResource(\"2_t0ika\")]\r\nposition = Vector2(2189, 2075.0002)\r\nscale = Vector2(0.915, 0.915)\r\nsquash_stretch_max_x = 1.02\r\nsquash_stretch_max_y = 1.03\r\njuice_phase_offset = 5.0\r\njuice_speed_override = 1.0\r\ntime_offset_override = 5.0\r\nmetadata/_edit_group_ = true\r\n\r\n[node name=\"VisualSprite\" parent=\"_group_ui/icon_settings\" index=\"0\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_fqwq4\")\r\ntexture = ExtResource(\"36_ledu6\")\r\noffset = Vector2(8.672302, -88.02722)\r\n\r\n[editable path=\"_group_props/prop_down01\"]\r\n[editable path=\"_group_props/prop_cloud03\"]\r\n[editable path=\"_group_props/prop_cloud04\"]\r\n[editable path=\"_group_props/prop_cloud05\"]\r\n[editable path=\"_group_props/prop_cloud06\"]\r\n[editable path=\"_group_props/prop_cloud07\"]\r\n[editable path=\"_group_props/prop_cloud08\"]\r\n[editable path=\"_group_props/prop_cloud09\"]\r\n[editable path=\"_group_props/prop_cloud10\"]\r\n[editable path=\"_group_props/prop_cloud01\"]\r\n[editable path=\"_group_props/prop_tuqiuhua02\"]\r\n[editable path=\"_group_props/prop_mountain\"]\r\n[editable path=\"_group_props/prop_house\"]\r\n[editable path=\"_group_props/prop_car\"]\r\n[editable path=\"_group_props/prop_grass\"]\r\n[editable path=\"_group_props/prop_tuqiuhua03\"]\r\n[editable path=\"_group_props/prop_tuqiuhua01\"]\r\n[editable path=\"_group_props/prop_left05\"]\r\n[editable path=\"_group_props/prop_cloud02\"]\r\n[editable path=\"_group_props/prop_huahua01\"]\r\n[editable path=\"_group_props/prop_huahua02\"]\r\n[editable path=\"_group_props/prop_huahua03\"]\r\n[editable path=\"_group_props/prop_huahua04\"]\r\n[editable path=\"_group_props/prop_tree01\"]\r\n[editable path=\"_group_props/prop_tree02\"]\r\n[editable path=\"_group_props/prop_tree03\"]\r\n[editable path=\"_group_props/prop_down02\"]\r\n[editable path=\"_group_props/prop_left04\"]\r\n[editable path=\"_group_props/prop_left03\"]\r\n[editable path=\"_group_props/prop_huasa\"]\r\n[editable path=\"_group_props/prop_aowoo\"]\r\n[editable path=\"_group_props/prop_left02\"]\r\n[editable path=\"_group_props/prop_left01\"]\r\n[editable path=\"_group_props/prop_right04\"]\r\n[editable path=\"_group_props/prop_right03\"]\r\n[editable path=\"_group_props/prop_right02\"]\r\n[editable path=\"_group_props/prop_right01\"]\r\n[editable path=\"_group_keys/Key_quoteleft\"]\r\n[editable path=\"_group_keys/Key_1\"]\r\n[editable path=\"_group_keys/Key_2\"]\r\n[editable path=\"_group_keys/Key_3\"]\r\n[editable path=\"_group_keys/Key_4\"]\r\n[editable path=\"_group_keys/Key_5\"]\r\n[editable path=\"_group_keys/Key_6\"]\r\n[editable path=\"_group_keys/Key_7\"]\r\n[editable path=\"_group_keys/Key_8\"]\r\n[editable path=\"_group_keys/Key_9\"]\r\n[editable path=\"_group_keys/Key_0\"]\r\n[editable path=\"_group_keys/Key_minus\"]\r\n[editable path=\"_group_keys/Key_equal\"]\r\n[editable path=\"_group_keys/Key_backspace\"]\r\n[editable path=\"_group_keys/Key_w\"]\r\n[editable path=\"_group_keys/Key_tab\"]\r\n[editable path=\"_group_keys/Key_q\"]\r\n[editable path=\"_group_keys/Key_e\"]\r\n[editable path=\"_group_keys/Key_r\"]\r\n[editable path=\"_group_keys/Key_t\"]\r\n[editable path=\"_group_keys/Key_y\"]\r\n[editable path=\"_group_keys/Key_u\"]\r\n[editable path=\"_group_keys/Key_i\"]\r\n[editable path=\"_group_keys/Key_o\"]\r\n[editable path=\"_group_keys/Key_p\"]\r\n[editable path=\"_group_keys/Key_bracketleft\"]\r\n[editable path=\"_group_keys/Key_bracketright\"]\r\n[editable path=\"_group_keys/Key_backslash\"]\r\n[editable path=\"_group_keys/Key_capslock\"]\r\n[editable path=\"_group_keys/Key_a\"]\r\n[editable path=\"_group_keys/Key_s\"]\r\n[editable path=\"_group_keys/Key_d\"]\r\n[editable path=\"_group_keys/Key_f\"]\r\n[editable path=\"_group_keys/Key_g\"]\r\n[editable path=\"_group_keys/Key_h\"]\r\n[editable path=\"_group_keys/Key_j\"]\r\n[editable path=\"_group_keys/Key_k\"]\r\n[editable path=\"_group_keys/Key_l\"]\r\n[editable path=\"_group_keys/Key_semicolon\"]\r\n[editable path=\"_group_keys/Key_apostrophe\"]\r\n[editable path=\"_group_keys/Key_enter\"]\r\n[editable path=\"_group_keys/Key_shift\"]\r\n[editable path=\"_group_keys/Key_z\"]\r\n[editable path=\"_group_keys/Key_x\"]\r\n[editable path=\"_group_keys/Key_c\"]\r\n[editable path=\"_group_keys/Key_v\"]\r\n[editable path=\"_group_keys/Key_b\"]\r\n[editable path=\"_group_keys/Key_n\"]\r\n[editable path=\"_group_keys/Key_m\"]\r\n[editable path=\"_group_keys/Key_comma\"]\r\n[editable path=\"_group_keys/Key_period\"]\r\n[editable path=\"_group_keys/Key_slash\"]\r\n[editable path=\"_group_keys/Key_ctrl\"]\r\n[editable path=\"_group_keys/Key_windows\"]\r\n[editable path=\"_group_keys/Key_alt\"]\r\n[editable path=\"_group_keys/Key_space\"]\r\n[editable path=\"_group_keys/Key_mouse\"]\r\n[editable path=\"_group_keys/Key_left2\"]\r\n[editable path=\"_group_keys/Key_up\"]\r\n[editable path=\"_group_keys/Key_dwon\"]\r\n[editable path=\"_group_keys/Key_right\"]\r\n[editable path=\"_group_ui/WarehouseButton\"]\r\n[editable path=\"_group_ui/icon_keyboard\"]\r\n[editable path=\"_group_ui/icon_journal\"]\r\n[editable path=\"_group_ui/icon_settings\"]\r\n\r\n-------------------\r\n# File: res://pot_data.gd\r\n\r\n# pot_config.gd\r\nextends Resource\r\nclass_name PotConfig\r\n\r\n@export_group(\"游戏机制\")\r\n@export var clicks_for_initial_seed: int = 1  # 💡 新增：第一颗种子（Stage 0）破土所需的独立敲击次数\r\n@export var clicks_per_stage: int = 2\r\n@export var max_stack_size: int = 99\r\n\r\n@export_group(\"背景音乐配置\")\r\n@export_file(\"*.wav\", \"*.ogg\", \"*.mp3\") var bgm_sound_path: String = \"\" # BGM 文件路径\r\n@export_range(0.0, 1.0, 0.05) var bgm_volume: float = 0.8 # BGM 目标音量 (0.0~1.0)\r\n@export var bgm_fade_time: float = 1.5 # 缓入缓出的过渡时间 (秒)\r\n\r\n@export_file(\"*.wav\", \"*.ogg\", \"*.mp3\") var harvest_sound_path: String = \"\"\r\n@export_range(0.0, 1.0, 0.05) var harvest_volume: float = 1.0 # 💡 专门控制普通植物音量\r\n\r\n@export_file(\"*.wav\", \"*.ogg\", \"*.mp3\") var chest_harvest_sound_path: String = \"\"\r\n@export_range(0.0, 1.0, 0.05) var chest_volume: float = 1.0  # 💡 专门控制宝箱音量\r\n\r\n@export_group(\"花盆下压与回弹\")\r\n@export var press_offset_y: float = 30.0\r\n@export var spring_speed: float = 3.0\r\n\r\n@export_group(\"花盆Q弹-X轴独立配置\")\r\n@export var squash_stretch_min_x: float = 0.8\r\n@export var squash_stretch_max_x: float = 1.2\r\n@export var juice_frequency_x: float = 50.0\r\n\r\n@export_group(\"花盆Q弹-Y轴独立配置\")\r\n@export var squash_stretch_min_y: float = 0.8\r\n@export var squash_stretch_max_y: float = 1.3\r\n@export var juice_frequency_y: float = -50.0\r\n\r\n@export_group(\"花盆Q弹-时间、快慢与衰减\")\r\n@export var juice_decay_speed: float = 5.0\r\n@export var juice_phase_offset: float = 1.57\r\n@export var juice_speed_override: float = 0.7\r\n\r\n@export_group(\"收获飞天特效-基础\")\r\n@export var harvest_fly_distance: float = 300.0\r\n@export var harvest_duration: float = 0.8\r\n\r\n@export_group(\"收获飞天特效-自动果冻数学函数控制\")\r\n@export var harvest_max_pop_scale: float = 1.2\r\n@export var harvest_jiggle_frequency: float = 20.0\r\n@export var harvest_jiggle_decay: float = 10.0\r\n\r\n\r\n@export_group(\"收获+1叠加配置（全键盘共享）\")\r\n# 💡 核心升级：由原先死板的 String 文本路径类型，直接升级为标准的 Texture2D 资源槽位类型！\r\n@export var plus_one_texture: Texture2D          # 面板可视化图片选择器\r\n@export var plus_one_offset: Vector2 = Vector2(150, -360)\r\n@export var plus_one_scale: Vector2 = Vector2(1.2, 1.2)\r\n@export var plus_one_delay: float = 0.05        # +1 特效动作往后延迟的时间（秒），推荐 0.15 秒\r\n\r\n\r\n@export_group(\"击键涟漪冲击波\")\r\n@export var impact_radius: float = 500.0       # 冲击波向外扩散的最大像素半径\r\n@export var impact_force: float = 2.0         # 把四周作物向外推开的最大像素距离\r\n@export var ripple_spring_speed: float = 1.0  # 四周作物被推开后，弹簧回弹的恢复速度\r\n@export var ripple_expand_speed: float = 1500.0 # 💡 冲击波向外扩散的速度（像素/秒，值越大扩散越快，推荐 1500-2500）\r\n@export var impact_force_down: float = 1.0    # 💡 冲击波纵向向下砸落/凹陷的最大强度（推荐 4.0 ~ 10.0，值越大下陷越深）\r\n\r\n-------------------\r\n# File: res://resources/base_item_data.gd\r\n\r\nextends Resource\r\nclass_name BaseItemData\r\n\r\n# 三大物品分类\r\nenum ItemCategory { POT, CROP, STICKER }\r\n# 四大稀有度等级\r\nenum ItemRarity { COMMON, RARE, EPIC, LEGENDARY }\r\n\r\n@export_group(\"基础核心属性\")\r\n@export var item_id: String = \"\"              # 唯一识别ID，必须与磁盘文件夹名（如 yayajun）严格对齐\r\n@export var item_name: String = \"\"            # 游戏内显示的中文名称，如 \"鸭鸭君\"\r\n@export var category: ItemCategory = ItemCategory.CROP\r\n@export var rarity: ItemRarity = ItemRarity.COMMON # 秒切 4 色格子背景样式\r\n@export var theme_id: String = \"theme_00_default\" # 所属主题文件夹名\r\n\r\n@export_group(\"经济价值\")\r\n@export var price: int = 1                   # 单个物品在出货售卖区的单价（金币数）\r\n\r\n-------------------\r\n# File: res://resources/crop_master_database.tres\r\n\r\n[gd_resource type=\"Resource\" script_class=\"CropMasterDB\" format=3 uid=\"uid://cxgesiep3eco5\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://gb5nueu8mpfe\" path=\"res://resources/crop_master_db.gd\" id=\"1_7pscj\"]\r\n[ext_resource type=\"Script\" uid=\"uid://b1csnp7vnmyhc\" path=\"res://resources/base_item_data.gd\" id=\"1_pcuco\"]\r\n\r\n[sub_resource type=\"Resource\" id=\"Resource_kc5yy\"]\r\nscript = ExtResource(\"1_pcuco\")\r\nitem_id = \"tuqiuhua\"\r\nitem_name = \"兔球花\"\r\nmetadata/_custom_type_script = \"uid://b1csnp7vnmyhc\"\r\n\r\n[sub_resource type=\"Resource\" id=\"Resource_bfghb\"]\r\nscript = ExtResource(\"1_pcuco\")\r\nitem_id = \"luobobo\"\r\nitem_name = \"萝卜卜\"\r\nrarity = 1\r\nprice = 2\r\nmetadata/_custom_type_script = \"uid://b1csnp7vnmyhc\"\r\n\r\n[sub_resource type=\"Resource\" id=\"Resource_mswa4\"]\r\nscript = ExtResource(\"1_pcuco\")\r\nitem_id = \"yayajun\"\r\nitem_name = \"牙牙菌\"\r\nrarity = 2\r\nprice = 5\r\nmetadata/_custom_type_script = \"uid://b1csnp7vnmyhc\"\r\n\r\n[sub_resource type=\"Resource\" id=\"Resource_pcuco\"]\r\nscript = ExtResource(\"1_pcuco\")\r\nitem_id = \"chest\"\r\nitem_name = \"宝箱\"\r\nrarity = 3\r\nprice = 500\r\nmetadata/_custom_type_script = \"uid://b1csnp7vnmyhc\"\r\n\r\n[resource]\r\nscript = ExtResource(\"1_7pscj\")\r\nall_crops_registry = {\r\n\"chest\": {\r\n\"data\": SubResource(\"Resource_pcuco\"),\r\n\"weight\": 0.01\r\n},\r\n\"luobobo\": {\r\n\"data\": SubResource(\"Resource_bfghb\"),\r\n\"weight\": 0.8\r\n},\r\n\"tuqiuhua\": {\r\n\"data\": SubResource(\"Resource_kc5yy\"),\r\n\"weight\": 1.0\r\n},\r\n\"yayajun\": {\r\n\"data\": SubResource(\"Resource_mswa4\"),\r\n\"weight\": 0.5\r\n}\r\n}\r\nmetadata/_custom_type_script = \"uid://gb5nueu8mpfe\"\r\n\r\n-------------------\r\n# File: res://resources/crop_master_db.gd\r\n\r\nextends Resource\r\nclass_name CropMasterDB\r\n\r\n@export_group(\"全局作物集散总谱数据大盘\")\r\n# 💡 【核心高阶设计】：这里是一个高级字典。\r\n# 存储格式为：{ \"作物英文ID\": {\"data\": BaseItemData属性资源, \"weight\": 抽卡概率权重} }\r\n# 这样不仅将名字、价格、稀有度，连带抽卡概率全部锁死合并在了同一个地方修改！\r\n@export var all_crops_registry: Dictionary = {}\r\n\r\n# 🛠️ 系统底层专用的高速缓存运行时字典（防止频繁进行外壳拆解，优化运行开销）\r\nvar _cached_weights_dict: Dictionary = {}\r\n\r\n# 💡 官方标准的运行时高速路径初始化工具\r\nfunc get_weights_dictionary() -> Dictionary:\r\n\tif not _cached_weights_dict.is_empty():\r\n\t\treturn _cached_weights_dict\r\n\t\t\r\n\t# 全自动在内存中把注册表里的数据提取组装成抽卡算法需要的纯概率字典\r\n\tfor crop_key in all_crops_registry:\r\n\t\tif all_crops_registry[crop_key].has(\"weight\"):\r\n\t\t\t_cached_weights_dict[crop_key] = all_crops_registry[crop_key][\"weight\"]\r\n\t\t\t\r\n\treturn _cached_weights_dict\r\n\r\n-------------------\r\n# File: res://resources/crop_weights.gd\r\n\r\n# crop_weights.gd\r\nextends Resource\r\nclass_name CropWeights\r\n\r\n# 💡 核心设计：在这里写你的概率权重盘！普通概率写 1.0，1% 概率写 0.01。\r\n# 未来有新的作物（如 CropGroup3、CropGroup4），直接在这个字典里点“添加键值对”填入即可。\r\n# 💡 直接从单例常驻的 master_db 集中总谱里抓取实时组装好的纯概率字典大盘\r\nvar active_weights_pool: Dictionary = Warehouse.master_db.get_weights_dictionary() if Warehouse.master_db else {}\r\n\r\n-------------------\r\n# File: res://resources/default_weights.tres\r\n\r\n[gd_resource type=\"Resource\" script_class=\"CropWeights\" format=3 uid=\"uid://cn73v14dqk6q0\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://4xne2q1solyt\" path=\"res://resources/crop_weights.gd\" id=\"1_pstho\"]\r\n\r\n[resource]\r\nscript = ExtResource(\"1_pstho\")\r\ncrop_weights = {\r\n\"CropGroup0\": 1.0,\r\n\"CropGroup1\": 1.0,\r\n\"CropGroup2\": 1.0\r\n}\r\nmetadata/_custom_type_script = \"uid://4xne2q1solyt\"\r\n\r\n-------------------\r\n# File: res://scenes/game_prop.tscn\r\n\r\n[gd_scene format=3 uid=\"uid://bpbanvymb1cmw\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://eupba3p6va3a\" path=\"res://scenes/juice_jiggler.gd\" id=\"1_ivo0o\"]\r\n[ext_resource type=\"Shader\" uid=\"uid://bh0qpokppaj6p\" path=\"res://assets/wave_noise.gdshader\" id=\"2_45bw3\"]\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_f3fra\"]\r\nshader = ExtResource(\"2_45bw3\")\r\nshader_parameter/wave_amplitude_x = 0.010000000475\r\nshader_parameter/wave_amplitude_y = 0.010000000475\r\nshader_parameter/wave_frequency = 0.83600003645012\r\nshader_parameter/noise_scale = 100.0000014752188\r\n\r\n[node name=\"game_prop\" type=\"Node2D\" unique_id=1924461588]\r\nscript = ExtResource(\"1_ivo0o\")\r\n\r\n[node name=\"VisualSprite\" type=\"Sprite2D\" parent=\".\" unique_id=1954305855]\r\nmaterial = SubResource(\"ShaderMaterial_f3fra\")\r\n\r\n-------------------\r\n# File: res://scenes/global_warehouse.gd\r\n\r\nextends Node\r\n\r\nsignal warehouse_updated()                     \r\nsignal coins_changed(new_coins: int)          \r\n\r\nvar coins: int = 0:\r\n\tset(value):\r\n\t\tcoins = max(0, value)\r\n\t\tcoins_changed.emit(coins)\r\n\r\nvar inventory: Dictionary = {}\r\n\r\n# 💡 全库最高核心指针：运行时自动加载并常驻您刚刚填好数据的集中总谱资源盘\r\nvar master_db: CropMasterDB = null\r\n\r\n\r\nfunc _ready() -> void:\r\n\tcoins = 0\r\n\t# 运行时动态全自动按需加载全局唯一集中数据总盘\r\n\tmaster_db = load(\"res://resources/crop_master_database.tres\") as CropMasterDB\r\n\r\n\r\nfunc add_crop(crop_id: String, amount: int = 1) -> void:\r\n\tif not inventory.has(crop_id):\r\n\t\tvar target_item_data: BaseItemData = null\r\n\t\t\r\n\t\t# 💡 【100%数据驱动】：直接去您刚才捏好的总谱注册表里，抓取单体属性资源盘！\r\n\t\tif master_db and master_db.all_crops_registry.has(crop_id):\r\n\t\t\ttarget_item_data = master_db.all_crops_registry[crop_id][\"data\"]\r\n\t\t\t\r\n\t\t# 🦺 强大的防护安全网：如果你在总谱里还没来得及加它，启动自动化内存自适应兜底，绝对不报错崩溃\r\n\t\tif target_item_data == null:\r\n\t\t\ttarget_item_data = BaseItemData.new()\r\n\t\t\ttarget_item_data.item_id = crop_id\r\n\t\t\ttarget_item_data.item_name = crop_id\r\n\t\t\ttarget_item_data.category = BaseItemData.ItemCategory.CROP\r\n\t\t\ttarget_item_data.theme_id = \"theme_00_default\"\r\n\t\t\ttarget_item_data.rarity = BaseItemData.ItemRarity.COMMON\r\n\t\t\ttarget_item_data.price = 10\r\n\t\t\t\r\n\t\tinventory[crop_id] = {\"amount\": 0, \"data\": target_item_data}\r\n\t\t\r\n\tinventory[crop_id][\"amount\"] += amount\r\n\twarehouse_updated.emit()\r\n\r\n\r\nfunc move_to_sell_queue(item_id: String, amount: int) -> BaseItemData:\r\n\tif not inventory.has(item_id) or inventory[item_id][\"amount\"] < amount:\r\n\t\treturn null\r\n\tinventory[item_id][\"amount\"] -= amount\r\n\tvar item_data: BaseItemData = inventory[item_id][\"data\"]\r\n\tcoins += item_data.price * amount\r\n\twarehouse_updated.emit()\r\n\treturn item_data\r\n\r\n\r\nfunc refund_from_sell_queue(item_id: String, amount: int) -> void:\r\n\tif not inventory.has(item_id): return\r\n\tinventory[item_id][\"amount\"] += amount\r\n\tvar item_data: BaseItemData = inventory[item_id][\"data\"]\r\n\tcoins -= item_data.price * amount\r\n\twarehouse_updated.emit()\r\n\r\n-------------------\r\n# File: res://scenes/juice_jiggler.gd\r\n\r\n# juice_jiggler.gd (场景永动装饰物控制器 - XY独立最大值版)\r\nextends Node2D\r\nclass_name JuiceJiggler\r\n\r\n@export_group(\"Q弹-形变幅度（基于1.0对称）\")\r\n@export var squash_stretch_max_x: float = 1.05  # 💡 X轴最大波峰（如1.05，自动对称出波谷0.95）\r\n@export var squash_stretch_max_y: float = 1.05  # 💡 Y轴最大波峰（如1.05，自动对称出波谷0.95）\r\n\r\n@export_group(\"Q弹-时间、快慢与错位\")\r\n@export var juice_phase_offset: float = 1.57   \r\n@export var juice_speed_override: float = 0.1  \r\n@export var time_offset_override: float = 0.0  \r\n\r\n# 节点引用与内部时间\r\nvar target_sprite: Sprite2D\r\nvar base_sprite_scale: Vector2\r\nvar juice_time: float = 0.0\r\n\r\nfunc _ready() -> void:\r\n\tfor child in get_children():\r\n\t\tif child is Sprite2D:\r\n\t\t\ttarget_sprite = child\r\n\t\t\tbreak\r\n\t\t\t\r\n\tif target_sprite:\r\n\t\tbase_sprite_scale = target_sprite.scale\r\n\t\tjuice_time = time_offset_override\r\n\r\nfunc _process(delta: float) -> void:\r\n\tif target_sprite == null: return\r\n\t\r\n\t# 💡 核心升级 1：速度线性倍率化\r\n\t# 速度填 1.0 就是基准速度（每秒摆动一个完整周期），填 2.0 速度就完美快一倍，填 0.5 慢一倍\r\n\t# 通过乘以 (PI * 2.0) 锁死一秒一周期，彻底斩断之前 100.0 倍率带来的失控感！\r\n\tjuice_time += delta * juice_speed_override * (PI * 2.0)\r\n\t\r\n\t# 💡 核心升级 2：尺寸线性倍率化\r\n\t# 如果你填 2.0，代表放大一倍（增量为 1.0），填 1.1 代表放大 10%（增量为 0.1）\r\n\t# 允许你直接在面板输入任意倍率，代码在后台全自动计算单边振幅宽度\r\n\tvar amplitude_x = max(0.0, squash_stretch_max_x - 1.0)\r\n\tvar amplitude_y = max(0.0, squash_stretch_max_y - 1.0)\r\n\t\r\n\t# 计算包含干净时间偏移（time_offset_override 也同步对齐为纯秒数）的波形位置\r\n\t# 此时括号内部极其干净，只有纯粹弧度制，参数绝对平滑\r\n\tvar wave_time = juice_time + (time_offset_override * juice_speed_override * PI * 2.0)\r\n\t\r\n\tvar scale_offset_x = sin(wave_time + juice_phase_offset) * amplitude_x\r\n\tvar scale_offset_y = sin(-wave_time) * amplitude_y\r\n\t\r\n\t# 实时无缝应用完美对称的全新形变\r\n\ttarget_sprite.scale = base_sprite_scale * (Vector2.ONE + Vector2(scale_offset_x, scale_offset_y))\r\n\r\n-------------------\r\n# File: res://scenes/key.gd\r\n\r\n# =====================================================================\r\n# 📄 完整覆盖替换 res://scenes/key.gd 最顶部的整个变量定义区（覆盖到 _ready 之前）\r\n# =====================================================================\r\nextends Node2D\r\n\r\n@export_group(\"核心动效数据盘\")\r\n@export var pot_config: Resource               # 绑定全键盘共享的 standard_pot_data.tres\r\n\r\n@export_group(\"概率抽卡绑定\")\r\n@export var weights_config: Resource\r\n\r\n@export_group(\"键盘独立按键映射\")\r\n@export var trigger_keycode: Key = KEY_A       # 允许面板自由分配为 KEY_B, KEY_SPACE 等\r\n\r\n\r\n@export_group(\"特殊大件快捷控制 (无需新建文件)\")\r\n@export var is_big_key: bool = false           # 如果是空格/回车，在右侧面板勾选它\r\n@export var big_key_press_multiplier: float = 1.5 # 大键的下压幅度倍率\r\n\r\n# 节点引用与内部计数器\r\n@onready var flower_pot: Sprite2D = $FlowerPot\r\n@onready var letter_sprite: Sprite2D = $FlowerPot/LetterSprite \r\n\r\n# 纯数组缓存\r\nvar all_crop_nodes: Array = []\r\n\r\n# 内部状态计算变量\r\nvar current_crop_idx: int = 0                  \r\nvar current_stage: int = -1                    \r\nvar click_count: int = 0\r\n\r\nvar anim_offset_y: float = 0.0\r\nvar anim_scale_offset: Vector2 = Vector2.ZERO\r\n\r\nvar base_pot_position: Vector2\r\nvar base_pot_scale: Vector2\r\n\r\nvar juice_time: float = 0.0\r\nvar juice_intensity: float = 0.0\r\n\r\n# 🌊 【冲击波核心底层底座变量】\r\n# 💡 必须严格死磕存放在最外层作用域，这样 _process 和 接收函数 才能同时认识它们！\r\nvar ripple_offset: Vector2 = Vector2.ZERO      # 涟漪冲击波带来的瞬时X/Y物理位移向量\r\nvar active_ripples: Array = []                 # 当前作用在自己身上的动态非线性波场列表\r\n\r\n\r\n\r\nfunc _ready() -> void:\r\n\trandomize()\r\n\t\r\n\tbase_pot_position = flower_pot.position\r\n\tbase_pot_scale = flower_pot.scale\r\n\t\r\n\t# 全自动资产匹配：直接根据你选的键位，自动去加载对应名字的手手绘图片\r\n\tif letter_sprite:\r\n\t\tletter_sprite.z_index = 0\r\n\t\tletter_sprite.z_as_relative = true \r\n\t\t\r\n\t\t# 自动化获取对应的标准英文图片名\r\n\t\tvar key_name: String = OS.get_keycode_string(trigger_keycode).to_lower()\r\n\t\tvar target_image_path: String = \"res://assets/sprites/letters/\" + key_name + \".png\"\r\n\t\t\r\n\t\tif ResourceLoader.exists(target_image_path):\r\n\t\t\tletter_sprite.texture = load(target_image_path)\r\n\t\telse:\r\n\t\t\tprint(\"【标准资产检查】未找到该键位贴图，请确认图片名是否为: \", key_name, \".png\")\r\n\t\t\r\n\tscan_and_init_crops()\r\n\thide_all_crops()\r\n\t\r\n\t# 💡 【涟漪核心监听】：将自己注册进大世界的击键分发网络中\r\n\t# 监听主场景抛出的统一震源信号（我们稍后会在主场景抛出它）\r\n\tvar main_scene = get_tree().current_scene\r\n\tif main_scene and main_scene.has_signal(\"key_pressed_at_world_pos\"):\r\n\t\tmain_scene.connect(\"key_pressed_at_world_pos\", _on_global_key_ripple_receive)\r\n\r\n\r\n\r\n\r\n\r\n# =====================================================================\r\n# 📄 面板动态控幅版：完整覆盖替换 res://scenes/key.gd 内的 _process 函数\r\n# =====================================================================\r\nfunc _process(delta: float) -> void:\r\n\tif pot_config == null: return\r\n\t\r\n\t# 💡 A. 【多维非线性曲线物理引擎】：实时采样作用在自己身上的每一个冲击波\r\n\tif not active_ripples.is_empty():\r\n\t\tvar max_radius = pot_config.get(\"impact_radius\") if \"impact_radius\" in pot_config else 500.0\r\n\t\tvar max_force = pot_config.get(\"impact_force\") if \"impact_force\" in pot_config else 10.0\r\n\t\t# 提取面板上新增的纵向下压力度参数（带安全兜底默认值 6.0）\r\n\t\tvar max_force_down = pot_config.get(\"impact_force_down\") if \"impact_force_down\" in pot_config else 6.0\r\n\t\tvar i = active_ripples.size() - 1\r\n\t\t\r\n\t\twhile i >= 0:\r\n\t\t\tvar ripple = active_ripples[i]\r\n\t\t\tripple[\"time_elapsed\"] += delta\r\n\t\t\t\r\n\t\t\t# 计算当前的生命进度比例 (0.0 ~ 1.0)\r\n\t\t\tvar progress = clamp(ripple[\"time_elapsed\"] / ripple[\"total_life\"], 0.0, 1.0)\r\n\t\t\t\r\n\t\t\t# 🧮 【先快后慢核心公式】：Quadratic Ease-Out 渐缓曲线\r\n\t\t\tvar ease_out_factor = 1.0 - (1.0 - progress) * (1.0 - progress)\r\n\t\t\t\r\n\t\t\t# 计算当前冲击波环先快后慢膨胀出来的实时半径\r\n\t\t\tvar current_wave_radius = max_radius * ease_out_factor\r\n\t\t\t\r\n\t\t\t# 🌊 触发检测：当波形圈的实时半径正好追上并越过了作物与圆心的距离\r\n\t\t\tif current_wave_radius >= ripple[\"distance\"]:\r\n\t\t\t\t# 计算双重衰减：空间距离衰减 + 时间进度衰减，让远处的波纹极其柔和\r\n\t\t\t\tvar distance_falloff = 1.0 - (ripple[\"distance\"] / max_radius)\r\n\t\t\t\tvar time_falloff = 1.0 - progress # 越往后能量越微弱\r\n\t\t\t\t\r\n\t\t\t\t# 基础能量衰减系数 (结合了距离和时间，保证多维位移手感高度统一)\r\n\t\t\t\tvar energy_multiplier = distance_falloff * time_falloff * 5.0\r\n\t\t\t\t\r\n\t\t\t\t# 1. 计算原有的【横向向外推开力】基础向量\r\n\t\t\t\tvar horizontal_push = ripple[\"push_dir\"] * (max_force * energy_multiplier)\r\n\t\t\t\t\r\n\t\t\t\t# 2. 💡 【核心修改：完全面板可控的纵向向下凹陷力】\r\n\t\t\t\t# 严格尊崇面板上填入的最大下压系数，使其同步共享完全一样的非线性衰减曲线\r\n\t\t\t\tvar vertical_drop_y = max_force_down * energy_multiplier\r\n\t\t\t\t\r\n\t\t\t\t# 3. 完美结合成高阶的多维 3D 物理偏移向量\r\n\t\t\t\tvar final_3d_push = Vector2(horizontal_push.x, horizontal_push.y + vertical_drop_y)\r\n\t\t\t\tripple_offset += final_3d_push\r\n\t\t\t\t\r\n\t\t\t\t# 该波纹已经对当前物体生效完毕，从当前物体的池子中安全移除\r\n\t\t\t\tactive_ripples.remove_at(i)\r\n\t\t\t# 如果波纹超时仍未追上（安全边界保护），自动销毁任务\r\n\t\t\telif progress >= 1.0:\r\n\t\t\t\tactive_ripples.remove_at(i)\r\n\t\t\t\t\r\n\t\t\ti -= 1\r\n\r\n\t# B. 🎬 核心物理位移弹簧拉回计算\r\n\t# 基础敲击：Y 轴受压回弹\r\n\tanim_offset_y = move_toward(anim_offset_y, 0.0, pot_config.spring_speed * delta * 50.0)\r\n\t# 涟漪向外外推+向下凹陷向量：受您面板上的 Ripple Spring Speed (当前为 0.5) 控制同步回弹向 (0,0) 零点！\r\n\tvar ripple_spring = pot_config.get(\"ripple_spring_speed\") if \"ripple_spring_speed\" in pot_config else 0.5\r\n\tripple_offset = ripple_offset.move_toward(Vector2.ZERO, ripple_spring * delta * 50.0)\r\n\t\r\n\t# C. 🧮 核心果冻 Q 弹缩放逻辑计算（保持不变）\r\n\tif juice_intensity > 0.01:\r\n\t\tjuice_time += delta\r\n\t\tjuice_intensity = move_toward(juice_intensity, 0.0, pot_config.juice_decay_speed * delta)\r\n\t\t\r\n\t\tvar amplitude_x = (pot_config.squash_stretch_max_x - pot_config.squash_stretch_min_x) / 2.0\r\n\t\tvar amplitude_y = (pot_config.squash_stretch_max_y - pot_config.squash_stretch_min_y) / 2.0\r\n\t\t\r\n\t\tvar scale_offset_x = sin(juice_time * pot_config.juice_frequency_x * pot_config.juice_speed_override + pot_config.juice_phase_offset) * amplitude_x * juice_intensity\r\n\t\tvar scale_offset_y = sin(juice_time * pot_config.juice_frequency_y * pot_config.juice_speed_override) * amplitude_y * juice_intensity\r\n\t\t\r\n\t\tanim_scale_offset.x = scale_offset_x\r\n\t\tanim_scale_offset.y = scale_offset_y\r\n\telse:\r\n\t\tanim_scale_offset = Vector2.ZERO\r\n\t\tjuice_time = 0.0\r\n\t\t\r\n\t# D. 🖼️ 数据完美无缝叠加到节点上\r\n\t# 位置无缝融合：原本的 Y 轴下压 + 全新的先快后慢【3D立体水平外推与纵向下陷】复合涟漪位移向量\r\n\tflower_pot.position = base_pot_position + Vector2(0.0, anim_offset_y) + ripple_offset\r\n\t# 缩放无缝融合\r\n\tflower_pot.scale = base_pot_scale * (Vector2.ONE + anim_scale_offset)\r\n\r\n\r\n\r\n\r\nfunc _input(event: InputEvent) -> void:\r\n\tif event is InputEventKey and event.pressed and not event.is_echo():\r\n\t\tif event.keycode == trigger_keycode:\r\n\t\t\t# 💡 涟漪发射点：按下的一瞬间，通过主场景向大世界发射包含自己世界坐标的震源信号！\r\n\t\t\tvar main_scene = get_tree().current_scene\r\n\t\t\tif main_scene and main_scene.has_signal(\"key_pressed_at_world_pos\"):\r\n\t\t\t\tmain_scene.emit_signal(\"key_pressed_at_world_pos\", global_position)\r\n\t\t\t\t\r\n\t\t\ttrigger_press_displacement()\r\n\t\t\tadvance_logic()\r\n\r\n\t\t\t\r\n\t# ----------------- 2. 💡 满足你的新要求：精准捕捉并吞下鼠标所有点击 -----------------\r\n\t# 如果你希望【全键盘只有这一个特定的按键】能吃鼠标，我们在面板上通过名字（比如叫 Key_Space）来锁死它。\r\n\t# 这里我帮你做了一个名字保护判断：只有当你在主场景里把这个按键重命名为 \"Key_Space\"（或者任何你想给鼠标的按键名字）时，它才会激活鼠标监听！\r\n\tif name == \"Key_mouse\" and event is InputEventMouseButton and event.pressed:\r\n\t\t# MOUSE_BUTTON_LEFT (左键), MOUSE_BUTTON_RIGHT (右键), MOUSE_BUTTON_MIDDLE (中键)\r\n\t\tif event.button_index == MOUSE_BUTTON_LEFT or event.button_index == MOUSE_BUTTON_RIGHT or event.button_index == MOUSE_BUTTON_MIDDLE:\r\n\t\t\t\r\n\t\t\t\r\n\t\t\ttrigger_press_displacement()\r\n\t\t\tadvance_logic()\r\n\r\n\r\nfunc advance_logic() -> void:\r\n\tif pot_config == null: return\r\n\tclick_count += 1\r\n\t\r\n\t# 💡 核心修正：无论第几次轮回，只要当前处于空盘(Stage -1)，就必须死磕种子独立的敲击数\r\n\tvar required_clicks: int = pot_config.clicks_per_stage\r\n\tif current_stage == -1:\r\n\t\trequired_clicks = pot_config.get(\"clicks_for_initial_seed\") if \"clicks_for_initial_seed\" in pot_config else pot_config.clicks_per_stage\r\n\r\n\t# 达到当前阶段的要求\r\n\tif click_count >= required_clicks:\r\n\t\tclick_count = 0 # 计数器归零\r\n\t\tif current_stage == -1:\r\n\t\t\t# 从空盘进入 Stage 0\r\n\t\t\tcurrent_crop_idx = select_random_crop_by_order()\r\n\t\t\tcurrent_stage = 0\r\n\t\t\tupdate_visuals()\r\n\t\t\ttrigger_juice_scale()\r\n\t\telse:\r\n\t\t\t# 后续正常生长\r\n\t\t\tcurrent_stage += 1\r\n\t\t\tif current_stage == 4:\r\n\t\t\t\tupdate_visuals()\r\n\t\t\t\tspawn_harvest_effect()\r\n\t\t\t\treset_to_empty() # 💡 这里触发重置后，current_stage 变回 -1，下一轮敲击会自动重新走上面 clicks_for_initial_seed 的次数\r\n\t\t\telse:\r\n\t\t\t\tupdate_visuals()\r\n\t\t\t\ttrigger_juice_scale()\r\n\r\n\r\nfunc scan_and_init_crops() -> void:\r\n\tall_crop_nodes.clear()\r\n\tfor child in flower_pot.get_children():\r\n\t\tif child is Node2D and child.get_child_count() >= 5:\r\n\t\t\tvar stages = []\r\n\t\t\tfor i in range(5): stages.append(child.get_child(i))\r\n\t\t\tall_crop_nodes.append(stages)\r\n\r\nfunc reset_to_empty() -> void:\r\n\tcurrent_stage = -1\r\n\tclick_count = 0\r\n\thide_all_crops()\r\n\ttrigger_juice_scale()\r\n\r\nfunc hide_all_crops() -> void:\r\n\tfor group in all_crop_nodes:\r\n\t\tfor stage in group: if stage: stage.visible = false\r\n\r\nfunc update_visuals() -> void:\r\n\thide_all_crops()\r\n\tif current_stage >= 0 and current_stage < 5 and current_crop_idx < all_crop_nodes.size():\r\n\t\tvar target_node = all_crop_nodes[current_crop_idx][current_stage] as Sprite2D\r\n\t\tif target_node: target_node.visible = true\r\n\r\nfunc trigger_press_displacement() -> void:\r\n\tif pot_config == null: return\r\n\tanim_offset_y = pot_config.press_offset_y\r\n\r\n\r\nfunc trigger_juice_scale() -> void:\r\n\t# 💡 核心修改：如果勾选了 Is Big Key，大键的果冻抖动强度会立刻乘以你截图里设定的 Big Key Press Multiplier \r\n\tif is_big_key:\r\n\t\tjuice_intensity = 1.0 * big_key_press_multiplier\r\n\telse:\r\n\t\tjuice_intensity = 1.0\r\n\t\t\r\n\tjuice_time = 0.0\r\n\r\n\r\nfunc spawn_harvest_effect() -> void:\r\n\tif current_crop_idx >= all_crop_nodes.size() or pot_config == null: return\r\n\t\r\n\t# 💡 【核心修复】：先确保提取出来的是一个纯数组\r\n\tvar current_stages_array = all_crop_nodes[current_crop_idx] as Array\r\n\tif current_stages_array.size() < 5: return\r\n\t\r\n\t# 💡 【终极解药】：不再使用 as 盲目强转数组，而是通过 [4] 直接精准抓取熟透期的那个 Sprite2D 实例！\r\n\tvar target_stage_node = current_stages_array[4] as Sprite2D\r\n\tif target_stage_node == null or target_stage_node.texture == null: return\r\n\t\r\n\tvar current_scene = get_tree().current_scene if (get_tree() and get_tree().current_scene) else self\r\n\tvar crop_global_trans = target_stage_node.global_transform\r\n\tvar crop_base_scale = target_stage_node.global_scale\r\n\t\r\n\t# 💡 动态提取当前作物节点的【真实英文名字本身】（如 tuqiuhua / yayajun），无缝递交集中总谱大盘\r\n\tvar dynamic_crop_id: String = \"\"\r\n\tif target_stage_node.get_parent():\r\n\t\tdynamic_crop_id = target_stage_node.get_parent().name\r\n\t\t\r\n\tif dynamic_crop_id == \"\":\r\n\t\tdynamic_crop_id = \"tuqiuhua\"\r\n\t\t\r\n\tWarehouse.add_crop(dynamic_crop_id, 1)\r\n\r\n\t\r\n\t# 🎬 链路 A：农作物飞天动效\r\n\tvar fx_crop = Sprite2D.new()\r\n\tfx_crop.texture = target_stage_node.texture\r\n\tfx_crop.centered = target_stage_node.centered\r\n\tfx_crop.offset = target_stage_node.offset\r\n\tfx_crop.global_transform = crop_global_trans\r\n\tfx_crop.scale = crop_base_scale\r\n\tcurrent_scene.add_child(fx_crop)\r\n\t\r\n\tif pot_config.harvest_duration > 0.001:\r\n\t\tvar tw_crop_fly = create_tween().set_parallel(true)\r\n\t\ttw_crop_fly.tween_property(fx_crop, \"global_position:y\", fx_crop.global_position.y - pot_config.harvest_fly_distance, pot_config.harvest_duration).set_trans(Tween.TRANS_QUAD).set_ease(Tween.EASE_IN)\r\n\t\ttw_crop_fly.tween_property(fx_crop, \"modulate:a\", 0.0, pot_config.harvest_duration / 2.0).set_delay(pot_config.harvest_duration / 2.0)\r\n\t\t\r\n\t\tvar tw_crop_math = create_tween()\r\n\t\ttw_crop_math.tween_method(_on_harvest_jiggle_update.bind(fx_crop, crop_base_scale), 0.0, pot_config.harvest_duration, pot_config.harvest_duration).set_trans(Tween.TRANS_LINEAR)\r\n\t\ttw_crop_math.tween_callback(fx_crop.queue_free)\r\n\telse:\r\n\t\tfx_crop.queue_free()\r\n\r\n\t# 🎬 链路 B：延迟【+1】动效（完全回归内存对象指针无缝绑定）\r\n\tvar p_tex = pot_config.get(\"plus_one_texture\") if \"plus_one_texture\" in pot_config else null\r\n\tvar delay_time: float = pot_config.get(\"plus_one_delay\") if \"plus_one_delay\" in pot_config else 0.15\r\n\r\n\tif p_tex != null and p_tex is Texture2D:\r\n\t\tvar fx_plus = Sprite2D.new()\r\n\t\tfx_plus.texture = p_tex \r\n\t\tfx_plus.centered = true\r\n\t\t\r\n\t\tvar p_offset = pot_config.get(\"plus_one_offset\") if \"plus_one_offset\" in pot_config else Vector2(200, -200)\r\n\t\tvar p_scale = pot_config.get(\"plus_one_scale\") if \"plus_one_scale\" in pot_config else Vector2(0.8, 0.8)\r\n\t\t\r\n\t\tfx_plus.global_transform = crop_global_trans\r\n\t\tfx_plus.global_position += p_offset\r\n\t\tfx_plus.scale = crop_base_scale * p_scale\r\n\t\t\r\n\t\tfx_plus.modulate.a = 0.0\r\n\t\tcurrent_scene.add_child(fx_plus)\r\n\t\t\r\n\t\tif pot_config.harvest_duration > 0.001:\r\n\t\t\tvar tw_plus_fly = create_tween().set_parallel(true)\r\n\t\t\ttw_plus_fly.tween_property(fx_plus, \"global_position:y\", fx_plus.global_position.y - pot_config.harvest_fly_distance, pot_config.harvest_duration).set_trans(Tween.TRANS_QUAD).set_ease(Tween.EASE_IN).set_delay(delay_time)\r\n\t\t\ttw_plus_fly.tween_property(fx_plus, \"modulate:a\", 1.0, delay_time * 0.5).set_delay(delay_time)\r\n\t\t\ttw_plus_fly.tween_property(fx_plus, \"modulate:a\", 0.0, pot_config.harvest_duration / 2.0).set_delay(delay_time + pot_config.harvest_duration / 2.0)\r\n\t\t\t\r\n\t\t\tvar tw_plus_math = create_tween()\r\n\t\t\ttw_plus_math.tween_method(_on_harvest_jiggle_update.bind(fx_plus, crop_base_scale * p_scale), 0.0, pot_config.harvest_duration, pot_config.harvest_duration).set_trans(Tween.TRANS_LINEAR).set_delay(delay_time)\r\n\t\t\ttw_plus_math.tween_callback(fx_plus.queue_free)\r\n\t\telse:\r\n\t\t\tfx_plus.queue_free()\r\n\t\t\t\r\n\t# 音频\t# =====================================================================\r\n\t# 🎵 全自动音频分流与安全消音控制大盘（精准对齐面板数据）\r\n\t# =====================================================================\r\n\t# 💡 【核心修复点】：默认情况下，全游戏所有常规作物（如 tuqiuhua / luobobo / yayajun 等）统一打包托管加载普通音效\r\n\tvar target_sound: String = pot_config.get(\"harvest_sound_path\") if \"harvest_sound_path\" in pot_config else \"\"\r\n\tvar target_vol: float = pot_config.get(\"harvest_volume\") if \"harvest_volume\" in pot_config else 1.0\r\n\t\r\n\t# 💡 【真·100%去硬编码名字拦截】：抛弃脆弱的 current_crop_idx == 2 下标！\r\n\t# 有且只有当成熟作物的真实节点名字严格等于 \"chest\"（主题宝箱）时，才强行分流切换为专属的宝箱音效和独立音量大小！\r\n\tif dynamic_crop_id == \"chest\" and pot_config.get(\"chest_harvest_sound_path\") != \"\":\r\n\t\ttarget_sound = pot_config.chest_harvest_sound_path\r\n\t\ttarget_vol = pot_config.get(\"chest_volume\") if \"chest_volume\" in pot_config else 1.0\r\n\r\n\t# 执行运行时动态音频流加载，保障内存安全\r\n\tif target_sound != \"\" and ResourceLoader.exists(target_sound):\r\n\t\tvar audio_player = AudioStreamPlayer.new()\r\n\t\taudio_player.stream = load(target_sound)\r\n\t\tcurrent_scene.add_child(audio_player)\r\n\t\t\r\n\t\t# 🎚️ 工业级官方标准分贝值（dB）安全映射机制，完美消灭任何破音或闪退隐患\r\n\t\tif target_vol >= 0.99:\r\n\t\t\taudio_player.volume_db = 0.0 \r\n\t\telif target_vol <= 0.01:\r\n\t\t\taudio_player.volume_db = -80.0 \r\n\t\telse:\r\n\t\t\taudio_player.volume_db = linear_to_db(target_vol)\r\n\t\t\r\n\t\taudio_player.play()\r\n\t\taudio_player.finished.connect(func(): audio_player.queue_free())\r\n\r\n\r\n\r\n\r\n\r\nfunc _on_harvest_jiggle_update(elapsed_time: float, fx: Sprite2D, target_base_scale: Vector2) -> void:\r\n\tif not is_instance_valid(fx) or pot_config == null: return\r\n\tvar max_amplitude = pot_config.harvest_max_pop_scale - 1.0\r\n\tvar decay = exp(-pot_config.harvest_jiggle_decay * elapsed_time)\r\n\tvar wave = cos(pot_config.harvest_jiggle_frequency * elapsed_time)\r\n\tvar current_offset = max_amplitude * decay * wave\r\n\tfx.scale = target_base_scale * (1.0 + current_offset)\r\n\t\r\n\r\n\r\nfunc _on_global_key_ripple_receive(source_global_pos: Vector2) -> void:\r\n\tif pot_config == null: return\r\n\t\r\n\t# 1. 震源是自己，直接弹回（由原生的下压逻辑接管）\r\n\tif source_global_pos.distance_to(global_position) < 5.0: return\r\n\t\r\n\t# 2. 计算当前作物与震源之间的绝对物理像素距离\r\n\tvar distance = global_position.distance_to(source_global_pos)\r\n\tvar max_radius = pot_config.get(\"impact_radius\") if \"impact_radius\" in pot_config else 500.0\r\n\t\r\n\t# 3. 【轻量化阻断】：如果在最大圆圈半径之外，零算力浪费，直接弹回\r\n\tif distance > max_radius or distance < 0.01: return\r\n\t\r\n\t# 4. 计算扩散到我这里所需的总生命周期时长 (最大半径 / 基础扩散速度)\r\n\tvar expand_speed = pot_config.get(\"ripple_expand_speed\") if \"ripple_expand_speed\" in pot_config else 1800.0\r\n\tvar total_lifetime = max_radius / expand_speed\r\n\t\r\n\t# 5. 计算从内向外的推开方向向量\r\n\tvar push_direction = (global_position - source_global_pos).normalized()\r\n\t\r\n\t# 6. 将当前波纹源注入到自己的实时监测池中，记录当前存活时间(从0开始)和它的物理参数\r\n\tactive_ripples.append({\r\n\t\t\"center\": source_global_pos,\r\n\t\t\"time_elapsed\": 0.0,\r\n\t\t\"total_life\": total_lifetime,\r\n\t\t\"distance\": distance,\r\n\t\t\"push_dir\": push_direction\r\n\t})\r\n\r\n# 💡 【全新纯净抽卡内核】：完全读取万能集中总谱，严格阻断并遵守您的 1% 和平摊逻辑\r\nfunc _pick_random_crop_id() -> String:\r\n\tvar active_weights_pool: Dictionary = {}\r\n\tif Warehouse.master_db and Warehouse.master_db.has_method(\"get_weights_dictionary\"):\r\n\t\tactive_weights_pool = Warehouse.master_db.get_weights_dictionary()\r\n\t\t\r\n\tif active_weights_pool.is_empty():\r\n\t\treturn \"\"\r\n\t\t\r\n\t# 两阶段绝对概率剥离算法内核\r\n\tvar rare_items: Array = []\r\n\tvar common_items: Array = []\r\n\tvar total_rare_probability: float = 0.0\r\n\t\r\n\tfor crop_id in active_weights_pool:\r\n\t\tvar w: float = active_weights_pool[crop_id]\r\n\t\tif w <= 0.11: # 精准剥离 0.1 和 0.01 等绝对固定的稀有度限制项\r\n\t\t\trare_items.append({\"id\": crop_id, \"weight\": w})\r\n\t\t\ttotal_rare_probability += w\r\n\t\telse:\r\n\t\t\tcommon_items.append(crop_id)\r\n\t\t\t\r\n\tvar rolled_value: float = randf()\r\n\t\r\n\t# 第一阶段投掷：若随机数砸入绝对稀有区间，100% 吐出对应新植物字符串\r\n\tvar rare_accumulator: float = 0.0\r\n\tfor rare in rare_items:\r\n\t\trare_accumulator += rare[\"weight\"]\r\n\t\tif rolled_value <= rare_accumulator:\r\n\t\t\treturn rare[\"id\"]\r\n\t\t\t\r\n\t# 第二阶段投掷：常规作物按照 1.0 的平摊均分概率随机产生\r\n\tif common_items.is_empty():\r\n\t\treturn \"\"\r\n\t\t\r\n\tvar random_common_idx: int = randi() % common_items.size()\r\n\treturn common_items[random_common_idx]\r\n\r\n# 💡 【老项目函数名无缝适配连线总闸 - 100%全自动化零写死且带整型返回版】\r\nfunc select_random_crop_by_order() -> int:\r\n\t# 1. 触发我们在第一步写好的抽卡内核，拿到本次随机摇出来的作物英文ID（如 tuqiuhua / yayajun）\r\n\tvar next_crop_id: String = _pick_random_crop_id()\r\n\t\r\n\t# 🦺 路径安全防护网：如果总谱没加载好，默认返回 0（种第一种作物），确保 100% 不崩溃\r\n\tif next_crop_id == \"\": \r\n\t\treturn 0\r\n\t\r\n\t# 2. 🧮 【全自动运行时下标反向推算算法】：\r\n\t# 彻底告别 if next_crop_id == \"xxx\" 的硬编码名字！\r\n\t# 代码会全自动去遍历当前花盆底下的 all_crop_nodes 数组，寻找名字能和 next_crop_id 100% 对齐的层级\r\n\tfor idx in range(all_crop_nodes.size()):\r\n\t\tvar stage_array = all_crop_nodes[idx] as Array\r\n\t\tif stage_array.size() > 0:\r\n\t\t\tvar first_stage_node = stage_array[0] as Sprite2D\r\n\t\t\tif first_stage_node and first_stage_node.get_parent():\r\n\t\t\t\tvar parent_node_name: String = first_stage_node.get_parent().name\r\n\t\t\t\t\r\n\t\t\t\t# 当场景树节点名与总谱抽出来的 ID 100% 稳固咬合对齐时：\r\n\t\t\t\tif parent_node_name == next_crop_id:\r\n\t\t\t\t\t# 直接将这个算好的整型下标数字 return 抛回去给第 207 行进行无脑赋值！\r\n\t\t\t\t\treturn idx\r\n\t\t\t\t\t\r\n\t# 🦺 最终防御兜底：如果场景树节点名字拼写错了导致没对上，默认返回当前的 current_crop_idx 保持原样\r\n\tprint(\"【数据驱动抽卡提示】抽出了资产 [\", next_crop_id, \"]，但当前花盆场景树上没有拼装同名的作物节点组！\")\r\n\treturn current_crop_idx\r\n\r\n-------------------\r\n# File: res://scenes/key.tscn\r\n\r\n[gd_scene format=3 uid=\"uid://c2n76yquwpiy2\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://dlc4ksnjw0cf7\" path=\"res://scenes/key.gd\" id=\"1_6y7fx\"]\r\n[ext_resource type=\"Resource\" uid=\"uid://cn73v14dqk6q0\" path=\"res://resources/default_weights.tres\" id=\"2_htl1e\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://d3bh0qacljprp\" path=\"res://assets/sprites/items/theme_00_default/crops/tuqiuhua/tuqiuhua_stage_0.png\" id=\"2_krfvd\"]\r\n[ext_resource type=\"Resource\" uid=\"uid://exmkmdcimin7\" path=\"res://resources/pot_data_standard.tres\" id=\"3_g6wqb\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bejqg822xduqg\" path=\"res://assets/sprites/items/theme_00_default/pots/pot_default_size_0.png\" id=\"4_htl1e\"]\r\n[ext_resource type=\"Shader\" uid=\"uid://bh0qpokppaj6p\" path=\"res://assets/wave_noise.gdshader\" id=\"5_xrs3s\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c8visbdabsqe8\" path=\"res://assets/sprites/items/theme_00_default/crops/tuqiuhua/tuqiuhua_stage_1.png\" id=\"6_lchjj\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c4epe1weodblk\" path=\"res://assets/sprites/items/theme_00_default/crops/tuqiuhua/tuqiuhua_stage_2.png\" id=\"7_q4r3n\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ljvnt7bgbd1v\" path=\"res://assets/sprites/items/theme_00_default/crops/tuqiuhua/tuqiuhua_stage_3.png\" id=\"8_o04q6\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://nx57l3wiygnm\" path=\"res://assets/sprites/items/theme_00_default/crops/tuqiuhua/tuqiuhua_stage_4.png\" id=\"9_21j0w\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://xf4ej3orysao\" path=\"res://assets/sprites/items/theme_00_default/crops/luobobo/luobobo_stage_0.png\" id=\"10_e6e4t\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dwls73a7tc038\" path=\"res://assets/sprites/items/theme_00_default/crops/luobobo/luobobo_stage_1.png\" id=\"11_kx4t7\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cldjqphhw7732\" path=\"res://assets/sprites/items/theme_00_default/crops/luobobo/luobobo_stage_2.png\" id=\"12_qif7y\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://drnn70xv2wn7e\" path=\"res://assets/sprites/items/theme_00_default/crops/luobobo/luobobo_stage_3.png\" id=\"13_vkf0s\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bne1rj0yjqlh0\" path=\"res://assets/sprites/items/theme_00_default/crops/luobobo/luobobo_stage_4.png\" id=\"14_eqd53\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dhsvl1p0unhtt\" path=\"res://assets/sprites/items/theme_00_default/crops/chest/chest_stage_0.png\" id=\"15_sen5w\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ba30onffn6gvl\" path=\"res://assets/sprites/items/theme_00_default/crops/chest/chest_stage_1.png\" id=\"16_tku3k\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://l7y47v0fg4x6\" path=\"res://assets/sprites/items/theme_00_default/crops/chest/chest_stage_2.png\" id=\"17_57odb\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cbuwtmnb3v1bp\" path=\"res://assets/sprites/items/theme_00_default/crops/chest/chest_stage_3.png\" id=\"18_oil3b\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bw3lrf2e10uwn\" path=\"res://assets/sprites/items/theme_00_default/crops/chest/chest_stage_4.png\" id=\"19_htl1e\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c6770nycfadw7\" path=\"res://assets/sprites/items/theme_00_default/crops/yayajun/yayajun_stage_0.png\" id=\"21_bmwd0\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dasatqmngtp6\" path=\"res://assets/sprites/items/theme_00_default/crops/yayajun/yayajun_stage_1.png\" id=\"22_tbsev\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dqx30wg1nqrbg\" path=\"res://assets/sprites/items/theme_00_default/crops/yayajun/yayajun_stage_2.png\" id=\"23_c562q\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ddh3lp4lay6eb\" path=\"res://assets/sprites/items/theme_00_default/crops/yayajun/yayajun_stage_3.png\" id=\"24_4j6cc\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://15ym6f0p38mb\" path=\"res://assets/sprites/items/theme_00_default/crops/yayajun/yayajun_stage_4.png\" id=\"25_f82af\"]\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_aqh0b\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.010000000475\r\nshader_parameter/wave_amplitude_y = 0.010000000475\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_fw5uf\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_obeno\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_xrs3s\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_udwwn\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_bmwd0\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_tbsev\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_c562q\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_4j6cc\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_f82af\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_iqk5x\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[sub_resource type=\"ShaderMaterial\" id=\"ShaderMaterial_28oxv\"]\r\nshader = ExtResource(\"5_xrs3s\")\r\nshader_parameter/wave_amplitude_x = 0.01\r\nshader_parameter/wave_amplitude_y = 0.01\r\nshader_parameter/wave_frequency = 1.915\r\nshader_parameter/noise_scale = 206.6\r\n\r\n[node name=\"Key\" type=\"Node2D\" unique_id=245655917]\r\nscript = ExtResource(\"1_6y7fx\")\r\npot_config = ExtResource(\"3_g6wqb\")\r\nweights_config = ExtResource(\"2_htl1e\")\r\n\r\n[node name=\"FlowerPot\" type=\"Sprite2D\" parent=\".\" unique_id=558943612]\r\ntexture = ExtResource(\"4_htl1e\")\r\noffset = Vector2(0, -41.93)\r\n\r\n[node name=\"LetterSprite\" type=\"Sprite2D\" parent=\"FlowerPot\" unique_id=1176971840]\r\nmodulate = Color(1, 1, 1, 0.46666667)\r\n\r\n[node name=\"tuqiuhua\" type=\"Node2D\" parent=\"FlowerPot\" unique_id=1450575067]\r\n\r\n[node name=\"Stage0\" type=\"Sprite2D\" parent=\"FlowerPot/tuqiuhua\" unique_id=1533235797]\r\nmaterial = SubResource(\"ShaderMaterial_aqh0b\")\r\ntexture = ExtResource(\"2_krfvd\")\r\noffset = Vector2(0, -96.36)\r\n\r\n[node name=\"Stage1\" type=\"Sprite2D\" parent=\"FlowerPot/tuqiuhua\" unique_id=305618491]\r\nmaterial = SubResource(\"ShaderMaterial_fw5uf\")\r\ntexture = ExtResource(\"6_lchjj\")\r\noffset = Vector2(0, -149.24)\r\n\r\n[node name=\"Stage2\" type=\"Sprite2D\" parent=\"FlowerPot/tuqiuhua\" unique_id=1391986623]\r\nmaterial = SubResource(\"ShaderMaterial_obeno\")\r\ntexture = ExtResource(\"7_q4r3n\")\r\noffset = Vector2(0, -167.86)\r\n\r\n[node name=\"Stage3\" type=\"Sprite2D\" parent=\"FlowerPot/tuqiuhua\" unique_id=1619652737]\r\nmaterial = SubResource(\"ShaderMaterial_xrs3s\")\r\ntexture = ExtResource(\"8_o04q6\")\r\noffset = Vector2(0, -214.04)\r\n\r\n[node name=\"Stage4\" type=\"Sprite2D\" parent=\"FlowerPot/tuqiuhua\" unique_id=1775454154]\r\nscale = Vector2(0.435, 0.435)\r\ntexture = ExtResource(\"9_21j0w\")\r\noffset = Vector2(0, -654.26)\r\n\r\n[node name=\"luobobo\" type=\"Node2D\" parent=\"FlowerPot\" unique_id=561093510]\r\n\r\n[node name=\"Stage0\" type=\"Sprite2D\" parent=\"FlowerPot/luobobo\" unique_id=410906889]\r\nmaterial = SubResource(\"ShaderMaterial_udwwn\")\r\ntexture = ExtResource(\"10_e6e4t\")\r\noffset = Vector2(0, -96.995)\r\n\r\n[node name=\"Stage1\" type=\"Sprite2D\" parent=\"FlowerPot/luobobo\" unique_id=2111706793]\r\nmaterial = SubResource(\"ShaderMaterial_bmwd0\")\r\ntexture = ExtResource(\"11_kx4t7\")\r\noffset = Vector2(0, -118.78)\r\n\r\n[node name=\"Stage2\" type=\"Sprite2D\" parent=\"FlowerPot/luobobo\" unique_id=2009713370]\r\nmaterial = SubResource(\"ShaderMaterial_tbsev\")\r\ntexture = ExtResource(\"12_qif7y\")\r\noffset = Vector2(0, -152.665)\r\n\r\n[node name=\"Stage3\" type=\"Sprite2D\" parent=\"FlowerPot/luobobo\" unique_id=1064223927]\r\nmaterial = SubResource(\"ShaderMaterial_c562q\")\r\ntexture = ExtResource(\"13_vkf0s\")\r\noffset = Vector2(0, -172.06)\r\n\r\n[node name=\"Stage4\" type=\"Sprite2D\" parent=\"FlowerPot/luobobo\" unique_id=1288124573]\r\nscale = Vector2(0.445, 0.445)\r\ntexture = ExtResource(\"14_eqd53\")\r\noffset = Vector2(0, -582.91)\r\n\r\n[node name=\"yayajun\" type=\"Node2D\" parent=\"FlowerPot\" unique_id=1542722619]\r\n\r\n[node name=\"Stage0\" type=\"Sprite2D\" parent=\"FlowerPot/yayajun\" unique_id=1936009865]\r\nmaterial = SubResource(\"ShaderMaterial_4j6cc\")\r\nposition = Vector2(0, -97)\r\ntexture = ExtResource(\"21_bmwd0\")\r\n\r\n[node name=\"Stage1\" type=\"Sprite2D\" parent=\"FlowerPot/yayajun\" unique_id=142667007]\r\nmaterial = SubResource(\"ShaderMaterial_f82af\")\r\nposition = Vector2(-2, -95)\r\ntexture = ExtResource(\"22_tbsev\")\r\noffset = Vector2(1, -34)\r\n\r\n[node name=\"Stage2\" type=\"Sprite2D\" parent=\"FlowerPot/yayajun\" unique_id=1180342351]\r\nmaterial = SubResource(\"ShaderMaterial_iqk5x\")\r\nposition = Vector2(0, -92)\r\ntexture = ExtResource(\"23_c562q\")\r\noffset = Vector2(0, -71)\r\n\r\n[node name=\"Stage3\" type=\"Sprite2D\" parent=\"FlowerPot/yayajun\" unique_id=1911909795]\r\nmaterial = SubResource(\"ShaderMaterial_28oxv\")\r\nposition = Vector2(0, -94)\r\ntexture = ExtResource(\"24_4j6cc\")\r\noffset = Vector2(-12, -84)\r\n\r\n[node name=\"Stage4\" type=\"Sprite2D\" parent=\"FlowerPot/yayajun\" unique_id=287330915]\r\nscale = Vector2(0.465, 0.465)\r\ntexture = ExtResource(\"25_f82af\")\r\noffset = Vector2(0, -500)\r\n\r\n[node name=\"chest\" type=\"Node2D\" parent=\"FlowerPot\" unique_id=127599925]\r\n\r\n[node name=\"Stage0\" type=\"Sprite2D\" parent=\"FlowerPot/chest\" unique_id=152828852]\r\nmaterial = SubResource(\"ShaderMaterial_4j6cc\")\r\ntexture = ExtResource(\"15_sen5w\")\r\noffset = Vector2(0, -99.53)\r\n\r\n[node name=\"Stage1\" type=\"Sprite2D\" parent=\"FlowerPot/chest\" unique_id=1025611889]\r\nmaterial = SubResource(\"ShaderMaterial_f82af\")\r\ntexture = ExtResource(\"16_tku3k\")\r\noffset = Vector2(0, -116.07)\r\n\r\n[node name=\"Stage2\" type=\"Sprite2D\" parent=\"FlowerPot/chest\" unique_id=2040750977]\r\nmaterial = SubResource(\"ShaderMaterial_iqk5x\")\r\ntexture = ExtResource(\"17_57odb\")\r\noffset = Vector2(0, -125.62)\r\n\r\n[node name=\"Stage3\" type=\"Sprite2D\" parent=\"FlowerPot/chest\" unique_id=1911150715]\r\nmaterial = SubResource(\"ShaderMaterial_28oxv\")\r\ntexture = ExtResource(\"18_oil3b\")\r\noffset = Vector2(0, -146.63)\r\n\r\n[node name=\"Stage4\" type=\"Sprite2D\" parent=\"FlowerPot/chest\" unique_id=270493958]\r\nscale = Vector2(0.465, 0.465)\r\ntexture = ExtResource(\"19_htl1e\")\r\noffset = Vector2(0, -500)\r\n\r\n-------------------\r\n# File: res://scenes/main_keyboard.gd\r\n\r\n\r\nextends Node2D  # 100% 恢复为您最初的 Node 地基，彻底解决层级偏移导致的点击失效！\r\n\r\nconst WAREHOUSE_WINDOW_SCENE = preload(\"res://warehouse_window.tscn\") # 请确保路径与你实际的 tscn 文件路径一致\r\n\r\n# =====================================================================\r\n# 💾 【新增安全织入】：大仓库UI配置与信号总线定义盘（完全不破坏原有骨架）\r\n# =====================================================================\r\n@warning_ignore(\"unused_signal\")\r\nsignal key_pressed_at_world_pos(source_global_pos: Vector2)\r\n\r\n@export_group(\"大仓库UI配置总盘\")\r\n# 💡 【核心可视化槽位】：在右侧检查器面板开辟一个槽位，允许你直接把写好的大仓库子场景拖进来！\r\n@export var warehouse_window_scene: PackedScene\r\n\r\n# 💡 【核心新增】：暴露给最右侧检查器面板的垂直位移微调输入框\r\n# 输入 0 代表绝对居中，输入负数（如 -100）代表向上提，输入正数（如 100）代表向下沉\r\n@export var warehouse_popup_vertical_offset: float = -160.0\r\n\r\n# 记录当前在屏幕上已经弹出的仓库窗口实例指针（如果为 null 代表仓库此时是关闭的）\r\nvar _active_warehouse_node: Control = null\r\n\r\n\r\n# --- 原生场景组件与路径挂载 (完美连通) ---\r\n@onready var _group_keys: Node2D = $_group_keys\r\n\r\n\r\nfunc _ready() -> void:\r\n\t# 重置 Windows 的鼠标物理穿透阻挡，确保操作系统把所有点击权完整还给游戏本身\r\n\tDisplayServer.window_set_mouse_passthrough(PackedVector2Array())\r\n\t\r\n\tprint(\"【系统重置成功】主键盘骨架已完美恢复！游戏前台的原生 TextureButton 点击链已安全解封。\")\r\n\r\n\t# =================================================================\r\n\t# 💡 【新增安全织入】：启动背景音乐丝滑缓入\r\n\t# =================================================================\r\n\tsetup_background_music()\r\n\r\n\t# =================================================================\r\n\t# 💡 【新增安全织入】：常驻果冻篮子前台鼠标点击信号直连通车\r\n\t# =================================================================\r\n\tvar real_click_trigger = get_node_or_null(\"_group_ui/WarehouseButton/ClickDetector\")\r\n\tif real_click_trigger and real_click_trigger is TextureButton:\r\n\t\t# 强制确保按钮自身处于 Stop 模式，不被任何外界因素吞掉点击\r\n\t\treal_click_trigger.mouse_filter = Control.MOUSE_FILTER_STOP\r\n\t\tif not real_click_trigger.pressed.is_connected(toggle_warehouse_window):\r\n\t\t\treal_click_trigger.pressed.connect(toggle_warehouse_window)\r\n\t\tprint(\"【大仓库系统】常驻篮子按钮底座透明检测器已成功连线通车！\")\r\n\telse:\r\n\t\tprint(\"【大仓库系统提示】未在篮子底下找到 ClickDetector，请确认名字和层级是否完全一致！\")\r\n\r\n\t# =================================================================\r\n\t# 2. 信号桥接：自动连通来自 C# 的系统底层跨窗口全局后台无焦点键鼠信号\r\n\t# =================================================================\r\n\tif Engine.has_singleton(\"GlobalInputHook\") or has_node(\"/root/GlobalInputHook\"):\r\n\t\tvar global_hook = get_node(\"/root/GlobalInputHook\")\r\n\t\tglobal_hook.connect(\"GlobalKeyPressed\", Callable(self, \"_on_global_key_pressed\"))\r\n\t\tglobal_hook.connect(\"GlobalMousePressed\", Callable(self, \"_on_global_mouse_pressed\"))\r\n\r\n\r\nfunc _process(_delta: float) -> void:\r\n\t# 💡 【新增安全织入】：实时把大世界的时间推给全局着色器参数盘，驱动所有噪声波浪运动（Shader用）\r\n\tRenderingServer.global_shader_parameter_set(\"global_noise_time\", Time.get_ticks_msec() / 1000.0)\r\n\r\n\r\n# =====================================================================\r\n# 🏛️ 【新增功能段落】：教常驻篮子如何一点击就把仓库完美弹出与关闭！\r\n# =====================================================================\r\nfunc toggle_warehouse_window() -> void:\r\n\t# 1. 如果当前大仓库已经是打开状态 -> 第二次点击触发，直接销毁收起！\r\n\tif is_instance_valid(_active_warehouse_node):\r\n\t\t_active_warehouse_node.queue_free()\r\n\t\t_active_warehouse_node = null\r\n\t\tprint(\"【大仓库系统】大屋子面板已安全收起。\")\r\n\t\treturn\r\n\t\t\r\n\t# 2. 如果当前仓库是关闭状态 -> 第一次点击触发，动态实例化克隆弹窗！\r\n\tif warehouse_window_scene != null:\r\n\t\tvar new_window = warehouse_window_scene.instantiate()\r\n\t\t\r\n\t\t# 将其精准扔进常驻 UI 层\r\n\t\tvar ui_layer = get_node_or_null(\"_group_ui\")\r\n\t\tif ui_layer:\r\n\t\t\tui_layer.add_child(new_window)\r\n\t\telse:\r\n\t\t\tadd_child(new_window)\r\n\t\t\t\r\n\t\t# A. 先让窗口执行官方标准的屏幕正中央几何对齐\r\n\t\tnew_window.set_anchors_and_offsets_preset(Control.PRESET_CENTER, Control.PRESET_MODE_MINSIZE)\r\n\t\t\r\n\t\t# B. 💡 【全自动化动态位置微调核心公式】：\r\n\t\t# 100% 尊重您在右侧属性栏里手敲的数值，实时对窗口的全局 Y 轴坐标实施叠加偏移修正！\r\n\t\tnew_window.global_position.y += warehouse_popup_vertical_offset\r\n\t\t\r\n\t\t_active_warehouse_node = new_window\r\n\t\tprint(\"【大仓库系统】大屋子面板已成功弹出，当前垂直位移修正量为: \", warehouse_popup_vertical_offset)\r\n\r\n\r\n# =====================================================================\r\n# 🎵 【新增功能段落】：全局背景音乐播放与丝滑缓入\r\n# =====================================================================\r\nfunc setup_background_music() -> void:\r\n\tvar config_path = \"res://resources/pot_data_standard.tres\" \r\n\tif not ResourceLoader.exists(config_path): return\r\n\tvar pot_config = load(config_path)\r\n\tvar bgm_path = pot_config.get(\"bgm_sound_path\") if \"bgm_sound_path\" in pot_config else \"\"\r\n\t\r\n\tif bgm_path != \"\" and ResourceLoader.exists(bgm_path):\r\n\t\tvar bgm_player = AudioStreamPlayer.new()\r\n\t\tbgm_player.stream = load(bgm_path)\r\n\t\tadd_child(bgm_player)\r\n\t\tbgm_player.finished.connect(func(): if is_instance_valid(bgm_player): bgm_player.play())\r\n\t\t\r\n\t\tvar target_vol = pot_config.get(\"bgm_volume\") if \"bgm_volume\" in pot_config else 0.8\r\n\t\tvar target_db = linear_to_db(target_vol)\r\n\t\tvar fade_time = pot_config.get(\"bgm_fade_time\") if \"bgm_fade_time\" in pot_config else 1.5\r\n\t\t\r\n\t\tif fade_time > 0.0:\r\n\t\t\tbgm_player.volume_db = -80.0\r\n\t\t\tbgm_player.play()\r\n\t\t\tvar tween = create_tween()\r\n\t\t\ttween.tween_property(bgm_player, \"volume_db\", target_db, fade_time).set_trans(Tween.TRANS_SINE).set_ease(Tween.EASE_OUT)\r\n\t\telse:\r\n\t\t\tbgm_player.volume_db = target_db\r\n\t\t\tbgm_player.play()\r\n\r\n\r\n# =================================================================\r\n# 3. 【核心跨层联动】1:1 原汁原味完美保留您失去焦点时的全局跨窗口键鼠输入响应\r\n# =================================================================\r\n\r\n# 接收失去焦点时的全局键盘事件\r\nfunc _on_global_key_pressed(vk_code: int) -> void:\r\n\tif DisplayServer.window_is_focused():\r\n\t\treturn # 前台运行时由引擎默认输入处理，后台运行时由本钩子接管\r\n\r\n\tvar godot_key: int = KEY_NONE\r\n\tif vk_code >= 65 and vk_code <= 90:    godot_key = vk_code\r\n\telif vk_code >= 48 and vk_code <= 57:  godot_key = vk_code\r\n\telif vk_code >= 96 and vk_code <= 105: godot_key = KEY_KP_0 + (vk_code - 96)\r\n\telif vk_code == 20:  godot_key = KEY_CAPSLOCK\r\n\telif vk_code == 16 or vk_code == 160 or vk_code == 161: godot_key = KEY_SHIFT\r\n\telif vk_code == 17 or vk_code == 162 or vk_code == 163: godot_key = KEY_CTRL\r\n\telif vk_code == 18 or vk_code == 164 or vk_code == 165: godot_key = KEY_ALT\r\n\telif vk_code == 91 or vk_code == 92:                    godot_key = KEY_META\r\n\telif vk_code == 37:  godot_key = KEY_LEFT\r\n\telif vk_code == 38:  godot_key = KEY_UP\r\n\telif vk_code == 39:  godot_key = KEY_RIGHT\r\n\telif vk_code == 40:  godot_key = KEY_DOWN\r\n\telif vk_code == 32:  godot_key = KEY_SPACE\r\n\telif vk_code == 13:  godot_key = KEY_ENTER\r\n\telif vk_code == 8:   godot_key = KEY_BACKSPACE\r\n\telif vk_code == 9:   godot_key = KEY_TAB\r\n\telif vk_code == 27:  godot_key = KEY_ESCAPE\r\n\telif vk_code == 186: godot_key = KEY_SEMICOLON\r\n\telif vk_code == 187: godot_key = KEY_EQUAL\r\n\telif vk_code == 188: godot_key = KEY_COMMA\r\n\telif vk_code == 189: godot_key = KEY_MINUS\r\n\telif vk_code == 190: godot_key = KEY_PERIOD\r\n\telif vk_code == 191: godot_key = KEY_SLASH\r\n\telif vk_code == 192: godot_key = KEY_QUOTELEFT\r\n\telif vk_code == 219: godot_key = KEY_BRACKETLEFT\r\n\telif vk_code == 220: godot_key = KEY_BACKSLASH\r\n\telif vk_code == 221: godot_key = KEY_BRACKETRIGHT\r\n\telif vk_code == 222: godot_key = KEY_APOSTROPHE\r\n\r\n\tif godot_key == KEY_NONE:\r\n\t\treturn\r\n\r\n\tvar global_key_name = OS.get_keycode_string(godot_key).to_lower()\r\n\r\n\tif _group_keys:\r\n\t\tfor key_node in _group_keys.get_children():\r\n\t\t\tif key_node.has_method(\"advance_logic\"):\r\n\t\t\t\tvar key_node_name = OS.get_keycode_string(key_node.trigger_keycode).to_lower()\r\n\t\t\t\tif key_node_name == global_key_name:\r\n\t\t\t\t\tkey_node.trigger_press_displacement()\r\n\t\t\t\t\tkey_node.advance_logic()\r\n\t\t\t\t\tbreak\r\n\r\n\r\n# ==================== 底层规避：多键位独立穿透广播功能段落 ====================\r\nfunc _on_global_mouse_pressed(button_index: int, _screen_x: int, _screen_y: int) -> void:\r\n\tvar mouse_canvas_pos = get_viewport().get_mouse_position()\r\n\tvar btn = $_group_ui/WarehouseButton/ClickDetector\r\n\tvar btn_canvas_rect = Rect2(btn.global_position, btn.size)\r\n\t\r\n\t# 1. 优先判定：如果是左键点击，且刚好点到了篮子区域，只处理仓库开关，绝对不广播任何输入\r\n\tif button_index == MOUSE_BUTTON_LEFT and btn_canvas_rect.has_point(mouse_canvas_pos):\r\n\t\tprint(\"成功点击到了篮子区域！开始切换仓库显示状态...\")\r\n\t\tvar ui_group = $_group_ui\r\n\t\tvar window = ui_group.find_child(\"warehouse_window\", true, false)\r\n\t\t\r\n\t\tif not window:\r\n\t\t\twindow = WAREHOUSE_WINDOW_SCENE.instantiate()\r\n\t\t\twindow.name = \"warehouse_window\"\r\n\t\t\tui_group.add_child(window)\r\n\t\t\tif window is Control:\r\n\t\t\t\twindow.custom_minimum_size = window.size\r\n\t\t\tvar screen_size = get_viewport().get_visible_rect().size\r\n\t\t\tvar window_size = window.size if (window is Control and window.size > Vector2.ZERO) else Vector2(600, 400)\r\n\t\t\tvar target_x = (screen_size.x - window_size.x) / 2.0\r\n\t\t\tvar target_y = ((screen_size.y - window_size.y) / 2.0) - 200.0\r\n\t\t\twindow.global_position = Vector2(target_x, target_y)\r\n\t\t\tui_group.move_child(window, -1)\r\n\t\t\twindow.show()\r\n\t\telse:\r\n\t\t\tif window.visible:\r\n\t\t\t\twindow.hide()\r\n\t\t\t\tprint(\"仓库窗口已隐藏\")\r\n\t\t\telse:\r\n\t\t\t\tui_group.move_child(window, -1) \r\n\t\t\t\twindow.show()\r\n\t\t\t\tprint(\"仓库窗口已重新显示\")\r\n\t\t\t\t\r\n\t# 2. 局外判定：点的是篮子以外的区域，或者是右键/滚轮，则通过底层专用的推流方式，只把点击传给游戏世界和作物，对 UI 隐形\r\n\telse:\r\n\t\tif button_index in [MOUSE_BUTTON_LEFT, MOUSE_BUTTON_RIGHT, MOUSE_BUTTON_MIDDLE, MOUSE_BUTTON_WHEEL_UP, MOUSE_BUTTON_WHEEL_DOWN]:\r\n\t\t\tvar raw_event = InputEventMouseButton.new()\r\n\t\t\traw_event.button_index = button_index\r\n\t\t\traw_event.pressed = true\r\n\t\t\t# 底层防错：将坐标直接打入当前视口，避免大范围坐标错位\r\n\t\t\traw_event.position = mouse_canvas_pos\r\n\t\t\traw_event.global_position = mouse_canvas_pos\r\n\t\t\t\r\n\t\t\t# 【从底层规避粘连的核心修改】：使用推流将点击事件定点发送给主视口输入通道。\r\n\t\t\t# 这样做能绕过全局输入捕获（避免窗口认为鼠标被按住），直接送去触发作物和农田。\r\n\t\t\tget_viewport().push_input(raw_event) \r\n# ==============================================================================\r\n\r\n-------------------\r\n# File: res://scenes/ui/inventory_slot.gd\r\n\r\n# =====================================================================\r\nextends Control\r\n\r\n# 自定义信号：当该小格子被右键点击时触发，通知大窗口将本格全部数量快速闪击分流到出货区\r\nsignal slot_right_clicked(item_id: String, slot_amount: int)\r\n\r\n# =====================================================================\r\n# 🎛️ 📥 100% 全可视化资源槽位区（全部自己选图片，彻底斩断硬路径！）\r\n# =====================================================================\r\n@export_group(\"4色稀有度基础背景自选槽位\")\r\n@export var bg_rarity_0_common: Texture2D       # 稀有度 0 (普通 -> 无/白色背景)\r\n@export var bg_rarity_1_rare: Texture2D         # 稀有度 1 (稀有 -> 浅蓝背景)\r\n@export var bg_rarity_2_epic: Texture2D         # 稀有度 2 (史诗 -> 紫色背景)\r\n@export var bg_rarity_3_legendary: Texture2D    # 稀有度 3 (传说 -> 金色背景)\r\n\r\n# ⚙️ 内部节点高速底层指针引用\r\n@onready var bg_rect: TextureRect = $BackgroundSprite\r\n@onready var icon_rect: TextureRect = $IconSprite\r\n@onready var count_label: Label = $AmountLabel\r\n\r\n# 本格当前承载的动态运行时物品数据镜像\r\nvar bound_item_data: BaseItemData = null\r\nvar current_slot_count: int = 0\r\n\r\nfunc _ready() -> void:\r\n\t# 强固开启鼠标过滤模式：Stop 代表吃掉事件，优先响应格子点击，绝不让点格子时连带把大屋子移动走！\r\n\tmouse_filter = Control.MOUSE_FILTER_STOP\r\n\r\n\r\n\r\nfunc set_slot_data(item_data: BaseItemData, amount: int) -> void:\r\n\tbound_item_data = item_data\r\n\tcurrent_slot_count = amount\r\n\t\r\n\t# 1. 🪙 堆叠数量标签刷新\r\n\tif count_label:\r\n\t\tcount_label.text = str(amount)\r\n\t\tcount_label.visible = (amount > 1)\r\n\t\t\r\n\t# 2. 🌾 【全自动化名字自适应抓取引擎 - 精准对齐截图文件名版】\r\n\t# 初始基础拼装前缀：res://assets/sprites/items/主题名/\r\n\tvar base_folder_path: String = \"res://assets/sprites/items/\" + item_data.theme_id + \"/\"\r\n\tvar final_icon_load_path: String = \"\"\r\n\t\r\n\tif item_data.category == BaseItemData.ItemCategory.POT:\r\n\t\t# 🏺 花盆类型规则：对齐截图中的 \"pot_default_size_0.png\" 格式\r\n\t\t# 主题路径 + pots/ + pot_ + 花盆名 + _size_0.png\r\n\t\tfinal_icon_load_path = base_folder_path + \"pots/pot_\" + item_data.item_id + \"_size_0.png\"\r\n\t\t\r\n\telif item_data.category == BaseItemData.ItemCategory.CROP:\r\n\t\t# 🌾 作物与箱子类型规则：对齐截图中的 \"tuqiuhua_stage_5.png\"、\"chest_stage_5.png\" 格式\r\n\t\t# 主题路径 + crops/ + 作物名/ + 作物名 + _stage_5.png\r\n\t\tfinal_icon_load_path = base_folder_path + \"crops/\" + item_data.item_id + \"/\" + item_data.item_id + \"_stage_5.png\"\r\n\t\t\r\n\telif item_data.category == BaseItemData.ItemCategory.STICKER:\r\n\t\t# 🏷️ 贴纸类型规则（未来手账预留）：贴纸名_inv_icon.png\r\n\t\tfinal_icon_load_path = base_folder_path + \"stickers/\" + item_data.item_id + \"/\" + item_data.item_id + \"_inv_icon.png\"\r\n\r\n\t# 运行时强固磁盘路径检测：只有当该图片在文件系统中真实存在时，才进行动态 load()\r\n\tif final_icon_load_path != \"\" and ResourceLoader.exists(final_icon_load_path):\r\n\t\tif icon_rect:\r\n\t\t\ticon_rect.texture = load(final_icon_load_path) as Texture2D\r\n\t\t\ticon_rect.visible = true\r\n\telse:\r\n\t\t# 如果路径没对齐，图标自动隐去作为安全保护，并在控制台给出极其清晰的官方排查路径提示\r\n\t\tif icon_rect: icon_rect.visible = false\r\n\t\tprint(\"【资产全自动抓取提示】未找到该切片，请核对磁盘上是否存在该文件: \", final_icon_load_path)\r\n\t\t\r\n\t# 3. 🎴 4色稀有度全自动无if-else换装大盘（保持不变）\r\n\tif bg_rect:\r\n\t\tmatch item_data.rarity:\r\n\t\t\t0: bg_rect.texture = bg_rarity_0_common\r\n\t\t\t1: bg_rect.texture = bg_rarity_1_rare\r\n\t\t\t2: bg_rect.texture = bg_rarity_2_epic\r\n\t\t\t3: bg_rect.texture = bg_rarity_3_legendary\r\n\r\n\r\n\r\n# =====================================================================\r\n# 📦 出货售卖格样式强制强制重写替换（供大面板_update_sale_bar_visuals反射调用）\r\n# =====================================================================\r\nfunc force_set_sale_style(sale_bg_texture: Texture2D) -> void:\r\n\t# 彻底屏蔽原生的稀有度背景，换为您在窗口上填入的、画好的专用售卖正方形底图 `slot_sale_bg.png`\r\n\tif bg_rect and sale_bg_texture != null:\r\n\t\tbg_rect.texture = sale_bg_texture\r\n\r\n\r\n# =====================================================================\r\n# 🖱️ 鼠标高频高级交互事件拦截总网闸\r\n# =====================================================================\r\nfunc _gui_input(event: InputEvent) -> void:\r\n\tif event is InputEventMouseButton and event.pressed:\r\n\t\t# 💡 【核心交互：鼠标右键点击一键全量闪击出货】\r\n\t\tif event.button_index == MOUSE_BUTTON_RIGHT and bound_item_data != null:\r\n\t\t\t# 发射信号给大窗口总控制器，把当前的 item_id 和格子内的全量堆叠数直接装车送走！\r\n\t\t\tslot_right_clicked.emit(bound_item_data.item_id, current_slot_count)\r\n\r\n\r\n\r\nfunc _get_drag_data(_at_position: Vector2) -> Variant:\r\n\tif bound_item_data == null or current_slot_count <= 0: return null\r\n\t\r\n\t# 💡 【彻底精简】：移除任何半透明与缩放特效，直接使用最干净的原生图片作为抓取影子\r\n\tvar drag_preview = TextureRect.new()\r\n\tdrag_preview.texture = icon_rect.texture\r\n\tdrag_preview.expand_mode = TextureRect.EXPAND_IGNORE_SIZE\r\n\tdrag_preview.stretch_mode = TextureRect.STRETCH_KEEP_CENTERED\r\n\tdrag_preview.size = size \r\n\t\r\n\tset_drag_preview(drag_preview)\r\n\t\r\n\t# 传递单例大字典绝对认得的原始大主键\r\n\tvar drag_payload = {\r\n\t\t\"type\": \"warehouse_item\",\r\n\t\t\"item_id\": bound_item_data.item_id,\r\n\t\t\"slot_amount\": current_slot_count\r\n\t}\r\n\treturn drag_payload\r\n\r\n\r\n# 💡 【全放行核心解药】：让每一个小格子面对拖拽时全部亮起绿灯，100% 根除任何红圈禁止符号！\r\n# =====================================================================\r\n# 📄 彻底净化版：完整覆盖替换 res://scenes/ui/inventory_slot.gd 最末尾\r\n# =====================================================================\r\nfunc _can_drop_data(_at_position: Vector2, data: Variant) -> bool:\r\n\tif data is Dictionary and data.has(\"type\") and data[\"type\"] == \"warehouse_item\":\r\n\t\treturn true\r\n\treturn false\r\n\r\nfunc _drop_data(_at_position: Vector2, data: Variant) -> void:\r\n\t# 💡 【解药 1】：格子本身绝不处理任何复杂的空间分流逻辑！\r\n\t# 当玩家把货松手在底部的任何一个售卖格子上时，格子全自动把球踢给大窗口的根节点去统一处理\r\n\tvar warehouse_root = get_node_or_null(\"../../\")\r\n\tif warehouse_root == null or not warehouse_root.has_method(\"_drop_data\"):\r\n\t\twarehouse_root = get_node_or_null(\"../../../../\")\r\n\t\t\r\n\tif warehouse_root and warehouse_root.has_method(\"_drop_data\"):\r\n\t\t# 强行调用大窗口总控的官方接收函数，并将当前鼠标在【全游戏大屏幕上的全局绝对像素坐标】直接拍过去！\r\n\t\twarehouse_root._drop_data(warehouse_root.get_global_mouse_position(), data)\r\n\r\n-------------------\r\n# File: res://scenes/ui/inventory_slot.tscn\r\n\r\n[gd_scene format=3 uid=\"uid://b17bdqxu1eliy\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://betqtenxik6jo\" path=\"res://scenes/ui/inventory_slot.gd\" id=\"1_uda2d\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://c1rl8bou4btud\" path=\"res://assets/sprites/ui/warehouse/slot_rarity_0.png\" id=\"2_hytmx\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dvel8418s71me\" path=\"res://assets/sprites/ui/warehouse/slot_rarity_1.png\" id=\"3_gd4e4\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://blc8fkm4isae5\" path=\"res://assets/sprites/ui/warehouse/slot_rarity_2.png\" id=\"4_wmsr3\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dorf11025tpkk\" path=\"res://assets/sprites/ui/warehouse/slot_rarity_3.png\" id=\"5_onxkp\"]\r\n\r\n[node name=\"inventory_slot\" type=\"AspectRatioContainer\" unique_id=895664333]\r\ncustom_minimum_size = Vector2(205, 205)\r\nanchors_preset = 15\r\nanchor_right = 1.0\r\nanchor_bottom = 1.0\r\ngrow_horizontal = 2\r\ngrow_vertical = 2\r\nsize_flags_horizontal = 3\r\nsize_flags_vertical = 3\r\nalignment_horizontal = 0\r\nalignment_vertical = 0\r\nscript = ExtResource(\"1_uda2d\")\r\nbg_rarity_0_common = ExtResource(\"2_hytmx\")\r\nbg_rarity_1_rare = ExtResource(\"3_gd4e4\")\r\nbg_rarity_2_epic = ExtResource(\"4_wmsr3\")\r\nbg_rarity_3_legendary = ExtResource(\"5_onxkp\")\r\n\r\n[node name=\"BackgroundSprite\" type=\"TextureRect\" parent=\".\" unique_id=220160541]\r\nlayout_mode = 2\r\nexpand_mode = 1\r\n\r\n[node name=\"IconSprite\" type=\"TextureRect\" parent=\".\" unique_id=695285752]\r\nlayout_mode = 2\r\nmouse_filter = 2\r\nexpand_mode = 1\r\nstretch_mode = 5\r\n\r\n[node name=\"AmountLabel\" type=\"Label\" parent=\".\" unique_id=1315788424]\r\nlayout_mode = 2\r\nsize_flags_horizontal = 8\r\nsize_flags_vertical = 0\r\ntheme_override_colors/font_color = Color(18.892157, 18.892157, 18.892157, 0.92941177)\r\ntheme_override_colors/font_outline_color = Color(0, 0, 0, 0.5058824)\r\ntheme_override_constants/outline_size = 15\r\ntheme_override_font_sizes/font_size = 65\r\nhorizontal_alignment = 2\r\n\r\n-------------------\r\n# File: res://scenes/ui/warehouse_window.gd\r\n\r\nextends Control\r\n\r\nconst INVENTORY_SLOT_SCENE = preload(\"res://scenes/ui/inventory_slot.tscn\")\r\n\r\n@export_group(\"大仓库专用可视化资源槽位\")\r\n@export var sale_slot_background: Texture2D     \r\n\r\n@onready var grid_container: GridContainer = $PanelContainer_Main/ScrollContainer_Grid/GridContainer_Items\r\n@onready var scroll_container: ScrollContainer = $PanelContainer_Main/ScrollContainer_Grid\r\n@onready var coin_label: Label = $PanelContainer_Main/GoldBarBG/CoinDisplayLabel\r\n@onready var sale_hbox: HBoxContainer = $PanelContainer_Main/SaleBarBG/HBoxContainer_Sale\r\n\r\nvar current_category: int = 1           \r\nvar current_sort_type: String = \"theme\" \r\n\r\nvar sort_ascending_theme: bool = false\r\nvar sort_ascending_rarity: bool = false\r\nvar sort_ascending_amount: bool = false\r\n\r\nvar is_dragging: bool = false\r\nvar drag_position: Vector2 = Vector2.ZERO\r\n\r\nvar sell_queue: Array = []\r\n\r\n\r\nfunc _ready() -> void:\r\n\tscroll_container.vertical_scroll_mode = ScrollContainer.SCROLL_MODE_SHOW_ALWAYS\r\n\tscroll_container.horizontal_scroll_mode = ScrollContainer.SCROLL_MODE_DISABLED\r\n\t\r\n\t# 确保大仓库根节点吸收背景点击，防止穿透\r\n\tmouse_filter = Control.MOUSE_FILTER_STOP\r\n\t\r\n\t# 💡 【核心通车对齐】：强行开启中间格子区的鼠标透传，让拖拽放手电信号毫无阻挡直达底盘\r\n\tgrid_container.mouse_filter = Control.MOUSE_FILTER_PASS\r\n\tscroll_container.mouse_filter = Control.MOUSE_FILTER_PASS\r\n\t\r\n\tWarehouse.warehouse_updated.connect(refresh_warehouse_view)\r\n\tWarehouse.coins_changed.connect(_on_global_coins_changed)\r\n\t\r\n\t_setup_ui_buttons_signals()\r\n\t\r\n\t_on_global_coins_changed(Warehouse.coins)\r\n\trefresh_warehouse_view()\r\n\r\n\r\nfunc _process(_delta: float) -> void:\r\n\tif grid_container.get_child_count() <= 24:\r\n\t\tscroll_container.scroll_vertical = 0\r\n\r\n\r\n# =====================================================================\r\n# 🧮 核心前端渲染引擎：数据驱动拆格与正倒序复合排序\r\n# =====================================================================\r\nfunc refresh_warehouse_view() -> void:\r\n\tfor child in grid_container.get_children():\r\n\t\tchild.queue_free()\r\n\t\t\r\n\tvar raw_display_list: Array = []\r\n\tfor key_id in Warehouse.inventory:\r\n\t\tvar item_node = Warehouse.inventory[key_id]\r\n\t\tif item_node.data.category == current_category and item_node.amount > 0:\r\n\t\t\titem_node[\"_dict_key_id\"] = key_id\r\n\t\t\traw_display_list.append(item_node)\r\n\t\t\t\r\n\traw_display_list.sort_custom(func(a, b):\r\n\t\tif current_sort_type == \"rarity\":\r\n\t\t\tif a.data.rarity != b.data.rarity:\r\n\t\t\t\treturn a.data.rarity < b.data.rarity if sort_ascending_rarity else a.data.rarity > b.data.rarity\r\n\t\telif current_sort_type == \"amount\":\r\n\t\t\tif a.amount != b.amount:\r\n\t\t\t\treturn a.amount < b.amount if sort_ascending_amount else a.amount > b.amount\r\n\t\tif a.data.theme_id != b.data.theme_id:\r\n\t\t\treturn a.data.theme_id > b.data.theme_id if sort_ascending_theme else a.data.theme_id < b.data.theme_id\r\n\t\treturn a.amount > b.amount\r\n\t)\r\n\t\r\n\tvar stack_limit: int = 999\r\n\tvar p_config = load(\"res://resources/pot_data_standard.tres\")\r\n\tif p_config and \"max_stack_size\" in p_config:\r\n\t\tstack_limit = max(1, p_config.max_stack_size)\r\n\r\n\tfor item_node in raw_display_list:\r\n\t\tvar total_count: int = item_node.amount\r\n\t\tvar item_data: BaseItemData = item_node.data\r\n\t\tvar current_dict_key: String = item_node[\"_dict_key_id\"]\r\n\t\t\r\n\t\t\t\t# 💡 【整除警告修复】：擦除冗余的 floor()，直接使用官方标准的 / 整数除法，黄标警告一秒熄灭\r\n\t\tvar full_slots_count = total_count / stack_limit\r\n\t\tvar remainder_count = total_count % stack_limit\r\n\t\t\r\n\t\tfor k in range(full_slots_count):\r\n\t\t\t_instantiate_and_render_slot(item_data, stack_limit)\r\n\t\t\t\r\n\t\tif remainder_count > 0:\r\n\t\t\t_instantiate_and_render_slot(item_data, remainder_count)\r\n\r\n\t\t\t\r\n\t_update_sale_bar_visuals()\r\n\r\n\r\nfunc _instantiate_and_render_slot(item_data: BaseItemData, display_amount: int) -> void:\r\n\tvar slot_instance = INVENTORY_SLOT_SCENE.instantiate()\r\n\tgrid_container.add_child(slot_instance)\r\n\t\r\n\tif slot_instance.has_method(\"set_slot_data\"):\r\n\t\tslot_instance.set_slot_data(item_data, display_amount)\r\n\t\t\r\n\tif slot_instance.has_signal(\"slot_right_clicked\"):\r\n\t\t# 💡 【未使用参数警告修复】：在前面精准补齐下划线修改为 _ignored_id，编译器一秒变清爽\r\n\t\tslot_instance.connect(\"slot_right_clicked\", func(_ignored_id, slot_amt):\r\n\t\t\tpush_into_sell_queue(item_data.item_id, slot_amt)\r\n\t\t)\r\n\r\n\r\n\r\n# =====================================================================\r\n# 💰 智能出货临时售卖队列（先进先出与即时财富回溯）\r\n# =====================================================================\r\nfunc push_into_sell_queue(item_id: String, sell_amount: int) -> void:\r\n\t# 1. 提取数据并即时从单例总背包内扣减，金币账户立刻即时财富加钱入账\r\n\tvar fetched_data = Warehouse.move_to_sell_queue(item_id, sell_amount)\r\n\tif fetched_data == null: return\r\n\t\r\n\t# 2. 动态读取您面板截图上设定的 max_stack_size 堆叠上限\r\n\tvar stack_limit: int = 999\r\n\tvar p_config = load(\"res://resources/pot_data_standard.tres\")\r\n\tif p_config and \"max_stack_size\" in p_config:\r\n\t\tstack_limit = max(1, p_config.max_stack_size)\r\n\t\t\r\n\t# 3. 🧮 【售卖区堆叠分格拆分算法】：将当前塞入的数量放入售卖缓冲池中\r\n\t# 改变以往的直接追加模式，改成先寻找末尾未满额的同种物品格进行合并，或者新开满额格\r\n\tvar remaining_to_push = sell_amount\r\n\t\r\n\t# 3.1 尝试优先填满原本处于 sell_queue 末尾、且尚未达到 stack_limit 的同种物资零头格\r\n\tfor queued_item in sell_queue:\r\n\t\tif queued_item[\"item_id\"] == item_id and queued_item[\"amount\"] < stack_limit:\r\n\t\t\tvar room_left = stack_limit - queued_item[\"amount\"]\r\n\t\t\tvar add_to_this = min(remaining_to_push, room_left)\r\n\t\t\tqueued_item[\"amount\"] += add_to_this\r\n\t\t\tremaining_to_push -= add_to_this\r\n\t\t\tif remaining_to_push <= 0:\r\n\t\t\t\tbreak\r\n\t\t\t\t\r\n\t# 3.2 如果还有多出来的数量（或者根本没有零头格），全自动按照 stack_limit 拆分并产生新售卖格单元\r\n\twhile remaining_to_push > 0:\r\n\t\tvar this_slot_amount = min(remaining_to_push, stack_limit)\r\n\t\tsell_queue.append({\r\n\t\t\t\"item_id\": item_id,\r\n\t\t\t\"amount\": this_slot_amount,\r\n\t\t\t\"data\": fetched_data\r\n\t\t})\r\n\t\tremaining_to_push -= this_slot_amount\r\n\t\t\r\n\t# 4. 💡 【强固先进先出 FIFO 爆仓拦截闸】：死磕出货缓冲带长度最大只能为 6 格！\r\n\t# 由于开启了底部堆叠拆格，如果一次性拽入或右键闪击了大量物资导致底部格数爆发超过 6\r\n\t# 循环执行 pop_front() 清理，直到刚好留下最后装车的 6 格物资\r\n\twhile sell_queue.size() > 6:\r\n\t\tvar popped_trash = sell_queue.pop_front()\r\n\t\tprint(\"【FIFO售卖区爆仓】出货条超过6格上限！最老物品格子 [\", popped_trash[\"data\"].item_name, \" x\", popped_trash[\"amount\"], \"] 已被永久打包运走！\")\r\n\t\t\r\n\trefresh_warehouse_view()\r\n\r\n\r\nfunc pop_out_from_sell_queue_index(index: int) -> void:\r\n\tif index < 0 or index >= sell_queue.size(): return\r\n\tvar target_refund = sell_queue[index]\r\n\t\r\n\tWarehouse.refund_from_sell_queue(target_refund[\"item_id\"], target_refund[\"amount\"])\r\n\tsell_queue.remove_at(index)\r\n\trefresh_warehouse_view()\r\n\r\n\r\nfunc _update_sale_bar_visuals() -> void:\r\n\tfor child in sale_hbox.get_children():\r\n\t\tchild.queue_free()\r\n\t\t\r\n\t# 强制固定渲染 6 个底座\r\n\tfor i in range(6):\r\n\t\tvar sale_slot = INVENTORY_SLOT_SCENE.instantiate()\r\n\t\tsale_hbox.add_child(sale_slot)\r\n\t\t\r\n\t\t# 强制将小格子的基础背景图重置替换为您在面板上选中的专用 `slot_sale_bg.png`\r\n\t\tif sale_slot.has_method(\"force_set_sale_style\") and sale_slot_background != null:\r\n\t\t\tsale_slot.force_set_sale_style(sale_slot_background)\r\n\t\t\t\r\n\t\t# 💡 由于现在 sell_queue 在上游已经被算法自动拆分成了一个个完全符合 Max Stack Size 限制的独立元素项\r\n\t\t# 此处直接读取对应的数组元素进行无脑平铺展现即可，逻辑完美无缝对齐！\r\n\t\tif i < sell_queue.size():\r\n\t\t\tvar item_info = sell_queue[i]\r\n\t\t\tif sale_slot.has_method(\"set_slot_data\"):\r\n\t\t\t\tsale_slot.set_slot_data(item_info[\"data\"], item_info[\"amount\"])\r\n\t\t\t\r\n\t\t\tvar current_index = i\r\n\t\t\tsale_slot.gui_input.connect(func(event):\r\n\t\t\t\tif event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:\r\n\t\t\t\t\tpop_out_from_sell_queue_index(current_index)\r\n\t\t\t)\r\n\r\n# =====================================================================\r\n# 🕹️ 鼠标高级交互总网闸与 100% 强固 DND 接收端\r\n# =====================================================================\r\nfunc _unhandled_input(event: InputEvent) -> void:\r\n\tif event is InputEventMouseButton and event.pressed and event.button_index == MOUSE_BUTTON_LEFT:\r\n\t\tvar panel_rect: Rect2 = $PanelContainer_Main.get_global_rect()\r\n\t\tvar click_pos: Vector2 = get_global_mouse_position()\r\n\t\t\r\n\t\tif not panel_rect.has_point(click_pos):\r\n\t\t\tvar main_scene = get_tree().current_scene\r\n\t\t\tif main_scene and main_scene.has_method(\"toggle_warehouse_window\"):\r\n\t\t\t\tget_viewport().set_input_as_handled()\r\n\t\t\t\tmain_scene.toggle_warehouse_window()\r\n\r\n\r\nfunc _gui_input(event: InputEvent) -> void:\r\n\tif event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:\r\n\t\tif event.pressed:\r\n\t\t\tis_dragging = true\r\n\t\t\tdrag_position = get_global_mouse_position() - global_position\r\n\t\telse:\r\n\t\t\tis_dragging = false\r\n\t\t\t\r\n\tif event is InputEventMouseMotion and is_dragging:\r\n\t\tglobal_position = get_global_mouse_position() - drag_position\r\n\r\n\r\n# 💡 【全大盘唯一最高准入总网闸】：完全合并净化，彻底抹平重复命名冲突！\r\nfunc _can_drop_data(_at_position: Vector2, data: Variant) -> bool:\r\n\tif data is Dictionary and data.has(\"type\") and data[\"type\"] == \"warehouse_item\":\r\n\t\treturn true\r\n\treturn false\r\n\r\n\r\n# 💡 【全局屏幕绝对像素坐标撞击算法】：无论窗口怎么移动，松手一瞬间精准捕获！\r\nfunc _drop_data(_at_position: Vector2, data: Variant) -> void:\r\n\t# 抓取鼠标此时在全显示器屏幕上的绝对物理像素坐标点\r\n\tvar mouse_global_pos: Vector2 = get_global_mouse_position()\r\n\t\r\n\t# 精准锁定你在编辑器中摆好的售卖区大横条底图节点\r\n\tvar sale_bar_node = get_node_or_null(\"PanelContainer_Main/SaleBarBG\")\r\n\tif sale_bar_node == null: return\r\n\t\r\n\t# 提取该节点此时在全屏幕上的绝对矩形物理范围（完美无视任何下方子格子的信号吞噬和拦截！）\r\n\tvar sale_global_rect: Rect2 = sale_bar_node.get_global_rect()\r\n\t\r\n\tvar item_id: String = data[\"item_id\"]\r\n\tvar available_amount: int = data[\"slot_amount\"]\r\n\t\r\n\t# 🌊 如果松手时鼠标指针【正好落在这个大横条的物理边界内部】\r\n\tif sale_global_rect.has_point(mouse_global_pos):\r\n\t\tpush_into_sell_queue(item_id, available_amount)\r\n\telse:\r\n\t\t# 如果松手在外面（拽回背包），执行反悔回溯\r\n\t\tvar found_index: int = -1\r\n\t\tfor idx in range(sell_queue.size()):\r\n\t\t\tif sell_queue[idx][\"item_id\"] == item_id:\r\n\t\t\t\tfound_index = idx\r\n\t\t\t\tbreak\r\n\t\t\t\t\r\n\t\tif found_index != -1:\r\n\t\t\tpop_out_from_sell_queue_index(found_index)\r\n\r\n\r\nfunc _on_global_coins_changed(new_coins: int) -> void:\r\n\tcoin_label.text = str(new_coins)\r\n\r\n\r\nfunc _setup_ui_buttons_signals() -> void:\r\n\tvar cat_pot = get_node_or_null(\"PanelContainer_Main/TabCategory_Pot\")\r\n\tvar cat_crop = get_node_or_null(\"PanelContainer_Main/TabCategory_Crop\")\r\n\tvar cat_stk = get_node_or_null(\"PanelContainer_Main/TabCategory_Sticker\")\r\n\t\r\n\tif cat_pot: cat_pot.pressed.connect(func(): current_category = 0; refresh_warehouse_view())\r\n\tif cat_crop: cat_crop.pressed.connect(func(): current_category = 1; refresh_warehouse_view())\r\n\tif cat_stk: cat_stk.pressed.connect(func(): current_category = 2; refresh_warehouse_view())\r\n\t\r\n\tvar sort_theme = get_node_or_null(\"PanelContainer_Main/BtnSort_Theme\")\r\n\tvar sort_rarity = get_node_or_null(\"PanelContainer_Main/BtnSort_Rarity\")\r\n\tvar sort_amt = get_node_or_null(\"PanelContainer_Main/BtnSort_Amount\")\r\n\t\r\n\tif sort_theme: sort_theme.pressed.connect(func(): if current_sort_type == \"theme\": sort_ascending_theme = not sort_ascending_theme else: current_sort_type = \"theme\"; refresh_warehouse_view())\r\n\tif sort_rarity: sort_rarity.pressed.connect(func(): if current_sort_type == \"rarity\": sort_ascending_rarity = not sort_ascending_rarity else: current_sort_type = \"rarity\"; refresh_warehouse_view())\r\n\tif sort_amt: sort_amt.pressed.connect(func(): if current_sort_type == \"amount\": sort_ascending_amount = not sort_ascending_amount else: current_sort_type = \"amount\"; refresh_warehouse_view())\r\n\r\n-------------------\r\n# File: res://warehouse_window.tscn\r\n\r\n[gd_scene format=3 uid=\"uid://hcq7jw51ihgt\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://bxc13kux7m5t0\" path=\"res://scenes/ui/warehouse_window.gd\" id=\"1_noxtk\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://crx43u65uqk1s\" path=\"res://assets/sprites/ui/warehouse/slot_sale.png\" id=\"2_3bc7t\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://bknluwhan41g0\" path=\"res://assets/sprites/ui/warehouse/warehouse_bg.png\" id=\"2_qg72l\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ds8r630ytd5f3\" path=\"res://assets/sprites/ui/warehouse/tab_category_pot.png\" id=\"3_ay6kt\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://b2bmx5u8e81gu\" path=\"res://assets/sprites/ui/warehouse/tab_category_crop.png\" id=\"4_3bc7t\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://b15h5ce6crupj\" path=\"res://assets/sprites/ui/warehouse/tab_category_sticker.png\" id=\"5_50gng\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dvedhp7xr3dq5\" path=\"res://assets/sprites/ui/warehouse/btn_sort_theme.png\" id=\"6_hhl8r\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://cdaylcm36i805\" path=\"res://assets/sprites/ui/warehouse/btn_sort_rarity.png\" id=\"7_k224d\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://ie6gg67a4ig7\" path=\"res://assets/sprites/ui/warehouse/btn_sort_amount.png\" id=\"8_l51yn\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dyvc87mnvkmeh\" path=\"res://assets/sprites/ui/warehouse/marketplace.png\" id=\"9_ay6kt\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://h52foqiqjc3x\" path=\"res://assets/sprites/ui/warehouse/Gold_Bar.png\" id=\"9_qg72l\"]\r\n\r\n[node name=\"warehouse_window\" type=\"Control\" unique_id=1883350495]\r\nlayout_mode = 3\r\nanchors_preset = 15\r\nanchor_right = 1.0\r\nanchor_bottom = 1.0\r\ngrow_horizontal = 2\r\ngrow_vertical = 2\r\nscript = ExtResource(\"1_noxtk\")\r\nsale_slot_background = ExtResource(\"2_3bc7t\")\r\n\r\n[node name=\"InvisibleCloseOverlay\" type=\"Control\" parent=\".\" unique_id=614560863]\r\nlayout_mode = 1\r\nanchors_preset = 15\r\nanchor_right = 1.0\r\nanchor_bottom = 1.0\r\ngrow_horizontal = 2\r\ngrow_vertical = 2\r\n\r\n[node name=\"PanelContainer_Main\" type=\"TextureRect\" parent=\".\" unique_id=808524561]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 0.492\r\nanchor_top = 0.409\r\nanchor_right = 0.492\r\nanchor_bottom = 0.409\r\noffset_left = -783.28\r\noffset_top = -780.44\r\noffset_right = 779.72\r\noffset_bottom = 782.56\r\ntexture = ExtResource(\"2_qg72l\")\r\nexpand_mode = 1\r\n\r\n[node name=\"TabCategory_Pot\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=1447388443]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = -0.017\r\nanchor_top = 0.51000005\r\nanchor_right = -0.017\r\nanchor_bottom = 0.51000005\r\noffset_left = -82.429\r\noffset_top = -84.130066\r\noffset_right = 83.571\r\noffset_bottom = 84.869934\r\ntexture_normal = ExtResource(\"3_ay6kt\")\r\n\r\n[node name=\"TabCategory_Crop\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=292850791]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = -0.015000001\r\nanchor_top = 0.63600004\r\nanchor_right = -0.015000001\r\nanchor_bottom = 0.63600004\r\noffset_left = -83.555\r\noffset_top = -85.068054\r\noffset_right = 82.445\r\noffset_bottom = 83.931946\r\ntexture_normal = ExtResource(\"4_3bc7t\")\r\n\r\n[node name=\"TabCategory_Sticker\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=970198712]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = -0.013\r\nanchor_top = 0.76100004\r\nanchor_right = -0.013\r\nanchor_bottom = 0.76100004\r\noffset_left = -83.681\r\noffset_top = -84.443115\r\noffset_right = 82.319\r\noffset_bottom = 84.556885\r\ntexture_normal = ExtResource(\"5_50gng\")\r\n\r\n[node name=\"BtnSort_Theme\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=1259571941]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 1.026\r\nanchor_top = 0.512\r\nanchor_right = 1.026\r\nanchor_bottom = 0.512\r\noffset_left = -82.63806\r\noffset_top = -84.25604\r\noffset_right = 83.36194\r\noffset_bottom = 84.74396\r\ntexture_normal = ExtResource(\"6_hhl8r\")\r\n\r\n[node name=\"BtnSort_Rarity\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=253163872]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 1.028\r\nanchor_top = 0.638\r\nanchor_right = 1.028\r\nanchor_bottom = 0.638\r\noffset_left = -83.76404\r\noffset_top = -85.19403\r\noffset_right = 82.23596\r\noffset_bottom = 83.80597\r\ntexture_normal = ExtResource(\"7_k224d\")\r\n\r\n[node name=\"BtnSort_Amount\" type=\"TextureButton\" parent=\"PanelContainer_Main\" unique_id=1567327281]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 1.029\r\nanchor_top = 0.763\r\nanchor_right = 1.029\r\nanchor_bottom = 0.763\r\noffset_left = -82.32703\r\noffset_top = -84.56897\r\noffset_right = 83.67297\r\noffset_bottom = 84.43103\r\ntexture_normal = ExtResource(\"8_l51yn\")\r\n\r\n[node name=\"ScrollContainer_Grid\" type=\"ScrollContainer\" parent=\"PanelContainer_Main\" unique_id=1571021461]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 0.497\r\nanchor_top = 0.66800004\r\nanchor_right = 0.497\r\nanchor_bottom = 0.66800004\r\noffset_left = -631.81104\r\noffset_top = -452.0841\r\noffset_right = 680.18896\r\noffset_bottom = 448.9159\r\n\r\n[node name=\"GridContainer_Items\" type=\"GridContainer\" parent=\"PanelContainer_Main/ScrollContainer_Grid\" unique_id=585543618]\r\nlayout_mode = 2\r\ntheme_override_constants/h_separation = 5\r\ntheme_override_constants/v_separation = 5\r\ncolumns = 6\r\n\r\n[node name=\"GoldBarBG\" type=\"TextureRect\" parent=\"PanelContainer_Main\" unique_id=1033860893]\r\nlayout_mode = 0\r\noffset_left = 68.0\r\noffset_top = 1520.0\r\noffset_right = 1503.0\r\noffset_bottom = 1709.0\r\ntexture = ExtResource(\"9_qg72l\")\r\n\r\n[node name=\"CoinDisplayLabel\" type=\"Label\" parent=\"PanelContainer_Main/GoldBarBG\" unique_id=740216695]\r\nlayout_mode = 1\r\nanchors_preset = -1\r\nanchor_left = 0.148\r\nanchor_top = 0.5\r\nanchor_right = 0.148\r\nanchor_bottom = 0.5\r\noffset_left = 0.6199951\r\noffset_top = -51.5\r\noffset_right = 1106.62\r\noffset_bottom = 52.5\r\ntheme_override_colors/font_color = Color(0, 0, 0, 0.6745098)\r\ntheme_override_font_sizes/font_size = 76\r\n\r\n[node name=\"SaleBarBG\" type=\"TextureRect\" parent=\"PanelContainer_Main\" unique_id=956835255]\r\nlayout_mode = 0\r\noffset_left = 51.0\r\noffset_top = 1672.0\r\noffset_right = 1535.0\r\noffset_bottom = 1943.0\r\ntexture = ExtResource(\"9_ay6kt\")\r\nexpand_mode = 1\r\n\r\n[node name=\"HBoxContainer_Sale\" type=\"HBoxContainer\" parent=\"PanelContainer_Main/SaleBarBG\" unique_id=1443989732]\r\nlayout_mode = 1\r\nanchors_preset = 15\r\nanchor_right = 1.0\r\nanchor_bottom = 1.0\r\noffset_left = 96.0\r\noffset_top = 31.0\r\noffset_right = -107.0\r\noffset_bottom = -28.0\r\ngrow_horizontal = 2\r\ngrow_vertical = 2\r\n\r\n-------------------\r\n# File: res://resources/pot_data_standard.tres\r\n\r\n[gd_resource type=\"Resource\" script_class=\"PotConfig\" format=3 uid=\"uid://exmkmdcimin7\"]\r\n\r\n[ext_resource type=\"Script\" uid=\"uid://drdur516kovcw\" path=\"res://pot_data.gd\" id=\"1_g65sj\"]\r\n[ext_resource type=\"Texture2D\" uid=\"uid://dk44nhapwq5cp\" path=\"res://assets/sprites/environment/plus_one.png\" id=\"1_gpd3o\"]\r\n\r\n[resource]\r\nscript = ExtResource(\"1_g65sj\")\r\nbgm_sound_path = \"uid://n4tx43g0q48t\"\r\nbgm_volume = 1.0\r\nbgm_fade_time = 0.2\r\nharvest_sound_path = \"uid://bky6cfot3f2k5\"\r\nharvest_volume = 0.8\r\nchest_harvest_sound_path = \"uid://b0snoue8bxhgc\"\r\nplus_one_texture = ExtResource(\"1_gpd3o\")\r\nmetadata/_custom_type_script = \"uid://drdur516kovcw\"\r\n\r\n-------------------\r\n# File: res://window_controller.gd\r\n\r\n# ==========================================\r\n# 独立组件：游戏窗口拖拽与滚轮缩放控制器 (最终完美版)\r\n# 核心哲学：零渲染开销，全穿透不拦截，防抖动缩放\r\n# ==========================================\r\nextends Node\r\n\r\n@export_group(\"缩放配置\")\r\n@export var min_scale: float = 0.1\r\n@export var max_scale: float = 1.0\r\n@export var scale_step: float = 0.05\r\n\r\nvar _is_dragging: bool = false\r\nvar _drag_start_mouse_pos: Vector2i = Vector2i.ZERO\r\nvar _drag_start_window_pos: Vector2i = Vector2i.ZERO\r\n\r\n@onready var _base_size: Vector2i = Vector2i(\r\n\tProjectSettings.get_setting(\"display/window/size/viewport_width\"),\r\n\tProjectSettings.get_setting(\"display/window/size/viewport_height\")\r\n)\r\nvar _current_scale: float = 1.0\r\n\r\nfunc _ready() -> void:\r\n\t# 优先采用你的覆盖分辨率作为基准尺寸来计算初始缩放比\r\n\tvar current_size: Vector2i = DisplayServer.window_get_size()\r\n\t_current_scale = float(current_size.x) / float(_base_size.x)\r\n\r\n# ... 保持原有类定义和 _ready、_input 不变 ...\r\n\r\nfunc _process(_delta: float) -> void:\r\n\t# 1. 检查鼠标左键状态\r\n\tvar is_left_pressed: bool = Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT)\r\n\t\r\n\tif is_left_pressed:\r\n\t\tif not _is_dragging:\r\n\t\t\t# 【核心优化 1】：规避 UI 交互\r\n\t\t\t# 检查鼠标当前是否悬停在游戏内的 UI 控件（Control节点，如仓库、按钮）上方\r\n\t\t\tvar hovered_control: Control = get_viewport().gui_get_hovered_control()\r\n\t\t\tif hovered_control != null:\r\n\t\t\t\t# 如果点在了 UI 上，直接拒绝这次拖拽，让点击事件交由游戏 UI 或仓库处理\r\n\t\t\t\treturn\r\n\t\t\t\t\r\n\t\t\t# 刚按下的一瞬间，记录初始绝对坐标\r\n\t\t\t_is_dragging = true\r\n\t\t\t_drag_start_mouse_pos = DisplayServer.mouse_get_position()\r\n\t\t\t_drag_start_window_pos = DisplayServer.window_get_position()\r\n\t\telse:\r\n\t\t\t# 【核心优化 2】：加入微小的拖拽位移死区限制（防止开启/关闭UI时的微小晃动误触发）\r\n\t\t\tvar current_mouse_pos: Vector2i = DisplayServer.mouse_get_position()\r\n\t\t\tvar delta: Vector2i = current_mouse_pos - _drag_start_mouse_pos\r\n\t\t\t\r\n\t\t\t# 如果鼠标累计移动超过 3 个像素，才真正判定为“玩家想要搬移游戏窗口”\r\n\t\t\tif delta.length() > 3:\r\n\t\t\t\tDisplayServer.window_set_position(_drag_start_window_pos + delta)\r\n\telse:\r\n\t\t_is_dragging = false\r\n\r\n\r\nfunc _input(event: InputEvent) -> void:\r\n\t# 将滚轮事件放回 _input 中，利用操作系统的单次事件驱动，防止单帧内连续缩放过快\r\n\tif event is InputEventMouseButton and event.pressed:\r\n\t\tvar scale_changed: bool = false\r\n\t\tif event.button_index == MOUSE_BUTTON_WHEEL_UP:\r\n\t\t\t_current_scale = min(_current_scale + scale_step, max_scale)\r\n\t\t\tscale_changed = true\r\n\t\telif event.button_index == MOUSE_BUTTON_WHEEL_DOWN:\r\n\t\t\t_current_scale = max(_current_scale - scale_step, min_scale)\r\n\t\t\tscale_changed = true\r\n\t\t\t\r\n\t\tif scale_changed:\r\n\t\t\tvar old_size: Vector2i = DisplayServer.window_get_size()\r\n\t\t\tvar target_size: Vector2i = Vector2i(\r\n\t\t\t\troundi(_base_size.x * _current_scale),\r\n\t\t\t\troundi(_base_size.y * _current_scale)\r\n\t\t\t)\r\n\t\t\t\r\n\t\t\t# 核心优化：计算尺寸差值，让窗口在缩放时保持原位平滑过渡，不发生瞬移\r\n\t\t\tvar size_diff: Vector2i = target_size - old_size\r\n\t\t\tvar current_pos: Vector2i = DisplayServer.window_get_position()\r\n\t\t\t\r\n\t\t\tDisplayServer.window_set_size(target_size)\r\n\t\t\t# 可选：如果你希望缩放时窗口以中心点向外扩张，可以取消注释下面这行\r\n\t\t\t# DisplayServer.window_set_position(current_pos - size_diff / 2)\r\n\r\n"}