calculation for next warbond now wraps around if you have euqal to or greater than 1000 sc
This commit is contained in:
parent
c21ac8a0f8
commit
2b5ab1c8fc
2 changed files with 4 additions and 2 deletions
5
logic.gd
5
logic.gd
|
|
@ -33,7 +33,7 @@ func _process(delta):
|
||||||
pause_button.disabled = !running
|
pause_button.disabled = !running
|
||||||
add10_button.disabled = !running
|
add10_button.disabled = !running
|
||||||
add100_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
|
undo_button.disabled = not pickups.size() > 0
|
||||||
|
|
||||||
current_sc_label.text = str(super_credits)
|
current_sc_label.text = str(super_credits)
|
||||||
|
|
@ -44,7 +44,8 @@ func _process(delta):
|
||||||
|
|
||||||
#returns the amount of minutes until 1000 sc reached
|
#returns the amount of minutes until 1000 sc reached
|
||||||
func get_next_warbond() -> int:
|
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:
|
if next_warbond_needed <= 0:
|
||||||
return 0
|
return 0
|
||||||
var sc_per_hour_min : float = round((pickups.size()*10)*(3600/timer))
|
var sc_per_hour_min : float = round((pickups.size()*10)*(3600/timer))
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ config_version=5
|
||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="SuperCreditFarm"
|
config/name="SuperCreditFarm"
|
||||||
|
run/main_scene="res://main.tscn"
|
||||||
config/features=PackedStringArray("4.3", "GL Compatibility")
|
config/features=PackedStringArray("4.3", "GL Compatibility")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue