upd
This commit is contained in:
parent
6e784491fd
commit
dd266b1a8a
@ -4,7 +4,7 @@
|
||||
"ImageTexture": null,
|
||||
"ImageUrl": "https://cdn.sbox.game/asset/pukes.pyjamatop/thumb.png.9405387bc9d8e406",
|
||||
"ClothUrl": "pukes/pyjamatop",
|
||||
"Name": "Pijama",
|
||||
"Name": "Pyjama Top",
|
||||
"Description": "Test clothing",
|
||||
"Prefab": null,
|
||||
"WeaponDefinition": {
|
||||
|
||||
16
Assets/Items/shorts_1.inv
Normal file
16
Assets/Items/shorts_1.inv
Normal file
@ -0,0 +1,16 @@
|
||||
{
|
||||
"Slot": "None",
|
||||
"HoldType": "None",
|
||||
"ImageTexture": null,
|
||||
"ImageUrl": "https://cdn.sbox.game/org/doubletrouble/denimshorts/thumb/03a1325a-4ac5-4884-8cc2-b379a01b976c.png",
|
||||
"ClothUrl": "doubletrouble/denimshorts",
|
||||
"Name": "Denim Shorts",
|
||||
"Description": "test shorts",
|
||||
"Prefab": null,
|
||||
"WeaponDefinition": {
|
||||
"Position": "0,0,0",
|
||||
"Rotation": "0,0,0,0"
|
||||
},
|
||||
"__references": [],
|
||||
"__version": 0
|
||||
}
|
||||
@ -141,9 +141,7 @@
|
||||
},
|
||||
"RunSpeed": 350,
|
||||
"WalkSpeed": 200,
|
||||
"WorkshopItems": [
|
||||
"pukes/pyjamatop"
|
||||
]
|
||||
"WorkshopItems": []
|
||||
},
|
||||
{
|
||||
"__type": "Sandbox.AudioListener",
|
||||
@ -2030,8 +2028,8 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "ankle_R",
|
||||
"Position": "0.4100251,-4.377188,3.807455",
|
||||
"Rotation": "0.6728532,0.2185255,-0.3316621,0.6241117",
|
||||
"Position": "0.4100335,-4.377071,3.807489",
|
||||
"Rotation": "0.6728557,0.2185201,-0.3316683,0.6241075",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
@ -2047,9 +2045,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "ankle_L",
|
||||
"Position": "0.4083929,4.427738,3.805784",
|
||||
"Rotation": "0.6245901,0.3321031,-0.2183217,0.6722577",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Position": "0.4083832,4.427598,3.805829",
|
||||
"Rotation": "0.6245875,0.3321067,-0.218319,0.6722592",
|
||||
"Scale": "1,1,1",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2064,9 +2062,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "arm_lower_R",
|
||||
"Position": "-2.777774,-8.907755,40.58329",
|
||||
"Rotation": "0.5056845,0.3672242,-0.5358468,0.5677128",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Position": "-2.305881,-8.654749,40.97688",
|
||||
"Rotation": "0.5030814,0.3782525,-0.540166,0.5586189",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2081,9 +2079,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "arm_lower_L",
|
||||
"Position": "-2.554454,9.938415,41.12941",
|
||||
"Rotation": "0.5901422,0.539196,-0.3564052,0.4837099",
|
||||
"Scale": "1.000006,1.000006,1.000006",
|
||||
"Position": "-1.954972,9.871452,41.46471",
|
||||
"Rotation": "0.5850527,0.5385041,-0.3695764,0.4807702",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2098,9 +2096,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "hand_R",
|
||||
"Position": "-1.575329,-10.73443,33.19328",
|
||||
"Rotation": "0.4779791,0.3452799,-0.5928894,0.5484523",
|
||||
"Scale": "1.000006,1.000006,1.000006",
|
||||
"Position": "-1.301779,-10.37271,33.53143",
|
||||
"Rotation": "0.4744667,0.3565034,-0.5969852,0.5398108",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2115,9 +2113,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "hand_L",
|
||||
"Position": "-1.286812,12.18568,33.86737",
|
||||
"Rotation": "0.5707431,0.5958003,-0.3323785,0.4569452",
|
||||
"Scale": "1.000008,1.000008,1.000008",
|
||||
"Position": "-0.8232388,11.98876,34.14148",
|
||||
"Rotation": "0.5664198,0.5951051,-0.345663,0.4533604",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2132,9 +2130,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "hold_R",
|
||||
"Position": "-0.01371813,-9.381454,27.16162",
|
||||
"Rotation": "0.3082592,0.7160788,0.06766287,0.6225988",
|
||||
"Scale": "1.000008,1.000008,1.000008",
|
||||
"Position": "0.1027977,-8.932137,27.48148",
|
||||
"Rotation": "0.3143174,0.7234542,0.06842977,0.6108487",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2149,9 +2147,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "hold_L",
|
||||
"Position": "0.2557262,11.16746,27.76514",
|
||||
"Rotation": "-0.2797161,0.7211201,-0.05373439,0.6315516",
|
||||
"Scale": "1.000008,1.000008,1.000008",
|
||||
"Position": "0.5759228,10.85694,28.0248",
|
||||
"Rotation": "-0.2817041,0.7288769,-0.05973086,0.6211389",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2200,9 +2198,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "leg_lower_R",
|
||||
"Position": "2.368746,-4.429564,16.1687",
|
||||
"Rotation": "0.4852337,0.5078025,-0.5660278,0.4316219",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Position": "2.141828,-4.433267,16.20256",
|
||||
"Rotation": "0.4914648,0.5026264,-0.5626303,0.435059",
|
||||
"Scale": "1,1,1",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2217,9 +2215,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "leg_lower_L",
|
||||
"Position": "2.750974,4.852622,16.09278",
|
||||
"Rotation": "0.4170566,0.5649363,-0.5238643,0.4821586",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Position": "2.990841,4.839132,16.04515",
|
||||
"Rotation": "0.4134015,0.568549,-0.5290765,0.4753201",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2234,9 +2232,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "middle_of_both_hands",
|
||||
"Position": "-1.104477,0.8691149,28.74636",
|
||||
"Rotation": "0.01755048,0.7529662,0.006575623,0.6577923",
|
||||
"Scale": "1.000007,1.000007,1.000007",
|
||||
"Position": "-0.8430352,0.9475369,29.01887",
|
||||
"Rotation": "0.01926278,0.7531982,0.004356876,0.6574971",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2251,9 +2249,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_arm_upper_R_twist1",
|
||||
"Position": "-1.929822,-7.920132,45.43435",
|
||||
"Position": "-1.400206,-7.729323,45.82975",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2268,9 +2266,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_arm_lower_R_twist1",
|
||||
"Position": "-2.176551,-9.821091,36.88829",
|
||||
"Position": "-1.80383,-9.513729,37.25415",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000006,1.000006,1.000006",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2285,9 +2283,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_elbow_R_position",
|
||||
"Position": "-2.800889,-8.908604,40.57903",
|
||||
"Rotation": "-0.03809046,-0.6245987,0.7799343,0.01131491",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Position": "-2.314887,-8.657202,40.97291",
|
||||
"Rotation": "-0.0298567,-0.6296679,0.7760905,0.01761862",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2302,9 +2300,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_elbow_L_position",
|
||||
"Position": "-2.577524,9.940108,41.12513",
|
||||
"Rotation": "-0.04260791,0.7959635,-0.5976314,0.08639171",
|
||||
"Scale": "1.000006,1.000006,1.000006",
|
||||
"Position": "-1.963849,9.874497,41.4608",
|
||||
"Rotation": "-0.04279031,0.7921829,-0.6040214,0.07598255",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2319,9 +2317,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_arm_upper_L_twist1",
|
||||
"Position": "-1.744466,8.632482,45.91122",
|
||||
"Position": "-1.12625,8.624744,46.25906",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000005,1.000005,1.000005",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2336,9 +2334,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_arm_lower_L_twist1",
|
||||
"Position": "-1.920633,11.06205,37.49839",
|
||||
"Position": "-1.389105,10.93011,37.80309",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000007,1.000007,1.000007",
|
||||
"Scale": "1.000003,1.000003,1.000003",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2353,7 +2351,7 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_leg_upper_R_twist1",
|
||||
"Position": "1.46347,-4.2318,23.34433",
|
||||
"Position": "1.383293,-4.265827,23.39594",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
@ -2370,9 +2368,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_leg_upper_L_twist1",
|
||||
"Position": "1.678381,4.836231,23.24801",
|
||||
"Position": "1.837544,4.795762,23.18769",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Scale": "1,1,1",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2387,8 +2385,8 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_kneecap_R_position",
|
||||
"Position": "2.787574,-4.476758,16.13843",
|
||||
"Rotation": "0.5176088,0.4734412,-0.5328195,0.4733266",
|
||||
"Position": "2.503448,-4.474622,16.17259",
|
||||
"Rotation": "0.5185856,0.4737309,-0.5330592,0.4716947",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
@ -2404,9 +2402,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_kneecap_L_position",
|
||||
"Position": "3.249787,4.906153,16.05798",
|
||||
"Rotation": "0.6995426,0.04320066,0.0288072,0.712702",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Position": "3.534691,4.896688,16.00735",
|
||||
"Rotation": "0.7001207,0.04391778,0.02674206,0.7121707",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2421,9 +2419,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_leg_lower_R_twist1",
|
||||
"Position": "1.389388,-4.403374,9.988078",
|
||||
"Position": "1.275923,-4.405165,10.00504",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2438,9 +2436,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "driver_leg_lower_L_twist1",
|
||||
"Position": "1.579678,4.640162,9.949263",
|
||||
"Position": "1.699609,4.633352,9.925488",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2455,9 +2453,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "forward_reference_modelspace",
|
||||
"Position": "-0.6776385,0.2271925,43.41444",
|
||||
"Position": "-0.2639478,0.2526502,43.42427",
|
||||
"Rotation": "0,0,0,1",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2472,9 +2470,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "eyes",
|
||||
"Position": "5.072767,-0.3072115,63.30234",
|
||||
"Rotation": "0.0140758,-0.01898375,-0.01293489,0.999637",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Position": "5.885584,-0.1965587,63.25779",
|
||||
"Rotation": "0.0126497,-0.01464069,-0.01462483,0.9997059",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2489,9 +2487,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "eye_R_forward",
|
||||
"Position": "4.988014,-3.651226,63.20652",
|
||||
"Rotation": "0.0140758,-0.01898375,-0.01293489,0.999637",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Position": "5.788969,-3.540511,63.17171",
|
||||
"Rotation": "0.0126497,-0.01464069,-0.01462483,0.9997059",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2506,9 +2504,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "eye_L_forward",
|
||||
"Position": "5.157518,3.036803,63.39816",
|
||||
"Rotation": "0.0140758,-0.01898375,-0.01293489,0.999637",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Position": "5.982198,3.147393,63.34386",
|
||||
"Rotation": "0.0126497,-0.01464069,-0.01462483,0.9997059",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2523,9 +2521,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "forward_reference",
|
||||
"Position": "0.027397,0.02358127,56.22047",
|
||||
"Rotation": "0.0140758,-0.01898375,-0.01293489,0.999637",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Position": "0.779397,0.1321325,56.21957",
|
||||
"Rotation": "0.0126497,-0.01464069,-0.01462483,0.9997059",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2540,8 +2538,8 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "foot_R",
|
||||
"Position": "1.982162,-4.910528,0.1892754",
|
||||
"Rotation": "0.0004858672,-0.00001408905,-0.08710641,0.9961989",
|
||||
"Position": "1.982155,-4.910447,0.1893355",
|
||||
"Rotation": "0.0004867911,-0.0000140816,-0.08711611,0.9961981",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
@ -2557,9 +2555,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "foot_L",
|
||||
"Position": "1.978726,4.96698,1.053321",
|
||||
"Rotation": "-0.08723081,0.996188,0.000407666,0.00001469322",
|
||||
"Scale": "1.000001,1.000001,1.000001",
|
||||
"Position": "1.978698,4.966865,1.053316",
|
||||
"Rotation": "-0.0872355,0.9961876,0.0004070103,0.00001410835",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
@ -2574,9 +2572,9 @@
|
||||
"__version": 1,
|
||||
"Flags": 8,
|
||||
"Name": "hat",
|
||||
"Position": "-0.2584102,-0.4028735,71.37216",
|
||||
"Rotation": "0.0140758,-0.01898375,-0.01293489,0.999637",
|
||||
"Scale": "1.000004,1.000004,1.000004",
|
||||
"Position": "0.6251416,-0.2530355,71.37424",
|
||||
"Rotation": "0.0126497,-0.01464069,-0.01462483,0.9997059",
|
||||
"Scale": "1.000002,1.000002,1.000002",
|
||||
"Tags": "",
|
||||
"Enabled": true,
|
||||
"NetworkMode": 2,
|
||||
|
||||
@ -21,6 +21,11 @@ public sealed partial class Dedugan : Component
|
||||
Definition = ResourceLibrary.Get<InventoryItemDefinition>( "Items/Pijama.inv" )
|
||||
} );
|
||||
|
||||
Inventory.AddItem( new InventoryItem
|
||||
{
|
||||
Definition = ResourceLibrary.Get<InventoryItemDefinition>( "Items/shorts_1.inv" )
|
||||
} );
|
||||
|
||||
Inventory.AddItem( new InventoryItem
|
||||
{
|
||||
Definition = ResourceLibrary.Get<InventoryItemDefinition>( "Items/pistol.inv" )
|
||||
@ -41,93 +46,90 @@ public sealed partial class Dedugan : Component
|
||||
|
||||
private void OnItemEquipped( InventoryItem item )
|
||||
{
|
||||
var go = item.Definition.Prefab.Clone();
|
||||
|
||||
AnimationHelper.HoldType = item.Definition.HoldType;
|
||||
|
||||
// switch ( item.Definition.Slot )
|
||||
// {
|
||||
// case Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand:
|
||||
// go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
// AnimationHelper.Handedness = CitizenAnimationHelper.Hand.Both;
|
||||
// break;
|
||||
// case Inventar.InventorySlot.RightHand:
|
||||
// go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
// AnimationHelper.Handedness = CitizenAnimationHelper.Hand.Right;
|
||||
// break;
|
||||
// case Inventar.InventorySlot.LeftHand:
|
||||
// go.Parent = Renderer.GetAttachmentObject( "hold_L" );
|
||||
// AnimationHelper.Handedness = CitizenAnimationHelper.Hand.Left;
|
||||
// break;
|
||||
// default:
|
||||
// go.Parent = Renderer.GetAttachmentObject( "forward_reference_modelspace" );
|
||||
// break;
|
||||
// }
|
||||
switch ( item.Definition.Slot )
|
||||
if ( item.Definition.Prefab.IsValid() )
|
||||
{
|
||||
case Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
break;
|
||||
case Inventar.InventorySlot.RightHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
break;
|
||||
case Inventar.InventorySlot.LeftHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_L" );
|
||||
break;
|
||||
default:
|
||||
go.Parent = Renderer.GetAttachmentObject( "forward_reference_modelspace" );
|
||||
break;
|
||||
var go = item.Definition.Prefab.Clone();
|
||||
|
||||
AnimationHelper.HoldType = item.Definition.HoldType;
|
||||
|
||||
switch ( item.Definition.Slot )
|
||||
{
|
||||
case Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
break;
|
||||
case Inventar.InventorySlot.RightHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_R" );
|
||||
break;
|
||||
case Inventar.InventorySlot.LeftHand:
|
||||
go.Parent = Renderer.GetAttachmentObject( "hold_L" );
|
||||
break;
|
||||
default:
|
||||
go.Parent = Renderer.GetAttachmentObject( "forward_reference_modelspace" );
|
||||
break;
|
||||
}
|
||||
|
||||
go.LocalPosition = item.Definition.WeaponDefinition.Position;
|
||||
go.LocalRotation = item.Definition.WeaponDefinition.Rotation;
|
||||
|
||||
go.NetworkSpawn();
|
||||
|
||||
var hand = item.Definition.Slot switch
|
||||
{
|
||||
Inventar.InventorySlot.LeftHand => CitizenAnimationHelper.Hand.Left,
|
||||
Inventar.InventorySlot.RightHand => CitizenAnimationHelper.Hand.Right,
|
||||
Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand => CitizenAnimationHelper.Hand.Both,
|
||||
_ => CitizenAnimationHelper.Hand.Both
|
||||
};
|
||||
|
||||
AnimationHelper.HoldType = item.Definition.HoldType;
|
||||
AnimationHelper.Handedness = hand;
|
||||
|
||||
RpcSetHoldAnimation( item.Definition.HoldType, hand );
|
||||
|
||||
InAds = true;
|
||||
// item.SpawnedObject = go;
|
||||
}
|
||||
|
||||
go.LocalPosition = item.Definition.WeaponDefinition.Position;
|
||||
go.LocalRotation = item.Definition.WeaponDefinition.Rotation;
|
||||
|
||||
go.NetworkSpawn();
|
||||
|
||||
var hand = item.Definition.Slot switch
|
||||
else
|
||||
{
|
||||
Inventar.InventorySlot.LeftHand => CitizenAnimationHelper.Hand.Left,
|
||||
Inventar.InventorySlot.RightHand => CitizenAnimationHelper.Hand.Right,
|
||||
Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand => CitizenAnimationHelper.Hand.Both,
|
||||
_ => CitizenAnimationHelper.Hand.Both
|
||||
};
|
||||
|
||||
AnimationHelper.HoldType = item.Definition.HoldType;
|
||||
AnimationHelper.Handedness = hand;
|
||||
|
||||
RpcSetHoldAnimation( item.Definition.HoldType, hand );
|
||||
|
||||
InAds = true;
|
||||
// item.SpawnedObject = go;
|
||||
WearWorkshop( new List<string>() { item.Definition.ClothUrl } );
|
||||
}
|
||||
}
|
||||
|
||||
private void OnItemUnEquipped( InventoryItem item )
|
||||
{
|
||||
switch ( item.Definition.Slot )
|
||||
if ( item.Definition.Prefab.IsValid() )
|
||||
{
|
||||
case Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand:
|
||||
case Inventar.InventorySlot.RightHand:
|
||||
case Inventar.InventorySlot.LeftHand:
|
||||
var attachmentName = !item.Definition.Slot.HasFlag( Inventar.InventorySlot.RightHand )
|
||||
? "hold_L"
|
||||
: "hold_R";
|
||||
switch ( item.Definition.Slot )
|
||||
{
|
||||
case Inventar.InventorySlot.LeftHand | Inventar.InventorySlot.RightHand:
|
||||
case Inventar.InventorySlot.RightHand:
|
||||
case Inventar.InventorySlot.LeftHand:
|
||||
var attachmentName = !item.Definition.Slot.HasFlag( Inventar.InventorySlot.RightHand )
|
||||
? "hold_L"
|
||||
: "hold_R";
|
||||
|
||||
Renderer.GetAttachmentObject( attachmentName ).Children.ForEach( child => child.Destroy() );
|
||||
// AnimationHelper.Handedness = CitizenAnimationHelper.Hand.Both;
|
||||
// AnimationHelper.HoldType = CitizenAnimationHelper.HoldTypes.None;
|
||||
Renderer.GetAttachmentObject( attachmentName ).Children.ForEach( child => child.Destroy() );
|
||||
// AnimationHelper.Handedness = CitizenAnimationHelper.Hand.Both;
|
||||
// AnimationHelper.HoldType = CitizenAnimationHelper.HoldTypes.None;
|
||||
|
||||
RpcSetHoldAnimation( CitizenAnimationHelper.HoldTypes.None, CitizenAnimationHelper.Hand.Both );
|
||||
break;
|
||||
default:
|
||||
Renderer.GetAttachmentObject( "forward_reference_modelspace" ).Children
|
||||
.ForEach( child => child.Destroy() );
|
||||
break;
|
||||
RpcSetHoldAnimation( CitizenAnimationHelper.HoldTypes.None, CitizenAnimationHelper.Hand.Both );
|
||||
break;
|
||||
default:
|
||||
Renderer.GetAttachmentObject( "forward_reference_modelspace" ).Children
|
||||
.ForEach( child => child.Destroy() );
|
||||
break;
|
||||
}
|
||||
|
||||
// item.SpawnedObject = null;
|
||||
item.Destroy();
|
||||
|
||||
InAds = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
Log.Info( "STRIPPIN" );
|
||||
StripByName( item.Definition.Name );
|
||||
}
|
||||
|
||||
// item.SpawnedObject = null;
|
||||
item.Destroy();
|
||||
|
||||
InAds = false;
|
||||
}
|
||||
|
||||
[Rpc.Broadcast]
|
||||
|
||||
@ -76,12 +76,11 @@ partial class Dedugan
|
||||
|
||||
CurrentClothing.Clothing.RemoveAll( entry => !allowedCategories.Contains( entry.Clothing.Category ) );
|
||||
CurrentClothing.Apply( Renderer );
|
||||
|
||||
WearWorkshop( WorkshopItems );
|
||||
}
|
||||
|
||||
CancellationTokenSource _cts;
|
||||
|
||||
[Rpc.Broadcast]
|
||||
public async void WearWorkshop( List<string> workshopItems )
|
||||
{
|
||||
_cts = new CancellationTokenSource();
|
||||
@ -108,11 +107,24 @@ partial class Dedugan
|
||||
CurrentClothing.Normalize();
|
||||
CurrentClothing.Apply( Renderer );
|
||||
Renderer.PostAnimationUpdate();
|
||||
}
|
||||
|
||||
// foreach ( var clothing in CurrentClothing.Clothing )
|
||||
// {
|
||||
// Log.Info( clothing.Clothing.Title );
|
||||
// }
|
||||
[Rpc.Broadcast]
|
||||
public void StripByName( string name )
|
||||
{
|
||||
CurrentClothing.Clothing.RemoveAll( entry => entry.Clothing.Title == name );
|
||||
|
||||
CurrentClothing.Normalize();
|
||||
CurrentClothing.Apply( Renderer );
|
||||
Renderer.PostAnimationUpdate();
|
||||
}
|
||||
|
||||
|
||||
public void CancelDressing()
|
||||
{
|
||||
_cts?.Cancel();
|
||||
_cts?.Dispose();
|
||||
_cts = default;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -11,6 +11,8 @@ public sealed class RagdollController : Component
|
||||
[Group( "Config" ), Order( 0 ), Property]
|
||||
public bool isLocked { get; set; }
|
||||
|
||||
public float size { get; set; }
|
||||
|
||||
[Sync]
|
||||
public new bool Enabled
|
||||
{
|
||||
@ -27,10 +29,11 @@ public sealed class RagdollController : Component
|
||||
|
||||
if ( !value )
|
||||
{
|
||||
// size = bodyRenderer.Parameters.GetFloat( "scale_height" );
|
||||
WorldPosition = bodyRenderer.WorldPosition;
|
||||
bodyRenderer.LocalPosition = Vector3.Zero;
|
||||
|
||||
bodyRenderer.ClearParameters();
|
||||
// bodyRenderer.ClearParameters();
|
||||
bodyRenderer.ClearPhysicsBones();
|
||||
}
|
||||
}
|
||||
@ -60,7 +63,7 @@ public sealed class RagdollController : Component
|
||||
bodyLock.X = isLocked;
|
||||
bodyLock.Y = isLocked;
|
||||
bodyLock.Z = isLocked;
|
||||
|
||||
|
||||
bodyPhysics.Locking = bodyLock;
|
||||
bodyPhysics.MotionEnabled = !isLocked;
|
||||
WorldPosition = bodyRenderer.WorldPosition;
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ACollider_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003Fe2_003F95542f09_003FCollider_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003AComponent_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003F72_003Ff5d9e547_003FComponent_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADresser_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F7fb6d2768e9860b6a8981bf396c4df97bf8ea33bd23971f6e86435b43e47ed_003FDresser_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADresser_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003F7fb6d2768e9860b6a8981bf396c4df97bf8ea33bd23971f6e86435b43e47ed_003FDresser_002Ecs_002Fz_003A2_002D0/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADresser_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FSourcesCache_003Fa59714cc5d0c63b6ceff5bd775714767c621e47fa2e5128a61ed1744b471cd_003FDresser_002Ecs_002Fz_003A2_002D1/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADspProcessor_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003Fb259d6161b344f3994a9007e79ffb76e727000_003Ffb_003F1e5434fb_003FDspProcessor_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
<s:String x:Key="/Default/CodeInspection/ExcludedFiles/FilesAndFoldersToSkip2/=7020124F_002D9FFC_002D4AC3_002D8F3D_002DAAB8E0240759_002Ff_003ADspVolume_002Ecs_002Fl_003A_002E_002E_003F_002E_002E_003F_002E_002E_003FAppData_003FRoaming_003FJetBrains_003FRider2024_002E2_003Fresharper_002Dhost_003FDecompilerCache_003Fdecompiler_003F473df774ec844d1eb1dafe31862610eb433000_003Fda_003Fdddba176_003FDspVolume_002Ecs/@EntryIndexedValue">ForceIncluded</s:String>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user