From 5c9be94abaff691ebcd0db6aca838ced1acda555 Mon Sep 17 00:00:00 2001 From: Oscar Date: Tue, 10 Jun 2025 23:24:50 +0300 Subject: [PATCH] upd --- Assets/Items/cloth_pijama.clitem | 11 + Assets/Items/cloth_pijama_bottom.clitem | 11 + Assets/Items/pistol_ammo.inv | 1 + Assets/Items/pistol_test.weapon | 18 + Assets/prefabs/Player.prefab | 168 +-- Assets/prefabs/weapon/ammobox.prefab | 75 +- Assets/prefabs/weapon/pistol_1.prefab | 77 ++ Assets/scenes/minimal.scene | 1038 +++++++++++------ .../Definitions/BaseItemDefinition.cs | 2 + Code/Inventory/Inventar.cs | 50 +- Code/Inventory/InventoryItem.cs | 5 +- Code/Inventory/Ui/Inventory.razor | 12 +- Code/Inventory/Ui/InventoryItem.razor | 13 +- Code/Inventory/Usable/AmmoUseableBase.cs | 4 +- Code/Inventory/Usable/PickupItem.cs | 29 + Code/Inventory/Usable/UseSystem.cs | 5 +- Code/Inventory/Usable/UseableBase.cs | 31 +- Code/Player/Dedugan.Interaction.cs | 72 +- Code/Player/Dedugan.Inventory.cs | 48 +- Code/UI/InteractionButton.cs | 50 +- Code/UI/TeleportMazeButton.cs | 19 +- Code/Weapons/Weapon.cs | 19 +- sasalka.sbproj | 7 +- sasalka.sln.DotSettings.user | 2 + 24 files changed, 1187 insertions(+), 580 deletions(-) create mode 100644 Assets/Items/cloth_pijama.clitem create mode 100644 Assets/Items/cloth_pijama_bottom.clitem create mode 100644 Assets/Items/pistol_test.weapon create mode 100644 Code/Inventory/Usable/PickupItem.cs diff --git a/Assets/Items/cloth_pijama.clitem b/Assets/Items/cloth_pijama.clitem new file mode 100644 index 0000000..9aecfd4 --- /dev/null +++ b/Assets/Items/cloth_pijama.clitem @@ -0,0 +1,11 @@ +{ + "ClothUrl": "pukes/pyjamatop", + "Slot": "Body", + "Name": "Pyjama Top", + "Description": null, + "Prefab": null, + "ImageTexture": null, + "ImageUrl": "https://cdn.sbox.game/asset/pukes.pyjamatop/thumb.png.9405387bc9d8e406", + "__references": [], + "__version": 0 +} \ No newline at end of file diff --git a/Assets/Items/cloth_pijama_bottom.clitem b/Assets/Items/cloth_pijama_bottom.clitem new file mode 100644 index 0000000..a561d2e --- /dev/null +++ b/Assets/Items/cloth_pijama_bottom.clitem @@ -0,0 +1,11 @@ +{ + "ClothUrl": "pukes/pyjamabottoms", + "Slot": "Body", + "Name": "Pyjama Bottoms", + "Description": "Pyjama Bottoms", + "Prefab": null, + "ImageTexture": null, + "ImageUrl": "https://cdn.sbox.game/asset/pukes.pyjamatop/thumb.png.9405387bc9d8e406", + "__references": [], + "__version": 0 +} \ No newline at end of file diff --git a/Assets/Items/pistol_ammo.inv b/Assets/Items/pistol_ammo.inv index 10e2ef7..d10aa7e 100644 --- a/Assets/Items/pistol_ammo.inv +++ b/Assets/Items/pistol_ammo.inv @@ -7,6 +7,7 @@ }, "ImageTexture": null, "ImageUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBUTEBMVFRUXFxgSGBcWFxUXFRUYFxUYGBcaGBkaHSggGBonGxcXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDQ0NDg8PEDcZFRkrLSsrKysrKzc3LS0rNys3Nys3NzcrKy0rKy0rLSsrKysrKysrKysrKysrKysrKysrK//AABEIAOEA4QMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABgEDBQcIBAL/xABNEAABAwICBQkBCwoEBQUAAAABAAIDBBESIQUGMUFRBxMiYXGBkaHwFDJCUlNUkqKxwdHSFRYXM2KCg5Th8SNDo7IkVXJzkwhEdMLi/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAEQH/2gAMAwEAAhEDEQA/AN4oiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIi8Wlq4wxOcyN0j7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REBERAREQEREBERAREQEREBERAREQaL1m5PdIHSM08cQkjkkdI1zHtvZxvYtcQQVD6jk40ticfYpCLk5OiOVydgfddSIg5OdqBpT5BUfNH3q83k10sRf2GXvdED4F+S6rRCOVf0aaX+RSfOi/Gs9qRycVntjGaQoX+zPDmyXcwBvRJa4Fr73DrbOJXRiIIzqtqJQaPc59LFhe4YS9znPdh24QXHojZs22CkyIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiIP/Z", + "MaxCount": 120, "__references": [], "__version": 0 } \ No newline at end of file diff --git a/Assets/Items/pistol_test.weapon b/Assets/Items/pistol_test.weapon new file mode 100644 index 0000000..1bff257 --- /dev/null +++ b/Assets/Items/pistol_test.weapon @@ -0,0 +1,18 @@ +{ + "Slot": "RightHand", + "HoldType": "Pistol", + "WeaponDefinition": { + "Position": "-1.108,0.38,-2.367", + "Rotation": "0.002790701,0.01173679,0.006057173,0.9999089" + }, + "Name": "Pistol Test", + "Description": "test description", + "Prefab": { + "_type": "gameobject", + "prefab": "prefabs/weapon/pistol_1.prefab" + }, + "ImageTexture": null, + "ImageUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBUTEBMVFRUXFxgSGBcWFxUXFRUYFxUYGBcaGBkaHSggGBonGxcXITEhJSkrLi4uFx8zODMtNygtLisBCgoKDQ0NDg8PEDcZFRkrLSsrKysrKzc3LS0rNys3Nys3NzcrKy0rKy0rLSsrKysrKysrKysrKysrKysrKysrK//AABEIAOEA4QMBIgACEQEDEQH/xAAcAAEAAQUBAQAAAAAAAAAAAAAABgEDBQcIBAL/xABNEAABAwICBQkBCwoEBQUAAAABAAIDBBESIQUGMUFRBxMiYXGBkaHwFDJCUlNUkqKxwdHSFRYXM2KCg5Th8SNDo7Ik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Slj6mO5x3iS0DzWZp9AaEb+s0k9/UJImg+DCfNBAS/edvbn19vruvRZ7PLyPl5eGwvyZq7vqCf47/ssqM0ToNzgIK0xuvYXfjZc5DFjF/pBFQqC7RJe4/U7bj/McukeTS/5Io7/EtPjcrRmmdDSyVIoqR0dRKSbc29lsmk3Nz0bWuftXRegqH2emhgH+VGyLLZ0Ghp+pQe5ERAREQEREBERAREQEREBERAREQEREBERAREQaL1m5PdIHSM08cQkjkkdI1zHtvZxvYtcQQVD6jk40ticfYpCLk5OiOVydgfddSIg5OdqBpT5BUfNH3q83k10sRf2GXvdED4F+S6rRCOVf0aaX+RSfOi/Gs9qRycVntjGaQoX+zPDmyXcwBvRJa4Fr73DrbOJXRiIIzqtqJQaPc59LFhe4YS9znPdh24QXHojZs22CkyIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiICIiAiIgIiIP/Z", + "__references": [], + "__version": 0 +} \ No newline at end of file diff --git a/Assets/prefabs/Player.prefab b/Assets/prefabs/Player.prefab index e6a3691..9c49867 100644 --- a/Assets/prefabs/Player.prefab +++ b/Assets/prefabs/Player.prefab @@ -1995,7 +1995,7 @@ "Flags": 8, "Name": "aim_matrix_02a", "Position": "5.864844,0.005568608,9.842515", - "Rotation": "-0.00000000000000000000001185265,0.0000000000000001455021,-0.0000003871369,1", + "Rotation": "-0.00000000000000000000001185265,0.0000000000000001455021,-0.000000387137,1", "Scale": "1,1,1", "Tags": "", "Enabled": true, @@ -2012,7 +2012,7 @@ "Flags": 8, "Name": "aim_matrix_02b", "Position": "9.801846,0.005565077,9.842513", - "Rotation": "-0.00000000000000000000001185278,0.0000000000000001455018,-0.0000003871369,1", + "Rotation": "-0.00000000000000000000001185277,0.0000000000000001455018,-0.000000387137,1", "Scale": "1,1,1", "Tags": "", "Enabled": true, @@ -2028,8 +2028,8 @@ "__version": 1, "Flags": 8, "Name": "ankle_R", - "Position": "0.4099646,-4.377359,3.807756", - "Rotation": "0.6728516,0.2185292,-0.3316596,0.6241136", + "Position": "0.409983,-4.377514,3.807766", + "Rotation": "0.6728485,0.2185345,-0.3316539,0.624118", "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, @@ -2045,8 +2045,8 @@ "__version": 1, "Flags": 8, "Name": "ankle_L", - "Position": "0.4083393,4.427768,3.806167", - "Rotation": "0.6245928,0.3320992,-0.2183265,0.6722555", + "Position": "0.4083189,4.428035,3.806114", + "Rotation": "0.6245992,0.3320901,-0.2183362,0.6722509", "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, @@ -2062,9 +2062,9 @@ "__version": 1, "Flags": 8, "Name": "arm_lower_R", - "Position": "-2.567823,-9.414575,40.7076", - "Rotation": "0.4924873,0.3660672,-0.5479427,0.5685155", - "Scale": "1.000005,1.000005,1.000005", + "Position": "-2.1681,-9.431196,41.19865", + "Rotation": "0.4944381,0.37219,-0.5413064,0.5692039", + "Scale": "1.000003,1.000003,1.000003", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2079,9 +2079,9 @@ "__version": 1, "Flags": 8, "Name": "arm_lower_L", - "Position": "-2.410847,9.395028,40.69125", - "Rotation": "0.5735433,0.5426417,-0.3705063,0.4891964", - "Scale": "1.000005,1.000005,1.000005", + "Position": "-2.005183,9.136837,41.20834", + "Rotation": "0.5773867,0.5358267,-0.3725455,0.4906366", + "Scale": "1.000003,1.000003,1.000003", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2096,9 +2096,9 @@ "__version": 1, "Flags": 8, "Name": "hand_R", - "Position": "-1.554352,-11.43732,33.34042", - "Rotation": "0.4642905,0.3432117,-0.604311,0.5490432", - "Scale": "1.000007,1.000007,1.000007", + "Position": "-1.112873,-11.34385,33.80799", + "Rotation": "0.4663244,0.3495446,-0.5979788,0.5502559", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2113,9 +2113,9 @@ "__version": 1, "Flags": 8, "Name": "hand_L", - "Position": "-1.358666,11.39837,33.32423", - "Rotation": "0.5545862,0.5991901,-0.3473969,0.4612166", - "Scale": "1.000006,1.000006,1.000006", + "Position": "-0.8630744,11.08804,33.84074", + "Rotation": "0.5587665,0.5926774,-0.3494848,0.4630054", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2130,9 +2130,9 @@ "__version": 1, "Flags": 8, "Name": "hold_R", - "Position": "-0.1356873,-10.24809,27.23935", - "Rotation": "0.3025265,0.7237881,0.05324486,0.6178782", - "Scale": "1.000008,1.000008,1.000008", + "Position": "0.3033191,-10.05647,27.72632", + "Rotation": "0.3018348,0.7246752,0.06230799,0.6163273", + "Scale": "1.000005,1.000005,1.000005", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2147,9 +2147,9 @@ "__version": 1, "Flags": 8, "Name": "hold_L", - "Position": "0.03949806,10.18287,27.22342", - "Rotation": "-0.2958933,0.7264506,-0.0589573,0.6174469", - "Scale": "1.000007,1.000007,1.000007", + "Position": "0.5723044,9.822827,27.75871", + "Rotation": "-0.2925257,0.7254868,-0.06610834,0.6194572", + "Scale": "1.000005,1.000005,1.000005", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2165,7 +2165,7 @@ "Flags": 8, "Name": "IK_right_hand", "Position": "-1.684358,-11.3081,33.23968", - "Rotation": "0.4603033,0.3490922,-0.6097354,0.5426587", + "Rotation": "0.4603032,0.3490922,-0.6097353,0.5426588", "Scale": "1,1,1", "Tags": "", "Enabled": true, @@ -2198,9 +2198,9 @@ "__version": 1, "Flags": 8, "Name": "leg_lower_R", - "Position": "2.852134,-4.64673,16.07982", - "Rotation": "0.4771746,0.5220156,-0.5701445,0.4180185", - "Scale": "1.000002,1.000002,1.000002", + "Position": "3.02255,-4.632833,16.04495", + "Rotation": "0.4713203,0.5268413,-0.5716739,0.4165147", + "Scale": "1,1,1", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2215,8 +2215,8 @@ "__version": 1, "Flags": 8, "Name": "leg_lower_L", - "Position": "2.710925,4.660064,16.10588", - "Rotation": "0.4209704,0.5689973,-0.5179102,0.4804112", + "Position": "2.155716,4.636949,16.19732", + "Rotation": "0.4311262,0.5604271,-0.5056977,0.494289", "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, @@ -2232,9 +2232,9 @@ "__version": 1, "Flags": 8, "Name": "middle_of_both_hands", - "Position": "-1.265596,-0.021348,28.53136", - "Rotation": "0.003585241,0.7594557,-0.003357793,0.6505405", - "Scale": "1.000006,1.000006,1.000006", + "Position": "-0.7482702,-0.11094,29.00881", + "Rotation": "0.004989519,0.7527336,-0.001331221,0.6583049", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2249,9 +2249,9 @@ "__version": 1, "Flags": 8, "Name": "driver_arm_upper_R_twist1", - "Position": "-1.681034,-8.291717,45.52214", + "Position": "-1.2787,-8.364439,46.02543", "Rotation": "0,0,0,1", - "Scale": "1.000005,1.000005,1.000005", + "Scale": "1.000003,1.000003,1.000003", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2266,9 +2266,9 @@ "__version": 1, "Flags": 8, "Name": "driver_arm_lower_R_twist1", - "Position": "-2.061087,-10.42595,37.02401", + "Position": "-1.640486,-10.38752,37.50332", "Rotation": "0,0,0,1", - "Scale": "1.000006,1.000006,1.000006", + "Scale": "1.000003,1.000003,1.000003", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2283,9 +2283,9 @@ "__version": 1, "Flags": 8, "Name": "driver_elbow_R_position", - "Position": "-2.574409,-9.417637,40.70373", - "Rotation": "-0.03302322,-0.6136653,0.7886796,0.01757571", - "Scale": "1.000006,1.000006,1.000006", + "Position": "-2.180049,-9.433502,41.19473", + "Rotation": "-0.02861762,-0.6189936,0.7847716,0.01270967", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2300,9 +2300,9 @@ "__version": 1, "Flags": 8, "Name": "driver_elbow_L_position", - "Position": "-2.417371,9.398232,40.68735", - "Rotation": "-0.05309913,0.7858217,-0.6108508,0.08078353", - "Scale": "1.000005,1.000005,1.000005", + "Position": "-2.017065,9.139403,41.20432", + "Rotation": "-0.04637044,0.7844297,-0.613399,0.0791298", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2317,9 +2317,9 @@ "__version": 1, "Flags": 8, "Name": "driver_arm_upper_L_twist1", - "Position": "-1.545969,8.256403,45.50608", + "Position": "-1.169505,8.015933,46.03245", "Rotation": "0,0,0,1", - "Scale": "1.000005,1.000005,1.000005", + "Scale": "1.000003,1.000003,1.000003", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2334,9 +2334,9 @@ "__version": 1, "Flags": 8, "Name": "driver_arm_lower_L_twist1", - "Position": "-1.884756,10.3967,37.00774", + "Position": "-1.434129,10.11244,37.52454", "Rotation": "0,0,0,1", - "Scale": "1.000006,1.000006,1.000006", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2351,9 +2351,9 @@ "__version": 1, "Flags": 8, "Name": "driver_leg_upper_R_twist1", - "Position": "1.835075,-4.537014,23.24235", + "Position": "1.876673,-4.498212,23.18756", "Rotation": "0,0,0,1", - "Scale": "1.000002,1.000002,1.000002", + "Scale": "1,1,1", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2368,9 +2368,9 @@ "__version": 1, "Flags": 8, "Name": "driver_leg_upper_L_twist1", - "Position": "1.777929,4.543681,23.27972", + "Position": "1.445647,4.562048,23.39719", "Rotation": "0,0,0,1", - "Scale": "1.000001,1.000001,1.000001", + "Scale": "1,1,1", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2385,9 +2385,9 @@ "__version": 1, "Flags": 8, "Name": "driver_kneecap_R_position", - "Position": "3.351182,-4.701256,16.04174", - "Rotation": "0.5169078,0.4808557,-0.5317466,0.4677923", - "Scale": "1.000002,1.000002,1.000002", + "Position": "3.568419,-4.690867,16.00689", + "Rotation": "0.5159015,0.4807676,-0.5308076,0.4700548", + "Scale": "0.9999997,0.9999997,0.9999997", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2402,9 +2402,9 @@ "__version": 1, "Flags": 8, "Name": "driver_kneecap_L_position", - "Position": "3.176064,4.711613,16.06872", - "Rotation": "0.7050594,0.04671752,0.02711059,0.7070882", - "Scale": "1.000001,1.000001,1.000001", + "Position": "2.509118,4.677139,16.16555", + "Rotation": "0.7047989,0.04552961,0.03070755,0.7072784", + "Scale": "1,1,1", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2419,9 +2419,9 @@ "__version": 1, "Flags": 8, "Name": "driver_leg_lower_R_twist1", - "Position": "1.63105,-4.512045,9.943793", + "Position": "1.716266,-4.505174,9.926357", "Rotation": "0,0,0,1", - "Scale": "1.000003,1.000003,1.000003", + "Scale": "1,1,1", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2436,9 +2436,9 @@ "__version": 1, "Flags": 8, "Name": "driver_leg_lower_L_twist1", - "Position": "1.55963,4.543931,9.956005", + "Position": "1.282023,4.53249,10.00171", "Rotation": "0,0,0,1", - "Scale": "1.000002,1.000002,1.000002", + "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2453,9 +2453,9 @@ "__version": 1, "Flags": 8, "Name": "forward_reference_modelspace", - "Position": "-0.4114534,0.001021107,43.38918", + "Position": "-0.2125276,-0.06392401,43.42877", "Rotation": "0,0,0,1", - "Scale": "1.000002,1.000002,1.000002", + "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2470,9 +2470,9 @@ "__version": 1, "Flags": 8, "Name": "eyes", - "Position": "5.407951,-0.1355422,63.24592", - "Rotation": "-0.0007134229,-0.01552102,-0.01144814,0.9998137", - "Scale": "1.000004,1.000004,1.000004", + "Position": "5.906095,-0.3021989,63.2759", + "Rotation": "-0.0001773983,-0.01521605,-0.009447872,0.9998396", + "Scale": "1.000002,1.000002,1.000002", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2487,9 +2487,9 @@ "__version": 1, "Flags": 8, "Name": "eye_R_forward", - "Position": "5.331269,-3.481122,63.24951", - "Rotation": "-0.0007134229,-0.01552102,-0.01144814,0.9998137", - "Scale": "1.000004,1.000004,1.000004", + "Position": "5.842853,-3.648057,63.27613", + "Rotation": "-0.0001773983,-0.01521605,-0.009447872,0.9998396", + "Scale": "1.000002,1.000002,1.000002", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2504,9 +2504,9 @@ "__version": 1, "Flags": 8, "Name": "eye_L_forward", - "Position": "5.484632,3.210038,63.24234", - "Rotation": "-0.0007134229,-0.01552102,-0.01144814,0.9998137", - "Scale": "1.000004,1.000004,1.000004", + "Position": "5.969336,3.043659,63.27568", + "Rotation": "-0.0001773983,-0.01521605,-0.009447872,0.9998396", + "Scale": "1.000002,1.000002,1.000002", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2521,9 +2521,9 @@ "__version": 1, "Flags": 8, "Name": "forward_reference", - "Position": "0.3106461,-0.02626462,56.19444", - "Rotation": "-0.0007134229,-0.01552102,-0.01144814,0.9998137", - "Scale": "1.000004,1.000004,1.000004", + "Position": "0.8041469,-0.2062372,56.2276", + "Rotation": "-0.0001773983,-0.01521605,-0.009447872,0.9998396", + "Scale": "1.000002,1.000002,1.000002", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2538,9 +2538,9 @@ "__version": 1, "Flags": 8, "Name": "foot_R", - "Position": "1.982103,-4.910701,0.1895912", - "Rotation": "0.0004849434,-0.00001452863,-0.08709995,0.9961995", - "Scale": "1.000004,1.000004,1.000004", + "Position": "1.982133,-4.910829,0.1895903", + "Rotation": "0.0004833937,-0.00001463294,-0.08709148,0.9962002", + "Scale": "1.000001,1.000001,1.000001", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2555,9 +2555,9 @@ "__version": 1, "Flags": 8, "Name": "foot_L", - "Position": "1.978663,4.967034,1.053633", - "Rotation": "-0.08722261,0.9961888,0.0004088581,0.00001432814", - "Scale": "1.000002,1.000002,1.000002", + "Position": "1.978647,4.967236,1.053595", + "Rotation": "-0.08720801,0.9961901,0.0004106759,0.00001446971", + "Scale": "1.000004,1.000004,1.000004", "Tags": "", "Enabled": true, "NetworkMode": 2, @@ -2572,9 +2572,9 @@ "__version": 1, "Flags": 8, "Name": "hat", - "Position": "0.1355461,-0.005559167,71.35379", - "Rotation": "-0.0007134229,-0.01552102,-0.01144814,0.9998137", - "Scale": "1.000004,1.000004,1.000004", + "Position": "0.6381106,-0.2016305,71.38704", + "Rotation": "-0.0001773983,-0.01521605,-0.009447872,0.9998396", + "Scale": "1.000002,1.000002,1.000002", "Tags": "", "Enabled": true, "NetworkMode": 2, diff --git a/Assets/prefabs/weapon/ammobox.prefab b/Assets/prefabs/weapon/ammobox.prefab index 58aa99b..6976251 100644 --- a/Assets/prefabs/weapon/ammobox.prefab +++ b/Assets/prefabs/weapon/ammobox.prefab @@ -59,9 +59,82 @@ "Static": false, "Surface": null, "SurfaceVelocity": "0,0,0" + }, + { + "__type": "Sandbox.UI.PickupItem", + "__guid": "8546ae27-6c60-4e32-b613-760bc20bd651", + "__enabled": true, + "Label": "E", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RequiresHold": false + }, + { + "__type": "Sandbox.Rigidbody", + "__guid": "4d97a077-f187-44f4-967b-d346530c38d9", + "__enabled": true, + "AngularDamping": 0, + "Gravity": true, + "LinearDamping": 0, + "Locking": { + "X": false, + "Y": false, + "Z": false, + "Pitch": false, + "Yaw": false, + "Roll": false + }, + "MassCenterOverride": "0,0,0", + "MassOverride": 0, + "MotionEnabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OverrideMassCenter": false, + "RigidbodyFlags": 0, + "StartAsleep": false + }, + { + "__type": "Sasalka.InventoryItem", + "__guid": "beaec0c2-ccc3-48b0-8459-5a3f3fe679f1", + "__enabled": true, + "Count": 120, + "Definition": "items/pistol_ammo.inv", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null } ], - "Children": [] + "Children": [], + "__properties": { + "NetworkInterpolation": true, + "TimeScale": 1, + "WantsSystemScene": true, + "Metadata": {}, + "NavMesh": { + "Enabled": false, + "IncludeStaticBodies": true, + "IncludeKeyframedBodies": true, + "EditorAutoUpdate": true, + "AgentHeight": 64, + "AgentRadius": 16, + "AgentStepSize": 18, + "AgentMaxSlope": 40, + "ExcludedBodies": "", + "IncludedBodies": "" + } + }, + "__variables": [] }, "ResourceVersion": 2, "ShowInMenu": false, diff --git a/Assets/prefabs/weapon/pistol_1.prefab b/Assets/prefabs/weapon/pistol_1.prefab index 6d301ab..7e86652 100644 --- a/Assets/prefabs/weapon/pistol_1.prefab +++ b/Assets/prefabs/weapon/pistol_1.prefab @@ -116,6 +116,7 @@ "prefab": "prefabs/impacts/impact.flesh.mist.prefab" }, "Cooldown": 0.5, + "Equipped": false, "GunRenderer": { "_type": "component", "component_id": "6017d24d-39d0-4acf-bf9f-010c345fd13d", @@ -136,6 +137,82 @@ "_type": "gameobject", "prefab": "prefabs/impacts/impact.metal.prefab" } + }, + { + "__type": "Sandbox.UI.PickupItem", + "__guid": "7350112e-dea3-4c22-b9fc-76eaed3d2e57", + "__enabled": true, + "Label": "E", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RequiresHold": false + }, + { + "__type": "Sasalka.InventoryItem", + "__guid": "ce60c131-01f0-4aa3-a84c-c93eac1d1c2d", + "__enabled": true, + "Count": 1, + "Definition": "items/pistol_test.weapon", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null + }, + { + "__type": "Sandbox.BoxCollider", + "__guid": "8a705640-2966-489e-a41a-2bf6f2cc62f0", + "__enabled": true, + "Center": "3.455851,0.294498,1.968303", + "Friction": null, + "IsTrigger": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Scale": "15.11259,2.231525,10.9", + "Static": false, + "Surface": null, + "SurfaceVelocity": "0,0,0" + }, + { + "__type": "Sandbox.Rigidbody", + "__guid": "8b4ca11f-8cd7-4bb5-bb63-df86dac15ab9", + "__enabled": true, + "AngularDamping": 0, + "Gravity": true, + "LinearDamping": 0, + "Locking": { + "X": false, + "Y": false, + "Z": false, + "Pitch": false, + "Yaw": false, + "Roll": false + }, + "MassCenterOverride": "0,0,0", + "MassOverride": 25, + "MotionEnabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OverrideMassCenter": false, + "RigidbodyFlags": 0, + "StartAsleep": false } ], "Children": [ diff --git a/Assets/scenes/minimal.scene b/Assets/scenes/minimal.scene index 236410e..64a543d 100644 --- a/Assets/scenes/minimal.scene +++ b/Assets/scenes/minimal.scene @@ -367,6 +367,387 @@ ], "Children": [] }, + { + "__guid": "ed4e1ff0-f1cf-48f8-8d35-31a1667f3576", + "__version": 1, + "Flags": 0, + "Name": "Teleporters", + "Position": "646.4671,277.7022,-82.21413", + "Rotation": "0,0,0,1", + "Scale": "1,1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [], + "Children": [ + { + "__guid": "2bd92c80-ad40-4ccd-99bf-5fe83196a8a8", + "__version": 1, + "Flags": 0, + "Name": "ToMaze", + "Position": "-646.4671,-741.7021,-685.7859", + "Rotation": "0,0,0,1", + "Scale": "10,10,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ModelRenderer", + "__guid": "57997a7f-70d1-4f9a-969d-60f037f5f951", + "__enabled": true, + "BodyGroups": 18446744073709551615, + "CreateAttachments": false, + "MaterialGroup": null, + "MaterialOverride": "materials/lake_water.vmat", + "Model": "models/dev/box.vmdl", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Tint": "1,1,1,1" + }, + { + "__type": "Sandbox.BoxCollider", + "__guid": "6ea8ea47-9846-4963-8fe3-18a749d66b2c", + "__enabled": true, + "Center": "0,0,0", + "Friction": null, + "IsTrigger": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Scale": "50,50,50", + "Static": true, + "Surface": null, + "SurfaceVelocity": "0,0,0" + } + ], + "Children": [ + { + "__guid": "a5126378-c47f-4692-8581-0e8706d0aacb", + "__version": 1, + "Flags": 0, + "Name": "Trigger", + "Position": "0,0,272", + "Rotation": "0,0,0,1", + "Scale": "1,1,10", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ModelRenderer", + "__guid": "4d31bee4-ade5-4939-924f-508101cab9f3", + "__enabled": true, + "BodyGroups": 18446744073709551615, + "CreateAttachments": false, + "MaterialGroup": null, + "MaterialOverride": "materials/lake_water.vmat", + "Model": "models/dev/box.vmdl", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Tint": "1,1,1,1" + }, + { + "__type": "NormalGravityTrigger", + "__guid": "6eac77b1-2988-4bf4-92a1-e0eef8e3df24", + "__enabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "TriggerOnEnter": true + }, + { + "__type": "Sandbox.BoxCollider", + "__guid": "5cf7bca1-50cc-45c4-a748-df696542f884", + "__enabled": true, + "Center": "0,0,0", + "Friction": null, + "IsTrigger": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Scale": "50,50,50", + "Static": false, + "Surface": null, + "SurfaceVelocity": "0,0,0" + }, + { + "__type": "Sandbox.Gravity.InteractTeleporter", + "__guid": "f68ab101-133c-462b-92c5-280b5d6453dd", + "__enabled": true, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Players": [], + "ToPosGameObject": { + "_type": "gameobject", + "go": "e795ac45-f653-4631-a4b3-d3bdbb3e3906" + } + } + ], + "Children": [ + { + "__guid": "402347d6-2363-418a-ad8f-f4ae79ae6c65", + "__version": 1, + "Flags": 0, + "Name": "Cube", + "Position": "0,0,0", + "Rotation": "0,0,0,1", + "Scale": "-1,-1,-1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ModelRenderer", + "__guid": "b4318fa1-6895-49ba-89e7-a85732852c49", + "__enabled": true, + "BodyGroups": 18446744073709551615, + "CreateAttachments": false, + "MaterialGroup": null, + "MaterialOverride": "materials/glass_tiling/glass_tiling.vmat", + "Model": "models/dev/box.vmdl", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Tint": "1,1,1,1" + } + ], + "Children": [] + }, + { + "__guid": "d6084e92-747a-4676-b0eb-be8b600ed30e", + "__version": 1, + "Flags": 0, + "Name": "ReverbZone", + "Position": "0,0,-2.176532", + "Rotation": "0,0,0,1", + "Scale": "25,25,25", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.DSPReverb", + "__guid": "7293168d-90ba-4897-af3d-e0e01d24e958", + "__enabled": true, + "Bounds": { + "Mins": "-1,-1,-1", + "Maxs": "1,1,1" + }, + "FadeDuration": 1, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Preset": "cavern.medium", + "TargetMixer": { + "Name": "master", + "Id": "4dfafbd4-58c2-4223-844b-6cec64459c2e" + } + } + ], + "Children": [] + } + ] + }, + { + "__guid": "6f2daedd-b436-47ea-9f3e-8a79cc457670", + "__version": 1, + "Flags": 0, + "Name": "Point Light", + "Position": "0,0,250.3864", + "Rotation": "0,0,0,1", + "Scale": "0.1,0.1,1", + "Tags": "light_point,light", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.PointLight", + "__guid": "3cac0ea2-846b-4c92-b50f-e47e335656cf", + "__enabled": true, + "Attenuation": 0.35999995, + "FogMode": "Enabled", + "FogStrength": 1, + "LightColor": "0,0.21667,1,1", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "Radius": 496.10083, + "Shadows": true + } + ], + "Children": [] + }, + { + "__guid": "ae73801b-7ea3-4eb8-8f41-ab853eb9712a", + "__version": 1, + "Flags": 0, + "Name": "TeleportButton", + "Position": "0,-0.3979706,72.00787", + "Rotation": "0,0,0,1", + "Scale": "0.1,0.1,1", + "Tags": "", + "Enabled": true, + "NetworkMode": 2, + "NetworkInterpolation": true, + "NetworkOrphaned": 0, + "OwnerTransfer": 1, + "Components": [ + { + "__type": "Sandbox.ModelRenderer", + "__guid": "54a66842-f810-4e90-9719-f6dfa6bc4d66", + "__enabled": false, + "BodyGroups": 18446744073709551615, + "CreateAttachments": false, + "MaterialGroup": null, + "MaterialOverride": null, + "Model": "models/dev/box.vmdl", + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RenderOptions": { + "GameLayer": true, + "OverlayLayer": false, + "BloomLayer": false, + "AfterUILayer": false + }, + "RenderType": "On", + "Tint": "1,1,1,1" + }, + { + "__type": "Sandbox.BoxCollider", + "__guid": "3af1eac4-8f50-42cb-97c0-ad2278986606", + "__enabled": true, + "Center": "0,1.910728,0", + "Friction": null, + "IsTrigger": false, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "OnObjectTriggerEnter": null, + "OnObjectTriggerExit": null, + "OnTriggerEnter": null, + "OnTriggerExit": null, + "Scale": "50,36.93199,50", + "Static": true, + "Surface": null, + "SurfaceVelocity": "0,0,0" + }, + { + "__type": "Sandbox.UI.TeleportMazeButton", + "__guid": "7ffb2d9a-1293-4f9f-b74d-35e64fb8e75e", + "__enabled": true, + "Label": "Teleport to maze", + "Maze": { + "_type": "component", + "component_id": "12721768-2c59-4036-99e4-6d0c8e85ca0e", + "go": "4d4d0077-7867-468f-a33d-fac08206b750", + "component_type": "Maze" + }, + "OnComponentDestroy": null, + "OnComponentDisabled": null, + "OnComponentEnabled": null, + "OnComponentFixedUpdate": null, + "OnComponentStart": null, + "OnComponentUpdate": null, + "RequiresHold": false, + "Teleporter": { + "_type": "component", + "component_id": "f68ab101-133c-462b-92c5-280b5d6453dd", + "go": "a5126378-c47f-4692-8581-0e8706d0aacb", + "component_type": "InteractTeleporter" + } + } + ], + "Children": [] + } + ] + } + ] + }, { "__guid": "0cf0ef22-6c88-4ae0-a1e6-db2ddcdb311c", "__version": 1, @@ -1274,369 +1655,6 @@ } ] }, - { - "__guid": "2bd92c80-ad40-4ccd-99bf-5fe83196a8a8", - "__version": 1, - "Flags": 0, - "Name": "ToMaze", - "Position": "0,-464,-768", - "Rotation": "0,0,0,1", - "Scale": "10,10,1", - "Tags": "", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.ModelRenderer", - "__guid": "57997a7f-70d1-4f9a-969d-60f037f5f951", - "__enabled": true, - "BodyGroups": 18446744073709551615, - "CreateAttachments": false, - "MaterialGroup": null, - "MaterialOverride": "materials/lake_water.vmat", - "Model": "models/dev/box.vmdl", - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "RenderOptions": { - "GameLayer": true, - "OverlayLayer": false, - "BloomLayer": false, - "AfterUILayer": false - }, - "RenderType": "On", - "Tint": "1,1,1,1" - }, - { - "__type": "Sandbox.BoxCollider", - "__guid": "6ea8ea47-9846-4963-8fe3-18a749d66b2c", - "__enabled": true, - "Center": "0,0,0", - "Friction": null, - "IsTrigger": false, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "OnObjectTriggerEnter": null, - "OnObjectTriggerExit": null, - "OnTriggerEnter": null, - "OnTriggerExit": null, - "Scale": "50,50,50", - "Static": true, - "Surface": null, - "SurfaceVelocity": "0,0,0" - } - ], - "Children": [ - { - "__guid": "a5126378-c47f-4692-8581-0e8706d0aacb", - "__version": 1, - "Flags": 0, - "Name": "Trigger", - "Position": "0,0,272", - "Rotation": "0,0,0,1", - "Scale": "1,1,10", - "Tags": "", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.ModelRenderer", - "__guid": "4d31bee4-ade5-4939-924f-508101cab9f3", - "__enabled": true, - "BodyGroups": 18446744073709551615, - "CreateAttachments": false, - "MaterialGroup": null, - "MaterialOverride": "materials/lake_water.vmat", - "Model": "models/dev/box.vmdl", - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "RenderOptions": { - "GameLayer": true, - "OverlayLayer": false, - "BloomLayer": false, - "AfterUILayer": false - }, - "RenderType": "On", - "Tint": "1,1,1,1" - }, - { - "__type": "NormalGravityTrigger", - "__guid": "6eac77b1-2988-4bf4-92a1-e0eef8e3df24", - "__enabled": true, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "TriggerOnEnter": true - }, - { - "__type": "Sandbox.BoxCollider", - "__guid": "5cf7bca1-50cc-45c4-a748-df696542f884", - "__enabled": true, - "Center": "0,0,0", - "Friction": null, - "IsTrigger": true, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "OnObjectTriggerEnter": null, - "OnObjectTriggerExit": null, - "OnTriggerEnter": null, - "OnTriggerExit": null, - "Scale": "50,50,50", - "Static": false, - "Surface": null, - "SurfaceVelocity": "0,0,0" - }, - { - "__type": "Sandbox.Gravity.InteractTeleporter", - "__guid": "f68ab101-133c-462b-92c5-280b5d6453dd", - "__enabled": true, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "Players": [], - "ToPosGameObject": { - "_type": "gameobject", - "go": "e795ac45-f653-4631-a4b3-d3bdbb3e3906" - } - } - ], - "Children": [ - { - "__guid": "402347d6-2363-418a-ad8f-f4ae79ae6c65", - "__version": 1, - "Flags": 0, - "Name": "Cube", - "Position": "0,0,0", - "Rotation": "0,0,0,1", - "Scale": "-1,-1,-1", - "Tags": "", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.ModelRenderer", - "__guid": "b4318fa1-6895-49ba-89e7-a85732852c49", - "__enabled": true, - "BodyGroups": 18446744073709551615, - "CreateAttachments": false, - "MaterialGroup": null, - "MaterialOverride": "materials/glass_tiling/glass_tiling.vmat", - "Model": "models/dev/box.vmdl", - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "RenderOptions": { - "GameLayer": true, - "OverlayLayer": false, - "BloomLayer": false, - "AfterUILayer": false - }, - "RenderType": "On", - "Tint": "1,1,1,1" - } - ], - "Children": [] - }, - { - "__guid": "d6084e92-747a-4676-b0eb-be8b600ed30e", - "__version": 1, - "Flags": 0, - "Name": "ReverbZone", - "Position": "0,0,-2.176532", - "Rotation": "0,0,0,1", - "Scale": "25,25,25", - "Tags": "", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.DSPReverb", - "__guid": "7293168d-90ba-4897-af3d-e0e01d24e958", - "__enabled": true, - "Bounds": { - "Mins": "-1,-1,-1", - "Maxs": "1,1,1" - }, - "FadeDuration": 1, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "Preset": "cavern.medium", - "TargetMixer": { - "Name": "master", - "Id": "4dfafbd4-58c2-4223-844b-6cec64459c2e" - } - } - ], - "Children": [] - } - ] - }, - { - "__guid": "6f2daedd-b436-47ea-9f3e-8a79cc457670", - "__version": 1, - "Flags": 0, - "Name": "Point Light", - "Position": "0,0,250.3864", - "Rotation": "0,0,0,1", - "Scale": "0.1,0.1,1", - "Tags": "light_point,light", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.PointLight", - "__guid": "3cac0ea2-846b-4c92-b50f-e47e335656cf", - "__enabled": true, - "Attenuation": 0.35999995, - "FogMode": "Enabled", - "FogStrength": 1, - "LightColor": "0,0.21667,1,1", - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "Radius": 496.10083, - "Shadows": true - } - ], - "Children": [] - }, - { - "__guid": "ae73801b-7ea3-4eb8-8f41-ab853eb9712a", - "__version": 1, - "Flags": 0, - "Name": "TeleportButton", - "Position": "0,-0.3979706,72.00787", - "Rotation": "0,0,0,1", - "Scale": "0.1,0.1,1", - "Tags": "", - "Enabled": true, - "NetworkMode": 2, - "NetworkInterpolation": true, - "NetworkOrphaned": 0, - "OwnerTransfer": 1, - "Components": [ - { - "__type": "Sandbox.ModelRenderer", - "__guid": "54a66842-f810-4e90-9719-f6dfa6bc4d66", - "__enabled": false, - "BodyGroups": 18446744073709551615, - "CreateAttachments": false, - "MaterialGroup": null, - "MaterialOverride": null, - "Model": "models/dev/box.vmdl", - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "RenderOptions": { - "GameLayer": true, - "OverlayLayer": false, - "BloomLayer": false, - "AfterUILayer": false - }, - "RenderType": "On", - "Tint": "1,1,1,1" - }, - { - "__type": "Sandbox.BoxCollider", - "__guid": "3af1eac4-8f50-42cb-97c0-ad2278986606", - "__enabled": true, - "Center": "0,1.910728,0", - "Friction": null, - "IsTrigger": false, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "OnObjectTriggerEnter": null, - "OnObjectTriggerExit": null, - "OnTriggerEnter": null, - "OnTriggerExit": null, - "Scale": "50,36.93199,50", - "Static": true, - "Surface": null, - "SurfaceVelocity": "0,0,0" - }, - { - "__type": "Sandbox.UI.TeleportMazeButton", - "__guid": "7ffb2d9a-1293-4f9f-b74d-35e64fb8e75e", - "__enabled": true, - "Label": "Teleport to maze", - "Maze": { - "_type": "component", - "component_id": "12721768-2c59-4036-99e4-6d0c8e85ca0e", - "go": "4d4d0077-7867-468f-a33d-fac08206b750", - "component_type": "Maze" - }, - "OnComponentDestroy": null, - "OnComponentDisabled": null, - "OnComponentEnabled": null, - "OnComponentFixedUpdate": null, - "OnComponentStart": null, - "OnComponentUpdate": null, - "RequiresHold": false, - "Teleporter": { - "_type": "component", - "component_id": "f68ab101-133c-462b-92c5-280b5d6453dd", - "go": "a5126378-c47f-4692-8581-0e8706d0aacb", - "component_type": "InteractTeleporter" - } - } - ], - "Children": [] - } - ] - }, { "__guid": "285c9910-d341-4fa0-9e80-c89a2e31f4cb", "__version": 1, @@ -4886,6 +4904,300 @@ "OwnerTransfer": 1, "Components": [], "Children": [] + }, + { + "__guid": "ed38018e-ba08-41ba-a55c-6dbc515b431e", + "__version": 1, + "__Prefab": "prefabs/weapon/pistol_1.prefab", + "__PrefabInstancePatch": { + "AddedObjects": [], + "RemovedObjects": [], + "PropertyOverrides": [ + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "Position", + "Value": "48,432.6396,-732.2083" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "Rotation", + "Value": "0,-0.00000008940697,0.7071068,-0.7071067" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkMode", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkInterpolation", + "Value": true + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkOrphaned", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "OwnerTransfer", + "Value": 0 + } + ], + "MovedObjects": [] + }, + "__PrefabIdToInstanceId": { + "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb": "ed38018e-ba08-41ba-a55c-6dbc515b431e", + "6017d24d-39d0-4acf-bf9f-010c345fd13d": "7a573614-f78a-4fcc-b037-ef735134c48b", + "be95c906-5f2f-4239-8fd6-a42a148dea6e": "3d90b24c-19c8-4ccc-bb83-65e2e9960927", + "fc38d078-995b-443a-b409-e877618fcf09": "fa560b5e-2e01-4119-a664-d5d34ab25267", + "eda01dbe-7e56-4e66-af99-673e197e7dc0": "d5e0960d-356b-4f7e-9510-7d51dbe9b6c3", + "1e1e54b4-ebf1-4211-9ca9-0eaa37f7bf7e": "63b93a39-6d01-4722-9642-c596896ad8aa", + "d81748e9-bc3d-4d68-97b5-5602bf5e0e15": "d9905786-0a0f-457a-9596-6cbc835d4542", + "47bb3ba1-b0de-4af4-b639-235a5ad2c312": "10f33f1a-a25a-415c-ae5e-5f26b8d4675e", + "862e0738-e57f-456a-b0c8-ff03a165faf9": "701f96b9-7954-46eb-ad44-4c29b4a8b864", + "a9d8c3d0-cbcb-4ebe-994c-5f4c36f08996": "063a1722-e398-4cad-b070-85d49e1bf2a6", + "e1b93001-f96d-474d-bd6f-aaa2acb0d33e": "b760f91f-b71d-4337-b5fa-d8cd81ff8f91", + "0e9f41d3-8000-4c3c-9cdd-076056da9d0a": "8cf5cfa0-f7e1-452f-84f1-d94576887a9e", + "3803bdb5-aa92-46f7-91a6-1dfad9549cf4": "54517d7d-fd3a-46a3-883a-c7ca10880f99", + "8b4ca11f-8cd7-4bb5-bb63-df86dac15ab9": "649b8538-f131-4363-81bb-c229ef58f88e", + "7350112e-dea3-4c22-b9fc-76eaed3d2e57": "88c214da-7f83-45b6-bee6-f04451e433a6", + "8a705640-2966-489e-a41a-2bf6f2cc62f0": "4f66ecd1-1144-4598-998c-d9d7e53f1e4f", + "ce60c131-01f0-4aa3-a84c-c93eac1d1c2d": "9557f709-69c3-4748-8b33-bfb2b16b3214" + } + }, + { + "__guid": "2667ad9c-a819-4d01-b404-c319e5361290", + "__version": 1, + "__Prefab": "prefabs/weapon/pistol_1.prefab", + "__PrefabInstancePatch": { + "AddedObjects": [], + "RemovedObjects": [], + "PropertyOverrides": [ + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "Name", + "Value": "pistol_1 (1)" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "Position", + "Value": "16,432.6396,-732.2083" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "Rotation", + "Value": "0,-0.00000008940697,0.7071068,-0.7071067" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkMode", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkInterpolation", + "Value": true + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "NetworkOrphaned", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb" + }, + "Property": "OwnerTransfer", + "Value": 0 + } + ], + "MovedObjects": [] + }, + "__PrefabIdToInstanceId": { + "dec3b7f3-79ae-4bb4-b868-8de9d0306ebb": "2667ad9c-a819-4d01-b404-c319e5361290", + "6017d24d-39d0-4acf-bf9f-010c345fd13d": "babc98aa-2744-4693-86b0-9fc7d9f0e65c", + "be95c906-5f2f-4239-8fd6-a42a148dea6e": "db4b7440-0d9e-4eae-9443-1d4bf44064c5", + "fc38d078-995b-443a-b409-e877618fcf09": "867b43c0-e8b8-4354-8782-3202290b5e73", + "eda01dbe-7e56-4e66-af99-673e197e7dc0": "37ea07f3-aa10-4a85-96ff-0242cf79b92e", + "1e1e54b4-ebf1-4211-9ca9-0eaa37f7bf7e": "d9b7089d-e480-4c7f-b936-a72d5f42bc47", + "d81748e9-bc3d-4d68-97b5-5602bf5e0e15": "3cdcd318-51d2-40ba-ab96-e0f8ebf54b07", + "47bb3ba1-b0de-4af4-b639-235a5ad2c312": "1de9f71e-2811-4668-b13d-499ce2459db1", + "862e0738-e57f-456a-b0c8-ff03a165faf9": "05acde1b-eab6-4588-8f45-f3c16ee9568c", + "a9d8c3d0-cbcb-4ebe-994c-5f4c36f08996": "630fd1cf-3fa9-4a70-a375-c2d6b5612508", + "e1b93001-f96d-474d-bd6f-aaa2acb0d33e": "91bfa52a-0828-4788-8e80-80db06f1b759", + "0e9f41d3-8000-4c3c-9cdd-076056da9d0a": "7b2489d4-8602-4f32-9df4-bbb298f08d30", + "3803bdb5-aa92-46f7-91a6-1dfad9549cf4": "79507d1a-90dd-482a-aa69-8bf99c31a991", + "8b4ca11f-8cd7-4bb5-bb63-df86dac15ab9": "ab0618cf-2b53-4bf6-8eeb-9ecda7d1f788", + "7350112e-dea3-4c22-b9fc-76eaed3d2e57": "b9d50ca0-eaec-4701-b76b-ab9804cb872f", + "8a705640-2966-489e-a41a-2bf6f2cc62f0": "6371d0ed-2393-4482-a1e0-5715079f621c", + "ce60c131-01f0-4aa3-a84c-c93eac1d1c2d": "90d28cd6-85a6-4202-b546-e6fb9895787b" + } + }, + { + "__guid": "b555e40d-18e7-4f18-bc47-31efa015582e", + "__version": 1, + "__Prefab": "prefabs/weapon/ammobox.prefab", + "__PrefabInstancePatch": { + "AddedObjects": [], + "RemovedObjects": [], + "PropertyOverrides": [ + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "Position", + "Value": "15.82259,401.5467,-737.8055" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "Rotation", + "Value": "0,-0.00000008940697,0.7071068,-0.7071067" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "NetworkMode", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "NetworkOrphaned", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "OwnerTransfer", + "Value": 0 + } + ], + "MovedObjects": [] + }, + "__PrefabIdToInstanceId": { + "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec": "b555e40d-18e7-4f18-bc47-31efa015582e", + "ee9d15a8-ffe9-43f1-b6b4-2f04ce55c908": "0601507b-0f7a-4327-8aca-789e11756c0d", + "5830c995-d747-4c8c-abd7-b0366fa2a2aa": "d82766d4-543d-407f-aa95-986ff1a8b9fb", + "8546ae27-6c60-4e32-b613-760bc20bd651": "9fd81c4d-c8bd-413c-896a-8f3b515a8629", + "4d97a077-f187-44f4-967b-d346530c38d9": "fa766bec-57b9-4b14-b313-7a5adc1a6922", + "beaec0c2-ccc3-48b0-8459-5a3f3fe679f1": "4c482c92-b22b-4480-bbc0-e9de5006c768" + } + }, + { + "__guid": "39a481c2-4aae-4407-98f5-975fed929f02", + "__version": 1, + "__Prefab": "prefabs/weapon/ammobox.prefab", + "__PrefabInstancePatch": { + "AddedObjects": [], + "RemovedObjects": [], + "PropertyOverrides": [ + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "Name", + "Value": "ammobox (1)" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "Position", + "Value": "64,401.5467,-737.8055" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "Rotation", + "Value": "0,-0.00000008940697,0.7071068,-0.7071067" + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "NetworkMode", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "NetworkOrphaned", + "Value": 1 + }, + { + "Target": { + "Type": "GameObject", + "IdValue": "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec" + }, + "Property": "OwnerTransfer", + "Value": 0 + } + ], + "MovedObjects": [] + }, + "__PrefabIdToInstanceId": { + "e5e018f2-9cad-4ece-b160-ab2aa3aeb7ec": "39a481c2-4aae-4407-98f5-975fed929f02", + "ee9d15a8-ffe9-43f1-b6b4-2f04ce55c908": "4677cfa0-faa2-4369-a69b-46c87173224a", + "5830c995-d747-4c8c-abd7-b0366fa2a2aa": "bbbc140b-184d-4fd3-9504-30d923525a3d", + "8546ae27-6c60-4e32-b613-760bc20bd651": "9a066900-b6ad-47cb-8357-79802078d3ad", + "4d97a077-f187-44f4-967b-d346530c38d9": "69a9029a-1ce5-4786-8fb3-435d09c4949d", + "beaec0c2-ccc3-48b0-8459-5a3f3fe679f1": "08e417ef-ba4d-482b-8d19-b6c38a5ada2b" + } } ], "SceneProperties": { diff --git a/Code/Inventory/Definitions/BaseItemDefinition.cs b/Code/Inventory/Definitions/BaseItemDefinition.cs index d843ecb..b7c0bec 100644 --- a/Code/Inventory/Definitions/BaseItemDefinition.cs +++ b/Code/Inventory/Definitions/BaseItemDefinition.cs @@ -9,4 +9,6 @@ public class BaseItemDefinition : GameResource [ResourceType( "prefab" )] public GameObject Prefab { get; set; } public Texture ImageTexture { get; set; } public string ImageUrl { get; set; } + + public int MaxCount { get; set; } = 1; } diff --git a/Code/Inventory/Inventar.cs b/Code/Inventory/Inventar.cs index 33fa20d..55c8304 100644 --- a/Code/Inventory/Inventar.cs +++ b/Code/Inventory/Inventar.cs @@ -36,34 +36,50 @@ public class Inventar OnChanged?.Invoke(); } - // public void EquipItem( InventoryItem item ) - // { - // if ( EquippedItems.ContainsValue( item ) ) - // { - // UnEquipItem( item ); - // } - // else - // { - // EquippedItems.Add( item.Definition.Slot, item ); - // OnEquipped?.Invoke( item ); - // } - // } - public void EquipItem( InventoryItem item ) { - if ( item.Definition is not IEquipable equipable ) return; + if ( item.Definition is not IEquipable equipable ) + return; + // Если уже экипирован этот же предмет — снять его if ( EquippedItems.ContainsValue( item ) ) { UnEquipItem( item ); + return; } - else + + // Если на этом слоте уже что-то есть — снять старый предмет + if ( EquippedItems.TryGetValue( equipable.Slot, out var oldItem ) ) { - EquippedItems[equipable.Slot] = item; - OnEquipped?.Invoke( item ); + UnEquipItem( oldItem ); + + // Вернуть снятый предмет обратно в инвентарь, если его там нет + if ( !Items.Contains( oldItem ) ) + Items.Add( oldItem ); } + + // Экипировать новый предмет + EquippedItems[equipable.Slot] = item; + OnEquipped?.Invoke( item ); } + public void DropItem( InventoryItem item, Vector3 position ) + { + var gO = item.Definition.Prefab.Clone( position ); + + if ( gO.Components.TryGet( out var inventoryItem ) ) + { + inventoryItem.Count = item.Count; + } + + gO.NetworkSpawn( null ); + + RemoveItem( item ); + // Items.Remove( item ); + // OnChanged?.Invoke(); + } + + public void UnEquipItem( InventoryItem item ) { foreach ( var kvp in EquippedItems.Where( kvp => kvp.Value == item ).ToList() ) diff --git a/Code/Inventory/InventoryItem.cs b/Code/Inventory/InventoryItem.cs index a77ec1f..87e9d3f 100644 --- a/Code/Inventory/InventoryItem.cs +++ b/Code/Inventory/InventoryItem.cs @@ -4,7 +4,6 @@ namespace Sasalka; public class InventoryItem : Component { - public BaseItemDefinition Definition { get; set; } - public int Count { get; set; } = 1; - public int MaxCount { get; set; } = 1; + [Property] public BaseItemDefinition Definition { get; set; } + [Property] public int Count { get; set; } = 1; } diff --git a/Code/Inventory/Ui/Inventory.razor b/Code/Inventory/Ui/Inventory.razor index 1c4fe44..0f4e13f 100644 --- a/Code/Inventory/Ui/Inventory.razor +++ b/Code/Inventory/Ui/Inventory.razor @@ -4,9 +4,12 @@
- @foreach ( var item in PlayerInventory.Items ) + @if ( PlayerInventory.Items.Count > 0 ) { - + @foreach ( var item in PlayerInventory.Items ) + { + + } }
@@ -21,6 +24,11 @@ Player?.Inventory?.EquipItem( item ); } + void DropItem( Sasalka.InventoryItem item ) + { + Player?.Inventory?.DropItem( item, Player.CameraPivot.WorldPosition + Player.Camera.LocalRotation.Right * 50 ); + } + protected override void OnUpdate() { if ( Input.Pressed( "Score" ) ) diff --git a/Code/Inventory/Ui/InventoryItem.razor b/Code/Inventory/Ui/InventoryItem.razor index 5ef6c41..90365e7 100644 --- a/Code/Inventory/Ui/InventoryItem.razor +++ b/Code/Inventory/Ui/InventoryItem.razor @@ -3,8 +3,10 @@ @inherits Sandbox.UI.Panel @namespace Sasalka.Ui - - + OnItemRightClick?.Invoke( Item ) )> + + @* *@ + @if ( Item.Definition.ImageTexture.IsValid() ) { @Item.Definition.Name @@ -16,12 +18,17 @@
@Item?.Definition.Name
-
@Item?.Count / @Item?.MaxCount
+ @if ( Item?.Definition.MaxCount > 1 ) + { +
@Item?.Count / @Item?.Definition.MaxCount
+ }
@code { public Sasalka.InventoryItem Item { get; set; } public Action OnItemClick { get; set; } + public Action OnItemRightClick { get; set; } + public bool Equipped { get; set; } protected override int BuildHash() diff --git a/Code/Inventory/Usable/AmmoUseableBase.cs b/Code/Inventory/Usable/AmmoUseableBase.cs index 940b9b0..d7d412c 100644 --- a/Code/Inventory/Usable/AmmoUseableBase.cs +++ b/Code/Inventory/Usable/AmmoUseableBase.cs @@ -6,8 +6,7 @@ public abstract class AmmoUseableBase : UseableBase private InventoryItem FindAmmoItem() { - // var ammoDefinition = new InventoryItemDefinition(); - + //По типу патрон поиск + енум типа патрон return Dedugan.Local.Inventory.Items.FirstOrDefault( i => i.Definition.Name == "Pistol Ammo" ); } @@ -28,7 +27,6 @@ public abstract class AmmoUseableBase : UseableBase if ( ammo != null ) { ammo.Count--; - Log.Info( $"[AmmoUseableBase] Ammo left: {ammo.Count}" ); if ( ammo.Count <= 0 ) { diff --git a/Code/Inventory/Usable/PickupItem.cs b/Code/Inventory/Usable/PickupItem.cs new file mode 100644 index 0000000..4f1638a --- /dev/null +++ b/Code/Inventory/Usable/PickupItem.cs @@ -0,0 +1,29 @@ +using Sandbox.Gravity; +using Sasalka; + +namespace Sandbox.UI; + +[Icon( "skip_next" )] +public sealed class PickupItem : InteractionButton +{ + [Property] public override string Label { get; set; } = "E"; + + public override bool Press( IPressable.Event e ) + { + base.Press( e ); + + if ( e.Source.Components.TryGet( out var dedugan ) ) + { + dedugan.Inventory.AddItem( Components.Get() ); + RpcDestroy(); + } + + return true; + } + + [Rpc.Broadcast] + void RpcDestroy() + { + GameObject.Destroy(); + } +} diff --git a/Code/Inventory/Usable/UseSystem.cs b/Code/Inventory/Usable/UseSystem.cs index 61d4b4d..5700ddc 100644 --- a/Code/Inventory/Usable/UseSystem.cs +++ b/Code/Inventory/Usable/UseSystem.cs @@ -2,14 +2,17 @@ public static class UseSystem { - public static void TryUse( IUseContext context ) + public static bool TryUse( IUseContext context ) { foreach ( var useable in context.GetUsables() ) { if ( useable.CanUse() ) { useable.Use(); + return true; } } + + return false; } } diff --git a/Code/Inventory/Usable/UseableBase.cs b/Code/Inventory/Usable/UseableBase.cs index 78bd32a..a77f6cb 100644 --- a/Code/Inventory/Usable/UseableBase.cs +++ b/Code/Inventory/Usable/UseableBase.cs @@ -6,11 +6,38 @@ public abstract class UseableBase : Component, IUseable { [Property] public float Cooldown { get; set; } = 0.5f; - private TimeSince _timeSinceUsed; + private bool _equipped; - protected override void OnStart() + [Property] + public bool Equipped + { + get => _equipped; + set + { + if ( _equipped != value ) + { + _equipped = value; + if ( _equipped ) + { + OnEquip?.Invoke(); + } + } + } + } + + private TimeSince _timeSinceUsed; + public Action OnEquip { get; set; } + + protected override void OnAwake() { _timeSinceUsed = Cooldown; + + OnEquip += OnEquipped; + } + + public virtual void OnEquipped() + { + Log.Info( $"OnEquip {this}" ); } public virtual bool CanUse() diff --git a/Code/Player/Dedugan.Interaction.cs b/Code/Player/Dedugan.Interaction.cs index 40f587a..320a731 100644 --- a/Code/Player/Dedugan.Interaction.cs +++ b/Code/Player/Dedugan.Interaction.cs @@ -13,18 +13,9 @@ public sealed partial class Dedugan : Component [Sync] public bool CameraTraceIsHit { get; set; } public Vector3 TracedHitNormal { get; set; } - // private TimeSince HoldTime = 0; - // private bool Holding = false; - // private bool HoldingInteractionHappened = false; - void InteractionsUpdate() { - if ( !EnablePressing ) - { - // Holding = false; - // HoldingInteractionHappened = false; - return; - } + if ( !EnablePressing ) return; if ( Pressed.IsValid() ) { @@ -66,6 +57,8 @@ public sealed partial class Dedugan : Component private void UpdateHovered() { + if ( Pressed.IsValid() ) return; + SwitchHovered( TryGetLookedAt() ); if ( Hovered is IPressable pressable ) @@ -76,15 +69,19 @@ public sealed partial class Dedugan : Component } ); } - if ( Input.Down( "use" ) ) + if ( Input.Pressed( "use" ) ) { StartPressing( Hovered ); } } + public void StartPressing( Component obj ) { + if ( Pressed == obj ) return; + StopPressing(); + if ( !obj.IsValid() ) { ISceneEvent.PostToGameObject( GameObject, x => x.FailPressing() ); @@ -162,37 +159,30 @@ public sealed partial class Dedugan : Component private Component TryGetLookedAt() { - for ( float num = 0f; num <= 4f; num += 2f ) + var from = Scene.Camera.WorldPosition + Scene.Camera.WorldRotation.Forward; + var to = from + Scene.Camera.WorldRotation.Forward * InteractDistance; + + var trace = Scene.Trace + .Ray( from, to ) + .IgnoreGameObjectHierarchy( GameObject ) + .Run(); + + TracedHitPos = trace.Hit ? trace.HitPosition : trace.EndPosition; + CameraTraceIsHit = trace.Hit; + TracedHitNormal = trace.Normal; + + if ( !trace.Hit || !trace.GameObject.IsValid() ) return null; + + var go = trace.GameObject; + + var pressable = go.Components.Get( FindMode.EnabledInSelfAndDescendants ); + + if ( pressable != null && pressable.CanPress( new IPressable.Event + { + Ray = new Ray( Camera.WorldPosition, EyeAngles.ToRotation().Forward ), Source = this + } ) ) { - var from = Scene.Camera.WorldPosition + Scene.Camera.WorldRotation.Forward; - var to = from + Scene.Camera.WorldRotation.Forward * (InteractDistance - num); - var trace = Scene.Trace.Ray( from, to ).IgnoreGameObjectHierarchy( GameObject ).Radius( num ).Run(); - - TracedHitPos = trace.Hit ? trace.HitPosition : trace.EndPosition; - CameraTraceIsHit = trace.Hit; - TracedHitNormal = trace.Normal; - - if ( !trace.Hit || !trace.GameObject.IsValid() ) continue; - - Component foundComponent = null; - - ISceneEvent.PostToGameObject( GameObject, x => - { - foundComponent = x.GetUsableComponent( trace.GameObject ) ?? foundComponent; - } ); - - if ( foundComponent.IsValid() ) return foundComponent; - - foreach ( var component in trace.GameObject.Components.GetAll() ) - { - if ( component.CanPress( new IPressable.Event - { - Ray = new Ray( Camera.WorldPosition, EyeAngles.ToRotation().Forward ), Source = this - } ) ) - { - return component as Component; - } - } + return pressable as Component; } return null; diff --git a/Code/Player/Dedugan.Inventory.cs b/Code/Player/Dedugan.Inventory.cs index 7825a70..81645ec 100644 --- a/Code/Player/Dedugan.Inventory.cs +++ b/Code/Player/Dedugan.Inventory.cs @@ -16,29 +16,29 @@ public sealed partial class Dedugan : Component _resolver = new AttachmentSlotResolver( Renderer.GetAttachmentObject ); - Inventory.AddItem( new InventoryItem - { - Definition = ResourceLibrary.Get( "Items/cloth_pijama.clitem" ) - } ); - // Inventory.AddItem( new InventoryItem // { - // Definition = ResourceLibrary.Get( "Items/shorts_1.inv" ) + // Definition = ResourceLibrary.Get( "Items/cloth_pijama.clitem" ) // } ); - - Inventory.AddItem( new InventoryItem - { - Definition = ResourceLibrary.Get( "Items/pistol_test.weapon" ) - } ); - - var ammo = new InventoryItem - { - Definition = ResourceLibrary.Get( "Items/pistol_ammo.inv" ) - }; - ammo.Count = 30; - ammo.MaxCount = 130; - - Inventory.AddItem( ammo ); + // + // Inventory.AddItem( new InventoryItem + // { + // Definition = ResourceLibrary.Get( "Items/cloth_pijama_bottom.clitem" ) + // } ); + // + // Inventory.AddItem( new InventoryItem + // { + // Definition = ResourceLibrary.Get( "Items/pistol_test.weapon" ) + // } ); + // + // var ammo = new InventoryItem + // { + // Definition = ResourceLibrary.Get( "Items/pistol_ammo.inv" ) + // }; + // ammo.Count = 30; + // ammo.MaxCount = 130; + // + // Inventory.AddItem( ammo ); Inventory.OnEquipped += OnItemEquipped; Inventory.OnUnEquipped += OnItemUnEquipped; @@ -70,6 +70,8 @@ public sealed partial class Dedugan : Component go.LocalPosition = weaponDef.WeaponDefinition.Position; go.LocalRotation = weaponDef.WeaponDefinition.Rotation; + go.Components.Get().Equipped = true; + go.NetworkSpawn(); var hand = weaponDef.Slot switch @@ -145,8 +147,10 @@ public sealed partial class Dedugan : Component if ( Input.Pressed( "Attack1" ) ) { - UseSystem.TryUse( this ); - Attack(); + if ( UseSystem.TryUse( this ) ) + { + Attack(); + } } } diff --git a/Code/UI/InteractionButton.cs b/Code/UI/InteractionButton.cs index d780cd1..155327a 100644 --- a/Code/UI/InteractionButton.cs +++ b/Code/UI/InteractionButton.cs @@ -4,7 +4,7 @@ namespace Sandbox.UI; public abstract class InteractionButton : Component, Component.IPressable { - [Property] public string Label { get; set; } = "Label"; + [Property] public virtual string Label { get; set; } = "Label"; [Property] public bool RequiresHold { get; set; } = false; private HoverInfoPanel _uiPanel; private GameObject _interactionPanelPrefab { get; set; } @@ -12,25 +12,24 @@ public abstract class InteractionButton : Component, Component.IPressable protected override void OnStart() { base.OnStart(); - - _interactionPanelPrefab = GameObject.GetPrefab("prefabs/InteractionPanel.prefab"); - Log.Info(_interactionPanelPrefab.Name); - Assert.True(_interactionPanelPrefab.IsValid(), $"No InteractionPanel prefab found for {GameObject.Name}!"); + + _interactionPanelPrefab = GameObject.GetPrefab( "prefabs/InteractionPanel.prefab" ); + Assert.True( _interactionPanelPrefab.IsValid(), $"No InteractionPanel prefab found for {GameObject.Name}!" ); } - public virtual void Hover(IPressable.Event e) + public virtual void Hover( IPressable.Event e ) { CreatePanel(); } - public virtual void Blur(IPressable.Event e) + public virtual void Blur( IPressable.Event e ) { DestroyPanel(); } - public virtual void Look(IPressable.Event e) + public virtual void Look( IPressable.Event e ) { - if (_uiPanel != null) + if ( _uiPanel != null ) { _uiPanel.ProgressionHold = 0f; } @@ -40,34 +39,39 @@ public abstract class InteractionButton : Component, Component.IPressable { return true; } - - public virtual bool Press(IPressable.Event e) + + public virtual bool Press( IPressable.Event e ) { - if (_uiPanel != null) + // // Проверяем, что событие относится именно к этому объекту + // if ( e.Source.GameObject != this.GameObject ) + // return false; // Игнорируем, событие для другого объекта + + if ( _uiPanel != null ) { - _uiPanel?.SetPressed(true); + _uiPanel.SetPressed( true ); } - - return true; + + return false; } - public virtual void Release(IPressable.Event e) + + public virtual void Release( IPressable.Event e ) { - if (_uiPanel != null) + if ( _uiPanel != null ) { - _uiPanel?.SetPressed(false); + _uiPanel?.SetPressed( false ); } } protected void CreatePanel() { - if (_uiPanel != null) return; + if ( _uiPanel != null ) return; var panelGo = _interactionPanelPrefab.Clone(); panelGo.WorldPosition = WorldPosition; panelGo.Parent = Scene; _uiPanel = panelGo.Components.Get(); - if (_uiPanel != null) + if ( _uiPanel != null ) { _uiPanel.InteractionString = Label; _uiPanel.IsHoldInteraction = RequiresHold; @@ -75,13 +79,13 @@ public abstract class InteractionButton : Component, Component.IPressable } } - protected async void DestroyPanel() + protected void DestroyPanel() { - if (_uiPanel == null) return; + if ( _uiPanel == null ) return; _uiPanel.GameObject.Destroy(); _uiPanel = null; - await Task.DelaySeconds(0.05f); + // await Task.DelaySeconds(0.05f); } } diff --git a/Code/UI/TeleportMazeButton.cs b/Code/UI/TeleportMazeButton.cs index 4798587..58fd455 100644 --- a/Code/UI/TeleportMazeButton.cs +++ b/Code/UI/TeleportMazeButton.cs @@ -13,13 +13,20 @@ public sealed class TeleportMazeButton : InteractionButton public override bool Press( IPressable.Event e ) { base.Press( e ); - if ( Maze.IsValid() ) - { - Maze.RpcRequestMaze(); - } - DoTeleport(); - return true; + return false; + // if ( Maze.IsValid() ) + // { + // Maze.RpcRequestMaze(); + // } + // else + // { + // Log.Info( "pressed teleport maze" ); + // return false; + // } + // + // DoTeleport(); + // return true; } private async void DoTeleport() diff --git a/Code/Weapons/Weapon.cs b/Code/Weapons/Weapon.cs index d607172..2396f6f 100644 --- a/Code/Weapons/Weapon.cs +++ b/Code/Weapons/Weapon.cs @@ -1,4 +1,5 @@ using System.Threading.Tasks; +using Sandbox.UI; using Sasalka; namespace Sandbox.Weapons; @@ -11,6 +12,7 @@ public sealed class Weapon : AmmoUseableBase [Property] public GameObject bloodParticle { get; set; } private SoundPointComponent _sound; + private Rigidbody _rigidbody; protected override void OnStart() { @@ -18,6 +20,13 @@ public sealed class Weapon : AmmoUseableBase _sound = GameObject.GetComponent( true ); } + public override void OnEquipped() + { + _rigidbody = GameObject.Components.Get(); + _rigidbody.Enabled = false; + GameObject.Components.Get().Enabled = false; + } + public void Attack() { AttackEffects(); @@ -87,13 +96,11 @@ public sealed class Weapon : AmmoUseableBase _sound?.StartSound(); MuzzleLight.Enabled = true; GunRenderer.Set( "Fire", true ); - _ = AttackEffectsAsync(); - } - private async Task AttackEffectsAsync() - { - await GameTask.DelaySeconds( 0.05f ); - MuzzleLight.Enabled = false; + GameTask.DelaySeconds( 0.05f ).ContinueWith( ( _ ) => + { + MuzzleLight.Enabled = false; + } ); } protected override void OnUse() diff --git a/sasalka.sbproj b/sasalka.sbproj index 131143c..cc8b660 100644 --- a/sasalka.sbproj +++ b/sasalka.sbproj @@ -1,7 +1,7 @@ { - "Title": "sasalka", + "Title": "metaverse", "Type": "game", - "Org": "kptl", + "Org": "koptilnya", "Ident": "sasalka", "Schema": 1, "IncludeSourceFiles": false, @@ -28,6 +28,7 @@ "Keyboard": false, "VR": false, "Gamepad": false - } + }, + "LaunchMode": "Normal" } } \ No newline at end of file diff --git a/sasalka.sln.DotSettings.user b/sasalka.sln.DotSettings.user index 2967285..24efd95 100644 --- a/sasalka.sln.DotSettings.user +++ b/sasalka.sln.DotSettings.user @@ -17,6 +17,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded @@ -38,6 +39,7 @@ ForceIncluded ForceIncluded ForceIncluded + ForceIncluded ForceIncluded ForceIncluded ForceIncluded