Add planet scanner and octopus biome
This commit is contained in:
parent
2ecd61de98
commit
8fbcc340ce
21 changed files with 784 additions and 30 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class_name BuildingDefinitions
|
||||
extends RefCounted
|
||||
|
||||
const ORDER: PackedStringArray = ["mothership", "ship_crafter", "command_center", "outpost", "planning_center", "spacial_workshop", "extractor", "transport_hub", "ship_lab", "gas_burner"]
|
||||
const ORDER: PackedStringArray = ["mothership", "ship_crafter", "command_center", "outpost", "planning_center", "spacial_workshop", "planet_scanner", "extractor", "transport_hub", "ship_lab", "gas_burner"]
|
||||
const DEFINITIONS: Dictionary = {
|
||||
"mothership": preload("res://buildings/MothershipBuildingDefinition.tres"),
|
||||
"ship_crafter": preload("res://buildings/CrafterBuildingDefinition.tres"),
|
||||
|
|
@ -9,6 +9,7 @@ const DEFINITIONS: Dictionary = {
|
|||
"outpost": preload("res://buildings/OutpostBuildingDefinition.tres"),
|
||||
"planning_center": preload("res://buildings/PlanningBuildingDefinition.tres"),
|
||||
"spacial_workshop": preload("res://buildings/WorkshopBuildingDefinition.tres"),
|
||||
"planet_scanner": preload("res://buildings/ScannerBuildingDefinition.tres"),
|
||||
"extractor": preload("res://buildings/ExtractorBuildingDefinition.tres"),
|
||||
"transport_hub": preload("res://buildings/TransportHubBuildingDefinition.tres"),
|
||||
"ship_lab": preload("res://buildings/ShipLabBuildingDefinition.tres"),
|
||||
|
|
|
|||
25
buildings/ScannerBuildingDefinition.tres
Normal file
25
buildings/ScannerBuildingDefinition.tres
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
[gd_resource type="Resource" script_class="BuildingDefinition" load_steps=3 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://buildings/BuildingDefinition.gd" id="1"]
|
||||
[ext_resource type="PackedScene" path="res://buildings/ScannerBuildingVisual.tscn" id="2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
definition_id = "planet_scanner"
|
||||
display_name = "Planet Scanner"
|
||||
description = "Searches deep space for the nearest planet of a chosen type and reveals it on the world map. Survey all four ordinary planet types to identify the tentacled world."
|
||||
cost = 45
|
||||
build_resource_costs = {"ore": 45, "gas": 15}
|
||||
action_icon = 47
|
||||
menu_icon = 47
|
||||
visual_scene = ExtResource("2")
|
||||
capabilities = PackedStringArray("planet_scanner")
|
||||
map_color = Color(0.35, 0.88, 1, 1)
|
||||
map_sides = 6
|
||||
map_radius = 8.0
|
||||
map_phase = 0.523599
|
||||
menu_button_name = "ScannerButton"
|
||||
menu_label_name = "ScannerLabel"
|
||||
menu_cost_name = "ScannerCost"
|
||||
unique = true
|
||||
max_hp = 75
|
||||
26
buildings/ScannerBuildingVisual.gd
Normal file
26
buildings/ScannerBuildingVisual.gd
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
extends Node2D
|
||||
|
||||
const COLOR: Color = Color(0.35, 0.88, 1.0)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
set_process(false)
|
||||
queue_redraw()
|
||||
|
||||
|
||||
func _draw() -> void:
|
||||
# A broad dish on an open orbital truss. Static by design: scanning is a
|
||||
# deliberate menu action, so a permanent sweep animation would promise
|
||||
# background work that the building does not perform.
|
||||
NeonDraw.draw_glowing_path(self, PackedVector2Array([
|
||||
Vector2(-58, -34), Vector2(-34, 12), Vector2(12, 30),
|
||||
]), COLOR, 0.9, 0.7)
|
||||
NeonDraw.draw_glowing_line(self, Vector2(-31, 12), Vector2(-12, 62),
|
||||
COLOR, 0.9, 0.7)
|
||||
NeonDraw.draw_glowing_line(self, Vector2(-52, 62), Vector2(30, 62),
|
||||
COLOR, 0.9, 0.7)
|
||||
NeonDraw.draw_glowing_circle(self, Vector2(-25, 4), 7.0,
|
||||
Color(0.95, 0.3, 0.72), 1.0, Color(0.06, 0.02, 0.12))
|
||||
for radius in [34.0, 52.0, 70.0]:
|
||||
draw_arc(Vector2(-30, 3), radius, -1.15, -0.18, 18,
|
||||
COLOR, 2.2, true)
|
||||
11
buildings/ScannerBuildingVisual.tscn
Normal file
11
buildings/ScannerBuildingVisual.tscn
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
[gd_scene load_steps=3 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://buildings/ScannerBuildingVisual.gd" id="1"]
|
||||
[ext_resource type="Script" path="res://buildings/BuildingActionProvider.gd" id="2"]
|
||||
|
||||
[node name="Visual" type="Node2D"]
|
||||
script = ExtResource("1")
|
||||
|
||||
[node name="ActionProvider" type="Node" parent="."]
|
||||
script = ExtResource("2")
|
||||
actions = PackedStringArray("scanner")
|
||||
Loading…
Reference in a new issue