Skip to content

Commit

Permalink
There, begone problems.
Browse files Browse the repository at this point in the history
  • Loading branch information
Loiosh42 committed Jan 13, 2025
1 parent 0e6d02a commit f3c57f1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 9 additions & 6 deletions code/modules/projectiles/boxes_magazines/_box_magazine.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
var/list/bullet_cost
///cost of the materials in the magazine/box itself
var/list/base_cost
///Whether the sprite updates if it has ammunition, monke var
var/spriteshift = TRUE

/obj/item/ammo_box/Initialize(mapload)
. = ..()
Expand Down Expand Up @@ -173,12 +175,13 @@
desc = "[initial(desc)] There [(shells_left == 1) ? "is" : "are"] [shells_left] shell\s left!"

/obj/item/ammo_box/update_icon_state()
var/shells_left = LAZYLEN(stored_ammo)
switch(multiple_sprites)
if(AMMO_BOX_PER_BULLET)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left]"
if(AMMO_BOX_FULL_EMPTY)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left ? "full" : "empty"]"
if(spriteshift == TRUE) ///this if loop is monke edit
var/shells_left = LAZYLEN(stored_ammo)
switch(multiple_sprites)
if(AMMO_BOX_PER_BULLET)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left]"
if(AMMO_BOX_FULL_EMPTY)
icon_state = "[multiple_sprite_use_base ? base_icon_state : initial(icon_state)]-[shells_left ? "full" : "empty"]"
return ..()

/// Updates the amount of material in this ammo box according to how many bullets are left in it.
Expand Down
4 changes: 1 addition & 3 deletions monkestation/code/game/objects/items/tactical_shields.dm
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@
armor_type = /datum/armor/item_shield
block_sound = 'sound/weapons/block_shield.ogg'
start_empty = TRUE
spriteshift = FALSE
var/tutel_break_leftover = /obj/item/broken_shield

/obj/item/ammo_box/tacshield/tutel/update_icon_state()
return ..()

/obj/item/ammo_box/tacshield/tutel/examine(mob/user)
. = ..()
var/healthpercent = round((atom_integrity/max_integrity) * 100, 1)
Expand Down

0 comments on commit f3c57f1

Please sign in to comment.