calculation for next warbond now wraps around if you have euqal to or greater than 1000 sc

This commit is contained in:
Clevertop 2024-12-21 19:38:45 +11:00
parent c21ac8a0f8
commit 2b5ab1c8fc
2 changed files with 4 additions and 2 deletions

View file

@ -33,7 +33,7 @@ func _process(delta):
pause_button.disabled = !running
add10_button.disabled = !running
add100_button.disabled = !running
reset_button.disabled = not pickups.size() > 0
reset_button.disabled = not timer > 0
undo_button.disabled = not pickups.size() > 0
current_sc_label.text = str(super_credits)
@ -44,7 +44,8 @@ func _process(delta):
#returns the amount of minutes until 1000 sc reached
func get_next_warbond() -> int:
var next_warbond_needed : float = 1000 - super_credits
var next_warbond_needed : float = 1000 - wrap(super_credits,0, 1000)
if next_warbond_needed <= 0:
return 0
var sc_per_hour_min : float = round((pickups.size()*10)*(3600/timer))

View file

@ -11,6 +11,7 @@ config_version=5
[application]
config/name="SuperCreditFarm"
run/main_scene="res://main.tscn"
config/features=PackedStringArray("4.3", "GL Compatibility")
config/icon="res://icon.svg"