Skip to content

Commit

Permalink
unused var, no sushi stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
thgvr committed Oct 5, 2024
1 parent eb1489c commit 98f0c9a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
15 changes: 6 additions & 9 deletions code/modules/projectiles/ammunition/_ammo_casing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@

///What this casing can be stacked into.
var/obj/item/ammo_box/magazine/stack_type = /obj/item/ammo_box/magazine/ammo_stack
///TRUE if the ammo stack is generic and we should give it info based on the casing
var/generic_stacking = TRUE
///Maximum stack size of ammunition
var/stack_size = 12

Expand Down Expand Up @@ -105,15 +103,15 @@
if(user)
to_chat(user, span_warning("[src] can't be stacked."))
return
if(caliber != other_casing.caliber)
if(name != other_casing.name) //Has to match exactly
if(user)
to_chat(user, span_warning("You can't stack different calibers."))
to_chat(user, span_warning("You can't stack different types of ammunition."))
return
if(stack_type != other_casing.stack_type)
if(user)
to_chat(user, span_warning("You can't stack [other_casing] with [src]."))
return
if(!BB || !other_casing.BB)
if(!BB || !other_casing.BB) //maybe allow empty casing stacking at a later date, when there's a feature to recycle casings
if(user)
to_chat(user, span_warning("You can't stack empty casings."))
return
Expand All @@ -129,10 +127,9 @@

/obj/item/ammo_casing/proc/stack_with(obj/item/ammo_casing/other_casing)
var/obj/item/ammo_box/magazine/ammo_stack/ammo_stack = new stack_type(drop_location())
if(generic_stacking)
ammo_stack.name = "handful of [caliber] rounds"
ammo_stack.base_icon_state = initial(icon_state)
ammo_stack.caliber = caliber
ammo_stack.name = "handful of [name]s" //"handful of .9mm bullet casings"
ammo_stack.base_icon_state = other_casing.icon_state
ammo_stack.caliber = caliber
ammo_stack.max_ammo = stack_size
ammo_stack.give_round(src)
ammo_stack.give_round(other_casing)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
var/image/bullet = image(initial(icon), src, "[base_icon_state]")
bullet.pixel_x = rand(-8, 8)
bullet.pixel_y = rand(-8, 8)
bullet.transform = bullet.transform.Turn(round(45 * rand(0, 32) / 2))
bullet.transform = bullet.transform.Turn(round(45 * rand(0, 32) / 2)) //this is the equation Eris uses on their bullet stacks
add_overlay(bullet)
return UPDATE_ICON_STATE | UPDATE_OVERLAYS

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
/obj/item/ammo_box/magazine/ammo_stack/prefilled

/obj/item/ammo_box/magazine/ammo_stack/prefilled/Initialize(mapload)

var/obj/item/ammo_casing/to_copy = ammo_type
src.top_off()
caliber = to_copy.caliber
base_icon_state = to_copy.icon_state
name = "handful of [to_copy.caliber] rounds"
name = "handful of [name]s"
update_appearance()
. = ..()

Expand Down
9 changes: 8 additions & 1 deletion shiptest.dme
Original file line number Diff line number Diff line change
Expand Up @@ -3022,8 +3022,15 @@
#include "code\modules\projectiles\ammunition\special\syringe.dm"
#include "code\modules\projectiles\boxes_magazines\_box_magazine.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_boxes.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stack.dm"
#include "code\modules\projectiles\boxes_magazines\generic_ammo_box.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\_ammo_stack.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\_premade_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_lmg_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_pistol_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_rifle_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_smg_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\premade_sniper_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\ammo_stacks\prefab_stacks\shotshell_stacks.dm"
#include "code\modules\projectiles\boxes_magazines\external\gauss.dm"
#include "code\modules\projectiles\boxes_magazines\external\grenade.dm"
#include "code\modules\projectiles\boxes_magazines\external\lmg.dm"
Expand Down

0 comments on commit 98f0c9a

Please sign in to comment.