Skip to content

Commit 9d64a4f

Browse files
committed
Update weapon data: add CarlGustafm45, Sten, NorincoCQ, L1A1, AKM, and Type56 with relevant stats in weapons.json; refactor StechkinAPS class to inherit from MachinePistol
1 parent 26e6dbe commit 9d64a4f

2 files changed

Lines changed: 98 additions & 13 deletions

File tree

Discordia/GameLogic/Weapons.py

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ class ProjectileType:
3333

3434
class Caliber:
3535
BB = 0
36-
MM_9 = IN_38 = 1 # Pistol & SMG
37-
MM_762 = 2 # AK47
38-
IN_577 = 3 # Rifles
36+
MM_9 = IN_38 = 1
37+
MM_762 = 2
38+
IN_577 = 3
3939
IN_45 = 4
40+
MM_556 = 5
4041

4142

4243
class FiringAction:
@@ -360,15 +361,15 @@ class M1911(FromData, Pistol, FullyImplemented):
360361
"""
361362

362363

363-
class StechkinAPS(FromData, Pistol, SelectiveFire, FullyImplemented):
364+
class StechkinAPS(FromData, MachinePistol, SelectiveFire, FullyImplemented):
364365
"""
365366
Based on the Stechkin automatic pistol (APS)
366367
"""
367368

368369

369-
class APS(FromData, Pistol, SelectiveFire, FullyImplemented):
370+
class CarlGustafm45(FromData, SMG, FullyImplemented):
370371
"""
371-
Based on the Stechkin automatic pistol (APS)
372+
Based on the Carl Gustaf m/45
372373
"""
373374

374375

@@ -378,6 +379,24 @@ class PPSh41(FromData, SMG, SelectiveFire, FullyImplemented):
378379
"""
379380

380381

382+
class Sten(FromData, SMG, SelectiveFire, FullyImplemented):
383+
"""
384+
Based on the Sten submachine gun
385+
"""
386+
387+
388+
class NorincoCQ(FromData, SMG, FullyImplemented):
389+
"""
390+
Based on the Norinco CQ
391+
"""
392+
393+
394+
class L1A1(FromData, Rifle, FullyImplemented):
395+
"""
396+
Based on the L1A1 (FN FAL)
397+
"""
398+
399+
381400
class OwenSMG(FromData, SMG, FullyImplemented):
382401
"""
383402
Based on the Owen Machine Carbine (Australian)
@@ -390,6 +409,18 @@ class AK47(FromData, Rifle, SelectiveFire, FullyImplemented):
390409
"""
391410

392411

412+
class AKM(FromData, Rifle, SelectiveFire, FullyImplemented):
413+
"""
414+
Based on the AKM
415+
"""
416+
417+
418+
class Type56(FromData, Rifle, SelectiveFire, FullyImplemented):
419+
"""
420+
Based on the Type 56
421+
"""
422+
423+
393424
class HKG3(FromData, Rifle, SelectiveFire, FullyImplemented):
394425
"""
395426
Based on the Heckler & Koch G3

Discordia/data/weapons.json

Lines changed: 61 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,49 @@
2727
"weight_lb": 2.8
2828
},
2929
"StechkinAPS": {
30-
"name": "Stechkin Automatic Pistol",
31-
"caliber": "MM_9",
32-
"action": "SemiAutomatic",
33-
"capacity": 20,
34-
"range_falloff": 0.7,
35-
"base_damage": 4,
36-
"weight_lb": 2.69
30+
"name": "Stechkin Automatic Pistol",
31+
"caliber": "MM_9",
32+
"action": "SemiAutomatic",
33+
"capacity": 20,
34+
"range_falloff": 0.7,
35+
"base_damage": 4,
36+
"weight_lb": 2.69
37+
},
38+
"CarlGustafm45": {
39+
"name": "Carl Gustaf m/45",
40+
"caliber": "MM_9",
41+
"action": "SemiAutomatic",
42+
"capacity": 30,
43+
"range_falloff": 0.6,
44+
"base_damage": 5,
45+
"weight_lb": 10.0
46+
},
47+
"Sten": {
48+
"name": "Sten Submachine Gun",
49+
"caliber": "MM_9",
50+
"action": "FullyAutomatic",
51+
"capacity": 32,
52+
"range_falloff": 0.6,
53+
"base_damage": 4,
54+
"weight_lb": 8.0
55+
},
56+
"NorincoCQ": {
57+
"name": "Norinco CQ",
58+
"caliber": "MM_556",
59+
"action": "FullyAutomatic",
60+
"capacity": 30,
61+
"range_falloff": 0.6,
62+
"base_damage": 4,
63+
"weight_lb": 8.0
64+
},
65+
"L1A1": {
66+
"name": "L1A1 (FN FAL)",
67+
"caliber": "MM_762",
68+
"action": "FullyAutomatic",
69+
"capacity": 20,
70+
"range_falloff": 0.3,
71+
"base_damage": 14,
72+
"weight_lb": 9.7
3773
},
3874
"M1911": {
3975
"name": "M1911 Pistol",
@@ -80,6 +116,24 @@
80116
"base_damage": 15,
81117
"weight_lb": 7.7
82118
},
119+
"AKM": {
120+
"name": "AKM",
121+
"caliber": "MM_762",
122+
"action": "FullyAutomatic",
123+
"capacity": 30,
124+
"range_falloff": 0.35,
125+
"base_damage": 15,
126+
"weight_lb": 7.7
127+
},
128+
"Type56": {
129+
"name": "Type 56",
130+
"caliber": "MM_762",
131+
"action": "FullyAutomatic",
132+
"capacity": 30,
133+
"range_falloff": 0.35,
134+
"base_damage": 15,
135+
"weight_lb": 7.7
136+
},
83137
"HKG3": {
84138
"name": "Heckler & Koch G3",
85139
"caliber": "MM_762",

0 commit comments

Comments
 (0)