Skip to content

Commit

Permalink
makes CO pistol indestructible as intended, makes m47 able to BE, inc…
Browse files Browse the repository at this point in the history
…reases ROF, lowers damage, increases scatter, prevents putting compensator or burst fire on m47
  • Loading branch information
zc-byte-boxer committed Jul 17, 2024
1 parent 7c2c77d commit f6da020
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 11 deletions.
10 changes: 8 additions & 2 deletions code/datums/ammo/bullet/pistol.dm
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,30 @@
sound_override = null

// Used by M1911, Deagle and KT-42
/datum/ammo/bullet/pistol/heavy/New()
..()
RegisterSignal(src, COMSIG_AMMO_POINT_BLANK, PROC_REF(handle_battlefield_execution))

/datum/ammo/bullet/pistol/heavy
name = "heavy pistol bullet"
headshot_state = HEADSHOT_OVERLAY_MEDIUM
accuracy = -HIT_ACCURACY_TIER_3
accuracy_var_low = PROJECTILE_VARIANCE_TIER_6
damage = 55
damage_falloff = DAMAGE_FALLOFF_TIER_5
penetration = ARMOR_PENETRATION_TIER_3
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

/datum/ammo/bullet/pistol/heavy/m47/apimpact
name = "heavy ap pistol bullet"
penetration = ARMOR_PENETRATION_TIER_1
damage = 45
penetration = ARMOR_PENETRATION_TIER_10
debilitate = list(0,1.5,0,0,0,1,0,0)
flags_ammo_behavior = AMMO_BALLISTIC

/datum/ammo/bullet/pistol/m47/impact
name = "heavy impact pistol bullet"
damage = 50
penetration = ARMOR_PENETRATION_TIER_1
debilitate = list(0,1.5,0,0,0,1,0,0)
flags_ammo_behavior = AMMO_BALLISTIC
Expand All @@ -120,7 +127,6 @@
name = "heavy pistol hollowpoint"
damage = 70
penetration = ARMOR_PENETRATION_TIER_1
shrapnel_chance = SHRAPNEL_CHANCE_TIER_2

// 50 cal

Expand Down
4 changes: 2 additions & 2 deletions code/game/objects/items/storage/belt.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1137,7 +1137,7 @@


/obj/item/storage/belt/gun/m4a3/m47/co/fill_preset_inventory()
handle_item_insertion(new /obj/item/weapon/gun/pistol/m47())
handle_item_insertion(new /obj/item/weapon/gun/pistol/m47/co())
new /obj/item/ammo_magazine/pistol/m47/impact(src)
new /obj/item/ammo_magazine/pistol/m47/impact(src)
new /obj/item/ammo_magazine/pistol/m47/apimpact(src)
Expand All @@ -1155,7 +1155,7 @@
new /obj/item/ammo_magazine/pistol/m47(src)

/obj/item/storage/belt/gun/m4a3/m47/foreconco/fill_preset_inventory()
handle_item_insertion(new /obj/item/weapon/gun/pistol/m47())
handle_item_insertion(new /obj/item/weapon/gun/pistol/m47/co())
new /obj/item/ammo_magazine/pistol/m47/impact(src)
new /obj/item/ammo_magazine/pistol/m47/hp(src)

Expand Down
28 changes: 22 additions & 6 deletions code/modules/projectiles/guns/pistols.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,23 +169,37 @@
empty_sound = null
flags_gun_features = GUN_CAN_POINTBLANK|GUN_ONE_HAND_WIELDED|GUN_AUTO_EJECTOR|GUN_AMMO_COUNTER
current_mag = /obj/item/ammo_magazine/pistol/m47

attachable_allowed = list(
/obj/item/attachable/suppressor,
/obj/item/attachable/reddot,
/obj/item/attachable/reflex,
/obj/item/attachable/flashlight,
/obj/item/attachable/lasersight,
/obj/item/attachable/extended_barrel,
/obj/item/attachable/heavy_barrel,
)

/obj/item/weapon/gun/pistol/m47/set_gun_attachment_offsets()
attachable_offset = list("muzzle_x" = 26, "muzzle_y" = 20,"rail_x" = 12, "rail_y" = 22, "under_x" = 21, "under_y" = 17, "stock_x" = 21, "stock_y" = 17)


/obj/item/weapon/gun/pistol/m47/set_gun_config_values()
..()
set_burst_delay(FIRE_DELAY_TIER_7)
set_fire_delay(FIRE_DELAY_TIER_9)
accuracy_mult = BASE_ACCURACY_MULT + HIT_ACCURACY_MULT_TIER_6
accuracy_mult_unwielded = BASE_ACCURACY_MULT
scatter = SCATTER_AMOUNT_TIER_8
burst_scatter_mult = SCATTER_AMOUNT_TIER_6
scatter_unwielded = SCATTER_AMOUNT_TIER_6
scatter = SCATTER_AMOUNT_TIER_7
scatter_unwielded = SCATTER_AMOUNT_TIER_5
recoil = RECOIL_AMOUNT_TIER_4
recoil_unwielded = RECOIL_AMOUNT_TIER_3
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_4
damage_mult = BASE_BULLET_DAMAGE_MULT + BULLET_DAMAGE_MULT_TIER_3

/obj/item/weapon/gun/pistol/m47/co
name = "\improper custom M47A2 offensive handgun"
desc_lore = "The feeding ramp is polished to a mirror sheen, with a reinforced slide, and tightened locking mechanisms in the frame for added precision. The thumb safety is extended to make it easier on the finger, with a long-type trigger with non-slip grooves. A ring hammer. The base of the trigger guards's been filed down for a higher grip, too. And not only that, but nearly every other part of this gun has been expertly crafted and customized by USMC armourers."
unacidable = TRUE
indestructible = 1
current_mag = /obj/item/ammo_magazine/pistol/m47/impact

//-------------------------------------------------------
//Beretta 92FS, the gun McClane carries around in Die Hard. Very similar to the service pistol, all around.
Expand Down Expand Up @@ -272,6 +286,8 @@
icon = 'icons/obj/items/weapons/guns/guns_by_faction/colony.dmi'
icon_state = "c_deagle"
item_state = "c_deagle"
unacidable = TRUE
indestructible = 1
current_mag = /obj/item/ammo_magazine/pistol/heavy/super/highimpact
black_market_value = 100

Expand Down
3 changes: 2 additions & 1 deletion code/modules/projectiles/guns/revolvers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,8 @@
icon = 'icons/obj/items/weapons/guns/guns_by_faction/uscm.dmi'
icon_state = "mateba"
item_state = "mateba"

unacidable = TRUE
indestructible = 1
fire_sound = 'sound/weapons/gun_mateba.ogg'
current_mag = /obj/item/ammo_magazine/internal/revolver/mateba
force = 15
Expand Down

0 comments on commit f6da020

Please sign in to comment.