Drobne zmiany
This commit is contained in:
parent
1bf30e0077
commit
042b7aea2b
@ -22,10 +22,10 @@ scale = Vector2(0.053333335, 0.053333335)
|
|||||||
texture = ExtResource("2_h8ms6")
|
texture = ExtResource("2_h8ms6")
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
offset_left = 8.0
|
offset_left = -12.0
|
||||||
offset_top = -8.0
|
offset_top = 6.0
|
||||||
offset_right = 32.0
|
offset_right = 12.0
|
||||||
offset_bottom = 8.0
|
offset_bottom = 22.0
|
||||||
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
theme_override_colors/font_outline_color = Color(0, 0, 0, 1)
|
||||||
theme_override_constants/outline_size = 1
|
theme_override_constants/outline_size = 1
|
||||||
theme_override_fonts/font = ExtResource("3_ggt7d")
|
theme_override_fonts/font = ExtResource("3_ggt7d")
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=4 format=3 uid="uid://cvc0brcqh2rhu"]
|
[gd_scene load_steps=5 format=3 uid="uid://cvc0brcqh2rhu"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://c7l387xor12hx" path="res://scripts/star.gd" id="1_mcqwg"]
|
[ext_resource type="Script" uid="uid://c7l387xor12hx" path="res://scripts/star.gd" id="1_mcqwg"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dsfxgajg3jodv" path="res://assets/stars/s3.png" id="2_8d8bx"]
|
||||||
[ext_resource type="Script" uid="uid://bgghdcbxp6o0k" path="res://scripts/star_sprite.gd" id="3_ef0hr"]
|
[ext_resource type="Script" uid="uid://bgghdcbxp6o0k" path="res://scripts/star_sprite.gd" id="3_ef0hr"]
|
||||||
[ext_resource type="FontFile" uid="uid://chk8jrn2ighpx" path="res://assets/fonts/main_font.ttf" id="4_8d8bx"]
|
[ext_resource type="FontFile" uid="uid://chk8jrn2ighpx" path="res://assets/fonts/main_font.ttf" id="4_8d8bx"]
|
||||||
|
|
||||||
@ -8,7 +9,8 @@
|
|||||||
script = ExtResource("1_mcqwg")
|
script = ExtResource("1_mcqwg")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||||
scale = Vector2(0.014594748, 0.013618186)
|
scale = Vector2(0.02, 0.02)
|
||||||
|
texture = ExtResource("2_8d8bx")
|
||||||
script = ExtResource("3_ef0hr")
|
script = ExtResource("3_ef0hr")
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="."]
|
[node name="Label" type="Label" parent="."]
|
||||||
|
|||||||
@ -13,3 +13,14 @@ func _process(delta):
|
|||||||
update_timer += delta #* Settings.TIME_SCALE
|
update_timer += delta #* Settings.TIME_SCALE
|
||||||
if update_timer >= Settings.UPDATE_INTERVAL:
|
if update_timer >= Settings.UPDATE_INTERVAL:
|
||||||
update_timer = 0.0
|
update_timer = 0.0
|
||||||
|
|
||||||
|
func format_number(num: int) -> String:
|
||||||
|
var s = str(int(num))
|
||||||
|
var result = ""
|
||||||
|
var count = 0
|
||||||
|
for i in range(s.length() - 1, -1, -1):
|
||||||
|
result = s[i] + result
|
||||||
|
count += 1
|
||||||
|
if count % 3 == 0 and i != 0:
|
||||||
|
result = "." + result
|
||||||
|
return result
|
||||||
|
|||||||
@ -60,8 +60,8 @@ func _generate_galaxy(count: int):
|
|||||||
planet.get_node("Sprite2D").texture = load("res://assets/planets/p%d.png" % randi_range(1,9))
|
planet.get_node("Sprite2D").texture = load("res://assets/planets/p%d.png" % randi_range(1,9))
|
||||||
else:
|
else:
|
||||||
planet.get_node("Sprite2D").texture = load("res://assets/planets/p%d.png" % randi_range(10,18))
|
planet.get_node("Sprite2D").texture = load("res://assets/planets/p%d.png" % randi_range(10,18))
|
||||||
planet.get_node("Sprite2D").scale = Vector2(0.053*planet.size/2, 0.053*planet.size/2)
|
planet.get_node("Sprite2D").scale = Vector2(0.073*planet.size/2, 0.073*planet.size/2)
|
||||||
star.add_child(planet) # Planeta należy do gwiazdy!
|
star.add_child(planet) # Planeta należy do gwiaz7
|
||||||
star.planets.append(planet)
|
star.planets.append(planet)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -98,7 +98,9 @@ func print_data():
|
|||||||
var text = "🌍 %s\n" % pname
|
var text = "🌍 %s\n" % pname
|
||||||
text += "Biosfera: %.2f\n" % biosfere
|
text += "Biosfera: %.2f\n" % biosfere
|
||||||
text += "Zasobność surowców: %.2f\n" % res_rich
|
text += "Zasobność surowców: %.2f\n" % res_rich
|
||||||
text += "Limit populacji: " + str(int(max_pop)).pad_decimals(0) + "\n"
|
text += "Limit populacji: %s\n" % GameData.format_number(max_pop)
|
||||||
|
|
||||||
|
|
||||||
text += "Populacja: " + str(int(population)).pad_decimals(0) + "\n"
|
text += "Populacja: " + str(int(population)).pad_decimals(0) + "\n"
|
||||||
text += "Status: " + ("Skolonizowana" if is_colonized else "Nieskolonizowana") + "\n"
|
text += "Status: " + ("Skolonizowana" if is_colonized else "Nieskolonizowana") + "\n"
|
||||||
var has_any_resource = false
|
var has_any_resource = false
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user