diff --git a/assets/tech/advanced_laser.png b/assets/tech/advanced_laser.png new file mode 100644 index 0000000..05225b9 Binary files /dev/null and b/assets/tech/advanced_laser.png differ diff --git a/assets/tech/advanced_laser.png.import b/assets/tech/advanced_laser.png.import new file mode 100644 index 0000000..40393df --- /dev/null +++ b/assets/tech/advanced_laser.png.import @@ -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 diff --git a/assets/tech/advanced_weapons.png b/assets/tech/advanced_weapons.png new file mode 100644 index 0000000..1636ba3 Binary files /dev/null and b/assets/tech/advanced_weapons.png differ diff --git a/assets/tech/advanced_weapons.png.import b/assets/tech/advanced_weapons.png.import new file mode 100644 index 0000000..77b7a25 --- /dev/null +++ b/assets/tech/advanced_weapons.png.import @@ -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 diff --git a/assets/tech/basic_shipbuilding.png b/assets/tech/basic_shipbuilding.png new file mode 100644 index 0000000..501db95 Binary files /dev/null and b/assets/tech/basic_shipbuilding.png differ diff --git a/assets/tech/basic_shipbuilding.png.import b/assets/tech/basic_shipbuilding.png.import new file mode 100644 index 0000000..489c631 --- /dev/null +++ b/assets/tech/basic_shipbuilding.png.import @@ -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 diff --git a/scenes/galaxy.tscn b/scenes/galaxy.tscn index 3efdc78..7244b74 100644 --- a/scenes/galaxy.tscn +++ b/scenes/galaxy.tscn @@ -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 diff --git a/scripts/PlayerData.gd b/scripts/PlayerData.gd index 990adfe..57be3ca 100644 --- a/scripts/PlayerData.gd +++ b/scripts/PlayerData.gd @@ -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, } diff --git a/scripts/planet.gd b/scripts/planet.gd index d91bb91..fc668f4 100644 --- a/scripts/planet.gd +++ b/scripts/planet.gd @@ -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 diff --git a/scripts/tech_panel.gd b/scripts/tech_panel.gd index 51de542..b7b7497 100644 --- a/scripts/tech_panel.gd +++ b/scripts/tech_panel.gd @@ -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") diff --git a/scripts/technologies.gd b/scripts/technologies.gd index 9c920bd..c10e07e 100644 --- a/scripts/technologies.gd +++ b/scripts/technologies.gd @@ -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"] + }, }