Untitled
unknown
plain_text
9 months ago
52 kB
27
Indexable
extends Control
var upgrade_num = 1
var active_weapon = null
var eig = 0
var burst_price = 5000
var overclock_price = 5009
var dmr_price = 5008
var laser_price = 500
var vertical_grip_price = 5006
var angled_grip_price = 5001
var bmg_price = 500
var shotgun_price = 550
var piercing_price = 5010
var ricochet_price = 500
var hollow_point_price = 5002
var armor_piercing_price = 500
var explosive_rounds_price = 5002
var resonance_rounds_price = 5002
var concussive_rounds_price = 500
var high_velocity_price = 5003
var mythic_rounds_price = 5002
var bounce_rounds_price = 5001
var brass_barrel_price = 500
var suppressor_price = 500
var stabalizing_barrel_price = 5003
var hellfire_barrel_price = 500
var volatile_barrel_price = 500
var deadeye_barrel_price = 5004
var nomad_lens_price = 500
var cobalt_scope_price = 5005
var deadeye_optic_price = 5006
var siphon_price = 5001
var ammo_supply_price = 5002
var point_blank_price = 500
var tactical_stock_price = 500
var alloy_stock_price = 5007
var pouch_stock_price = 500
var makeshift_stock_price = 5008
var extra_mag_price = 5003
var critical_mag_price = 5009
var quick_reload_price = 5003
var adaptive_mag_price = 5009
var explosive_mag_price = 5004
var burst_pos = 0
var overclock_pos = 1
var dmr_pos = 2
var laser_pos = 3
var vertical_grip_pos = 4
var angled_grip_pos = 5
var bmg_pos = 6
var shotgun_pos = 7
var piercing_pos = 8
var ricochet_pos = 9
var hollow_point_pos = 10
var armor_piercing_pos = 11
var explosive_rounds_pos = 12
var resonance_rounds_pos = 13
var concussive_rounds_pos = 14
var bounce_rounds_pos = 17
var high_velocity_pos = 15
var mythic_rounds_pos = 16
var brass_barrel_pos = 18
var suppressor_pos = 19
var stabalizing_barrel_pos = 20
var hellfire_barrel_pos = 21
var volatile_barrel_pos = 22
var deadeye_barrel_pos = 23
var nomad_lens_pos = 24
var cobalt_scope_pos = 25
var deadeye_optic_pos = 26
var siphon_pos = 27
var ammo_supply_pos = 28
var point_blank_pos = 29
var tactical_stock_pos = 30
var alloy_stock_pos = 31
var pouch_stock_pos = 32
var makeshift_stock_pos = 33
var extra_mag_pos = 34
var critical_mag_pos = 35
var quick_reload_pos = 36
var adaptive_mag_pos = 37
var explosive_mag_pos = 38
var choice_1 = null
var choice_2 = null
var choice_3 = null
var choice_4 = null
var choice_5 = null
var choice_6 = null
var choice_7 = null
var clicked = false
var flippin = false
var finished_flippin = false
var rot_num = 0
var active_choice = null
var chosen = false
var stay_up = true
var chosen1 = false
var chosen2 = false
var chosen3 = false
var chosen4 = false
var chosen5 = false
@onready var item_name = $upgradesRevolve/itemContainer/itemName
@onready var item_tag = $upgradesRevolve/itemContainer/itemDescription
@onready var price = $upgradesRevolve/priceContainer/buy/moneyContainer/money
@onready var active_choice1 = $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice
var active_price_choice = active_choice1
var flip_choice1 = false
var flip_choice2 = false
var flip_choice3 = false
var flip_choice4 = false
var flip_choice5 = false
var blank_choice1 = false
var blank_choice2 = false
var blank_choice3 = false
var blank_choice4 = false
var blank_choice5 = false
var tween_rot1: Tween
var tween_hover1: Tween
var tween_rot2: Tween
var tween_hover2: Tween
var tween_rot3: Tween
var tween_hover3: Tween
var tween_rot4: Tween
var tween_hover4: Tween
var tween_rot5: Tween
var tween_hover5: Tween
var tween_rot6: Tween
var tween_hover6: Tween
var tween_rot7: Tween
var tween_hover7: Tween
# Called when the node enters the scene tree for the first time.
func _ready():
$upgradesRevolve/expandRerollAnimations.play("RESET")
TranslationServer.reload_pseudolocalization()
TranslationServer.set_locale("en")
load("res://encoded-BreachingHarkonLanguage - Sheet1.csv")
randomize_choices1()
randomize_choices2()
randomize_choices33()
randomize_choices44()
randomize_choices5()
func randomize_choices1():
var selected = randi() % 38
randomize()
choice_1 = selected
func randomize_choices2():
var selected = randi() % 38
randomize()
choice_2 = selected
if choice_2 == choice_1:
randomize_choices2()
func randomize_choices3():
var selected = randi() % 38
randomize()
choice_3 = selected
print(str(choice_3) + " BOOOM")
if choice_3 == choice_1 or choice_3 == choice_2:
randomize_choices3()
func randomize_choices4():
var selected = randi() % 38
randomize()
choice_4 = selected
if choice_4 == choice_1 or choice_4 == choice_2 or choice_4 == choice_3:
randomize_choices4()
func randomize_choices5():
var selected = randi() % 38
randomize()
choice_5 = selected
if choice_5 == choice_1 or choice_5 == choice_2 or choice_5 == choice_3 or choice_5 == choice_4:
randomize_choices5()
func randomize_choices33():
var selected = randi() % 38
randomize()
choice_3 = burst_pos
print(str(choice_3) + " BOOOM")
func randomize_choices44():
var selected = randi() % 38
randomize()
choice_4 = dmr_pos
print(str(choice_4) + " BOOOM")
func randomize_active_choice():
#await get_tree().create_timer(0.2).timeout
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice:
randomize_choices1()
flip_choice1 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice:
randomize_choices2()
flip_choice2 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice:
randomize_choices3()
flip_choice3 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice:
randomize_choices4()
flip_choice4 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice:
randomize_choices5()
flip_choice5 = true
func hide_active_choice():
#await get_tree().create_timer(0.2).timeout
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice:
blank_choice1 = true
flip_choice1 = true
active_choice = null
await get_tree().create_timer(0.2).timeout
$upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice.frame = 39
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice:
blank_choice2 = true
flip_choice2 = true
active_choice = null
await get_tree().create_timer(0.2).timeout
$upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice.frame = 39
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice:
blank_choice3 = true
flip_choice3 = true
active_choice = null
await get_tree().create_timer(0.2).timeout
$upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice.frame = 39
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice:
blank_choice4 = true
flip_choice4 = true
active_choice = null
await get_tree().create_timer(0.2).timeout
$upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice.frame = 39
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice:
blank_choice5 = true
flip_choice5 = true
active_choice = null
await get_tree().create_timer(0.2).timeout
$upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice.frame = 39
func reroll():
if $timerNodes/rerollTimer.is_stopped():
$timerNodes/rerollTimer.start()
if chosen1:
mouseExitChoice1()
if chosen2:
mouseExitChoice2()
if chosen3:
mouseExitChoice3()
if chosen4:
mouseExitChoice4()
if chosen5:
mouseExitChoice5()
stats_bg_stuff()
$upgradesRevolve/expandRerollAnimations.play("expand")
Global.money -= 250
flippin = true
rerollTween()
mouseEnterChoice1()
await get_tree().create_timer(0.1).timeout
$upgradesRevolve/container/container2/choiceContainerCon1/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
await get_tree().create_timer(0.1).timeout
blank_choice1 = false
randomize_choices1()
await get_tree().create_timer(0.6).timeout
mouseExitChoice1()
await get_tree().create_timer(0.4).timeout
mouseEnterChoice2()
await get_tree().create_timer(0.1).timeout
$upgradesRevolve/container/container2/choiceContainerCon2/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
await get_tree().create_timer(0.1).timeout
blank_choice2 = false
randomize_choices2()
await get_tree().create_timer(0.6).timeout
mouseExitChoice2()
await get_tree().create_timer(0.4).timeout
mouseEnterChoice3()
await get_tree().create_timer(0.1).timeout
$upgradesRevolve/container/container2/choiceContainerCon3/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
await get_tree().create_timer(0.1).timeout
blank_choice3 = false
randomize_choices3()
await get_tree().create_timer(0.6).timeout
mouseExitChoice3()
await get_tree().create_timer(0.4).timeout
mouseEnterChoice4()
await get_tree().create_timer(0.1).timeout
$upgradesRevolve/container/container2/choiceContainerCon4/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
await get_tree().create_timer(0.1).timeout
blank_choice4 = false
randomize_choices4()
await get_tree().create_timer(0.6).timeout
mouseExitChoice4()
await get_tree().create_timer(0.4).timeout
mouseEnterChoice5()
await get_tree().create_timer(0.1).timeout
$upgradesRevolve/container/container2/choiceContainerCon5/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
await get_tree().create_timer(0.1).timeout
blank_choice5 = false
randomize_choices5()
await get_tree().create_timer(0.6).timeout
mouseExitChoice5()
flippin = false
await get_tree().create_timer(1.0).timeout
finished_flippin = true
func stats_bg_stuff():
await get_tree().create_timer(6.3).timeout
$statsUI.enter()
func price_stuff():
if active_price_choice != null:
if flippin:
return
if active_price_choice.frame == piercing_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("PIERCING_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("PIERCING") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(piercing_price) + "[/color][/center]"
if active_price_choice.frame == brass_barrel_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BARREL_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BARREL") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(brass_barrel_price) + "[/color][/center]"
if active_price_choice.frame == suppressor_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SILENCER_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SILENCER") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(suppressor_price) + "[/color][/center]"
if active_price_choice.frame == extra_mag_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MAGAZINE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MAGAZINE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(extra_mag_price) + "[/color][/center]"
if active_price_choice.frame == tactical_stock_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("STOCK_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("STOCK") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(tactical_stock_price) + "[/color][/center]"
if active_price_choice.frame == critical_mag_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CRIT_MAG_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CRIT_MAG") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(critical_mag_price) + "[/color][/center]"
if active_price_choice.frame == stabalizing_barrel_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("STABLE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("STABLE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(stabalizing_barrel_price) + "[/color][/center]"
if active_price_choice.frame == overclock_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("OVERCLOCK_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("OVERCLOCK") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(overclock_price) + "[/color][/center]"
if active_price_choice.frame == ricochet_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("RICOCHET_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("RICOCHET") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(ricochet_price) + "[/color][/center]"
if active_price_choice.frame == hollow_point_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("HOLLOW_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("HOLLOW") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(hollow_point_price) + "[/color][/center]"
if active_price_choice.frame == armor_piercing_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ARMORP_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ARMORP") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(armor_piercing_price) + "[/color][/center]"
if active_price_choice.frame == quick_reload_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("QUICKR_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("QUICKR") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(quick_reload_price) + "[/color][/center]"
if active_price_choice.frame == laser_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("LASER_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("LASER") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(laser_price) + "[/color][/center]"
if active_price_choice.frame == siphon_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SIPHON_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SIPHON") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(siphon_price) + "[/color][/center]"
if active_price_choice.frame == concussive_rounds_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CONC_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CONC") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(concussive_rounds_price) + "[/color][/center]"
if active_price_choice.frame == ammo_supply_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CONTIN_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("CONTIN") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(ammo_supply_price) + "[/color][/center]"
if active_price_choice.frame == burst_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BURST_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BURST") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(burst_price) + "[/color][/center]"
if active_price_choice.frame == explosive_rounds_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("EXPLOSIVE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("EXPLOSIVE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(explosive_rounds_price) + "[/color][/center]"
if active_price_choice.frame == resonance_rounds_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("RESONANCE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("RESONANCE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(resonance_rounds_price) + "[/color][/center]"
if active_price_choice.frame == hellfire_barrel_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("HELLFIRE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("HELLFIRE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(hellfire_barrel_price) + "[/color][/center]"
if active_price_choice.frame == dmr_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DMR_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DMR") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(dmr_price) + "[/color][/center]"
if active_price_choice.frame == vertical_grip_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VERTICAL_FOREGRIP_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VERTICAL_FOREGRIP") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(vertical_grip_price) + "[/color][/center]"
if active_price_choice.frame == angled_grip_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ANGLED_GRIP_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ANGLED_GRIP") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(angled_grip_price) + "[/color][/center]"
if active_price_choice.frame == bmg_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BMG_LAUNCHER_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BMG_LAUNCHER") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(bmg_price) + "[/color][/center]"
if active_price_choice.frame == shotgun_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SHOTGUN_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("SHOTGUN") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(shotgun_price) + "[/color][/center]"
if active_price_choice.frame == high_velocity_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VELOCITY_ROUNDS_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VELOCITY_ROUNDS") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(high_velocity_price) + "[/color][/center]"
if active_price_choice.frame == bounce_rounds_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BOUNCE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("BOUNCE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(bounce_rounds_price) + "[/color][/center]"
if active_price_choice.frame == mythic_rounds_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MYTHIC_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MYTHIC") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(mythic_rounds_price) + "[/color][/center]"
if active_price_choice.frame == volatile_barrel_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VOLATILE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("VOLATILE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(volatile_barrel_price) + "[/color][/center]"
if active_price_choice.frame == deadeye_barrel_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DEADEYE_BARREL_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DEADEYE_BARREL") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(deadeye_barrel_price) + "[/color][/center]"
if active_price_choice.frame == nomad_lens_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("NOMAD_LENS_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("NOMAD_LENS") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(nomad_lens_price) + "[/color][/center]"
if active_price_choice.frame == cobalt_scope_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("COBALT_SCOPE_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("COBALT_SCOPE") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(cobalt_scope_price) + "[/color][/center]"
if active_price_choice.frame == deadeye_optic_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DEADEYE_OPTIC_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("DEADEYE_OPTIC") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(deadeye_optic_price) + "[/color][/center]"
if active_price_choice.frame == point_blank_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("POINT_BLANK_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("POINT_BLANK") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(point_blank_price) + "[/color][/center]"
if active_price_choice.frame == alloy_stock_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ALLOY_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ALLOY") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(alloy_stock_price) + "[/color][/center]"
if active_price_choice.frame == pouch_stock_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("POUCH_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("POUCH") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(pouch_stock_price) + "[/color][/center]"
if active_price_choice.frame == makeshift_stock_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MAKESHIFT_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("MAKESHIFT") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(makeshift_stock_price) + "[/color][/center]"
if active_price_choice.frame == adaptive_mag_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ADAPTIVE_MAG_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("ADAPTIVE_MAG") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(adaptive_mag_price) + "[/color][/center]"
if active_price_choice.frame == explosive_mag_pos:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("EXPLOSIVE_MAG_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("EXPLOSIVE_MAG") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]buy - [color=#8eb138]" + "$" + str(explosive_mag_price) + "[/color][/center]"
if active_price_choice.frame == 39:
item_tag.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("PURCHASED_TAG") + "[/center][/wave]"
item_name.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + tr("PURCHASED") + "[/center][/wave]"
price.text = "[wave amp=30.0 freq=10.0 connected=1][center]Purchased[/center]"
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
$upgradesRevolve/itemContainer/money.text = "[wave amp=30.0 freq=10.0 connected=1][center]" + "$" + str(Global.money) + "[/center][/wave]"
price_stuff()
if finished_flippin:
$upgradesRevolve/itemContainer/itemName.text = "[wave amp=40.0 freq=10.0 connected=1][center]Reroll Complete[/center][/wave]"
$upgradesRevolve/itemContainer/itemDescription.text = "[wave amp=40.0 freq=10.0 connected=1][center]'Done rerolling your upgrades!'[/center][/wave]"
finished_flippin = false
if flippin:
$upgradesRevolve/itemContainer/itemName.text = "[wave amp=40.0 freq=10.0 connected=1][center]Reroll...[/center][/wave]"
$upgradesRevolve/itemContainer/itemDescription.text = "[wave amp=40.0 freq=10.0 connected=1][center]'Rerolling your upgrades!'[/center][/wave]"
if blank_choice1 == false:
$upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice.frame = choice_1
if blank_choice2 == false:
$upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice.frame = choice_2
if blank_choice3 == false:
$upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice.frame = choice_3
if blank_choice4 == false:
$upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice.frame = choice_4
if blank_choice5 == false:
$upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice.frame = choice_5
if Input.is_action_just_pressed("ui_f") and flip_choice1:
flip_choice1 = false
print("DEPOOP")
$upgradesRevolve/container/container2/choiceContainerCon1/flipAnimations.play("flip")
$sfx/flip.play()
if Input.is_action_just_pressed("ui_f") and flip_choice2:
flip_choice2 = false
$upgradesRevolve/container/container2/choiceContainerCon2/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
if Input.is_action_just_pressed("ui_f") and flip_choice3:
flip_choice3 = false
$upgradesRevolve/container/container2/choiceContainerCon3/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
if Input.is_action_just_pressed("ui_f") and flip_choice4:
flip_choice4 = false
$upgradesRevolve/container/container2/choiceContainerCon4/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
if Input.is_action_just_pressed("ui_f") and flip_choice5:
flip_choice5 = false
$upgradesRevolve/container/container2/choiceContainerCon5/flipAnimations.play("flip")
$sfx/flip.play()
$sfx/flip2.play()
if !stay_up and active_choice != null:
active_choice.scale.x = 1.2
active_choice.scale.y = 1.2
func text_stuff():
if flippin:
return
if active_choice.frame == piercing_pos:
pass
if active_choice.frame == brass_barrel_pos:
pass
if active_choice.frame == suppressor_pos:
pass
if active_choice.frame == extra_mag_pos:
pass
if active_choice.frame == tactical_stock_pos:
pass
if active_choice.frame == critical_mag_pos:
pass
if active_choice.frame == stabalizing_barrel_pos:
pass
if active_choice.frame == overclock_pos:
pass
if active_choice.frame == ricochet_pos:
pass
if active_choice.frame == hollow_point_pos:
pass
if active_choice.frame == armor_piercing_pos:
pass
if active_choice.frame == quick_reload_pos:
pass
if active_choice.frame == laser_pos:
pass
if active_choice.frame == siphon_pos:
pass
if active_choice.frame == concussive_rounds_pos:
pass
if active_choice.frame == ammo_supply_pos:
pass
if active_choice.frame == burst_pos:
pass
if active_choice.frame == explosive_rounds_pos:
pass
if active_choice.frame == resonance_rounds_pos:
pass
if active_choice.frame == hellfire_barrel_pos:
pass
if active_choice.frame == dmr_pos:
pass
if active_choice.frame == vertical_grip_pos:
pass
if active_choice.frame == angled_grip_pos:
pass
if active_choice.frame == bmg_pos:
pass
if active_choice.frame == shotgun_pos:
pass
if active_choice.frame == high_velocity_pos:
pass
if active_choice.frame == bounce_rounds_pos:
pass
if active_choice.frame == mythic_rounds_pos:
pass
if active_choice.frame == volatile_barrel_pos:
pass
if active_choice.frame == deadeye_barrel_pos:
pass
if active_choice.frame == nomad_lens_pos:
pass
if active_choice.frame == cobalt_scope_pos:
pass
if active_choice.frame == deadeye_optic_pos:
pass
if active_choice.frame == point_blank_pos:
pass
if active_choice.frame == alloy_stock_pos:
pass
if active_choice.frame == pouch_stock_pos:
pass
if active_choice.frame == makeshift_stock_pos:
pass
if active_choice.frame == adaptive_mag_pos:
pass
if active_choice.frame == explosive_mag_pos:
pass
if active_choice.frame == 39:
pass
func check_upgrade(choice):
#if active_choice != null:
if active_choice.frame == suppressor_pos and Global.money >= suppressor_price and Weapons.dict_on["Suppressor"] != "suppressor":
pressed()
Weapons.dict_on["Suppressor"] = "suppressor"
Global.money -= suppressor_price
if active_choice.frame == burst_pos and Global.money >= burst_price and Weapons.dict_on["BurstModule"] != "burst":
pressed()
Weapons.dict_on["BurstModule"] = "burst"
Global.money -= suppressor_price
if active_choice.frame == overclock_pos and Global.money >= overclock_price and Weapons.dict_on["OverClockedModule"] != "overclocked":
pressed()
Weapons.dict_on["OverClockedModule"] = "overclocked"
Global.money -= overclock_price
if active_choice.frame == dmr_pos and Global.money >= dmr_price and Weapons.dict_on["DMRModule"] != "dmr":
pressed()
Weapons.dict_on["DMRModule"] = "dmr"
Global.money -= dmr_price
if active_choice.frame == laser_pos and Global.money >= laser_price and Weapons.dict_on["LaserSight"] != "laser":
pressed()
Weapons.dict_on["LaserSight"] = "laser"
Global.money -= laser_price
if active_choice.frame == vertical_grip_pos and Global.money >= vertical_grip_price and Weapons.dict_on["VerticalForegrip"] != "vertical_foregrip":
pressed()
Weapons.dict_on["VerticalForegrip"] = "vertical_foregrip"
Global.money -= vertical_grip_price
if active_choice.frame == angled_grip_pos and Global.money >= angled_grip_price and Weapons.dict_on["AngledGrip"] != "angled_grip":
pressed()
Weapons.dict_on["AngledGrip"] = "angled_grip"
Global.money -= angled_grip_price
if active_choice.frame == bmg_pos and Global.money >= bmg_price and Weapons.dict_on["50BMG"] != "bmg":
pressed()
Weapons.dict_on["50BMG"] = "bmg"
Global.money -= bmg_price
if active_choice.frame == shotgun_pos and Global.money >= shotgun_price and Weapons.dict_on["TinyShotgun"] != "shotgun":
pressed()
Weapons.dict_on["TinyShotgun"] = "shotgun"
Global.money -= shotgun_price
if active_choice.frame == piercing_pos and Global.money >= piercing_price and Weapons.dict_on["PiercingRounds"] != "piercing_rounds":
pressed()
Weapons.dict_on["PiercingRounds"] = "piercing_rounds"
Global.money -= piercing_price
if active_choice.frame == ricochet_pos and Global.money >= ricochet_price and Weapons.dict_on["RicochetRounds"] != "ricochet_rounds":
pressed()
Weapons.dict_on["RicochetRounds"] = "ricochet_rounds"
Global.money -= ricochet_price
if active_choice.frame == hollow_point_pos and Global.money >= hollow_point_price and Weapons.dict_on["HollowPointRounds"] != "hollow_point_rounds":
pressed()
Weapons.dict_on["HollowPointRounds"] = "hollow_point_rounds"
Global.money -= hollow_point_price
if active_choice.frame == armor_piercing_pos and Global.money >= armor_piercing_price and Weapons.dict_on["ArmorPiercingRounds"] != "armor_piercing_rounds":
pressed()
Weapons.dict_on["ArmorPiercingRounds"] = "armor_piercing_rounds"
Global.money -= armor_piercing_price
if active_choice.frame == explosive_rounds_pos and Global.money >= explosive_rounds_price and Weapons.dict_on["ExplosiveRounds"] != "explosive_rounds":
pressed()
Weapons.dict_on["ExplosiveRounds"] = "explosive_rounds"
Global.money -= explosive_rounds_price
if active_choice.frame == resonance_rounds_pos and Global.money >= resonance_rounds_price and Weapons.dict_on["ResonanceRounds"] != "resonance_rounds":
pressed()
Weapons.dict_on["ResonanceRounds"] = "resonance_rounds"
Global.money -= resonance_rounds_price
if active_choice.frame == concussive_rounds_pos and Global.money >= concussive_rounds_price and Weapons.dict_on["ConcussiveRounds"] != "concussive_rounds":
pressed()
Weapons.dict_on["ConcussiveRounds"] = "concussive_rounds"
Global.money -= concussive_rounds_price
if active_choice.frame == high_velocity_pos and Global.money >= high_velocity_price and Weapons.dict_on["HighVelocityRounds"] != "high_velocity_rounds":
pressed()
Weapons.dict_on["HighVelocityRounds"] = "high_velocity_rounds"
Global.money -= high_velocity_price
if active_choice.frame == mythic_rounds_pos and Global.money >= mythic_rounds_price and Weapons.dict_on["MythicRounds"] != "mythic_rounds":
pressed()
Weapons.dict_on["MythicRounds"] = "mythic_rounds"
Global.money -= mythic_rounds_price
if active_choice.frame == bounce_rounds_pos and Global.money >= bounce_rounds_price and Weapons.dict_on["BounceRounds"] != "bounce_rounds":
pressed()
Weapons.dict_on["BounceRounds"] = "bounce_rounds"
Global.money -= bounce_rounds_price
if active_choice.frame == brass_barrel_pos and Global.money >= brass_barrel_price and Weapons.dict_on["BrassBarrel"] != "brass_barrel":
pressed()
Weapons.dict_on["BrassBarrel"] = "brass_barrel"
Global.money -= brass_barrel_price
if active_choice.frame == stabalizing_barrel_pos and Global.money >= stabalizing_barrel_price and Weapons.dict_on["StabalizingBarrel"] != "stabalizing_barrel":
pressed()
Weapons.dict_on["StabalizingBarrel"] = "stabalizing_barrel"
Global.money -= stabalizing_barrel_price
if active_choice.frame == hellfire_barrel_pos and Global.money >= hellfire_barrel_price and Weapons.dict_on["HellfireBarrel"] != "hellfire_barrel":
pressed()
Weapons.dict_on["HellfireBarrel"] = "hellfire_barrel"
Global.money -= hellfire_barrel_price
if active_choice.frame == volatile_barrel_pos and Global.money >= volatile_barrel_price and Weapons.dict_on["VolatileBarrel"] != "volatile_barrel":
pressed()
Weapons.dict_on["VolatileBarrel"] = "volatile_barrel"
Global.money -= volatile_barrel_price
if active_choice.frame == deadeye_barrel_pos and Global.money >= deadeye_barrel_price and Weapons.dict_on["DeadeyeBarrel"] != "deadeye_barrel":
pressed()
Weapons.dict_on["DeadeyeBarrel"] = "deadeye_barrel"
Global.money -= deadeye_barrel_price
if active_choice.frame == nomad_lens_pos and Global.money >= nomad_lens_price and Weapons.dict_on["NomadLens"] != "nomad_lens":
pressed()
Weapons.dict_on["NomadLens"] = "nomad_lens"
Global.money -= nomad_lens_price
if active_choice.frame == cobalt_scope_pos and Global.money >= cobalt_scope_price and Weapons.dict_on["CobaltScope"] != "cobalt_scope":
pressed()
Weapons.dict_on["CobaltScope"] = "cobalt_scope"
Global.money -= cobalt_scope_price
if active_choice.frame == deadeye_optic_pos and Global.money >= deadeye_optic_price and Weapons.dict_on["DeadeyeOptic"] != "deadeye_optic":
pressed()
Weapons.dict_on["DeadeyeOptic"] = "deadeye_optic"
Global.money -= deadeye_optic_price
if active_choice.frame == siphon_pos and Global.money >= siphon_price and Weapons.dict_on["Siphon"] != "siphon":
pressed()
Weapons.dict_on["Siphon"] = "siphon"
Global.money -= siphon_price
if active_choice.frame == ammo_supply_pos and Global.money >= ammo_supply_price and Weapons.dict_on["AmmoSupply"] != "ammo_supply":
pressed()
Weapons.dict_on["AmmoSupply"] = "ammo_supply"
Global.money -= ammo_supply_price
if active_choice.frame == point_blank_pos and Global.money >= point_blank_price and Weapons.dict_on["PointBlank"] != "point_blank":
pressed()
Weapons.dict_on["PointBlank"] = "point_blank"
Global.money -= point_blank_price
if active_choice.frame == tactical_stock_pos and Global.money >= tactical_stock_price and Weapons.dict_on["TacticalStock"] != "tactical_stock":
pressed()
Weapons.dict_on["TacticalStock"] = "tactical_stock"
Global.money -= tactical_stock_price
if active_choice.frame == alloy_stock_pos and Global.money >= alloy_stock_price and Weapons.dict_on["AlloyStock"] != "alloy_stock":
pressed()
Weapons.dict_on["AlloyStock"] = "alloy_stock"
Global.money -= alloy_stock_price
if active_choice.frame == pouch_stock_pos and Global.money >= pouch_stock_price and Weapons.dict_on["PouchStock"] != "pouch_stock":
pressed()
Weapons.dict_on["PouchStock"] = "pouch_stock"
Global.money -= pouch_stock_price
if active_choice.frame == makeshift_stock_pos and Global.money >= makeshift_stock_price and Weapons.dict_on["MakeshiftStock"] != "makeshift_stock":
pressed()
Weapons.dict_on["MakeshiftStock"] = "makeshift_stock"
Global.money -= makeshift_stock_price
if active_choice.frame == extra_mag_pos and Global.money >= extra_mag_price and Weapons.dict_on["ExtraMag"] != "extra_mag":
pressed()
Weapons.dict_on["ExtraMag"] = "extra_mag"
Global.money -= extra_mag_price
if active_choice.frame == critical_mag_pos and Global.money >= critical_mag_price and Weapons.dict_on["CriticalMag"] != "critical_mag":
pressed()
Weapons.dict_on["CriticalMag"] = "critical_mag"
Global.money -= critical_mag_price
if active_choice.frame == quick_reload_pos and Global.money >= quick_reload_price and Weapons.dict_on["Quickreload"] != "quick_reload":
pressed()
Weapons.dict_on["Quickreload"] = "quick_reload"
Global.money -= quick_reload_price
if active_choice.frame == adaptive_mag_pos and Global.money >= adaptive_mag_price and Weapons.dict_on["AdaptiveMag"] != "adaptive_mag":
pressed()
Weapons.dict_on["AdaptiveMag"] = "adaptive_mag"
Global.money -= adaptive_mag_price
if active_choice.frame == explosive_mag_pos and Global.money >= explosive_mag_price and Weapons.dict_on["ExplosiveMag"] != "explosive_mag":
pressed()
Weapons.dict_on["ExplosiveMag"] = "explosive_mag"
Global.money -= explosive_mag_price
func check_repress():
if !stay_up == false:
if chosen1:
chosen1 = false
active_price_choice = null
active_choice = null
mouseExitChoice1()
if chosen2:
chosen2 = false
active_price_choice = null
active_choice = null
mouseExitChoice2()
if chosen3:
chosen3 = false
active_price_choice = null
active_choice = null
mouseExitChoice3()
if chosen4:
chosen4 = false
active_price_choice = null
active_choice = null
mouseExitChoice4()
if chosen5:
chosen5 = false
active_price_choice = null
active_choice = null
mouseExitChoice5()
chosen = false
func pressed():
if chosen == false:
$upgradesRevolve/priceContainer.lil_up()
chosen = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice:
chosen1 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice:
chosen2 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice:
chosen3 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice:
chosen4 = true
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice:
chosen5 = true
func mouseEnterChoice1():
if tween_hover1 and tween_hover1.is_running():
tween_hover1.kill()
tween_hover1 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover1.tween_property($upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1, "scale", Vector2(1.2, 1.2), 0.5)
if $sfx/hover/Timer.is_stopped():
$sfx/hover.play()
$sfx/hover/Timer.start()
func mouseEnterChoice2():
if tween_hover2 and tween_hover2.is_running():
tween_hover2.kill()
tween_hover2 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover2.tween_property($upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2, "scale", Vector2(1.2, 1.2), 0.5)
if $sfx/hover/Timer.is_stopped():
$sfx/hover.play()
$sfx/hover/Timer.start()
func mouseEnterChoice3():
if tween_hover3 and tween_hover3.is_running():
tween_hover3.kill()
tween_hover3 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover3.tween_property($upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3, "scale", Vector2(1.2, 1.2), 0.5)
if $sfx/hover/Timer.is_stopped():
$sfx/hover.play()
$sfx/hover/Timer.start()
func mouseEnterChoice4():
if tween_hover4 and tween_hover4.is_running():
tween_hover4.kill()
tween_hover4 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover4.tween_property($upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4, "scale", Vector2(1.2, 1.2), 0.5)
if $sfx/hover/Timer.is_stopped():
$sfx/hover.play()
$sfx/hover/Timer.start()
func mouseEnterChoice5():
if tween_hover5 and tween_hover5.is_running():
tween_hover5.kill()
tween_hover5 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover5.tween_property($upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5, "scale", Vector2(1.2, 1.2), 0.5)
if $sfx/hover/Timer.is_stopped():
$sfx/hover.play()
$sfx/hover/Timer.start()
func mouseExitChoice1():
if chosen1 == false:
if tween_rot1 and tween_rot1.is_running():
tween_rot1.kill()
tween_rot1 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover1 and tween_hover1.is_running():
tween_hover1.kill()
tween_hover1 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover1.tween_property($upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1, "scale", Vector2.ONE, 0.55)
func mouseExitChoice2():
if chosen2 == false:
if tween_rot2 and tween_rot2.is_running():
tween_rot2.kill()
tween_rot2 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover2 and tween_hover2.is_running():
tween_hover2.kill()
tween_hover2 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover2.tween_property($upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2, "scale", Vector2.ONE, 0.55)
func mouseExitChoice3():
if chosen3 == false:
if tween_rot3 and tween_rot3.is_running():
tween_rot3.kill()
tween_rot3 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover3 and tween_hover3.is_running():
tween_hover3.kill()
tween_hover3 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover3.tween_property($upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3, "scale", Vector2.ONE, 0.55)
func mouseExitChoice4():
if chosen4 == false:
if tween_rot4 and tween_rot4.is_running():
tween_rot4.kill()
tween_rot4 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover4 and tween_hover4.is_running():
tween_hover4.kill()
tween_hover4 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover4.tween_property($upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4, "scale", Vector2.ONE, 0.55)
func mouseExitChoice5():
if chosen5 == false:
if tween_rot5 and tween_rot5.is_running():
tween_rot5.kill()
tween_rot5 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover5 and tween_hover5.is_running():
tween_hover5.kill()
tween_hover5 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover5.tween_property($upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5, "scale", Vector2.ONE, 0.55)
func rerollTween():
if tween_hover7 and tween_hover7.is_running():
tween_hover7.kill()
tween_hover7 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover7.tween_property($upgradesRevolve, "scale", Vector2(1.2, 1.2), 0.5)
await get_tree().create_timer(6.5).timeout
if tween_rot7 and tween_rot7.is_running():
tween_rot7.kill()
tween_rot7 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_BACK).set_parallel(true)
if tween_hover7 and tween_hover7.is_running():
tween_hover7.kill()
tween_hover7 = create_tween().set_ease(Tween.EASE_OUT).set_trans(Tween.TRANS_ELASTIC)
tween_hover7.tween_property($upgradesRevolve, "scale", Vector2.ONE, 0.55)
func _on_choice_1_button_mouse_entered():
mouseEnterChoice1()
if active_choice == null:
active_price_choice = $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice
$upgradesRevolve/itemContainer/money/AnimationPlayer.play("change")
func _on_choice_1_button_mouse_exited():
mouseExitChoice1()
#active_choice = null
func _on_choice_1_button_2_mouse_entered():
mouseEnterChoice2()
if active_choice == null:
active_price_choice = $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice
$upgradesRevolve/itemContainer/money/AnimationPlayer.play("change")
func _on_choice_1_button_2_mouse_exited():
mouseExitChoice2()
#active_choice = null
func _on_choice_1_button_3_mouse_entered():
mouseEnterChoice3()
if active_choice == null:
active_price_choice = $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice
$upgradesRevolve/itemContainer/money/AnimationPlayer.play("change")
func _on_choice_1_button_3_mouse_exited():
mouseExitChoice3()
#active_choice = null
func _on_choice_1_button_4_mouse_entered():
mouseEnterChoice4()
if active_choice == null:
active_price_choice = $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice
$upgradesRevolve/itemContainer/money/AnimationPlayer.play("change")
func _on_choice_1_button_4_mouse_exited():
mouseExitChoice4()
#active_choice = null
func _on_choice_1_button_5_mouse_entered():
mouseEnterChoice5()
if active_choice == null:
active_price_choice = $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice
$upgradesRevolve/itemContainer/money/AnimationPlayer.play("change")
func _on_choice_1_button_5_mouse_exited():
mouseExitChoice5()
#active_choice = null
func _on_choice_1_button_pressed():
clicked = true
active_choice = $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice
$upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice/flashAnimations.play("flash")
$sfx/click1.play()
$sfx/click2.play()
text_stuff()
stay_up = !stay_up
pressed()
check_repress()
await get_tree().create_timer(0.15).timeout
clicked = false
func _on_choice_1_button_2_pressed():
clicked = true
active_choice = $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice
$upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice/flashAnimations.play("flash")
$sfx/click1.play()
$sfx/click2.play()
text_stuff()
stay_up = !stay_up
pressed()
check_repress()
await get_tree().create_timer(0.15).timeout
clicked = false
func _on_choice_1_button_3_pressed():
clicked = true
active_choice = $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice
$upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice/flashAnimations.play("flash")
$sfx/click1.play()
$sfx/click2.play()
text_stuff()
stay_up = !stay_up
pressed()
check_repress()
await get_tree().create_timer(0.15).timeout
clicked = false
func _on_choice_1_button_4_pressed():
clicked = true
active_choice = $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice
$upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice/flashAnimations.play("flash")
$sfx/click1.play()
$sfx/click2.play()
text_stuff()
stay_up = !stay_up
pressed()
check_repress()
await get_tree().create_timer(0.15).timeout
clicked = false
func _on_choice_1_button_5_pressed():
clicked = true
active_choice = $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice
$upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice/flashAnimations.play("flash")
$sfx/click1.play()
$sfx/click2.play()
text_stuff()
stay_up = !stay_up
pressed()
check_repress()
await get_tree().create_timer(0.15).timeout
clicked = false
func _on_reroll_button_pressed():
reroll()
$upgradesRevolve/rerollContainer/buttonContainer2/buttonContainer/flashAnimations.play("flash")
func _on_purchase_button_pressed():
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon1/choiceContainer1/choice:
check_upgrade(1)
other_purchase_stuff()
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon2/choiceContainer2/choice:
check_upgrade(2)
other_purchase_stuff()
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon3/choiceContainer3/choice:
check_upgrade(3)
other_purchase_stuff()
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon4/choiceContainer4/choice:
check_upgrade(4)
other_purchase_stuff()
if active_choice == $upgradesRevolve/container/container2/choiceContainerCon5/choiceContainer5/choice:
check_upgrade(5)
other_purchase_stuff()
func other_purchase_stuff():
chosen = false
stay_up = true
if chosen1:
chosen1 = false
mouseExitChoice1()
if chosen2:
chosen2 = false
mouseExitChoice2()
if chosen3:
chosen3 = false
mouseExitChoice3()
if chosen4:
chosen4 = false
mouseExitChoice4()
if chosen5:
chosen5 = false
mouseExitChoice5()
$upgradesRevolve/priceContainer/flashAnimations.play("flash")
hide_active_choice()
get_parent().get_parent().close()
$sfx/chaching.play()
$sfx/click3.play()
$sfx/click1.play()
$sfx/click2.play()
Editor is loading...
Leave a Comment