Ammo Display Fix (#10096)

Fixed HUD ammo displays being lopsided when ammo counts were between 20 and 9.
This commit is contained in:
Geeves
2020-09-27 17:41:21 +02:00
committed by GitHub
parent 1f1f3260b1
commit 749eea8cb1
2 changed files with 13 additions and 3 deletions
+7 -3
View File
@@ -928,8 +928,12 @@
if(!ismob(loc) && !ismob(loc.loc))
maptext = ""
return
if(get_ammo() > 9)
maptext_x = 18
var/ammo = get_ammo()
if(ammo > 9)
if(ammo < 20)
maptext_x = 20
else
maptext_x = 18
else
maptext_x = 22
maptext = "<span style=\"font-family: 'Small Fonts'; -dm-text-outline: 1 black; font-size: 7px;\">[get_ammo()]</span>"
maptext = "<span style=\"font-family: 'Small Fonts'; -dm-text-outline: 1 black; font-size: 7px;\">[ammo]</span>"