Skip to content

Commit

Permalink
bugfix: hotfix #3816 (#3838)
Browse files Browse the repository at this point in the history
  • Loading branch information
Daeberdir authored Nov 9, 2023
1 parent cece28e commit 72b7645
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 28 deletions.
24 changes: 12 additions & 12 deletions _maps/map_files/generic/z2_old.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -10998,19 +10998,19 @@
/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/machinery/light/small{
brightness_range = 10;
light_range = 10;
Expand Down
2 changes: 1 addition & 1 deletion code/datums/outfits/outfit_admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@

backpack_contents = list(
/obj/item/storage/box/soviet = 1,
/obj/item/ammo_box/a762 = 4
/obj/item/ammo_box/speedloader/shotgun/a762 = 4
)

/datum/outfit/admin/soviet/conscript/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE)
Expand Down
12 changes: 6 additions & 6 deletions code/datums/supplypacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -578,12 +578,12 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY
name = "Mosin Nagant crate"
contains = list(/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/gun/projectile/shotgun/boltaction,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762,
/obj/item/ammo_box/a762)
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762,
/obj/item/ammo_box/speedloader/shotgun/a762)
cost = 80
containername = "Mosin Nagant rifle crate"
contraband = 1
Expand Down
12 changes: 9 additions & 3 deletions code/modules/projectiles/ammunition/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@
icon_state = "357OLD" // see previous entry for explanation of these vars
ammo_type = /obj/item/ammo_casing/a357
max_ammo = 20
multiple_sprites = 1

/obj/item/ammo_box/a357/update_icon()
icon_state = "[initial(icon_state)]-[round(stored_ammo.len / 3)]"
desc = "[initial(desc)] There are [stored_ammo.len] shell\s left!"

/obj/item/ammo_box/n762
name = "ammo box (7.62x38mmR)"
name = "ammo box (7.62x38mm)"
icon_state = "riflebox"
origin_tech = "combat=2"
ammo_type = /obj/item/ammo_casing/n762
Expand All @@ -23,6 +26,7 @@
icon_state = "slugbox"
ammo_type = /obj/item/ammo_casing/shotgun
max_ammo = 7
w_class = WEIGHT_CLASS_NORMAL

/obj/item/ammo_box/shotgun/buck
name = "Ammunition Box (Buckshot)"
Expand Down Expand Up @@ -257,10 +261,12 @@
* STRIPPER CLIP
*/

/obj/item/ammo_box/a762
/obj/item/ammo_box/speedloader/shotgun/a762
name = "stripper clip (7.62mm)"
desc = "A stripper clip."
icon_state = "762"
caliber = "7.62x54mm"
ammo_type = /obj/item/ammo_casing/a762
max_ammo = 5
multiple_sprites = 1
w_class = WEIGHT_CLASS_TINY
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/projectile/revolver.dm
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
. = ..()
if(.)
return
if(istype(A, /obj/item/ammo_box/speedloader))
if(istype(A, /obj/item/ammo_box/speedloader) || istype(A, /obj/item/ammo_casing))
var/num_loaded = magazine.attackby(A, user, params, TRUE)
if(num_loaded)
to_chat(user, span_notice("You load [num_loaded] shell\s into \the [src]."))
Expand Down
11 changes: 6 additions & 5 deletions code/modules/projectiles/guns/projectile/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@
. = ..()
if(.)
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
A.update_icon()
update_icon()
if(istype(A, /obj/item/ammo_box/speedloader/shotgun) || istype(A, /obj/item/ammo_casing))
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
to_chat(user, "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>")
A.update_icon()
update_icon()


/obj/item/gun/projectile/shotgun/process_chamber()
Expand Down

0 comments on commit 72b7645

Please sign in to comment.