diff --git a/assets/building_assets/2d Assets/Firehouse.png b/assets/building_assets/2d Assets/Firehouse.png index 72fa337..be86a16 100644 Binary files a/assets/building_assets/2d Assets/Firehouse.png and b/assets/building_assets/2d Assets/Firehouse.png differ diff --git a/assets/building_assets/2d Assets/Hospital.png b/assets/building_assets/2d Assets/Hospital.png index bdfd34c..db976ae 100644 Binary files a/assets/building_assets/2d Assets/Hospital.png and b/assets/building_assets/2d Assets/Hospital.png differ diff --git a/assets/building_assets/2d Assets/Library.png b/assets/building_assets/2d Assets/Library.png index 48ecd22..3a71ade 100644 Binary files a/assets/building_assets/2d Assets/Library.png and b/assets/building_assets/2d Assets/Library.png differ diff --git a/assets/building_assets/2d Assets/Museum.png b/assets/building_assets/2d Assets/Museum.png index 3af45bc..d144288 100644 Binary files a/assets/building_assets/2d Assets/Museum.png and b/assets/building_assets/2d Assets/Museum.png differ diff --git a/assets/building_assets/2d Assets/UtilityPlant.png b/assets/building_assets/2d Assets/UtilityPlant.png index 0c02d0d..a76e280 100644 Binary files a/assets/building_assets/2d Assets/UtilityPlant.png and b/assets/building_assets/2d Assets/UtilityPlant.png differ diff --git a/project.godot b/project.godot index fbdfbd7..f84fd4d 100644 --- a/project.godot +++ b/project.godot @@ -144,7 +144,7 @@ _global_script_classes=[ { "language": "GDScript", "path": "res://scripts/TileCube.gd" }, { -"base": "Reference", +"base": "Node", "class": "TourismAgent", "language": "GDScript", "path": "res://AI/tourism/TourismAgent.gd" diff --git a/resources/log.txt b/resources/log.txt index c5ecb78..6fd6e68 100644 --- a/resources/log.txt +++ b/resources/log.txt @@ -1,2 +1,14 @@ SELECTION, RESPONSE +We need to get the city fixed up., That’s right! We have to get things in tip-top shape. Join me in the office, and we can get started. +How can we help improve the city?, We need to fix the damaged facilities around the city. +I’ll meet you at the beach. I’d like to explore the city first., EMPTY +We need to get the city fixed up., That’s right! We have to get things in tip-top shape. Join me in the office, and we can get started. +How can we help improve the city?, We need to fix the damaged facilities around the city. +That sounds like a great idea. Let's go!, EMPTY +That’s really cool. What’s your job like?, I work with people every day to put on events and speak up for others so our community remains safe and happy. +Yes., That's great! Then you'll be a great addition to our little team. +Pretty beaches are better than dirty ones., Yes. Clean beaches encourage more visitors, which can improve our city’s economy. Clean beaches also create a healthy environment for marine life. +A clean beach means there’s less trash in the ocean., That’s correct! A clean beach means that less trash will go from the beach and into the ocean. +Yes., EMPTY +I'll go see him right now., EMPTY diff --git a/scripts/Tile.gd b/scripts/Tile.gd index c5fe7d0..66afeda 100644 --- a/scripts/Tile.gd +++ b/scripts/Tile.gd @@ -498,8 +498,8 @@ func check_if_valid_placement(inf_to_be, height, width): for a in range(0, height): for b in range(0, width): - if (i - a >= 0 and j - b >= 0): - var currTile = Global.tileMap[i - a][j - b] + if (i + a < Global.mapHeight and j + b < Global.mapWidth): + var currTile = Global.tileMap[i + a][j + b] if currTile.inf != TileInf.NONE or currTile.zone != TileZone.NONE: return false elif currTile.baseHeight != baseHeight: @@ -518,11 +518,11 @@ func set_tile_inf(infType, zoneType, height, width): if a == 0 and b == 0: continue #No need to check if valid, already did that - var currTile = Global.tileMap[i - a][j - b] + var currTile = Global.tileMap[i + a][j + b] currTile.inf = TileInf.CHILD currTile.zone = zoneType currTile.parent = [i, j] - children.append([i - a, j - b]) + children.append([i + a, j + b]) City.connectUtilities() set_active_tile() @@ -934,6 +934,8 @@ func set_active_tile(): isActive = true Global.activeTiles[[i, j]] = true print(Global.activeTiles.size()) + for child in children: + print(child) func deactivate_tile(): isActive = false Global.activeTiles.erase([i, j]) diff --git a/scripts/TileCube.gd b/scripts/TileCube.gd index b2bc727..5697a00 100644 --- a/scripts/TileCube.gd +++ b/scripts/TileCube.gd @@ -379,10 +379,10 @@ func update_polygons(): var image = load("res://assets/building_assets/2d Assets/Library.png") buildingSprite = Sprite.new() buildingSprite.texture = image - buildingSprite.position = Vector2(x, y - h) + buildingSprite.position = Vector2(x - w , y) buildingSprite.z_index = (i + j) * 10 listOfBuildings.append(buildingSprite) - sensor_height = 32 + sensor_height = 16 sensor_zindex+=2 elif tile.inf == Tile.TileInf.MUSEUM: @@ -390,7 +390,7 @@ func update_polygons(): var image = load("res://assets/building_assets/2d Assets/Museum.png") buildingSprite = Sprite.new() buildingSprite.texture = image - buildingSprite.position = Vector2(x, y - h) + buildingSprite.position = Vector2(x, y) buildingSprite.z_index = (i + j) * 10 listOfBuildings.append(buildingSprite) sensor_height = 16 @@ -412,8 +412,7 @@ func update_polygons(): var image = load("res://assets/building_assets/2d Assets/Firehouse.png") buildingSprite = Sprite.new() buildingSprite.texture = image - buildingSprite.position = Vector2(x, y - h - 32) - buildingSprite.scale = Vector2(2, 2) + buildingSprite.position = Vector2(x - w , y) buildingSprite.z_index = (i + j) * 10 listOfBuildings.append(buildingSprite) sensor_height = 16 diff --git a/scripts/ToolsMenu.gd b/scripts/ToolsMenu.gd index fbb3437..491e87c 100644 --- a/scripts/ToolsMenu.gd +++ b/scripts/ToolsMenu.gd @@ -261,8 +261,8 @@ func button_pressed(): Global.placementState = true Global.hoverImage = "res://assets/building_assets/2d Assets/Hospital.png" Global.infType = Tile.TileInf.HOSPITAL - Global.buildingHeight = 1 - Global.buildingWidth = 1 + Global.buildingHeight = 2 + Global.buildingWidth = 2 get_node("/root/CityMap/PreviewFade").play("Fade") 'police station_button': Global.mapTool = Global.Tool.INF_POLICE_STATION @@ -277,8 +277,8 @@ func button_pressed(): Global.placementState = true Global.hoverImage = "res://assets/building_assets/2d Assets/UtilityPlant.png" Global.infType = Tile.TileInf.UTILITIES_PLANT - Global.buildingHeight = 1 - Global.buildingWidth = 1 + Global.buildingHeight = 2 + Global.buildingWidth = 2 get_node("/root/CityMap/PreviewFade").play("Fade") 'sewage facility_button': Global.mapTool = Global.Tool.INF_SEWAGE_FACILITY @@ -309,16 +309,16 @@ func button_pressed(): Global.placementState = true Global.hoverImage = "res://assets/building_assets/2d Assets/Library.png" Global.infType = Tile.TileInf.LIBRARY - Global.buildingHeight = 1 - Global.buildingWidth = 1 + Global.buildingHeight = 2 + Global.buildingWidth = 2 get_node("/root/CityMap/PreviewFade").play("Fade") 'museum_button': Global.mapTool = Global.Tool.INF_MUSEUM Global.placementState = true Global.hoverImage = "res://assets/building_assets/2d Assets/Museum.png" Global.infType = Tile.TileInf.MUSEUM - Global.buildingHeight = 1 - Global.buildingWidth = 1 + Global.buildingHeight = 2 + Global.buildingWidth = 2 get_node("/root/CityMap/PreviewFade").play("Fade") 'school_button': Global.mapTool = Global.Tool.INF_SCHOOL diff --git a/scripts/start_map.gd b/scripts/start_map.gd index d6d49b3..8e19807 100644 --- a/scripts/start_map.gd +++ b/scripts/start_map.gd @@ -25,8 +25,8 @@ func _ready(): #$HUD/TopBar/HBoxContainer/Demand.text = "Residential Demand: " + str(UpdateDemand.calcResidentialDemand()) + "/10" + " Commercial Demand: " + str(UpdateDemand.calcCommercialDemand()) + "/10" $HUD/Date/Year.text = str(UpdateDate.year) $HUD/Date/Month.text = UpdateDate.Months.keys()[UpdateDate.month] - if (Global.newGame): - initTutorial() + #if (Global.newGame): + # initTutorial() func initSave_Exit(): $Popups/SaveDialog.connect("file_selected", self, "_on_file_selected_save")