Browse Source

[added] floor for song freshness to stop <0 value

Dank 8 months ago
parent
commit
09ee011f32
1 changed files with 2 additions and 0 deletions
  1. 2 0
      locations/cikl.qsrc

+ 2 - 0
locations/cikl.qsrc

@@ -1197,6 +1197,8 @@ if ml_onlinesongcount > 0:
 			if ml_tempsong_uploaded = 1 and (daystart ! ml_tempsong_dayuploaded[j]) and ((daystart - ml_tempsong_dayuploaded[j]) mod(7)) = 0:
             	gs 'fame', 'city', 'music', rand(0, ml_tempsong_freshness[j]/100)
             	ml_tempsong_freshness[j] -= 10
+				!! freshness < 0 shouldn not break anything, but at least for the sake of a clean display it should not go negative
+				if ml_tempsong_freshness[j] < 0: ml_tempsong_freshness[j] = 0
 
 			end
 		end