fixes progress bar looking wonky as fuck

This commit is contained in:
Iamgoofball
2015-06-13 01:10:41 -07:00
parent 2dbf9d9604
commit 5259fcde00
+11 -11
View File
@@ -714,27 +714,27 @@ Turf and target are seperate in case you want to teleport some distance from a t
user.overlays += img
for(var/i = 0, i<numticks, i++)
var/image/img2
var/percent = (i / numticks) * 100
var/percent = round(((i / numticks) * 100))
switch(percent)
if(-INFINITY to 10)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_0")
if(10 to 20)
if(11 to 20)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_10")
if(20 to 30)
if(21 to 30)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_20")
if(30 to 40)
if(31 to 40)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_30")
if(40 to 50)
if(41 to 50)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_40")
if(50 to 60)
if(51 to 60)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_50")
if(60 to 70)
if(61 to 70)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_60")
if(70 to 80)
if(71 to 80)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_70")
if(80 to 90)
if(81 to 90)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_80")
if(90 to 100)
if(91 to 100)
img2 = new('icons/effects/doafter_icon.dmi', "prog_bar_90")
if(img2)
img2.pixel_y = 32
@@ -1323,4 +1323,4 @@ var/list/WALLITEMS = list(
return pick("red","green","blue","brown","yellow","orange","darkred","crimson",
"lime","darkgreen","cyan","navy","teal","purple","indigo")
else
return "white"
return "white"