-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create terra_packed for changing current indicators Indicators send terra_packed instead setting indicators value on its own Change Natural Buttons sending action way Change Pop up convention File restructurization Every planet have own terravarible resource Normalize naming convenctions Change indicator movement script to indicator background Close solved issues: [closed #13], [closed #13], [closed #14], [closed #15] Change balloon dialogue to Control
- Loading branch information
1 parent
8ab3eae
commit 4862add
Showing
44 changed files
with
364 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
extends ColorRect | ||
|
||
|
||
var planet_mechanic_res: TerraVaribleRes: | ||
set(new): | ||
planet_mechanic_res = new | ||
max_value = planet_mechanic_res.max_value | ||
min_value = planet_mechanic_res.min_value | ||
planet_mechanic_res.value_changed.connect(_on_value_changed) | ||
_on_value_changed(planet_mechanic_res.value) | ||
|
||
|
||
var max_value: float | ||
var min_value: float | ||
@onready var indicator = $Indicator | ||
|
||
func _on_value_changed(new_value: float): | ||
indicator.position.x = remap(new_value, min_value, max_value, 0, self.size.x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
extends VBoxContainer | ||
|
||
signal spike_action_made(terra_packed) | ||
|
||
@export var is_debug := true | ||
@onready var indicators = self.get_children() | ||
|
||
func _ready(): | ||
if is_debug: | ||
for indicator in indicators: | ||
indicator.is_debug = true | ||
|
||
func _on_spike_action_made(terra_packed): | ||
for indicator in indicators: | ||
indicator.start_cooldown() | ||
emit_signal("spike_action_made", terra_packed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
[gd_scene load_steps=3 format=3 uid="uid://plfmfhlyals5"] | ||
|
||
[ext_resource type="Script" path="res://code/GUI/indicators/indicators.gd" id="1_bu24p"] | ||
[ext_resource type="PackedScene" uid="uid://x1lh0re4n6wg" path="res://code/GUI/indicators/indicator_bar.tscn" id="1_iw2oa"] | ||
|
||
[node name="Indicators" type="VBoxContainer"] | ||
size_flags_horizontal = 0 | ||
size_flags_vertical = 0 | ||
script = ExtResource("1_bu24p") | ||
|
||
[node name="Atmo" parent="." instance=ExtResource("1_iw2oa")] | ||
layout_mode = 2 | ||
is_debug = false | ||
|
||
[node name="Oxygen" parent="." instance=ExtResource("1_iw2oa")] | ||
layout_mode = 2 | ||
is_debug = false | ||
|
||
[node name="Heat" parent="." instance=ExtResource("1_iw2oa")] | ||
layout_mode = 2 | ||
is_debug = false | ||
|
||
[connection signal="spike_action_made" from="Atmo" to="." method="_on_spike_action_made"] | ||
[connection signal="spike_action_made" from="Oxygen" to="." method="_on_spike_action_made"] | ||
[connection signal="spike_action_made" from="Heat" to="." method="_on_spike_action_made"] |
5 changes: 2 additions & 3 deletions
5
code/useful/terraform_button.gd → code/GUI/nature_button_list/nature_button.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
@tool | ||
extends ButtonSound | ||
|
||
signal button_up_with_stats(stats) | ||
|
||
@export var stats: TerraformingVaribles | ||
@export var terra_packs: PackTerraPack | ||
|
||
|
||
|
||
func _init(): | ||
self.button_up.connect(_on_button_up) | ||
|
||
func _on_button_up(): | ||
emit_signal("button_up_with_stats", stats) | ||
emit_signal("button_up_with_stats", terra_packs) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
extends PanelContainer | ||
|
||
signal natural_action_made(pack_terra_pack: PackTerraPack) | ||
|
||
|
||
|
||
func _on_button_up_with_stats(pack_terra_pack): | ||
assert(pack_terra_pack, "This pack is empty!") | ||
emit_signal("natural_action_made", pack_terra_pack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.