|
|
@ -72,7 +72,7 @@ var ccVanilla = preload("res://Scenes/Cupcakes/cupcake.tscn")
|
|
|
|
var ccChocolate = preload("res://Scenes/Cupcakes/chocCupcake.tscn")
|
|
|
|
var ccChocolate = preload("res://Scenes/Cupcakes/chocCupcake.tscn")
|
|
|
|
var ccStrawberry = preload("res://Scenes/Cupcakes/strawCupcake.tscn")
|
|
|
|
var ccStrawberry = preload("res://Scenes/Cupcakes/strawCupcake.tscn")
|
|
|
|
var ccRedVelvet = preload("res://Scenes/Cupcakes/rvelCupcake.tscn")
|
|
|
|
var ccRedVelvet = preload("res://Scenes/Cupcakes/rvelCupcake.tscn")
|
|
|
|
var ccCinnamon = preload("res://Scenes/Cupcakes/cupcake.tscn")
|
|
|
|
var ccCinnamon = preload("res://Scenes/Cupcakes/cinCupcake.tscn")
|
|
|
|
var ccHonest = preload("res://Scenes/Cupcakes/honCupcake.tscn")
|
|
|
|
var ccHonest = preload("res://Scenes/Cupcakes/honCupcake.tscn")
|
|
|
|
var ccNightmare = preload("res://Scenes/Cupcakes/nightCupcake.tscn")
|
|
|
|
var ccNightmare = preload("res://Scenes/Cupcakes/nightCupcake.tscn")
|
|
|
|
var ccRock
|
|
|
|
var ccRock
|
|
|
@ -84,8 +84,12 @@ var ccLoyal
|
|
|
|
var ccChaos
|
|
|
|
var ccChaos
|
|
|
|
|
|
|
|
|
|
|
|
#Areas
|
|
|
|
#Areas
|
|
|
|
var yourYard = preload("res://Scenes/Locations/yard.tscn")
|
|
|
|
var location = null
|
|
|
|
var neighYard = preload("res://Scenes/Locations/neighYard.tscn")
|
|
|
|
const AREA_PATHS = [
|
|
|
|
|
|
|
|
"res://Scenes/Locations/yard.tscn",
|
|
|
|
|
|
|
|
"res://Scenes/Locations/neighYard.tscn"
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
var areaScenes = []
|
|
|
|
|
|
|
|
|
|
|
|
#Area Locks
|
|
|
|
#Area Locks
|
|
|
|
var neighYardLocked = true
|
|
|
|
var neighYardLocked = true
|
|
|
@ -141,11 +145,12 @@ var combo = 1.00
|
|
|
|
var comboMultiplier
|
|
|
|
var comboMultiplier
|
|
|
|
|
|
|
|
|
|
|
|
#Tools
|
|
|
|
#Tools
|
|
|
|
var tool
|
|
|
|
var tool = null
|
|
|
|
var toolHooves = preload("res://Scenes/Tools/hooves.tscn")
|
|
|
|
const TOOL_PATHS = [
|
|
|
|
var toolHoovesScene = toolHooves.instantiate()
|
|
|
|
"res://Scenes/Tools/hooves.tscn",
|
|
|
|
var toolBakingTray = preload("res://Scenes/Tools/bakingTray.tscn")
|
|
|
|
"res://Scenes/Tools/bakingTray.tscn"
|
|
|
|
var toolBakingTrayScene = toolBakingTray.instantiate()
|
|
|
|
]
|
|
|
|
|
|
|
|
var toolScenes = []
|
|
|
|
|
|
|
|
|
|
|
|
#Other
|
|
|
|
#Other
|
|
|
|
@onready var timer = get_node("Cupcake Spawn Timer")
|
|
|
|
@onready var timer = get_node("Cupcake Spawn Timer")
|
|
|
@ -155,16 +160,22 @@ var horseScene
|
|
|
|
var mouse_position = Vector2.ZERO
|
|
|
|
var mouse_position = Vector2.ZERO
|
|
|
|
var ccCount = 0
|
|
|
|
var ccCount = 0
|
|
|
|
var ccMaxOnScreen = 3000
|
|
|
|
var ccMaxOnScreen = 3000
|
|
|
|
var location
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#General
|
|
|
|
#General
|
|
|
|
func _ready():
|
|
|
|
func _ready():
|
|
|
|
|
|
|
|
for path in AREA_PATHS:
|
|
|
|
|
|
|
|
var scene = load(path)
|
|
|
|
|
|
|
|
var instance = scene.instantiate()
|
|
|
|
|
|
|
|
areaScenes.append(instance)
|
|
|
|
horse_instance = horse_scene.instantiate()
|
|
|
|
horse_instance = horse_scene.instantiate()
|
|
|
|
add_child(horse_instance)
|
|
|
|
add_child(horse_instance)
|
|
|
|
location = yourYard
|
|
|
|
location = areaScenes[0]
|
|
|
|
spawnHorse()
|
|
|
|
spawnHorse()
|
|
|
|
tool = toolHoovesScene
|
|
|
|
for path in TOOL_PATHS:
|
|
|
|
|
|
|
|
var scene = load(path)
|
|
|
|
|
|
|
|
var instance = scene.instantiate()
|
|
|
|
|
|
|
|
toolScenes.append(instance)
|
|
|
|
|
|
|
|
tool = toolScenes[0]
|
|
|
|
add_child(tool)
|
|
|
|
add_child(tool)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -174,11 +185,11 @@ func _process(delta):
|
|
|
|
horse_instance.position = mouse_position
|
|
|
|
horse_instance.position = mouse_position
|
|
|
|
if $"Tool":
|
|
|
|
if $"Tool":
|
|
|
|
tool.position = mouse_position
|
|
|
|
tool.position = mouse_position
|
|
|
|
handleInput()#don't ask
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func handleInput():
|
|
|
|
|
|
|
|
#I hate this so much but I'm retarded
|
|
|
|
func _input(event):
|
|
|
|
|
|
|
|
if event is InputEventMouseButton and event.pressed:
|
|
|
|
if Input.is_action_pressed("horseAttach"):
|
|
|
|
if Input.is_action_pressed("horseAttach"):
|
|
|
|
if horseAttached == true:
|
|
|
|
if horseAttached == true:
|
|
|
|
horseAttached = false
|
|
|
|
horseAttached = false
|
|
|
@ -187,9 +198,9 @@ func handleInput():
|
|
|
|
|
|
|
|
|
|
|
|
#AreaTeleporter
|
|
|
|
#AreaTeleporter
|
|
|
|
func spawnHorse():
|
|
|
|
func spawnHorse():
|
|
|
|
var spawn
|
|
|
|
if $Location.get_child_count() >= 1:
|
|
|
|
spawn = location.instantiate()
|
|
|
|
$Location.remove_child(location)
|
|
|
|
$Location.add_child(spawn)
|
|
|
|
$Location.add_child(location)
|
|
|
|
|
|
|
|
|
|
|
|
#Tool Refresh
|
|
|
|
#Tool Refresh
|
|
|
|
func toolRefresh():
|
|
|
|
func toolRefresh():
|
|
|
@ -207,86 +218,30 @@ func collectCupcakes():
|
|
|
|
|
|
|
|
|
|
|
|
#Cupcake Timer
|
|
|
|
#Cupcake Timer
|
|
|
|
func _on_timeout():
|
|
|
|
func _on_timeout():
|
|
|
|
spawnVanCupcakes()
|
|
|
|
spawnCupcakes(ccVan, ccVanSpawnRate)
|
|
|
|
if ccChocLocked == false:
|
|
|
|
if not ccChocLocked:
|
|
|
|
spawnChocCupcakes()
|
|
|
|
spawnCupcakes(ccChoc, ccChocSpawnRate)
|
|
|
|
if ccStrawLocked == false:
|
|
|
|
if not ccStrawLocked:
|
|
|
|
spawnStrawCupcakes()
|
|
|
|
spawnCupcakes(ccStraw, ccStrawSpawnRate)
|
|
|
|
if ccRVelLocked == false:
|
|
|
|
if not ccRVelLocked:
|
|
|
|
spawnRVelCupcakes()
|
|
|
|
spawnCupcakes(ccRVel, ccRVelSpawnRate)
|
|
|
|
if ccCinLocked == false:
|
|
|
|
if not ccCinLocked:
|
|
|
|
spawnCinCupcakes()
|
|
|
|
spawnCupcakes(ccCin, ccCinSpawnRate)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
timer.start
|
|
|
|
timer.start()
|
|
|
|
|
|
|
|
|
|
|
|
#Spawn
|
|
|
|
#Spawn
|
|
|
|
func spawnVanCupcakes():
|
|
|
|
func spawnCupcakes(cupcake: Node2D, spawn_rate: int):
|
|
|
|
var randX
|
|
|
|
|
|
|
|
var randY
|
|
|
|
|
|
|
|
randomize()
|
|
|
|
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
|
|
|
|
for i in range(ccVanSpawnRate):
|
|
|
|
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
|
|
|
|
ccVan.position = Vector2(randX, randY)
|
|
|
|
|
|
|
|
$Cupcakes.add_child(ccVan.duplicate())
|
|
|
|
|
|
|
|
ccCount = ccCount + ccVanSpawnRate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func spawnChocCupcakes():
|
|
|
|
|
|
|
|
var randX
|
|
|
|
|
|
|
|
var randY
|
|
|
|
|
|
|
|
randomize()
|
|
|
|
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
|
|
|
|
for i in range(ccChocSpawnRate):
|
|
|
|
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
|
|
|
|
ccChoc.position = Vector2(randX, randY)
|
|
|
|
|
|
|
|
$Cupcakes.add_child(ccChoc.duplicate())
|
|
|
|
|
|
|
|
ccCount = ccCount + ccChocSpawnRate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func spawnStrawCupcakes():
|
|
|
|
|
|
|
|
var randX
|
|
|
|
var randX
|
|
|
|
var randY
|
|
|
|
var randY
|
|
|
|
randomize()
|
|
|
|
randomize()
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
for i in range(ccStrawSpawnRate):
|
|
|
|
for i in range(spawn_rate):
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
ccStraw.position = Vector2(randX, randY)
|
|
|
|
cupcake.position = Vector2(randX, randY)
|
|
|
|
$Cupcakes.add_child(ccStraw.duplicate())
|
|
|
|
$Cupcakes.add_child(cupcake.duplicate())
|
|
|
|
ccCount = ccCount + ccStrawSpawnRate
|
|
|
|
ccCount += spawn_rate
|
|
|
|
|
|
|
|
|
|
|
|
func spawnRVelCupcakes():
|
|
|
|
|
|
|
|
var randX
|
|
|
|
|
|
|
|
var randY
|
|
|
|
|
|
|
|
randomize()
|
|
|
|
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
|
|
|
|
for i in range(ccRVelSpawnRate):
|
|
|
|
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
|
|
|
|
ccRVel.position = Vector2(randX, randY)
|
|
|
|
|
|
|
|
$Cupcakes.add_child(ccRVel.duplicate())
|
|
|
|
|
|
|
|
ccCount = ccCount + ccRVelSpawnRate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func spawnCinCupcakes():
|
|
|
|
|
|
|
|
var randX
|
|
|
|
|
|
|
|
var randY
|
|
|
|
|
|
|
|
randomize()
|
|
|
|
|
|
|
|
if ccCount <= ccMaxOnScreen:
|
|
|
|
|
|
|
|
for i in range(ccCinSpawnRate):
|
|
|
|
|
|
|
|
randX = randi_range(50, 1870)
|
|
|
|
|
|
|
|
randY = randi_range(50, 1030)
|
|
|
|
|
|
|
|
ccCin.position = Vector2(randX, randY)
|
|
|
|
|
|
|
|
$Cupcakes.add_child(ccCin.duplicate())
|
|
|
|
|
|
|
|
ccCount = ccCount + ccCinSpawnRate
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func spawnHonCupcakes():
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func spawnNightCupcakes():
|
|
|
|
|
|
|
|
pass
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
###Upgrades###
|
|
|
|
###Upgrades###
|
|
|
|
#Vanilla
|
|
|
|
#Vanilla
|
|
|
@ -298,7 +253,6 @@ func _on_upgrades_one_more_cupcake():
|
|
|
|
vanUpNum1 += 1
|
|
|
|
vanUpNum1 += 1
|
|
|
|
$Upgrades/Control/VanScroll/VanGrid/VanUp1/Price.text = str(ccVanPrice)
|
|
|
|
$Upgrades/Control/VanScroll/VanGrid/VanUp1/Price.text = str(ccVanPrice)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_faster_cupcake():
|
|
|
|
func _on_upgrades_faster_cupcake():
|
|
|
|
if ccVanNum >= ccVanPrice2:
|
|
|
|
if ccVanNum >= ccVanPrice2:
|
|
|
|
ccVanNum -= ccVanPrice2
|
|
|
|
ccVanNum -= ccVanPrice2
|
|
|
@ -307,7 +261,6 @@ func _on_upgrades_faster_cupcake():
|
|
|
|
vanUpNum2 += 1
|
|
|
|
vanUpNum2 += 1
|
|
|
|
$Upgrades/Control/VanScroll/VanGrid/VanUp2/Price.text = str(ccVanPrice2)
|
|
|
|
$Upgrades/Control/VanScroll/VanGrid/VanUp2/Price.text = str(ccVanPrice2)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_condensed_cupcake_1():
|
|
|
|
func _on_upgrades_condensed_cupcake_1():
|
|
|
|
if ccVanNum >= ccVanPrice3:
|
|
|
|
if ccVanNum >= ccVanPrice3:
|
|
|
|
ccVanNum -= ccVanPrice3
|
|
|
|
ccVanNum -= ccVanPrice3
|
|
|
@ -326,7 +279,6 @@ func _on_upgrades_one_more_cupcake_2():
|
|
|
|
chocUpNum1 += 1
|
|
|
|
chocUpNum1 += 1
|
|
|
|
$Upgrades/Control/ChocScroll/ChocGrid/ChocUp1/Price.text = str(ccChocPrice)
|
|
|
|
$Upgrades/Control/ChocScroll/ChocGrid/ChocUp1/Price.text = str(ccChocPrice)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_faster_cupcake_2():
|
|
|
|
func _on_upgrades_faster_cupcake_2():
|
|
|
|
if ccChocNum >= ccChocPrice2:
|
|
|
|
if ccChocNum >= ccChocPrice2:
|
|
|
|
ccChocNum -= ccChocPrice2
|
|
|
|
ccChocNum -= ccChocPrice2
|
|
|
@ -335,7 +287,6 @@ func _on_upgrades_faster_cupcake_2():
|
|
|
|
chocUpNum2 += 1
|
|
|
|
chocUpNum2 += 1
|
|
|
|
$Upgrades/Control/ChocScroll/ChocGrid/ChocUp2/Price.text = str(ccChocPrice2)
|
|
|
|
$Upgrades/Control/ChocScroll/ChocGrid/ChocUp2/Price.text = str(ccChocPrice2)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_condensed_cupcake_2():
|
|
|
|
func _on_upgrades_condensed_cupcake_2():
|
|
|
|
if ccChocNum >= ccChocPrice3:
|
|
|
|
if ccChocNum >= ccChocPrice3:
|
|
|
|
ccChocNum -= ccChocPrice3
|
|
|
|
ccChocNum -= ccChocPrice3
|
|
|
@ -354,7 +305,6 @@ func _on_upgrades_one_more_cupcake_3():
|
|
|
|
strawUpNum1 += 1
|
|
|
|
strawUpNum1 += 1
|
|
|
|
$Upgrades/Control/StrawScroll/StrawGrid/StrawUp1/Price.text = str(ccStrawPrice)
|
|
|
|
$Upgrades/Control/StrawScroll/StrawGrid/StrawUp1/Price.text = str(ccStrawPrice)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_faster_cupcake_3():
|
|
|
|
func _on_upgrades_faster_cupcake_3():
|
|
|
|
if ccStrawNum >= ccStrawPrice2:
|
|
|
|
if ccStrawNum >= ccStrawPrice2:
|
|
|
|
ccStrawNum -= ccStrawPrice2
|
|
|
|
ccStrawNum -= ccStrawPrice2
|
|
|
@ -362,7 +312,6 @@ func _on_upgrades_faster_cupcake_3():
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
$Upgrades/Control/StrawScroll/StrawGrid/StrawUp2/Price.text = str(ccStrawPrice2)
|
|
|
|
$Upgrades/Control/StrawScroll/StrawGrid/StrawUp2/Price.text = str(ccStrawPrice2)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_condensed_cupcake_3():
|
|
|
|
func _on_upgrades_condensed_cupcake_3():
|
|
|
|
if ccStrawNum >= ccStrawPrice3:
|
|
|
|
if ccStrawNum >= ccStrawPrice3:
|
|
|
|
ccStrawNum -= ccStrawPrice3
|
|
|
|
ccStrawNum -= ccStrawPrice3
|
|
|
@ -379,7 +328,6 @@ func _on_upgrades_one_more_cupcake_4():
|
|
|
|
ccRVelPrice = ccRVelPrice * 1.3
|
|
|
|
ccRVelPrice = ccRVelPrice * 1.3
|
|
|
|
$Upgrades/Control/RVelScroll/RVelGrid/RVelUp1/Price.text = str(ccRVelPrice)
|
|
|
|
$Upgrades/Control/RVelScroll/RVelGrid/RVelUp1/Price.text = str(ccRVelPrice)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_faster_cupcake_4():
|
|
|
|
func _on_upgrades_faster_cupcake_4():
|
|
|
|
if ccRVelNum >= ccRVelPrice2:
|
|
|
|
if ccRVelNum >= ccRVelPrice2:
|
|
|
|
ccRVelNum -= ccRVelPrice2
|
|
|
|
ccRVelNum -= ccRVelPrice2
|
|
|
@ -387,7 +335,6 @@ func _on_upgrades_faster_cupcake_4():
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
$Upgrades/Control/RVelScroll/RVelGrid/RVelUp2/Price.text = str(ccRVelPrice2)
|
|
|
|
$Upgrades/Control/RVelScroll/RVelGrid/RVelUp2/Price.text = str(ccRVelPrice2)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_condensed_cupcake_4():
|
|
|
|
func _on_upgrades_condensed_cupcake_4():
|
|
|
|
if ccRVelNum >= ccRVelPrice3:
|
|
|
|
if ccRVelNum >= ccRVelPrice3:
|
|
|
|
ccRVelNum -= ccRVelPrice3
|
|
|
|
ccRVelNum -= ccRVelPrice3
|
|
|
@ -404,7 +351,6 @@ func _on_upgrades_one_more_cupcake_5():
|
|
|
|
ccCinPrice = ccCinPrice * 1.3
|
|
|
|
ccCinPrice = ccCinPrice * 1.3
|
|
|
|
$Upgrades/Control/CinScroll/CinGrid/CinUp1/Price.text = str(ccCinPrice)
|
|
|
|
$Upgrades/Control/CinScroll/CinGrid/CinUp1/Price.text = str(ccCinPrice)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_faster_cupcake_5():
|
|
|
|
func _on_upgrades_faster_cupcake_5():
|
|
|
|
if ccCinNum >= ccCinPrice2:
|
|
|
|
if ccCinNum >= ccCinPrice2:
|
|
|
|
ccCinNum -= ccCinPrice2
|
|
|
|
ccCinNum -= ccCinPrice2
|
|
|
@ -412,7 +358,6 @@ func _on_upgrades_faster_cupcake_5():
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
timer.wait_time = timer.wait_time - (timer.wait_time * 0.01)
|
|
|
|
$Upgrades/Control/CinScroll/CinGrid/CinUp2/Price.text = str(ccCinPrice2)
|
|
|
|
$Upgrades/Control/CinScroll/CinGrid/CinUp2/Price.text = str(ccCinPrice2)
|
|
|
|
collectCupcakes()
|
|
|
|
collectCupcakes()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_condensed_cupcake_5():
|
|
|
|
func _on_upgrades_condensed_cupcake_5():
|
|
|
|
if ccCinNum >= ccCinPrice3:
|
|
|
|
if ccCinNum >= ccCinPrice3:
|
|
|
|
ccCinNum -= ccCinPrice3
|
|
|
|
ccCinNum -= ccCinPrice3
|
|
|
@ -551,9 +496,8 @@ func _on_night_cupcake_cc_night_collected():
|
|
|
|
|
|
|
|
|
|
|
|
#Areas
|
|
|
|
#Areas
|
|
|
|
func _on_upgrades_your_yard():
|
|
|
|
func _on_upgrades_your_yard():
|
|
|
|
|
|
|
|
|
|
|
|
if $Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled == false:
|
|
|
|
if $Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled == false:
|
|
|
|
location = yourYard
|
|
|
|
location = areaScenes[0]
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled = false
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled = false
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled = true
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled = true
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.text = str("Teleport (You're here)")
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.text = str("Teleport (You're here)")
|
|
|
@ -561,12 +505,12 @@ func _on_upgrades_your_yard():
|
|
|
|
spawnHorse()
|
|
|
|
spawnHorse()
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_neigh_yard():
|
|
|
|
func _on_upgrades_neigh_yard():
|
|
|
|
#if ccStrawNum >= ccStrawPrice5 and neighYardLocked == false:
|
|
|
|
if neighYardLocked == true:
|
|
|
|
# ccStrawNum -= ccStrawPrice5
|
|
|
|
if ccStrawNum >= ccStrawPrice6:
|
|
|
|
# $Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.text = str("Teleport")
|
|
|
|
ccStrawNum -= ccStrawPrice6
|
|
|
|
#else:
|
|
|
|
neighYardLocked = false
|
|
|
|
if $Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled == false:
|
|
|
|
elif neighYardLocked == false and $Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled == false:
|
|
|
|
location = neighYard
|
|
|
|
location = areaScenes[1]
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled = true
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area2/Buy.disabled = true
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled = false
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.disabled = false
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.text = str("Teleport")
|
|
|
|
$Upgrades/Control/AreaScroll/AreaGrid/Area1/Buy.text = str("Teleport")
|
|
|
@ -583,9 +527,11 @@ func _on_upgrades_abandoned_castle():
|
|
|
|
|
|
|
|
|
|
|
|
#Tools
|
|
|
|
#Tools
|
|
|
|
func _on_upgrades_tool_1():
|
|
|
|
func _on_upgrades_tool_1():
|
|
|
|
tool = toolHoovesScene
|
|
|
|
remove_child(tool)
|
|
|
|
|
|
|
|
tool = toolScenes[0]
|
|
|
|
|
|
|
|
add_child(tool)
|
|
|
|
|
|
|
|
|
|
|
|
func _on_upgrades_tool_2():
|
|
|
|
func _on_upgrades_tool_2():
|
|
|
|
tool = toolBakingTrayScene
|
|
|
|
remove_child(tool)
|
|
|
|
|
|
|
|
tool = toolScenes[1]
|
|
|
|
|
|
|
|
add_child(tool)
|
|
|
|