Pipegun Buff (#12365)

This commit is contained in:
Geeves
2021-08-31 18:05:02 +02:00
committed by GitHub
parent 996fa086bc
commit 6c5e9aa111
12 changed files with 83 additions and 30 deletions

View File

@@ -236,7 +236,7 @@
max_ammo = 15
/obj/item/ammo_magazine/a556/carbine/empty
max_ammo = 0
initial_ammo = 0
/obj/item/ammo_magazine/a556/carbine/practice
name = "carbine magazine (5.56mm practice)"
@@ -248,6 +248,16 @@
origin_tech = list(TECH_COMBAT = 3)
ammo_type = /obj/item/ammo_casing/a556/ap
/obj/item/ammo_magazine/a556/makeshift
name = "makeshift magazine (5.56mm)"
icon_state = "5.56m"
origin_tech = list(TECH_COMBAT = 1)
matter = list(DEFAULT_WALL_MATERIAL = 600)
max_ammo = 7
/obj/item/ammo_magazine/a556/makeshift/empty
initial_ammo = 0
/obj/item/ammo_magazine/a50
name = "magazine (.50)"
icon_state = "50ae"

View File

@@ -90,6 +90,7 @@
to_chat(user, "<span class='danger'>\The [src] jams!</span>")
balloon_alert(user, SPAN_RED("JAM"))
jam_num = rand(2, 5) // gotta attackself two to five times to unjam
return FALSE
return TRUE
/obj/item/gun/projectile/proc/process_chambered()

View File

@@ -59,13 +59,25 @@
caliber = "a556"
ammo_type = null
magazine_type = null
max_shells = 4
allowed_magazines = list(/obj/item/ammo_magazine/a556/makeshift)
load_method = MAGAZINE
max_shells = 7
can_sawoff = FALSE
needspin = FALSE
has_safety = FALSE
jam_chance = 0
slot_flags = SLOT_BACK|SLOT_S_STORE // can be stored in suit slot due to built in sling
jam_chance = -10
/obj/item/gun/projectile/shotgun/pump/rifle/pipegun/handle_pump_loading()
if(ammo_magazine && length(ammo_magazine.stored_ammo))
var/obj/item/ammo_casing/AC = ammo_magazine.stored_ammo[1] //load next casing.
if(AC)
AC.forceMove(src)
ammo_magazine.stored_ammo -= AC
chambered = AC
/obj/item/gun/projectile/shotgun/pump/rifle/pipegun/examine(mob/user)
. = ..()

View File

@@ -68,8 +68,7 @@
/obj/item/gun/projectile/shotgun/pump/unique_action(mob/living/user)
if(jam_num)
return
else if(unjam_cooldown + 2 SECONDS > world.time)
to_chat(user, SPAN_WARNING("\The [src] is jammed!"))
return
if(world.time >= recentpump + 10)
pump(user)
@@ -88,14 +87,17 @@
playsound(src.loc, chambered.drop_sound, DROP_SOUND_VOLUME, FALSE, required_asfx_toggles = ASFX_DROPSOUND)
chambered = null
handle_pump_loading()
update_maptext()
update_icon()
/obj/item/gun/projectile/shotgun/pump/proc/handle_pump_loading()
if(length(loaded))
var/obj/item/ammo_casing/AC = loaded[1] //load next casing.
loaded -= AC //Remove casing from loaded list.
chambered = AC
update_maptext()
update_icon()
/obj/item/gun/projectile/shotgun/pump/combat
name = "combat shotgun"
desc = "Built for close quarters combat, the Hephaestus Industries KS-40 is widely regarded as a weapon of choice for repelling boarders."