Skip to content

Commit 8bae7ef

Browse files
committed
Merge branch 'master' into dev
2 parents 423477f + 03d563c commit 8bae7ef

24 files changed

Lines changed: 399 additions & 137 deletions

EXILED/EXILED.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
<PropertyGroup>
1717
<!-- This is the global version and is used for all projects that don't have a version -->
18-
<Version Condition="$(Version) == ''">9.13.3</Version>
18+
<Version Condition="$(Version) == ''">9.14.2</Version>
1919
<!-- Enables public beta warning via the PUBLIC_BETA constant -->
2020
<PublicBeta>false</PublicBeta>
2121

EXILED/Exiled.API/Enums/PrefabType.cs

Lines changed: 65 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
namespace Exiled.API.Enums
99
{
10+
using System;
11+
1012
using Exiled.API.Features.Attributes;
1113

1214
/// <summary>
@@ -29,6 +31,7 @@ public enum PrefabType
2931
[Prefab(3038351124, "LCZ BreakableDoor")]
3032
LCZBreakableDoor,
3133

34+
// TODO: refactor HCZ door wall connector support
3235
[Prefab(400539138, "HCZ OneSided")]
3336
HCZOneSided,
3437

@@ -38,28 +41,28 @@ public enum PrefabType
3841
[Prefab(3343949480, "OpenHallway")]
3942
HCZOpenHallway,
4043

41-
[Prefab(3999209566, "OpenHallway Construct A")]
44+
[Prefab(3999209566, "Broken Electrical Box Open Connector")]
4245
HCZOpenHallway_Construct_A,
4346

44-
[Prefab(38976586, "OpenHallway Clutter A")]
47+
[Prefab(38976586, "Pipes Long Open Connector")]
4548
HCZOpenHallway_Clutter_A,
4649

47-
[Prefab(1687661105, "OpenHallway Clutter B")]
50+
[Prefab(1687661105, "Simple Boxes Open Connector")]
4851
HCZOpenHallway_Clutter_B,
4952

50-
[Prefab(147203050, "OpenHallway Clutter C")]
53+
[Prefab(147203050, "Pipes Short Open Connector")]
5154
HCZOpenHallway_Clutter_C,
5255

53-
[Prefab(1102032353, "OpenHallway Clutter D")]
56+
[Prefab(1102032353, "Boxes Ladder Open Connector")]
5457
HCZOpenHallway_Clutter_D,
5558

56-
[Prefab(2490430134, "OpenHallway Clutter E")]
59+
[Prefab(2490430134, "Tank-Supported Shelf Open Connector")]
5760
HCZOpenHallway_Clutter_E,
5861

59-
[Prefab(2673083832, "OpenHallway Clutter F")]
62+
[Prefab(2673083832, "Angled Fences Open Connector")]
6063
HCZOpenHallway_Clutter_F,
6164

62-
[Prefab(2536312960, "OpenHallway Clutter G")]
65+
[Prefab(2536312960, "Huge Orange Pipes Open Connector")]
6366
HCZOpenHallway_Clutter_G,
6467

6568
[Prefab(2176035362, "HCZ BulkDoor")]
@@ -86,10 +89,11 @@ public enum PrefabType
8689
[Prefab(712426663, "SpeakerToy")]
8790
SpeakerToy,
8891

89-
[Prefab(2672653014, "RegularKeycardPickup")]
92+
[Prefab(2672653014, "KeycardPickup")]
9093
RegularKeycardPickup,
9194

92-
[Prefab(335436768, "ChaosKeycardPickup")]
95+
// TODO: remove duplicate with KeycardPickupChaos
96+
[Prefab(2842703865, "KeycardPickup_Chaos")]
9397
ChaosKeycardPickup,
9498

9599
[Prefab(248357067, "RadioPickup")]
@@ -98,6 +102,7 @@ public enum PrefabType
98102
[Prefab(1925130715, "FirearmPickup")]
99103
FirearmPickup,
100104

105+
[Obsolete("This prefab no longer exists")]
101106
[Prefab(1925130715, "Com15Pickup")]
102107
Com15Pickup,
103108

@@ -119,18 +124,22 @@ public enum PrefabType
119124
[Prefab(4056235189, "Ammo12gaPickup")]
120125
Ammo12gaPickup,
121126

127+
[Obsolete("This prefab no longer exists")]
122128
[Prefab(212068596, "E11SRPickup")]
123129
E11SRPickup,
124130

131+
[Obsolete("This prefab no longer exists")]
125132
[Prefab(1982658896, "CrossvecPickup")]
126133
CrossvecPickup,
127134

128135
[Prefab(2474630775, "Ammo556mmPickup")]
129136
Ammo556mmPickup,
130137

138+
[Obsolete("This prefab no longer exists")]
131139
[Prefab(3462306180, "Fsp9Pickup")]
132140
Fsp9Pickup,
133141

142+
[Obsolete("This prefab no longer exists")]
134143
[Prefab(2405374689, "LogicerPickup")]
135144
LogicerPickup,
136145

@@ -149,6 +158,7 @@ public enum PrefabType
149158
[Prefab(2344368365, "Ammo9mmPickup")]
150159
Ammo9mmPickup,
151160

161+
[Obsolete("This prefab no longer exists")]
152162
[Prefab(1749039070, "Com18Pickup")]
153163
Com18Pickup,
154164

@@ -176,12 +186,15 @@ public enum PrefabType
176186
[Prefab(3164421243, "Heavy Armor Pickup")]
177187
HeavyArmorPickup,
178188

189+
[Obsolete("This prefab no longer exists")]
179190
[Prefab(1861159387, "RevolverPickup")]
180191
RevolverPickup,
181192

193+
[Obsolete("This prefab no longer exists")]
182194
[Prefab(3814984482, "AkPickup")]
183195
AkPickup,
184196

197+
[Obsolete("This prefab no longer exists")]
185198
[Prefab(3180035653, "ShotgunPickup")]
186199
ShotgunPickup,
187200

@@ -200,9 +213,11 @@ public enum PrefabType
200213
[Prefab(2702950243, "SCP1853Pickup")]
201214
SCP1853Pickup,
202215

216+
[Obsolete("This prefab no longer exists")]
203217
[Prefab(3881162440, "DisruptorPickup")]
204218
DisruptorPickup,
205219

220+
[Obsolete("This prefab no longer exists")]
206221
[Prefab(504857316, "Com45Pickup")]
207222
Com45Pickup,
208223

@@ -215,9 +230,11 @@ public enum PrefabType
215230
[Prefab(1209253563, "AntiSCP207Pickup")]
216231
AntiSCP207Pickup,
217232

233+
[Obsolete("This prefab no longer exists")]
218234
[Prefab(2216560136, "FRMG0Pickup")]
219235
FRMG0Pickup,
220236

237+
[Obsolete("This prefab no longer exists")]
221238
[Prefab(74988289, "A7Pickup")]
222239
A7Pickup,
223240

@@ -290,49 +307,55 @@ public enum PrefabType
290307
[Prefab(2409733045, "FlashbangProjectile")]
291308
FlashbangProjectile,
292309

293-
[Prefab(1062458989, "SCP-173_Ragdoll")]
310+
[Prefab(1062458989, "SCP-173 Ragdoll")]
294311
Scp173Ragdoll,
295312

313+
[Obsolete("This prefab no longer exists")]
296314
[Prefab(1951328980, "Ragdoll_1")]
297315
Ragdoll1,
298316

299-
[Prefab(992490681, "SCP-106_Ragdoll")]
317+
[Prefab(992490681, "SCP-106 Ragdoll")]
300318
Scp106Ragdoll,
301319

320+
[Obsolete("This prefab no longer exists")]
302321
[Prefab(3219675689, "Ragdoll_4")]
303322
Ragdoll4,
304323

305-
[Prefab(417388851, "Ragdoll_7")]
324+
[Prefab(417388851, "SCP-049 Ragdoll")]
306325
Ragdoll7,
307326

327+
[Obsolete("This prefab no longer exists")]
308328
[Prefab(3185790062, "Ragdoll_6")]
309329
Ragdoll6,
310330

331+
[Obsolete("This prefab no longer exists")]
311332
[Prefab(2567420661, "Ragdoll_8")]
312333
Ragdoll8,
313334

314-
[Prefab(149379640, "SCP-096_Ragdoll")]
335+
[Prefab(149379640, "SCP-096 Ragdoll")]
315336
Scp096Ragdoll,
316337

317-
[Prefab(1862774274, "Ragdoll_10")]
338+
[Prefab(1862774274, "Zombie Ragdoll")]
318339
Ragdoll10,
319340

341+
[Obsolete("This prefab no longer exists")]
320342
[Prefab(2710373253, "Ragdoll_Tut")]
321343
RagdollTutorial,
322344

345+
[Obsolete("This prefab no longer exists")]
323346
[Prefab(1389252654, "Ragdoll_12")]
324347
Ragdoll12,
325348

326-
[Prefab(3175759689, "SCP-939_Ragdoll")]
349+
[Prefab(3175759689, "SCP-939 Ragdoll")]
327350
Scp939Ragdoll,
328351

329-
[Prefab(3721192489, "Scp3114_Ragdoll")]
352+
[Prefab(3721192489, "SCP-3114 Ragdoll")]
330353
Scp3114Ragdoll,
331354

332355
[Prefab(2588580243, "ElevatorChamber")]
333356
ElevatorChamber,
334357

335-
[Prefab(1757973841, "ElevatorChamber_Gates")]
358+
[Prefab(1757973841, "ElevatorChamber Gates")]
336359
ElevatorChamber_Gates,
337360

338361
[Prefab(912031041, "ElevatorChamberNuke")]
@@ -344,7 +367,7 @@ public enum PrefabType
344367
[Prefab(3539746802, "Sinkhole")]
345368
Sinkhole,
346369

347-
[Prefab(1548138668, "AutoRagdoll")]
370+
[Prefab(1548138668, "Auto Humanoid Ragdoll")]
348371
AutoRagdoll,
349372

350373
[Prefab(1323017091, "ElevatorChamberCargo")]
@@ -365,7 +388,7 @@ public enum PrefabType
365388
[Prefab(2026969629, "LczCameraToy")]
366389
LczCameraToy,
367390

368-
[Prefab(1548138668, "SzCameraToy")]
391+
[Prefab(1734743361, "SzCameraToy")]
369392
SzCameraToy,
370393

371394
[Prefab(2842703865, "KeycardPickup_Chaos")]
@@ -386,78 +409,99 @@ public enum PrefabType
386409
[Prefab(1891631329, "PrismaticCloud")]
387410
PrismaticCloud,
388411

389-
[Prefab(3938583646, "TantrumObj (Brown Candy)")]
412+
[Prefab(2157375951, "TantrumObj (Brown Candy)")]
390413
TantrumObjBrownCandy,
391414

392415
[Prefab(1145481038, "Scp1509Pickup")]
393416
Scp1509Pickup,
394417

418+
[Obsolete("Only available for Halloween and AprilFools.")]
395419
[Prefab(1359696107, "Hubert Moon")]
396420
HubertMoon,
397421

422+
[Obsolete("Only available for Halloween and AprilFools.")]
398423
[Prefab(4075838184, "Scp018Projectile Halloween")]
399424
Scp018ProjectileHalloween,
400425

426+
[Obsolete("Only available for Halloween and AprilFools.")]
401427
[Prefab(3262457219, "JailbirdPickup Halloween")]
402428
JailbirdPickupHalloween,
403429

404430
[Prefab(1712001893, "Scp1509PedestalStructure Variant")]
405431
Scp1509PedestalStructureVariant,
406432

433+
[Obsolete("Only available for Halloween and AprilFools.")]
407434
[Prefab(517392265, "SCP-173 Ragdoll - MrNutty Sombrero Variant")]
408435
Scp173RagdollMrNuttySombreroVariant,
409436

437+
[Obsolete("Only available for Halloween and AprilFools.")]
410438
[Prefab(2174094462, "SCP-049 Ragdoll Halloween")]
411439
Scp049RagdollHalloween,
412440

441+
[Obsolete("Only available for Halloween and AprilFools.")]
413442
[Prefab(4255002108, "SCP-096 Ragdoll Halloween")]
414443
Scp096RagdollHalloween,
415444

445+
[Obsolete("Only available for Halloween and AprilFools.")]
416446
[Prefab(2556293836, "Zombie Ragdoll Halloween")]
417447
ZombieRagdollHalloween,
418448

449+
[Obsolete("Only available for Halloween and AprilFools.")]
419450
[Prefab(213466224, "SCP-939 Ragdoll Halloween")]
420451
Scp939RagdollHalloween,
421452

453+
[Obsolete("Only available for Christmas and AprilFools.")]
422454
[Prefab(689741320, "SCP-559 Cake")]
423455
Scp559Cake,
424456

457+
[Obsolete("Only available for Christmas and AprilFools.")]
425458
[Prefab(2657863153, "SCP-956")]
426459
Scp956,
427460

461+
[Obsolete("Only available for Christmas and AprilFools.")]
428462
[Prefab(1205960739, "SCP-2536 Tree")]
429463
Scp2536,
430464

465+
[Obsolete("Only available for Christmas and AprilFools.")]
431466
[Prefab(2102014206, "Snowpile")]
432467
Snowpile,
433468

469+
[Obsolete("Only available for Christmas and AprilFools.")]
434470
[Prefab(3401975113, "Scp018Projectile Christmas")]
435471
Scp018ProjectileChristmas,
436472

473+
[Obsolete("Only available for Christmas and AprilFools.")]
437474
[Prefab(3223468476, "SnowballProjectile")]
438475
SnowballProjectile,
439476

477+
[Obsolete("Only available for Christmas and AprilFools.")]
440478
[Prefab(296717882, "CoalPickup")]
441479
CoalPickup,
442480

481+
[Obsolete("Only available for Christmas and AprilFools.")]
443482
[Prefab(409273101, "TapePlayerPickup")]
444483
Scp1507TapePickup,
445484

485+
[Obsolete("Only available for Christmas and AprilFools.")]
446486
[Prefab(3971391978, "Scp021JPickup")]
447487
Scp021JPickup,
448488

489+
[Obsolete("Only available for Christmas and AprilFools.")]
449490
[Prefab(142820664, "CoalProjectile")]
450491
CoalProjectile,
451492

493+
[Obsolete("Only available for Christmas and AprilFools.")]
452494
[Prefab(2405470903, "Scp2536Projectile")]
453495
Scp2536Projectile,
454496

497+
[Obsolete("Only available for Christmas and AprilFools.")]
455498
[Prefab(1496232901, "SCP-173 Ragdoll Variant")]
456499
Scp173RagdollChristmas,
457500

458501
[Prefab(6069361, "SnowPoop - TantrumObj")]
459502
SnowTantrum,
460503

504+
[Obsolete("Only available for Christmas and AprilFools.")]
461505
[Prefab(3654754970, "SCP-1507 Ragdoll")]
462506
Scp1507Ragdoll,
463507
}

EXILED/Exiled.API/Enums/Scp939VisibilityState.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,10 @@ public enum Scp939VisibilityState
4343
/// SCP-939 sees another player for a while, after it's out of range.
4444
/// </summary>
4545
SeenByLastTime,
46+
47+
/// <summary>
48+
/// SCP-939 sees another player, who is the last human player in the round.
49+
/// </summary>
50+
SeenByLastHuman,
4651
}
4752
}

EXILED/Exiled.API/Features/Pickups/FirearmPickup.cs

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ namespace Exiled.API.Features.Pickups
99
{
1010
using System;
1111

12+
using Exiled.API.Features.Items.FirearmModules;
13+
using Exiled.API.Features.Items.FirearmModules.Primary;
1214
using Exiled.API.Interfaces;
1315

1416
using InventorySystem.Items;
@@ -169,13 +171,28 @@ internal override void ReadItemInfo(Items.Item item)
169171
protected override void InitializeProperties(ItemBase itemBase)
170172
{
171173
base.InitializeProperties(itemBase);
172-
if (!(itemBase as Firearm).TryGetModule(out IPrimaryAmmoContainerModule magazine))
174+
if (itemBase is not Firearm firearm)
173175
{
174-
Log.Error($"firearm prefab {itemBase.ItemTypeId} doesnt have an primary magazine module(unexpected)");
176+
Log.Error("FirearmPickup::InitializeProperties called with a non-firearm item!");
175177
return;
176178
}
177179

178-
MaxAmmo = magazine.AmmoMax;
180+
foreach (ModuleBase module in firearm.Modules)
181+
{
182+
switch (module)
183+
{
184+
case IPrimaryAmmoContainerModule primaryAmmoModule:
185+
MaxAmmo = primaryAmmoModule.AmmoMax;
186+
break;
187+
188+
case HitscanHitregModuleBase hitregModule:
189+
Damage = hitregModule.BaseDamage;
190+
Inaccuracy = hitregModule.BaseBulletInaccuracy;
191+
Penetration = hitregModule.BasePenetration;
192+
DamageFalloffDistance = hitregModule.DamageFalloffDistance;
193+
break;
194+
}
195+
}
179196
}
180197
}
181198
}

0 commit comments

Comments
 (0)