Add gas giant resource system
This commit is contained in:
parent
8f7b58f2a8
commit
fc68c4e8cf
9 changed files with 180 additions and 10 deletions
|
|
@ -643,7 +643,7 @@ func _show_building_info(type: String) -> void:
|
|||
lines.append("%s already has an extractor." % planet.planet_name)
|
||||
can_build = false
|
||||
else:
|
||||
lines.append("Will mine %s." % planet.planet_name)
|
||||
lines.append("Will mine %s from %s." % ["gas" if planet.resource_type == "gas" else "ore", planet.planet_name])
|
||||
elif can_build and type == GameState.BUILDING_MOTHERSHIP and GameState.has_mothership():
|
||||
lines.append("WARNING: only one may exist - this destroys your current one.")
|
||||
|
||||
|
|
@ -685,7 +685,7 @@ func _confirm_build() -> void:
|
|||
if not GameState.spend(GameState.EXTRACTOR_COST):
|
||||
build_status.text = "Not enough rocks (need %d, have %d)" % [GameState.EXTRACTOR_COST, GameState.rocks]
|
||||
return
|
||||
GameState.add_extractor(planet.planet_name, planet.position)
|
||||
GameState.add_extractor(planet.planet_name, planet.position, planet.resource_type)
|
||||
build_menu.visible = false
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue