few changes
This commit is contained in:
parent
4291107c98
commit
382440bb6b
BIN
assets/tech/advanced_laser.png
Normal file
BIN
assets/tech/advanced_laser.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
40
assets/tech/advanced_laser.png.import
Normal file
40
assets/tech/advanced_laser.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://d13q7dkfbb3xb"
|
||||
path="res://.godot/imported/advanced_laser.png-e6faf80fb8de1d37e8fe10d429b31819.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/tech/advanced_laser.png"
|
||||
dest_files=["res://.godot/imported/advanced_laser.png-e6faf80fb8de1d37e8fe10d429b31819.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/tech/advanced_weapons.png
Normal file
BIN
assets/tech/advanced_weapons.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.8 KiB |
40
assets/tech/advanced_weapons.png.import
Normal file
40
assets/tech/advanced_weapons.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://ddlrbutpdevej"
|
||||
path="res://.godot/imported/advanced_weapons.png-67aed4fec4ed1da9b03ac98e99824530.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/tech/advanced_weapons.png"
|
||||
dest_files=["res://.godot/imported/advanced_weapons.png-67aed4fec4ed1da9b03ac98e99824530.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
BIN
assets/tech/basic_shipbuilding.png
Normal file
BIN
assets/tech/basic_shipbuilding.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
40
assets/tech/basic_shipbuilding.png.import
Normal file
40
assets/tech/basic_shipbuilding.png.import
Normal file
@ -0,0 +1,40 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://2n1wprvxewh4"
|
||||
path="res://.godot/imported/basic_shipbuilding.png-2baac68cab7f0fd2e2b6c768ddaa9dcd.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://assets/tech/basic_shipbuilding.png"
|
||||
dest_files=["res://.godot/imported/basic_shipbuilding.png-2baac68cab7f0fd2e2b6c768ddaa9dcd.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/uastc_level=0
|
||||
compress/rdo_quality_loss=0.0
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=false
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/channel_remap/red=0
|
||||
process/channel_remap/green=1
|
||||
process/channel_remap/blue=2
|
||||
process/channel_remap/alpha=3
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=1
|
||||
@ -83,11 +83,10 @@ offset_bottom = 142.0
|
||||
size_flags_horizontal = 0
|
||||
|
||||
[node name="TechPanel" parent="UI" instance=ExtResource("9_lwv00")]
|
||||
visible = false
|
||||
offset_left = -1265.4401
|
||||
offset_top = -430.12006
|
||||
offset_right = -609.44006
|
||||
offset_bottom = -254.12006
|
||||
offset_right = -615.44006
|
||||
offset_bottom = -19.120056
|
||||
|
||||
[node name="StationPanel" parent="UI" instance=ExtResource("10_ntfcv")]
|
||||
visible = false
|
||||
@ -99,16 +98,7 @@ offset_bottom = 963.0
|
||||
[node name="Label" parent="UI/StationPanel" index="0"]
|
||||
offset_right = 636.0
|
||||
|
||||
[node name="Button" parent="UI/StationPanel" index="1"]
|
||||
offset_left = 38.0
|
||||
offset_top = 98.0
|
||||
offset_right = 257.0
|
||||
offset_bottom = 138.0
|
||||
|
||||
[node name="Button3" parent="UI/StationPanel" index="2"]
|
||||
offset_right = 257.0
|
||||
|
||||
[node name="Button2" parent="UI/StationPanel" index="3"]
|
||||
[node name="Button2" parent="UI/StationPanel" index="1"]
|
||||
offset_left = 607.0
|
||||
offset_top = 9.0
|
||||
offset_right = 636.0
|
||||
|
||||
@ -12,10 +12,10 @@ var resources := {
|
||||
"copper": 110.0,
|
||||
"water": 0.0,
|
||||
"carbon": 0.0,
|
||||
"aluminium": 0.0,
|
||||
"aluminium": 110.0,
|
||||
"silicon": 0.0,
|
||||
"titanium": 0.0,
|
||||
"uranium": 0.0,
|
||||
"uranium": 1110.0,
|
||||
"platinum": 0.0,
|
||||
"helium_3": 0.0,
|
||||
"neutronium": 0.0,
|
||||
@ -27,7 +27,7 @@ var resources := {
|
||||
"chronite": 0.0,
|
||||
}
|
||||
|
||||
var since_doc: float = 2.0
|
||||
var since_doc: float = 211.0
|
||||
|
||||
# Technologie odkryte
|
||||
var unlocked_techs = []
|
||||
@ -40,7 +40,7 @@ var planets: Array = []
|
||||
|
||||
# Możesz też trzymać globalne modyfikatory
|
||||
var global_modifiers = {
|
||||
"water_efficiency": 1.0,
|
||||
"population_growth": 1.0,
|
||||
"water_efficiency": 0.0,
|
||||
"population_growth": 0.0,
|
||||
"resource_bonus": 1.0,
|
||||
}
|
||||
|
||||
@ -200,8 +200,8 @@ func _res_growth(delta):
|
||||
|
||||
func check_growth(mining_difficulty: float) -> float:
|
||||
# Zwraca przyrost zaokrąglony do 2 miejsc po przecinku
|
||||
var growth = res_rich * log(1 + population / 10000.0) * mining_difficulty
|
||||
|
||||
var growth = res_rich * log(1 + population / 10000.0) * mining_difficulty*PlayerData.global_modifiers["resource_bonus"]
|
||||
#print(PlayerData.global_modifiers["resource_bonus"])
|
||||
|
||||
return round(growth * 100) / 100.0
|
||||
|
||||
|
||||
@ -130,6 +130,13 @@ func _on_technology_pressed(tech_id):
|
||||
# Dodaj technologię do odblokowanych
|
||||
PlayerData.unlocked_techs.append(tech_id)
|
||||
print("Odblokowano technologię:", tech.name)
|
||||
if tech.unlock_effects != null:
|
||||
for key in tech.unlock_effects.keys():
|
||||
if PlayerData.global_modifiers.has(key):
|
||||
PlayerData.global_modifiers[key] += tech.unlock_effects[key]
|
||||
else:
|
||||
# jeśli nie ma jeszcze takiego modyfikatora, dodajemy
|
||||
PlayerData.global_modifiers[key] = tech.unlock_effects[key]
|
||||
emit_signal("building_buttons_update")
|
||||
emit_signal("ships_buttons_update")
|
||||
|
||||
|
||||
@ -43,5 +43,50 @@ const TECHNOLOGIES = {
|
||||
|
||||
},
|
||||
"requires": ["hydro_engineering"]
|
||||
}
|
||||
},
|
||||
"basic_shipbuilding": {
|
||||
"name": "Basic shipbuilding",
|
||||
"description": "Allow builid advanced ships",
|
||||
"time": 10,
|
||||
"cost": {
|
||||
"science": 10,
|
||||
"iron": 5,
|
||||
"aluminium":10
|
||||
},
|
||||
"texture": "res://assets/tech/basic_shipbuilding.png",
|
||||
"unlock_effects": {
|
||||
|
||||
},
|
||||
"requires": ["advanced_mining"]
|
||||
},
|
||||
"advanced_weapons": {
|
||||
"name": "Advanced weapons",
|
||||
"description": "Allow builid advanced ships",
|
||||
"time": 10,
|
||||
"cost": {
|
||||
"science": 10,
|
||||
"iron": 5,
|
||||
|
||||
},
|
||||
"texture": "res://assets/tech/advanced_weapons.png",
|
||||
"unlock_effects": {
|
||||
|
||||
},
|
||||
"requires": ["basic_shipbuilding"]
|
||||
},
|
||||
"advanced_laser": {
|
||||
"name": "Advanced laser",
|
||||
"description": "Allow builid advanced ships",
|
||||
"time": 10,
|
||||
"cost": {
|
||||
"science": 10,
|
||||
"iron": 5,
|
||||
|
||||
},
|
||||
"texture": "res://assets/tech/advanced_laser.png",
|
||||
"unlock_effects": {
|
||||
"resource_bonus": 0.5,
|
||||
},
|
||||
"requires": ["basic_shipbuilding"]
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user