Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/__DEFINES/is_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

#define isgun(A) istype(A, /obj/item/gun)

#define ismodulargun(A) istype(A, /obj/item/gun/projectile/automatic/modular)
#define ismodulargun(A) istype(A, /obj/item/gun/projectile/modular)

#define istool(A) istype(A, /obj/item/tool)

Expand Down
7 changes: 6 additions & 1 deletion code/__DEFINES/items.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,13 @@
#define GUN_UPGRADE_DEFINE_GRIP "grip"
#define GUN_UPGRADE_DEFINE_LOADER "loadtype"
#define GUN_UPGRADE_DENY_MAG "no_mag"
#define GUN_UPGRADE_DEFINE_WCLASS "add_wclass"
#define GUN_UPGRADE_DEFINE_WCLASS "wclass"
#define GUN_UPGRADE_SCOPE_POWER "scope_power"
#define GUN_UPGRADE_SET_FIRESOUND "sound_fire"
#define GUN_UPGRADE_SET_SILENT_FIRESOUND "sound_fire_silent"
#define GUN_UPGRADE_SET_RELOADSOUND "sound_reload"
#define GUN_UPGRADE_SET_COCKEDSOUND "sound_cocked"
#define GUN_UPGRADE_SET_INSERTSOUND "sound_insert"

//Gun Interaction flags
#define GI_ATTACKSELF 1
Expand Down
16 changes: 8 additions & 8 deletions code/datums/autolathe/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@

/datum/design/autolathe/gun/mk58
name = "NT HG .35 \"Mk-58 B\""
build_path = /obj/item/gun/projectile/automatic/modular/mk58/gray/stock
build_path = /obj/item/gun/projectile/modular/mk58/gray/stock
factions = list(FACTION_NEOTHEOLOGY)

/datum/design/autolathe/gun/mk58_wood
name = "NT HG .35 \"Mk-58 C\""
build_path = /obj/item/gun/projectile/automatic/modular/mk58/gray/wood
build_path = /obj/item/gun/projectile/modular/mk58/gray/wood
factions = list(FACTION_NEOTHEOLOGY)

/datum/design/autolathe/gun/mk58_army
name = "NT HG .35 \"Mk-58 e\""
build_path = /obj/item/gun/projectile/automatic/modular/mk58/black/army
build_path = /obj/item/gun/projectile/modular/mk58/black/army
factions = list(FACTION_NEOTHEOLOGY)

/datum/design/autolathe/gun/colt
Expand Down Expand Up @@ -150,7 +150,7 @@

/datum/design/autolathe/gun/wintermute
name = "FS AR .20 \"Wintermute\""
build_path = /obj/item/gun/projectile/automatic/modular/wintermute/finished
build_path = /obj/item/gun/projectile/modular/wintermute/finished
minimum_quality = 2

/datum/design/autolathe/gun/kovacs
Expand Down Expand Up @@ -184,20 +184,20 @@

/datum/design/autolathe/gun/ak47
name = "Excelsior Car .30 Kalashnikov"
build_path = /obj/item/gun/projectile/automatic/modular/ak/excelsior
build_path = /obj/item/gun/projectile/modular/ak/excelsior
minimum_quality = 2

/datum/design/autolathe/gun/ak47_fs
name = "FS AR .30 \"Vipr\""
build_path = /obj/item/gun/projectile/automatic/modular/ak/frozen_star
build_path = /obj/item/gun/projectile/modular/ak/frozen_star

/datum/design/autolathe/gun/ak47_fs_ih
name = "FS AR .30 \"Venger\""
build_path = /obj/item/gun/projectile/automatic/modular/ak/ironhammer_securities
build_path = /obj/item/gun/projectile/modular/ak/ironhammer_securities

/datum/design/autolathe/gun/ak47_sa
name = "SA AR .30 \"Krinkov\""
build_path = /obj/item/gun/projectile/automatic/modular/ak/serbian_arms/printed
build_path = /obj/item/gun/projectile/modular/ak/serbian_arms/printed

/datum/design/autolathe/gun/sts35
name = "OR SDF AR .30 \"STS-35\""
Expand Down
2 changes: 1 addition & 1 deletion code/datums/craft/craft_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ Based on /datum/design of \code\datums\autolathe\autolathe_datums.dm
/datum/design/makeshift/sermak
category = "firearm frames"
name = "\"Sermak\" rifle frame"
build_path = /obj/item/gun/projectile/automatic/modular/ak/makeshift
build_path = /obj/item/gun/projectile/modular/ak/makeshift
minimum_quality = 0

// misc
Expand Down
43 changes: 38 additions & 5 deletions code/datums/craft/gun_parts.dm
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,7 @@ semi accepts weird caliber - +1 points
..(quality)
I.weapon_upgrades[GUN_UPGRADE_DEFINE_GRIP] = type_of_grip
I.weapon_upgrades[GUN_UPGRADE_OFFSET] = -15 // Without a grip the gun shoots funny, players are legally allowed to not use a grip
I.weapon_upgrades[GUN_UPGRADE_MELEEDAMAGE] = WEAPON_FORCE_WEAK - 1
I.gun_loc_tag = PART_GRIP

/obj/item/part/gun/modular/grip/set_quality(var/quality = 0)
Expand Down Expand Up @@ -378,7 +379,7 @@ semi accepts weird caliber - +1 points
price_tag = 100
rarity_value = 6
var/list/accepted_calibers = list(CAL_PISTOL, CAL_MAGNUM, CAL_SRIFLE, CAL_CLRIFLE, CAL_LRIFLE, CAL_SHOTGUN)
var/loader = MAGAZINE
var/loader = SINGLE_CASING
var/mag_well = MAG_WELL_GENERIC
var/divisor_bonus = 0
var/recoil_bonus = 0
Expand All @@ -387,7 +388,9 @@ semi accepts weird caliber - +1 points
var/max_shells = 0
var/list/bonus_firemodes = list()
var/no_internal_mag = FALSE

var/sound_reload
var/sound_cocked
var/sound_insert


/obj/item/part/gun/modular/mechanism/New(location, var/quality = 0)
Expand All @@ -405,7 +408,14 @@ semi accepts weird caliber - +1 points
I.weapon_upgrades[GUN_UPGRADE_MAGUP] = max_shells
if(no_internal_mag)
I.weapon_upgrades[GUN_UPGRADE_DENY_MAG] = TRUE

if(damage_bonus)
I.weapon_upgrades[GUN_UPGRADE_DAMAGEMOD_PLUS] = damage_bonus
if(sound_reload)
I.weapon_upgrades[GUN_UPGRADE_SET_RELOADSOUND] = sound_reload
if(sound_cocked)
I.weapon_upgrades[GUN_UPGRADE_SET_COCKEDSOUND] = sound_cocked
if(sound_insert)
I.weapon_upgrades[GUN_UPGRADE_SET_INSERTSOUND] = sound_insert
I.gun_loc_tag = PART_MECHANISM

/obj/item/part/gun/modular/mechanism/set_quality(var/quality = 0)
Expand All @@ -431,6 +441,7 @@ semi accepts weird caliber - +1 points
mag_well = MAG_WELL_PISTOL|MAG_WELL_H_PISTOL
accepted_calibers = list(CAL_PISTOL, CAL_MAGNUM, CAL_SRIFLE, CAL_CLRIFLE)
part_overlay = "mechanism_pistol"
loader = MAGAZINE

/obj/item/part/gun/modular/mechanism/revolver
name = "revolver mechanism"
Expand All @@ -453,13 +464,17 @@ semi accepts weird caliber - +1 points
desc = "All the bits that makes the bullet go bang, in a speedy package."
icon_state = "mechanism_smg"
mag_well = MAG_WELL_SMG
loader = MAGAZINE
sound_reload = 'sound/weapons/guns/interact/smg_magin.ogg'

/obj/item/part/gun/modular/mechanism/autorifle
name = "generic self-loading mechanism"
desc = "All the bits that makes the bullet go bang, for all the military hardware you know and love."
icon_state = "mechanism_autorifle"
matter = list(MATERIAL_PLASTEEL = 10)
mag_well = MAG_WELL_RIFLE|MAG_WELL_RIFLE_L|MAG_WELL_RIFLE_D|MAG_WELL_IH
sound_reload = 'sound/weapons/guns/interact/ltrifle_magin.ogg'
loader = MAGAZINE

// Basic - semiauto with high damage. Total point value: +4
/obj/item/part/gun/modular/mechanism/autorifle/basic
Expand Down Expand Up @@ -555,6 +570,7 @@ semi accepts weird caliber - +1 points
matter = list(MATERIAL_PLASTEEL = 16)
rarity_value = 8
mag_well = MAG_WELL_BOX
loader = MAGAZINE

// steel mechanisms
/obj/item/part/gun/modular/mechanism/pistol/steel
Expand Down Expand Up @@ -592,6 +608,7 @@ semi accepts weird caliber - +1 points
max_shells = 10
divisor_bonus = 0.3
damage_bonus = 0.4
sound_reload = 'sound/weapons/guns/interact/rifle_load.ogg'

/obj/item/part/gun/modular/mechanism/boltgun/power
accepted_calibers = list(CAL_SRIFLE, CAL_MAGNUM)
Expand All @@ -607,6 +624,7 @@ semi accepts weird caliber - +1 points
part_overlay = "big_" // the full entry is handled by the guninteraction
loader = SINGLE_CASING
max_shells = 1
no_internal_mag = TRUE
divisor_bonus = 0
damage_bonus = 1

Expand Down Expand Up @@ -646,9 +664,11 @@ semi accepts weird caliber - +1 points
var/recoilbuildup
var/pierce
var/basemove
var/fire_sound
var/fire_silenced_sound

/obj/item/part/gun/modular/barrel/New(location, var/quality = 0)
..(quality)
..()
I.weapon_upgrades[GUN_UPGRADE_DEFINE_CALIBER] = caliber
if(!isnull(speed))
I.weapon_upgrades[GUN_UPGRADE_STEPDELAY_MULT] = speed
Expand All @@ -660,6 +680,10 @@ semi accepts weird caliber - +1 points
I.weapon_upgrades[GUN_UPGRADE_PIERC_MULT] = pierce
if(basemove)
I.weapon_upgrades[GUN_UPGRADE_BASESLOW] = basemove
if(fire_sound)
I.weapon_upgrades[GUN_UPGRADE_SET_FIRESOUND] = fire_sound
if(fire_silenced_sound)
I.weapon_upgrades[GUN_UPGRADE_SET_SILENT_FIRESOUND] = fire_silenced_sound
I.gun_loc_tag = PART_BARREL


Expand Down Expand Up @@ -696,6 +720,7 @@ semi accepts weird caliber - +1 points
price_tag = 100
caliber = CAL_MAGNUM
part_overlay = "well_magnum"
fire_sound = 'sound/weapons/guns/fire/revolver_fire.ogg'

/obj/item/part/gun/modular/barrel/srifle
name = ".20 barrel"
Expand All @@ -711,6 +736,7 @@ semi accepts weird caliber - +1 points
onehandpenalty = 1.2
recoilbuildup = 1.2
speed = 0.8
fire_sound = 'sound/weapons/guns/fire/sniper_fire.ogg'

/obj/item/part/gun/modular/barrel/clrifle
name = ".25 barrel"
Expand All @@ -727,6 +753,7 @@ semi accepts weird caliber - +1 points
matter = list(MATERIAL_PLASTEEL = 8)
caliber = CAL_LRIFLE
part_overlay = "well_lrifle"
fire_sound = 'sound/weapons/guns/fire/lmg_fire.ogg'

/obj/item/part/gun/modular/barrel/lrifle/forged
name = "forged .30 barrel"
Expand All @@ -746,6 +773,7 @@ semi accepts weird caliber - +1 points
matter = list(MATERIAL_PLASTEEL = 8)
caliber = CAL_SHOTGUN
part_overlay = "well_shotgun"
fire_sound = 'sound/weapons/guns/fire/shotgunp_fire.ogg'

/obj/item/part/gun/modular/barrel/antim
name = ".60 barrel"
Expand All @@ -754,6 +782,8 @@ semi accepts weird caliber - +1 points
matter = list(MATERIAL_PLASTEEL = 10)
caliber = CAL_ANTIM
part_overlay = "well_amr"
fire_sound = 'sound/weapons/guns/fire/sniper_fire.ogg'
fire_silenced_sound = 'sound/weapons/guns/fire/smg_fire.ogg'

/obj/item/part/gun/modular/barrel/antim/long
name = "long .60 barrel"
Expand Down Expand Up @@ -816,6 +846,7 @@ semi accepts weird caliber - +1 points
var/movementcost
var/onehandpenalty
var/wclassmod = 1
var/damagedone = 8

/obj/item/part/gun/modular/stock/New(location, var/quality = 0)
..() // No stat change, so no need for price change either
Expand All @@ -829,6 +860,7 @@ semi accepts weird caliber - +1 points
if(onehandpenalty)
I.weapon_upgrades[GUN_UPGRADE_ONEHANDPENALTY] = onehandpenalty
I.weapon_upgrades[GUN_UPGRADE_DEFINE_WCLASS] = wclassmod
I.weapon_upgrades[GUN_UPGRADE_MELEEDAMAGE] = damagedone

/obj/item/part/gun/modular/stock/heavy
recoilbuildup = 0.7
Expand All @@ -839,6 +871,7 @@ semi accepts weird caliber - +1 points
recoilbuildup = 0.8
movementcost = 5
onehandpenalty = 2.4
damagedone = 13 // total goal of 20, frame 1, grip 6

/obj/item/part/gun/modular/sights
name = "ironsights"
Expand Down Expand Up @@ -923,7 +956,7 @@ semi accepts weird caliber - +1 points
I.weapon_upgrades = list(
GUN_UPGRADE_BAYONET = TRUE,
GUN_UPGRADE_MELEEDAMAGE = damagedone,
GUN_UPGRADE_MELEEPENETRATION = ARMOR_PEN_MODERATE,
GUN_UPGRADE_MELEEPENETRATION = (ARMOR_PEN_MODERATE-1),
GUN_UPGRADE_OFFSET = 4
)

Expand Down
2 changes: 1 addition & 1 deletion code/datums/craft/recipes/guns.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@

/datum/craft_recipe/gun/kalash
name = "HM AR \"Sermak\""
result = /obj/item/gun/projectile/automatic/modular/ak/makeshift/preset
result = /obj/item/gun/projectile/modular/ak/makeshift/preset
steps = list(
list(CRAFT_MATERIAL, 20, MATERIAL_STEEL),
list(QUALITY_WELDING, 10, 20),
Expand Down
16 changes: 8 additions & 8 deletions code/game/machinery/vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1662,11 +1662,11 @@
/obj/item/part/gun = 30,
/obj/item/gun/energy/retro = 4,
/obj/item/gun/projectile/shotgun/doublebarrel = 4,
/obj/item/gun/projectile/automatic/modular/mk58/gray/stock = 2,
/obj/item/gun/projectile/automatic/modular/mk58/gray/wood = 2,
/obj/item/gun/projectile/automatic/modular/mk58/black/army = 1,
/obj/item/gun/projectile/modular/mk58/gray/stock = 2,
/obj/item/gun/projectile/modular/mk58/gray/wood = 2,
/obj/item/gun/projectile/modular/mk58/black/army = 1,
/obj/item/gun/projectile/revolver/deckard = 2,
/obj/item/gun/projectile/automatic/modular/ak/frozen_star = 4,
/obj/item/gun/projectile/modular/ak/frozen_star = 4,
/obj/item/gun/projectile/automatic/z8 = 4,
/obj/item/gun/projectile/shotgun/pump/regulator = 4,
/obj/item/gun/projectile/boltgun/fs/civilian = 4,
Expand All @@ -1690,12 +1690,12 @@
/obj/item/part/gun = 700,
/obj/item/gun/energy/retro = 1200,
/obj/item/gun/projectile/shotgun/doublebarrel = 1400,
/obj/item/gun/projectile/automatic/modular/mk58/gray/stock = 900,
/obj/item/gun/projectile/automatic/modular/mk58/gray/wood = 900,
/obj/item/gun/projectile/automatic/modular/mk58/black/army = 950,
/obj/item/gun/projectile/modular/mk58/gray/stock = 900,
/obj/item/gun/projectile/modular/mk58/gray/wood = 900,
/obj/item/gun/projectile/modular/mk58/black/army = 950,
/obj/item/gun/projectile/mandella = 1800,
/obj/item/gun/projectile/revolver/deckard = 3600,
/obj/item/gun/projectile/automatic/modular/ak/frozen_star = 3200,
/obj/item/gun/projectile/modular/ak/frozen_star = 3200,
/obj/item/gun/projectile/automatic/z8 = 3500,
/obj/item/gun/projectile/shotgun/pump/regulator = 2400,
/obj/item/gun/projectile/boltgun/fs/civilian = 2000,
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/storage/deferred.dm
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@
name = "rifleman crate"
desc = "A crate containing six SA AK-47 rifles, and plenty of magazines."
icon_state = "serbcrate_deferred_green"
initial_contents = list(/obj/item/gun/projectile/automatic/modular/ak/serbian_arms = 6,
initial_contents = list(/obj/item/gun/projectile/modular/ak/serbian_arms = 6,
/obj/item/ammo_magazine/lrifle = 12, /obj/item/ammo_magazine/lrifle/drum = 6)

/obj/item/storage/deferred/crate/kovacs
Expand Down Expand Up @@ -383,7 +383,7 @@
desc = "The start of a revolutionary career in Haven's space corps."
icon_state = "Excel_crate"
initial_contents = list(
/obj/item/gun/projectile/automatic/modular/ak/excelsior = 1,
/obj/item/gun/projectile/modular/ak/excelsior = 1,
/obj/item/clothing/under/excelsior = 1,
/obj/item/clothing/gloves/thick = 1,
/obj/item/ammo_magazine/lrifle = 4,
Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/weapons/storage/holster.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/obj/item/gun/projectile/mandella,
/obj/item/gun/projectile/type_62,
/obj/item/gun/projectile/type_90,
/obj/item/gun/projectile/automatic/modular/mk58,
/obj/item/gun/projectile/modular/mk58,
/obj/item/gun/projectile/shotgun/type_21,
/obj/item/gun/energy/gun,
/obj/item/gun/energy/chameleon,
Expand Down Expand Up @@ -181,7 +181,7 @@
/obj/item/gun/projectile/handmade_pistol,
/obj/item/gun/projectile/flare_gun,
/obj/item/gun/projectile/lamia,
/obj/item/gun/projectile/automatic/modular/mk58,
/obj/item/gun/projectile/modular/mk58,
/obj/item/gun/projectile/olivaw,
/obj/item/gun/projectile/mandella,
/obj/item/gun/projectile/type_90,
Expand Down
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/uplink_kits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@

/obj/item/storage/briefcase/antimaterial_rifle/populate_contents()
new /obj/item/ammo_casing/antim(src)
new /obj/item/gun/projectile/automatic/modular/bolt/sniper(src)
new /obj/item/gun/projectile/modular/bolt/sniper(src)
new /obj/item/part/gun/modular/grip/serb(src)
new /obj/item/part/gun/modular/mechanism/boltgun/heavy(src)
new /obj/item/part/gun/modular/barrel/antim/long(src)
Expand Down
Loading
Loading