mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-25 22:12:58 +01:00
Shotgun Consistency (#17769)
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
desc_info = "This is a shotgun, chambered for various shells and slugs. To fire the weapon, toggle the safety with CTRL-Click or enable 'HARM' intent, then click where \
|
||||
you want to fire. To pump a pump-action shotgun, use the Unique-Action hotkey or the button in the bottom right of your screen. To reload, insert shells or a magazine \
|
||||
into the shotgun, then pump the shotgun to chamber a fresh round."
|
||||
accuracy = 1
|
||||
var/can_sawoff = FALSE
|
||||
var/sawnoff_workmsg
|
||||
var/sawing_in_progress = FALSE
|
||||
@@ -48,6 +49,7 @@
|
||||
icon = 'icons/obj/guns/shotgun.dmi'
|
||||
icon_state = "shotgun"
|
||||
item_state = "shotgun"
|
||||
accuracy = 0
|
||||
max_shells = 4
|
||||
w_class = ITEMSIZE_LARGE
|
||||
force = 10
|
||||
@@ -112,6 +114,7 @@
|
||||
icon_state = "cshotgun"
|
||||
item_state = "cshotgun"
|
||||
origin_tech = list(TECH_COMBAT = 5, TECH_MATERIAL = 2)
|
||||
accuracy = 2
|
||||
max_shells = 7 //match the ammo box capacity, also it can hold a round in the chamber anyways, for a total of 8.
|
||||
ammo_type = /obj/item/ammo_casing/shotgun
|
||||
fire_sound = 'sound/weapons/gunshot/gunshot_shotgun.ogg'
|
||||
@@ -183,6 +186,7 @@
|
||||
icon = 'icons/obj/guns/sawnshotgun.dmi'
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "sawnshotgun"
|
||||
accuracy = 0
|
||||
is_wieldable = FALSE
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
force = 5
|
||||
@@ -198,6 +202,7 @@
|
||||
icon = 'icons/obj/guns/sawnshotgun.dmi'
|
||||
icon_state = "sawnshotgun"
|
||||
item_state = "sawnshotgun"
|
||||
accuracy = 0
|
||||
is_wieldable = FALSE
|
||||
slot_flags = SLOT_BELT|SLOT_HOLSTER
|
||||
ammo_type = /obj/item/ammo_casing/shotgun/pellet
|
||||
|
||||
@@ -92,11 +92,21 @@
|
||||
if(target_mob.lying && target_mob != original && prob(prone_chance))
|
||||
continue
|
||||
|
||||
//pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
|
||||
//whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
|
||||
// pellet hits spread out across different zones, but 'aim at' the targeted zone with higher probability
|
||||
// whether the pellet actually hits the def_zone or a different zone should still be determined by the parent using get_zone_with_miss_chance().
|
||||
var/old_zone = def_zone
|
||||
def_zone = ran_zone(def_zone, spread)
|
||||
if (..()) hits++
|
||||
// relatively hacky way of basing a shotgun pellet's likelihood of hitting on the first pellet of the burst while not affecting shrapnel explosions.
|
||||
if (base_spread > 0)
|
||||
if (i == 1)
|
||||
if (..())
|
||||
hits++
|
||||
else
|
||||
return 0
|
||||
else if (..(target_mob, distance, -100))
|
||||
hits++
|
||||
else if (..())
|
||||
hits++
|
||||
def_zone = old_zone //restore the original zone the projectile was aimed at
|
||||
|
||||
pellets -= hits //each hit reduces the number of pellets left
|
||||
|
||||
Reference in New Issue
Block a user