Skip to content

Commit

Permalink
bugfix: Incorrect display of ammo in the clip (ss220-space#5083)
Browse files Browse the repository at this point in the history
* fix

* update_appearance
  • Loading branch information
Samirakis authored May 25, 2024
1 parent d3a1d1d commit ed89b55
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion code/game/objects/items/weapons/storage/boxes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1030,7 +1030,7 @@
gun.attackby(MA, user)
if(magazine)
magazine.loc = src
magazine.update_icon()
magazine.update_appearance(UPDATE_ICON | UPDATE_DESC)
return

/obj/item/storage/box/sec
Expand Down
4 changes: 2 additions & 2 deletions code/modules/projectiles/guns/projectile.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
else
to_chat(user, span_notice("You perform a tactical reload on \the [src], replacing the magazine."))
magazine.loc = get_turf(loc)
magazine.update_icon()
magazine.update_appearance(UPDATE_ICON | UPDATE_DESC)
magazine = null
reload(AM, user)
return TRUE
Expand Down Expand Up @@ -162,7 +162,7 @@
if(magazine)
magazine.loc = get_turf(loc)
user.put_in_hands(magazine)
magazine.update_icon()
magazine.update_appearance(UPDATE_ICON | UPDATE_DESC)
magazine = null
update_weight()
to_chat(user, span_notice("You pull the magazine out of \the [src]!"))
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/projectile/automatic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
if(magazine)
to_chat(user, "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>")
magazine.loc = get_turf(loc)
magazine.update_icon()
magazine.update_appearance(UPDATE_ICON | UPDATE_DESC)
magazine = null
else
to_chat(user, "<span class='notice'>You insert the magazine into \the [src].</span>")
Expand Down
2 changes: 1 addition & 1 deletion code/modules/projectiles/guns/projectile/saw.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
..()
else if(cover_open && magazine)
//drop the mag
magazine.update_icon()
magazine.update_appearance(UPDATE_ICON | UPDATE_DESC)
magazine.loc = get_turf(loc)
user.put_in_hands(magazine)
magazine = null
Expand Down

0 comments on commit ed89b55

Please sign in to comment.