Add new entity and item definitions, refactor related code
- Introduced new CSV files for entities and items, defining various properties and characteristics. - Refactored the stage.gd script to handle item selection and descriptions instead of entities. - Updated item button script to reflect changes in item properties and signals. - Created a new entity.gd script to define the OwniverseEntity class with initialization and parsing methods. - Modified owniverse.gd to initialize entities from the new definitions. - Adjusted versioning in export presets and project files to reflect recent changes.
This commit is contained in:
+10
-8
@@ -22,35 +22,37 @@ var Owniverse: Dictionary = {
|
|||||||
var Locales: Dictionary = {}
|
var Locales: Dictionary = {}
|
||||||
var Locale = "en"
|
var Locale = "en"
|
||||||
|
|
||||||
var Entities: Dictionary = {}
|
var OwniverseEntities: Dictionary = {}
|
||||||
|
var OwniverseItems: Dictionary = {}
|
||||||
var Templates: Dictionary = {}
|
var Templates: Dictionary = {}
|
||||||
|
|
||||||
|
|
||||||
func get_localized_item_description(entity_id: String, item: String) -> String:
|
func get_localized_item_description(item_id: String, item: String) -> String:
|
||||||
if Locales[Locale].has(entity_id):
|
if Locales[Locale].has(item_id):
|
||||||
return Locales[Locale][entity_id][item]
|
return Locales[Locale][item_id][item]
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
|
|
||||||
func get_description(item_id: String, values: Array = []) -> String:
|
func get_description(item_id: String, items: Array = []) -> String:
|
||||||
if !Templates[Locale].has(item_id):
|
if !Templates[Locale].has(item_id):
|
||||||
return ""
|
return ""
|
||||||
#print(Templates[Locale])
|
|
||||||
var description: String = Templates[Locale][item_id]["text"]
|
var description: String = Templates[Locale][item_id]["text"]
|
||||||
var value = 0
|
var value = 0
|
||||||
for item in values:
|
for item in items:
|
||||||
description.replace("value"+str(value), str(item))
|
description.replace("value"+str(value), str(item))
|
||||||
return description
|
return description
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
Entities = _read_from_csv("res://Autoload/entities.csv")
|
OwniverseEntities = _read_from_csv("res://Autoload/owniverse_entitites.csv")
|
||||||
|
OwniverseItems = _read_from_csv("res://Autoload/owniverse_items.csv")
|
||||||
|
|
||||||
Locales["en"] = _read_from_csv("res://Autoload/locale.en.csv")
|
Locales["en"] = _read_from_csv("res://Autoload/locale.en.csv")
|
||||||
Locales["ru"] = _read_from_csv("res://Autoload/locale.ru.csv")
|
Locales["ru"] = _read_from_csv("res://Autoload/locale.ru.csv")
|
||||||
|
|
||||||
Templates["en"] = _read_from_csv("res://Autoload/templates.en.csv")
|
Templates["en"] = _read_from_csv("res://Autoload/templates.en.csv")
|
||||||
|
|
||||||
|
|
||||||
func _read_from_csv(file_path: String) -> Dictionary:
|
func _read_from_csv(file_path: String) -> Dictionary:
|
||||||
if not FileAccess.file_exists(file_path):
|
if not FileAccess.file_exists(file_path):
|
||||||
|
|||||||
@@ -1,132 +0,0 @@
|
|||||||
Пространство|S|Resource|||||||||||||1|S||||||||
|
|
||||||
Водород|H|Resource|||||||||||||1|H||||||||
|
|
||||||
Гелий|He|Resource||||||||||||||||||||||
|
|
||||||
Металлы|Met|Resource||||||||||||||||||||||
|
|
||||||
Бурый карлик|BD|Planet|||||||||||BD:1|||||||||||
|
|
||||||
Горячий бурый карлик|HBD|Star phase 1|BD|0.1|5.00E+09|H:0.1|||S:0.5|||CBD:1|||||||||1|||
|
|
||||||
Красный карлик|RD|Star phase 1||1|4.00E+10|H:1||1|S:40|||TWD:1&H:0.13&He:0.05&Met:0.01|H:1|Star||DwStar|1x0.01|1x0.21|2x0.08|3x0.4|1|||
|
|
||||||
Оранжевый карлик|OD|Star phase 1||8|1.80E+10|H:8||1|S:36|||SRG:1|RD:1|Star||DwStar|1x0.03|2x0.34|3x0.13|3x0.4|1|||
|
|
||||||
Жёлтый карлик|YD|Star phase 1||10|9.00E+09|H:10||1|S:27|||NRG:1|OD:1|Star||DwStar|2x0.1|3x0.55|4x0.21|3x0.4|1|||
|
|
||||||
Бело-жёлтый карлик|WYD|Star phase 1||16|1.80E+09|H:16||1|S:18|||MRG:1|YD:1|Star||DwStar|3x0.3|5x0.89|5x0.34|3x0.4|1|||
|
|
||||||
Жёлтый гигант|YG|Star phase 1||50|4.50E+08|H:50||1|S:9|||LRG:1|H:15|Star||GiStar|||||2|||
|
|
||||||
Голубой гигант|BG|Star phase 1||100|9.00E+07|H:100||1|S:9|||HRG:1|H:30&YG:1|Star||GiStar|||||2|||
|
|
||||||
Сверхгигант|SG|Star phase 1||300|9.00E+06|H:300||1|S:9|||RSG:1|H:100&BG:1|Star||GiStar|||||2|||
|
|
||||||
Гипергигант|HG|Star phase 1||1000|9.00E+05|H:1000||1|S:9|||RHG:1|H:300&SG:1|Star||GiStar|||||2|||
|
|
||||||
Красный гигант|RG|Star phase 2|||||||||||RG:1|||||||||||
|
|
||||||
Малый красный гигант|SRG|Star phase 2|RG|8|2.00E+09||||S:80|||SWD:1&H:2.32&He:0.64&Met:0.08&S:12.4||Star|||||||1|||
|
|
||||||
Обычный Красный гигант|NRG|Star phase 2|RG|10|1.00E+09||||S:120.|||NWD:1&H:3.2&He:1.3&Met:0.2&S:14.3||Star|||||||1|||
|
|
||||||
Средний красный гигант|MRG|Star phase 2|RG|16|2.00E+08||||S:200|||LWD:1&H:4.96&He:3.36&Met:0.48&S:20.2||Star|||||||1|||
|
|
||||||
Большой красный гигант|LRG|Star phase 2|RG|50|5.00E+07||||S:300|||DSN^SGRB%.1||Star|||||||2|||
|
|
||||||
Огромный красный гигант|HRG|Star phase 2|RG|100|1.00E+07||||S:400.|||SN^GRB%1||Star|||||||2|||
|
|
||||||
Красный сверхгигант|RSG|Star phase 2|RG|300|1.00E+06||||S:500|||BSN^LGRB%3||Star|||||||2|||
|
|
||||||
Красный гипергигант|RHG|Star phase 2|RG|1000|1.00E+05||||S:600|||HN^HGRB%10||Star|||||||2|||
|
|
||||||
Тусклая сверхновая|DSN|Star phase 3|||1||||S:59.1|||SNS:1&H:6.5&He:13.5&Met:11&blast:2||||SNGRBB|||||2|||
|
|
||||||
Сверхновая|SN|Star phase 3|||1||||S:99.1|||LNS:1&H:8&He:50&Met:11&blast:9||||SNGRBB|||||2|||
|
|
||||||
Яркая сверхновая|BSN|Star phase 3|||1||||S:309.1|||MGT:1&H:15&He:186&Met:15&blast:305||||SNGRBB|||||2|||
|
|
||||||
Гиперновая|HN|Star phase 3|||1||||S:939.1|||BH40:1&H:30&He:560&Met:30&blast:9990||||SNGRBB|||||2|||
|
|
||||||
Малый гамма-всплеск|SGRB|Star phase 3|||1||||S:149.1|||BH25:1&H:0.5&He:10&Met:4&blast:31||||SNGRBB|||||2|||
|
|
||||||
Гамма-всплеск|GRB|Star phase 3|||1||||S:239.1|||BH30:1&H:19&He:12&Met:5&blast:136||||SNGRBB|||||2|||
|
|
||||||
Большой гамма-всплеск|LGRB|Star phase 3|||1||||S:669.1|||BH40:1&H:68&He:18&Met:9&blast:3446||||SNGRBB|||||2|||
|
|
||||||
Гипер гамма-всплеск|HGRB|Star phase 3|||1||||S:1939.1|||BH60:1&H:0&He:40&Met:10&blast:97342||||SNGRBB|||||2|||
|
|
||||||
Холодный бурый карлик|CBD|Star phase 4|BD|0.1||||||||||||||||||||
|
|
||||||
Белый карлик|WD|Star phase 4|||||||||||WD:1|||||||||||
|
|
||||||
Крошечный белый карлик|TWD|Star phase 4|WD|0.8||||||||||Star||Degen||||||||
|
|
||||||
Малый белый карлик|SWD|Star phase 4|WD|4.8||||||||||Star||Degen||||||||
|
|
||||||
Обычный белый карлик|NWD|Star phase 4|WD|5||||||||||Star||Degen||||||||
|
|
||||||
Большой белый карлик|LWD|Star phase 4|WD|6.4||||||||||Star||Degen||||||||
|
|
||||||
Нейтронная звезда|NS|Star phase 4|||||||||||NS:1|||||||||||
|
|
||||||
Малая нейтронная звезда|SNS|Star phase 4|NS|15||||||||||Star||Degen||||||||
|
|
||||||
Большая нейтронная звезда|LNS|Star phase 4|NS|18||||||||||Star||Degen||||||||
|
|
||||||
Магнетар|MGT|Star phase 4||21|||||||||MGT:1|Star||Degen||||||||
|
|
||||||
Чёрная дыра|BH|Star phase 4|||||||||||BH:1|||||||||||
|
|
||||||
Чёрная дыра 25|BH25|Star phase 4|BH|25||||||||||BH||BH||||||||
|
|
||||||
Чёрная дыра 30|BH30|Star phase 4|BH|30||||||||||BH||BH||||||||
|
|
||||||
Чёрная дыра 40|BH40|Star phase 4|BH|40||||||||||BH||BH||||||||
|
|
||||||
Чёрная дыра 60|BH60|Star phase 4|BH|60||||||||||BH||BH||||||||
|
|
||||||
СМЧД|SMBH|Star phase 4|||||||||||BH:1|||SMBH||||||||
|
|
||||||
Туманность|N|Cloud||1|1.00E+07|H:1||10|H:10|||H:1&S:10|S:1|CL||CL||||||||
|
|
||||||
Глобула|G|Cloud||11|3.00E+07|H:10&N:1||10|H:150|||H:11&S:20|N:1|CL||CL||||||||
|
|
||||||
Звёздная колыбель|STN|Cloud||211|3.00E+07|H:200&G:1||300|H:3000|0.50||H:211&S:320|G:1|CL||CL||||||||
|
|
||||||
Молекулярное облако|MC|Cloud||2011|3.00E+08|H:2000&G:1||4000|H:90000.|||H:2011&S:4020|G:1&S:1300|CL||CL||||||||
|
|
||||||
Активная звёздная колыбель|ASTN|Cloud||202011|1.00E+08|H:200000&MC:1||200000|H:2000000|0.65||H:202011&S:204020|MC:1&S:60000|CL||CL||||||||
|
|
||||||
Рассеянное звёздное скопление|SCD|Cluster|||1.00E+07||Star:1000||||||Star:300|SC||SC||||||0.10|4|C2.3
|
|
||||||
Малое звёздное скопление|SCS|Cluster|||1.00E+09||Star:10000&BH:10||||||SCD:1&Star:2000|SC||SC||||||0.20|3.6|C2.4
|
|
||||||
Среднее звёздное скопление|SCM|Cluster|||3.00E+09||Star:100000&BH:100||||||SCS:1&Star:20000|SC||SC||||||0.30|3.4|C2.5
|
|
||||||
Большое звёздное скопление|SCL|Cluster|||1.00E+10||Star:1000000&BH:1000||||||SCM:1&Star:200000|SC||SC||||||0.50|3.2|C2.6
|
|
||||||
Гигантское звёздное скопление|SCG|Cluster|||3.00E+10||Star:10000000&BH:10000||||||SCL:1&Star:2000000|SC||SC||||||0.80|3|C2.7
|
|
||||||
Карликовая эллиптическая галактика|GED|GalaxyElliptical|||1.20E+10|SMBH:10000|Star:1000000000&BH:1000000&SC:100||||||SMBH:1&SC:1|GAL||GALE||||||1.00|1.9|C2.9
|
|
||||||
Малая эллиптическая галактика|GES|GalaxyElliptical|||1.30E+10|SMBH:100000|Star:10000000000&BH:10000000&SC:1000||||||GED:1&Star:2000000000|GAL||GALE||||||1.50|1.8|C3.0
|
|
||||||
Средняя эллиптическая галактика|GEM|GalaxyElliptical|||1.50E+10|SMBH:1000000|Star:100000000000&BH:100000000&SC:10000||||||GES:1&Star:20000000000|GAL||GALE||||||2.00|1.7|C3.1
|
|
||||||
Большая эллиптическая галактика|GEL|GalaxyElliptical|||1.70E+10|SMBH:10000000|Star:1000000000000&BH:1000000000&SC:100000||||||GEM:1&Star:200000000000|GAL||GALE||||||3.00|1.6|C3.2
|
|
||||||
Гигантская эллиптическая галактика|GEG|GalaxyElliptical|||2.00E+10|SMBH:100000000|Star:10000000000000&BH:10000000000&SC:1000000||||||GEL:1&Star:2000000000000|GAL||GALE||||||4.50|1.5|C3.3
|
|
||||||
Карликовая спиральная галактика|GSD|GalaxySpiral|||2.00E+09|STN:10000&ASTN:10|GED:1|-5240200|H:2400000000|0.80||H:4112110|GED:1|GAL||GALS|||||||2.5|C2.9
|
|
||||||
Малая спиральная галактика|GSS|GalaxySpiral|||3.00E+09|STN:100000&ASTN:100|GES:1|-52402000|H:36000000000|0.80||H:41121100|GES:1|GAL||GALS|||||||2.3|C3.0
|
|
||||||
Средняя спиральная галактика|GSM|GalaxySpiral|||4.00E+09|STN:1000000&ASTN:1000|GEM:1|-524020000|H:480000000000|0.80||H:411211000|GEM:1|GAL||GALS|||||||2.2|C3.1
|
|
||||||
Большая спиральная галактика|GSL|GalaxySpiral|||6.00E+09|STN:10000000&ASTN:10000|GEL:1|-5240200000|H:7200000000000|0.80||H:4112110000|GEL:1|GAL||GALS|||||||2.1|C3.2
|
|
||||||
Гигантская спиральная галактика|GSG|GalaxySpiral|||9.00E+09|STN:100000000&ASTN:100000|GEG:1|-52402000000|H:108000000000000|0.80||H:41121100000|GEG:1|GAL||GALS|||||||2|C3.3
|
|
||||||
Группа галактик|LGG|Structures|||1.00E+10||GAL:50||||||GAL:20|LS||LS|||||||1.5|C3.4
|
|
||||||
Сверхскопление|LSC|Structures|||2.00E+10||LGG:200||||||LGG:1&GAL:100|LS||LS|||||||1.4|C3.6
|
|
||||||
Галактическая нить|LGF|Structures|||3.00E+10||LSC:100||||5||LSC:1&LGG:400|LS||LS|||||||1.3|C3.8
|
|
||||||
Великая стена|LGW|Structures|||6.00E+10||LGF:1000||||1.00E+04||LGF:1&LSC:200|LS||LS|||||||1.2|C4.1
|
|
||||||
Вселенский пузырь|LUB|Structures|||1.00E+11||LGW:1000||||1.00E+09||LGW:1&LGF:2000|LS||LS|||||||1.1|C4.4
|
|
||||||
Газовый гигант|GG|Planet|||||||||||GG:1|Planet||BPlanet||||||||
|
|
||||||
Астероиды|AB|Planet|||||||||||AB:1|Planet||BPlanet||||||||
|
|
||||||
Каменистая|RP|Planet|||||||||||RP:1|Planet||BPlanet||||||||
|
|
||||||
Обитаемая|HP|Planet|||||||||||HP:1|Planet||LPlanet||||||||
|
|
||||||
Живая|LP|Planet|||||||||||LP:1|Planet||LPlanet||||||||
|
|
||||||
Эон 1: Архей|EON1|Planet|LP||||||||||EON1:1|Planet||LPlanet||||||||
|
|
||||||
Эон 2: Протерозой|EON2|Planet|LP||||||||||EON2:1|Planet||LPlanet||||||||
|
|
||||||
Эон 3: Палеозой|EON3|Planet|LP||||||||||EON3:1|Planet||LPlanet||||||||
|
|
||||||
Эон 4: Мезозой|EON4|Planet|LP||||||||||EON4:1|Planet||LPlanet||||||||
|
|
||||||
Эон 5: Кайнозой|EON5|Planet|LP||||||||||EON5:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация типа 0|C0|Civilization|||||||||||C0:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.0|C0.0|Civilization|C0||||||||||C0.0:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.1|C0.1|Civilization|C0||||||||||C0.1:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.2|C0.2|Civilization|C0||||||||||C0.2:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.3|C0.3|Civilization|C0||||||||||C0.3:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.4|C0.4|Civilization|C0||||||||||C0.4:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.5|C0.5|Civilization|C0||||||||||C0.5:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.6|C0.6|Civilization|C0||||||||||C0.6:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.7|C0.7|Civilization|C0||||||||||C0.7:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.8|C0.8|Civilization|C0||||||||||C0.8:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 0.9|C0.9|Civilization|C0||||||||||C0.9:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация типа 1|C1|Civilization|||||||||||C1:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.0|C1.0|Civilization|C1||||||||||C1.0:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.1|C1.1|Civilization|C1||||||||||C1.1:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.2|C1.2|Civilization|C1||||||||||C1.2:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.3|C1.3|Civilization|C1||||||||||C1.3:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.4|C1.4|Civilization|C1||||||||||C1.4:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.5|C1.5|Civilization|C1||||||||||C1.5:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.6|C1.6|Civilization|C1||||||||||C1.6:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.7|C1.7|Civilization|C1||||||||||C1.7:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.8|C1.8|Civilization|C1||||||||||C1.8:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация 1.9|C1.9|Civilization|C1||||||||||C1.9:1|Planet||LPlanet||||||||
|
|
||||||
Цивилизация типа 2|C2|Civilization|||||||||||C2:1|||||||||||
|
|
||||||
Цивилизация 2.0|C2.0|Civilization|C2||||||||||C2.0:1|||||||||||
|
|
||||||
Цивилизация 2.1|C2.1|Civilization|C2||||||||||C2.1:1|||||||||||
|
|
||||||
Цивилизация 2.2|C2.2|Civilization|C2||||||||||C2.2:1|||||||||||
|
|
||||||
Цивилизация 2.3|C2.3|Civilization|C2||||||||||C2.3:1|||||||||||
|
|
||||||
Цивилизация 2.4|C2.4|Civilization|C2||||||||||C2.4:1|||||||||||
|
|
||||||
Цивилизация 2.5|C2.5|Civilization|C2||||||||||C2.5:1|||||||||||
|
|
||||||
Цивилизация 2.6|C2.6|Civilization|C2||||||||||C2.6:1|||||||||||
|
|
||||||
Цивилизация 2.7|C2.7|Civilization|C2||||||||||C2.7:1|||||||||||
|
|
||||||
Цивилизация 2.8|C2.8|Civilization|C2||||||||||C2.8:1|||||||||||
|
|
||||||
Цивилизация 2.9|C2.9|Civilization|C2||||||||||C2.9:1|||||||||||
|
|
||||||
Цивилизация типа 3|C3|Civilization|||||||||||C3:1|||||||||||
|
|
||||||
Цивилизация 3.0|C3.0|Civilization|C3||||||||||C3.0:1|||||||||||
|
|
||||||
Цивилизация 3.1|C3.1|Civilization|C3||||||||||C3.1:1|||||||||||
|
|
||||||
Цивилизация 3.2|C3.2|Civilization|C3||||||||||C3.2:1|||||||||||
|
|
||||||
Цивилизация 3.3|C3.3|Civilization|C3||||||||||C3.3:1|||||||||||
|
|
||||||
Цивилизация 3.4|C3.4|Civilization|C3||||||||||C3.4:1|||||||||||
|
|
||||||
Цивилизация 3.5|C3.5|Civilization|C3||||||||||C3.5:1|||||||||||
|
|
||||||
Цивилизация 3.6|C3.6|Civilization|C3||||||||||C3.6:1|||||||||||
|
|
||||||
Цивилизация 3.7|C3.7|Civilization|C3||||||||||C3.7:1|||||||||||
|
|
||||||
Цивилизация 3.8|C3.8|Civilization|C3||||||||||C3.8:1|||||||||||
|
|
||||||
Цивилизация 3.9|C3.9|Civilization|C3||||||||||C3.9:1|||||||||||
|
|
||||||
Цивилизация типа 4|C4|Civilization|||||||||||C4:1|||||||||||
|
|
||||||
Цивилизация 4.0|C4.0|Civilization|C4||||||||||C4.0:1|||||||||||
|
|
||||||
Цивилизация 4.1|C4.1|Civilization|C4||||||||||C4.1:1|||||||||||
|
|
||||||
Цивилизация 4.2|C4.2|Civilization|C4||||||||||C4.2:1|||||||||||
|
|
||||||
Цивилизация 4.3|C4.3|Civilization|C4||||||||||C4.3:1|||||||||||
|
|
||||||
Цивилизация 4.4|C4.4|Civilization|C4||||||||||C4.4:1|||||||||||
|
|
||||||
Трансцендентная цивилизация|Ct|Civilization||||||||||||||||||||||
|
|
||||||
|
@@ -0,0 +1,153 @@
|
|||||||
|
id|is_visible|unlock|cost|bind|mass|space|lifespan|auto|gamma|blast|life_product|voids|output|destroy_level|degradation|planets|count_as|group_as|event_group|space_bonus|civ_bonus|claim
|
||||||
|
S|1|start|||||||||||||||||S|||
|
||||||
|
H|1|start|||||||||||||||||H|||
|
||||||
|
He|1|He:1||||||||||||||||||||
|
||||||
|
Met|1|Met:1||||||||||||||||||||
|
||||||
|
BD|1|BD:1||||||||||||||||||||
|
||||||
|
HBD|0||H:0.1||0.1||5000000000||||S:0.5||CBD:1|1|mass:0.1&H:0&HE:0MET:0||BD|||||
|
||||||
|
RD|1|H:1|H:1||1|1|40000000000||||S:40||TWD:1&H:0.13&He:0.05&Met:0.01|1|mass:0.8&H:0.13&HE:0.05MET:0.01|HP:1:0.01&RP:1:0.21&GG:2:0.08&AB:3:0.4||Star|DwStar|||
|
||||||
|
OD|1|RD:1|H:8||8|1|18000000000||||S:36||SRG:1|1||HP:1:0.03&RP:2:0.34&GG:3:0.13&AB:3:0.4||Star|DwStar|||
|
||||||
|
YD|1|OD:1|H:10||10|1|9000000000||||S:27||NRG:1|1||HP:2:0.1&RP:3:0.55&GG:4:0.21&AB:3:0.4||Star|DwStar|||
|
||||||
|
WYD|1|YD:1|H:16||16|1|1800000000||||S:18||MRG:1|1||HP:3:0.3&RP:5:0.89&GG:5:0.34&AB:3:0.4||Star|DwStar|||
|
||||||
|
WS|1|H:15|H:50||50|1|450000000||||S:9||LRG:1|2||||Star|GiStar|||
|
||||||
|
BG|1|H:30&WS:1|H:100||100|1|90000000||||S:9||HRG:1|2||||Star|GiStar|||
|
||||||
|
SG|1|H:100&BG:1|H:300||300|1|9000000||||S:9||RSG:1|2||||Star|GiStar|||
|
||||||
|
HG|1|H:300&SG:1|H:1000||1000|1|900000||||S:9||RHG:1|2||||Star|GiStar|||
|
||||||
|
RG|1|RG:1||||||||||||||||||||
|
||||||
|
SRG|0||||8||2000000000||||S:80||SWD:1&H:2.32&He:0.64&Met:0.08&S:12.4|1|mass:4.8&H:2.32&HE:0.64MET:0.08||RG|Star||||
|
||||||
|
NRG|0||||10||1000000000||||S:120.||NWD:1&H:3.2&He:1.3&Met:0.2&S:14.3|1|mass:5&H:3.2&HE:1.3MET:0.2||RG|Star||||
|
||||||
|
MRG|0||||16||200000000||||S:200||LWD:1&H:4.96&He:3.36&Met:0.48&S:20.2|1|mass:6.4&H:4.96&HE:3.36MET:0.48||RG|Star||||
|
||||||
|
LRG|0||||50||50000000||||S:300||DSN^SGRB%0.1|2|||RG|Star||||
|
||||||
|
HRG|0||||100||10000000||||S:400.||SN^GRB%1|2|||RG|Star||||
|
||||||
|
RSG|0||||300||1000000||||S:500||BSN^LGRB%3|2|||RG|Star||||
|
||||||
|
RHG|0||||1000||100000||||S:600||HN^HGRB%10|2|||RG|Star||||
|
||||||
|
DSN|0||||||1|||2|S:59.1||SNS:1&H:6.5&He:13.5&Met:11&blast:2|2|mass:15&H:6.5&HE:13.5MET:11||||SNGRBB|||
|
||||||
|
SN|0||||||1|||9|S:99.1||LNS:1&H:8&He:50&Met:11&blast:9|2|mass:18&H:8&HE:50MET:11||||SNGRBB|||
|
||||||
|
BSN|0||||||1||.|305|S:309.1||MGT:1&H:15&He:186&Met:15&blast:305|2|mass:21&H:15&HE:186MET:15||||SNGRBB|||
|
||||||
|
HN|0||||||1|||9990|S:939.1||BH40:1&H:30&He:560&Met:30&blast:9990|2|mass:40&H:30&HE:560MET:30||||SNGRBB|||
|
||||||
|
SGRB|0||||||1||0.001|31|S:149.1||BH25:1&H:0.5&He:10&Met:4&blast:31|2|mass:25&H:0.5&HE:10MET:4||||SNGRBB|||
|
||||||
|
GRB|0||||||1||0.01|136|S:239.1||BH30:1&H:19&He:12&Met:5&blast:136|2|mass:30&H:19&HE:12MET:5||||SNGRBB|||
|
||||||
|
LGRB|0||||||1||0.03|3446|S:669.1||BH40:1&H:68&He:18&Met:9&blast:3446|2|mass:40&H:68&HE:18MET:9||||SNGRBB|||
|
||||||
|
HGRB|0||||||1||0.1|97342|S:1939.1||BH60:1&H:0&He:40&Met:10&blast:97342|2|mass:60&H:0&HE:40MET:10||||SNGRBB|||
|
||||||
|
CBD|0||||0.1||||||||||||BD|||||
|
||||||
|
WD|1|WD:1||||||||||||||||||||
|
||||||
|
TWD|0||||0.8||||||||||||WD|Star|Degen|||
|
||||||
|
SWD|0||||4.8||||||||||||WD|Star|Degen|||
|
||||||
|
NWD|0||||5||||||||||||WD|Star|Degen|||
|
||||||
|
LWD|0||||6.4||||||||||||WD|Star|Degen|||
|
||||||
|
NS|1|NS:1||||||||||||||||||||
|
||||||
|
SNS|0||||15||||||||||||NS|Star|Degen|||
|
||||||
|
LNS|0||||18||||||||||||NS|Star|Degen|||
|
||||||
|
MGT|1|MGT:1|||21|||||||||||||Star|Degen|||
|
||||||
|
BH|1|BH:1||||||||||||||||||||
|
||||||
|
BH25|0||||25||||||||||||BH|BH|BH|||
|
||||||
|
BH30|0||||30||||||||||||BH|BH|BH|||
|
||||||
|
BH40|0||||40||||||||||||BH|BH|BH|||
|
||||||
|
BH60|0||||60||||||||||||BH|BH|BH|||
|
||||||
|
SMBH|1|BH:1|||||||||||||||||SMBH|||
|
||||||
|
N|1|S:1|H:1||1|10|10000000||||H:10||H:1&S:10|||||CL|CL|||
|
||||||
|
G|1|N:1|H:10&N:1||11|10|30000000||||H:150||H:11&S:20|||||CL|CL|||
|
||||||
|
STN|1|G:1|H:200&G:1||211|300|30000000|0.5|||H:3000||H:211&S:320|||||CL|CL|||
|
||||||
|
MC|1|G:1&S:1300|H:2000&G:1||2011|4000|300000000||||H:90000.||H:2011&S:4020|||||CL|CL|||
|
||||||
|
ASTN|1|MC:1&S:60000|H:200000&MC:1||202011|200000|100000000|0.65|||H:2000000||H:202011&S:204020|||||CL|CL|||
|
||||||
|
SCD|1|Star:300||Star:1000|||10000000|||||||||||SC|SC|0.1|4|C2.3
|
||||||
|
SCS|1|SCD:1&Star:2000||Star:10000&BH:10|||1000000000|||||||||||SC|SC|0.2|44350|C2.4
|
||||||
|
SCM|1|SCS:1&Star:20000||Star:100000&BH:100|||3000000000|||||||||||SC|SC|0.3|44289|C2.5
|
||||||
|
SCL|1|SCM:1&Star:200000||Star:1000000&BH:1000|||10000000000|||||||||||SC|SC|0.5|44230|C2.6
|
||||||
|
SCG|1|SCL:1&Star:2000000||Star:10000000&BH:10000|||30000000000|||||||||||SC|SC|0.8|3|C2.7
|
||||||
|
GED|1|SMBH:1&SC:1|SMBH:10000|Star:1000000000&BH:1000000&SC:100|||12000000000|||||||||||GAL|GALE|1|44440|C2.9
|
||||||
|
GES|1|GED:1&Star:2000000000|SMBH:100000|Star:10000000000&BH:10000000&SC:1000|||13000000000|||||||||||GAL|GALE|1.5|44409|C3.0
|
||||||
|
GEM|1|GES:1&Star:20000000000|SMBH:1000000|Star:100000000000&BH:100000000&SC:10000|||15000000000|||||||||||GAL|GALE|2|44378|C3.1
|
||||||
|
GEL|1|GEM:1&Star:200000000000|SMBH:10000000|Star:1000000000000&BH:1000000000&SC:100000|||17000000000|||||||||||GAL|GALE|3|44348|C3.2
|
||||||
|
GEG|1|GEL:1&Star:2000000000000|SMBH:100000000|Star:10000000000000&BH:10000000000&SC:1000000|||20000000000|||||||||||GAL|GALE|4.5|44317|C3.3
|
||||||
|
GSD|1|GED:1|STN:10000&ASTN:10|GED:1||-5240200|2000000000|0.8|||H:2400000000||H:4112110|||||GAL|GALS||44318|C2.9
|
||||||
|
GSS|1|GES:1|STN:100000&ASTN:100|GES:1||-52402000|3000000000|0.8|||H:36000000000||H:41121100|||||GAL|GALS||44257|C3.0
|
||||||
|
GSM|1|GEM:1|STN:1000000&ASTN:1000|GEM:1||-524020000|4000000000|0.8|||H:480000000000||H:411211000|||||GAL|GALS||44229|C3.1
|
||||||
|
GSL|1|GEL:1|STN:10000000&ASTN:10000|GEL:1||-5240200000|6000000000|0.8|||H:7200000000000||H:4112110000|||||GAL|GALS||44198|C3.2
|
||||||
|
GSG|1|GEG:1|STN:100000000&ASTN:100000|GEG:1||-52402000000|9000000000|0.8|||H:108000000000000||H:41121100000|||||GAL|GALS||2|C3.3
|
||||||
|
LGG|1|GAL:20||GAL:50|||10000000000|||||||||||LS|LS||44317|C3.4
|
||||||
|
LSC|1|LGG:1&GAL:100||LGG:200|||20000000000|||||||||||LS|LS||44287|C3.6
|
||||||
|
LGF|1|LSC:1&LGG:400||LSC:100|||30000000000|||||5||||||LS|LS||44256|C3.8
|
||||||
|
LGW|1|LGF:1&LSC:200||LGF:1000|||60000000000|||||10000||||||LS|LS||44228|C4.1
|
||||||
|
LUB|1|LGW:1&LGF:2000||LGW:1000|||100000000000|||||1000000000||||||LS|LS||44197|C4.4
|
||||||
|
GG|1|GG:1||||||||||||||||Planet|BPlanet|||
|
||||||
|
AB|1|AB:1||||||||||||||||Planet|BPlanet|||
|
||||||
|
RP|1|RP:1||||||||||||||||Planet|BPlanet|||
|
||||||
|
HP|1|HP:1||||||||||||||||Planet|LPlanet|||
|
||||||
|
LP|1|LP:1||||||||||||||||Planet|LPlanet|||
|
||||||
|
EON1|1|EON1:1|||||||||||||||LP|Planet|LPlanet|||
|
||||||
|
EON2|1|EON2:1|||||||||||||||LP|Planet|LPlanet|||
|
||||||
|
EON3|1|EON3:1|||||||||||||||LP|Planet|LPlanet|||
|
||||||
|
EON4|1|EON4:1|||||||||||||||LP|Planet|LPlanet|||
|
||||||
|
EON5|1|EON5:1|||||||||||||||LP|Planet|LPlanet|||
|
||||||
|
C0|1|C0:1||||||||||||||||Planet|LPlanet|||
|
||||||
|
C0.0|1|C0.0:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.1|1|C0.1:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.2|1|C0.2:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.3|1|C0.3:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.4|1|C0.4:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.5|1|C0.5:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.6|1|C0.6:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.7|1|C0.7:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.8|1|C0.8:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C0.9|1|C0.9:1|||||||||||||||C0|Planet|LPlanet|||
|
||||||
|
C1|1|C1:1||||||||||||||||Planet|LPlanet|||
|
||||||
|
C1.0|1|C1.0:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.1|1|C1.1:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.2|1|C1.2:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.3|1|C1.3:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.4|1|C1.4:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.5|1|C1.5:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.6|1|C1.6:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.7|1|C1.7:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.8|1|C1.8:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C1.9|1|C1.9:1|||||||||||||||C1|Planet|LPlanet|||
|
||||||
|
C2|1|C2:1||||||||||||||||||||
|
||||||
|
C2.0|1|C2.0:1|||||||||||||||C2|||||
|
||||||
|
C2.1|1|C2.1:1|||||||||||||||C2|||||
|
||||||
|
C2.2|1|C2.2:1|||||||||||||||C2|||||
|
||||||
|
C2.3|1|C2.3:1|||||||||||||||C2|||||
|
||||||
|
C2.4|1|C2.4:1|||||||||||||||C2|||||
|
||||||
|
C2.5|1|C2.5:1|||||||||||||||C2|||||
|
||||||
|
C2.6|1|C2.6:1|||||||||||||||C2|||||
|
||||||
|
C2.7|1|C2.7:1|||||||||||||||C2|||||
|
||||||
|
C2.8|1|C2.8:1|||||||||||||||C2|||||
|
||||||
|
C2.9|1|C2.9:1|||||||||||||||C2|||||
|
||||||
|
C3|1|C3:1||||||||||||||||||||
|
||||||
|
C3.0|1|C3.0:1|||||||||||||||C3|||||
|
||||||
|
C3.1|1|C3.1:1|||||||||||||||C3|||||
|
||||||
|
C3.2|1|C3.2:1|||||||||||||||C3|||||
|
||||||
|
C3.3|1|C3.3:1|||||||||||||||C3|||||
|
||||||
|
C3.4|1|C3.4:1|||||||||||||||C3|||||
|
||||||
|
C3.5|1|C3.5:1|||||||||||||||C3|||||
|
||||||
|
C3.6|1|C3.6:1|||||||||||||||C3|||||
|
||||||
|
C3.7|1|C3.7:1|||||||||||||||C3|||||
|
||||||
|
C3.8|1|C3.8:1|||||||||||||||C3|||||
|
||||||
|
C3.9|1|C3.9:1|||||||||||||||C3|||||
|
||||||
|
C4|1|C4:1||||||||||||||||||||
|
||||||
|
C4.0|1|C4.0:1|||||||||||||||C4|||||
|
||||||
|
C4.1|1|C4.1:1|||||||||||||||C4|||||
|
||||||
|
C4.2|1|C4.2:1|||||||||||||||C4|||||
|
||||||
|
C4.3|1|C4.3:1|||||||||||||||C4|||||
|
||||||
|
C4.4|1|C4.4:1|||||||||||||||C4|||||
|
||||||
|
Ct|0|||||||||||||||||||||
|
||||||
|
FHYD|1|FHYD:1||||||||||||||||||||
|
||||||
|
FTEM|1|FTEM:1||||||||||||||||||||
|
||||||
|
FITE|1|FITE:1||||||||||||||||||||
|
||||||
|
FSIN|1|FSIN:1||||||||||||||||||||
|
||||||
|
FPRI|1|FPRI:1||||||||||||||||||||
|
||||||
|
FSTE|1|FSTE:1||||||||||||||||||||
|
||||||
|
FREN|1|FREN:1||||||||||||||||||||
|
||||||
|
FINF|1|FINF:1||||||||||||||||||||
|
||||||
|
FFRO|1|FFRO:1||||||||||||||||||||
|
||||||
|
FDES|1|FDES:1||||||||||||||||||||
|
||||||
|
FROC|1|FROC:1||||||||||||||||||||
|
||||||
|
FPAN|1|FPAN:1||||||||||||||||||||
|
||||||
|
FGAI|1|FGAI:1||||||||||||||||||||
|
||||||
|
FDAR|1|FDAR:1||||||||||||||||||||
|
||||||
|
FEDE|1|FEDE:1||||||||||||||||||||
|
||||||
|
FPAC|1|FPAC:1||||||||||||||||||||
|
||||||
|
FENR|1|FENR:1||||||||||||||||||||
|
||||||
|
FMOR|1|FMOR:1||||||||||||||||||||
|
||||||
|
FDIS|1|FDIS:1||||||||||||||||||||
|
||||||
|
FREP|1|FREP:1||||||||||||||||||||
|
||||||
|
+39
-37
@@ -26,7 +26,7 @@ const SWIPE_DELAY = 2000 # msec
|
|||||||
$StageRows/PageScroller/HBoxContainer/LifePage/Planets/Civ4
|
$StageRows/PageScroller/HBoxContainer/LifePage/Planets/Civ4
|
||||||
]
|
]
|
||||||
|
|
||||||
@onready var g_entity_descriptions: Array = [
|
@onready var g_item_descriptions: Array = [
|
||||||
$StageRows/PageScroller/HBoxContainer/ForcePage/Description,
|
$StageRows/PageScroller/HBoxContainer/ForcePage/Description,
|
||||||
$StageRows/PageScroller/HBoxContainer/ResourcePage/Description,
|
$StageRows/PageScroller/HBoxContainer/ResourcePage/Description,
|
||||||
$StageRows/PageScroller/HBoxContainer/StarPage/Description,
|
$StageRows/PageScroller/HBoxContainer/StarPage/Description,
|
||||||
@@ -65,7 +65,7 @@ var g_counters: Dictionary[String, Counter] = {
|
|||||||
"swipe": Counter.new(),
|
"swipe": Counter.new(),
|
||||||
}
|
}
|
||||||
|
|
||||||
var ActiveEntities: Dictionary = {}
|
var ActiveItems: Dictionary = {}
|
||||||
|
|
||||||
var owniverse = Owniverse.new()
|
var owniverse = Owniverse.new()
|
||||||
|
|
||||||
@@ -77,65 +77,66 @@ func _on_indicator_pressed(indicator_name: String, page: int = 0):
|
|||||||
_set_description(indicator_name, page)
|
_set_description(indicator_name, page)
|
||||||
|
|
||||||
|
|
||||||
func entity_activated(entity: OwniverseEntity) -> void:
|
func item_selected(item: OwniverseItem) -> void:
|
||||||
_control_page(entity)
|
_control_page(item)
|
||||||
_set_entity_description(entity)
|
_set_item_description(item)
|
||||||
|
|
||||||
|
|
||||||
func _set_entity_description(entity: OwniverseEntity) -> void:
|
func _set_item_description(item: OwniverseItem) -> void:
|
||||||
var description: String = "[b]" \
|
var description: String = "[b]" \
|
||||||
+ Global.get_localized_item_description(entity.entity_name, "label") \
|
+ Global.get_localized_item_description(item.item_name, "label") \
|
||||||
+"[/b]" \
|
+"[/b]" \
|
||||||
+"\n" \
|
+"\n" \
|
||||||
+ Global.get_localized_item_description(entity.entity_name, "description")
|
+ Global.get_localized_item_description(item.item_name, "description")
|
||||||
var desc_page = clamp(entity.entity_page, 0, 4)
|
var desc_page = clamp(item.item_page, 0, 4)
|
||||||
g_entity_descriptions[desc_page].text = description
|
g_item_descriptions[desc_page].text = description
|
||||||
|
|
||||||
|
|
||||||
func _set_description(item_name: String, page: int) -> void:
|
func _set_description(item_name: String, page: int) -> void:
|
||||||
var description = Global.get_description(item_name + ".Name")
|
var description = Global.get_description(item_name + ".Name")
|
||||||
description += "\n"
|
description += "\n"
|
||||||
description += Global.get_description(item_name + ".Description")
|
description += Global.get_description(item_name + ".Description")
|
||||||
g_entity_descriptions[page].text = description
|
g_item_descriptions[page].text = description
|
||||||
|
|
||||||
|
|
||||||
func _control_page(entity: OwniverseEntity) -> void:
|
func _control_page(item: OwniverseItem) -> void:
|
||||||
if !ActiveEntities.has(entity.entity_page):
|
if !ActiveItems.has(item.item_page):
|
||||||
ActiveEntities[entity.entity_page] = null
|
ActiveItems[item.item_page] = null
|
||||||
|
|
||||||
var current_entity: OwniverseEntity = ActiveEntities[entity.entity_page]
|
var current_item: OwniverseItem = ActiveItems[item.item_page]
|
||||||
if current_entity == entity:
|
if current_item == item:
|
||||||
return
|
return
|
||||||
|
|
||||||
ActiveEntities[entity.entity_page] = entity
|
ActiveItems[item.item_page] = item
|
||||||
|
|
||||||
if current_entity != null and current_entity.entity_page == entity.entity_page:
|
if current_item != null and current_item.item_page == item.item_page:
|
||||||
current_entity.set_selection(false)
|
current_item.set_selection(false)
|
||||||
|
|
||||||
entity.set_selection(true)
|
item.set_selection(true)
|
||||||
|
|
||||||
# subpages
|
# subpages
|
||||||
if entity.sub_page != -1:
|
if item.item_sub_page != -1:
|
||||||
item_pages[entity.sub_page].visible = true
|
item_pages[item.item_sub_page].visible = true
|
||||||
|
|
||||||
if current_entity == null \
|
if current_item == null \
|
||||||
or current_entity.sub_page == -1 \
|
or current_item.item_sub_page == -1 \
|
||||||
or current_entity.sub_page == entity.sub_page:
|
or current_item.item_sub_page == item.item_sub_page:
|
||||||
return
|
return
|
||||||
item_pages[current_entity.sub_page].visible = false
|
item_pages[current_item.item_sub_page].visible = false
|
||||||
|
|
||||||
|
|
||||||
func _init_entities() -> bool:
|
func _init_items() -> bool:
|
||||||
for e_id in Global.Entities:
|
|
||||||
var entity_properties: Dictionary = Global.Entities[e_id]
|
for item_id in Global.OwniverseItems:
|
||||||
var entity: OwniverseEntity = ITEM_BUTTON.instantiate()
|
var item_props: Dictionary = Global.OwniverseItems[item_id]
|
||||||
if !entity_properties.has("page"):
|
var item: OwniverseItem = ITEM_BUTTON.instantiate()
|
||||||
printerr("Entity `", e_id, "` has no `page` key.")
|
if !item_props.has("page"):
|
||||||
|
printerr("Item `", item_id, "` has no `page` key.")
|
||||||
return false
|
return false
|
||||||
var page: int = int(entity_properties.page)
|
var page: int = int(item_props.page)
|
||||||
item_pages[page].add_child(entity)
|
item_pages[page].add_child(item)
|
||||||
entity.init_button(entity_properties)
|
item.init_button(item_props)
|
||||||
entity.entity_activated.connect(entity_activated)
|
item.item_activated.connect(item_selected)
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
||||||
@@ -196,7 +197,8 @@ func _input(event: InputEvent) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
_init_entities()
|
owniverse.init_enitities()
|
||||||
|
_init_items()
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
extends Control
|
extends Control
|
||||||
class_name OwniverseEntity
|
class_name OwniverseItem
|
||||||
|
|
||||||
signal entity_activated(entity)
|
signal item_activated(item)
|
||||||
|
|
||||||
const ENTITY_WIDTH = 216
|
const ENTITY_WIDTH = 216
|
||||||
const ENTITY_HEIGHT = 256
|
const ENTITY_HEIGHT = 256
|
||||||
@@ -11,10 +11,10 @@ const ENTITY_HEIGHT = 256
|
|||||||
@onready var description: Label = $Description
|
@onready var description: Label = $Description
|
||||||
@onready var selection: TextureRect = $Selection
|
@onready var selection: TextureRect = $Selection
|
||||||
|
|
||||||
@export var entity_name: String = ""
|
var item_id: String = ""
|
||||||
@export var entity_id: String = ""
|
var item_name: String = ""
|
||||||
@export var entity_page: int = -1
|
var item_page: int = -1
|
||||||
@export var sub_page: int = -1
|
var item_sub_page: int = -1
|
||||||
|
|
||||||
|
|
||||||
func set_selection(flag: bool) -> void:
|
func set_selection(flag: bool) -> void:
|
||||||
@@ -25,16 +25,14 @@ func init_button(properties: Dictionary):
|
|||||||
var image_path = "res://" + properties.image + properties.name + ".png"
|
var image_path = "res://" + properties.image + properties.name + ".png"
|
||||||
texture_button.texture_normal = load(image_path)
|
texture_button.texture_normal = load(image_path)
|
||||||
position = Vector2i(int(properties.col) * ENTITY_WIDTH, int(properties.row) * ENTITY_HEIGHT)
|
position = Vector2i(int(properties.col) * ENTITY_WIDTH, int(properties.row) * ENTITY_HEIGHT)
|
||||||
entity_id = properties.id
|
item_id = properties.id
|
||||||
entity_name = properties.name
|
item_name = properties.name
|
||||||
entity_page = int(properties.page)
|
item_page = int(properties.page)
|
||||||
sub_page = int(properties.sub_page)
|
item_sub_page = int(properties.sub_page)
|
||||||
name = properties.id
|
name = properties.id
|
||||||
set_selection(false)
|
set_selection(false)
|
||||||
#print(properties)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_button_up() -> void:
|
func _on_button_up() -> void:
|
||||||
set_selection(true)
|
set_selection(true)
|
||||||
entity_activated.emit(self)
|
item_activated.emit(self)
|
||||||
#Texture_button.texture_normal = load("res://UI/0-Forces/Inflatin.png")
|
|
||||||
|
|||||||
+1
-1
@@ -110,7 +110,7 @@ architectures/armeabi-v7a=false
|
|||||||
architectures/arm64-v8a=true
|
architectures/arm64-v8a=true
|
||||||
architectures/x86=false
|
architectures/x86=false
|
||||||
architectures/x86_64=false
|
architectures/x86_64=false
|
||||||
version/code=124
|
version/code=123
|
||||||
version/name=""
|
version/name=""
|
||||||
package/unique_name="com.KIDGameProduction.Owniverse"
|
package/unique_name="com.KIDGameProduction.Owniverse"
|
||||||
package/name="Owniverse"
|
package/name="Owniverse"
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ compatibility/default_parent_skeleton_in_mesh_instance_3d=true
|
|||||||
[application]
|
[application]
|
||||||
|
|
||||||
config/name="Owniverse"
|
config/name="Owniverse"
|
||||||
config/version="0.6.8"
|
config/version="0.6.7"
|
||||||
run/main_scene="uid://bv384dpmvjv8o"
|
run/main_scene="uid://bv384dpmvjv8o"
|
||||||
config/features=PackedStringArray("4.6", "Mobile")
|
config/features=PackedStringArray("4.6", "Mobile")
|
||||||
config/icon="res://icon.svg"
|
config/icon="res://icon.svg"
|
||||||
|
|||||||
+132
@@ -0,0 +1,132 @@
|
|||||||
|
extends Node
|
||||||
|
class_name OwniverseEntity
|
||||||
|
|
||||||
|
var id: String
|
||||||
|
var is_visible: bool = false
|
||||||
|
var unlock: Dictionary = {}
|
||||||
|
var cost: Dictionary = {}
|
||||||
|
var bind: Dictionary = {}
|
||||||
|
var mass: float
|
||||||
|
var space: int
|
||||||
|
var lifespan: int
|
||||||
|
var auto: float
|
||||||
|
var gamma: float
|
||||||
|
var blast: int
|
||||||
|
var life_product: Dictionary = {}
|
||||||
|
var voids: int
|
||||||
|
var output_or: Dictionary = {}
|
||||||
|
var output_and: Dictionary = {}
|
||||||
|
var destroy_level: int
|
||||||
|
var degradation: Dictionary = {}
|
||||||
|
#deg_mass: "",
|
||||||
|
#deg_h: "",
|
||||||
|
#He": "",
|
||||||
|
#Met": "",
|
||||||
|
var planets: Dictionary = {}
|
||||||
|
#var habitable: "",
|
||||||
|
#var rocky: "",
|
||||||
|
#var gas giant: "",
|
||||||
|
#var asteroids: "",
|
||||||
|
var count_as: String
|
||||||
|
var group_as: String
|
||||||
|
var event_group: String
|
||||||
|
var space_bonus: float
|
||||||
|
var civ_bonus: float
|
||||||
|
var claim: String
|
||||||
|
|
||||||
|
var SCD: Dictionary = {
|
||||||
|
"id": "SCD",
|
||||||
|
"is_visible": "1",
|
||||||
|
"unlock": "Star:300",
|
||||||
|
"cost": "",
|
||||||
|
"bind": "Star:1000",
|
||||||
|
"mass": "",
|
||||||
|
"space": "",
|
||||||
|
"lifespan": "10000000",
|
||||||
|
"auto": "", "gamma": "",
|
||||||
|
"blast": "",
|
||||||
|
"life_product": "",
|
||||||
|
"voids": "",
|
||||||
|
"output": "",
|
||||||
|
"destroy_level": "",
|
||||||
|
"deg_mass": "",
|
||||||
|
"H": "",
|
||||||
|
"He": "",
|
||||||
|
"Met": "",
|
||||||
|
"planets": "",
|
||||||
|
"habitable": "",
|
||||||
|
"rocky": "",
|
||||||
|
"gas giant": "",
|
||||||
|
"asteroids": "",
|
||||||
|
"count_as": "",
|
||||||
|
"group_as": "SC",
|
||||||
|
"event_group": "SC",
|
||||||
|
"space_bonus": "0.1",
|
||||||
|
"civ_bonus": "4",
|
||||||
|
"claim": "C2.3"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
func init_entity(values: Dictionary) -> bool:
|
||||||
|
id = values.id
|
||||||
|
is_visible = values.is_visible == "1"
|
||||||
|
unlock = _parse_and_string(values.unlock)
|
||||||
|
cost = _parse_and_string(values.cost)
|
||||||
|
bind = _parse_and_string(values.bind)
|
||||||
|
mass = float(values.mass)
|
||||||
|
space = int(values.space)
|
||||||
|
lifespan = int(values.lifespan)
|
||||||
|
auto = float(values.auto)
|
||||||
|
gamma = float(values.gamma)
|
||||||
|
blast = int(values.blast)
|
||||||
|
life_product = _parse_and_string(values.life_product)
|
||||||
|
voids = int(values.voids)
|
||||||
|
output_or = _parse_or_string(values.output)
|
||||||
|
output_and = _parse_and_string(values.output)
|
||||||
|
destroy_level = int(values.destroy_level)
|
||||||
|
degradation = _parse_and_string(values.degradation)
|
||||||
|
planets = _parse_planet_string(values.planets)
|
||||||
|
count_as = values.count_as
|
||||||
|
group_as = values.group_as
|
||||||
|
event_group = values.event_group
|
||||||
|
space_bonus = float(values.space_bonus)
|
||||||
|
civ_bonus = float(values.civ_bonus)
|
||||||
|
claim = values.claim
|
||||||
|
|
||||||
|
return true
|
||||||
|
|
||||||
|
|
||||||
|
func _parse_or_string(source_line: String) -> Dictionary:
|
||||||
|
var result = {}
|
||||||
|
if source_line.contains("^"):
|
||||||
|
var first_split = source_line.split("^")
|
||||||
|
var second_split = first_split[1].split("%")
|
||||||
|
var probability = float(second_split[1])
|
||||||
|
result["chance"] = probability
|
||||||
|
result["positive"] = second_split[0]
|
||||||
|
result["negative"] = first_split[0]
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
func _parse_and_string(source_line: String) -> Dictionary:
|
||||||
|
var result = {}
|
||||||
|
if source_line.contains("&"):
|
||||||
|
var first_split = source_line.split("&")
|
||||||
|
for elem in first_split:
|
||||||
|
var second_split = elem.split(":")
|
||||||
|
result[second_split[0]] = float(second_split[1])
|
||||||
|
|
||||||
|
return result
|
||||||
|
|
||||||
|
func _parse_planet_string(source_line: String) -> Dictionary:
|
||||||
|
var result = {}
|
||||||
|
if source_line.contains("&"):
|
||||||
|
var first_split = source_line.split("&")
|
||||||
|
for elem in first_split:
|
||||||
|
var second_split = elem.split(":")
|
||||||
|
result[second_split[0]] = {}
|
||||||
|
result[second_split[0]]["amount"] = int(second_split[1])
|
||||||
|
result[second_split[0]]["chance"] = int(second_split[2])
|
||||||
|
|
||||||
|
return result
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
uid://tvj1grut2p4x
|
||||||
+9
-1
@@ -4,7 +4,15 @@ class_name Owniverse
|
|||||||
var g_datetime: float = 0
|
var g_datetime: float = 0
|
||||||
var g_speed: int = 1
|
var g_speed: int = 1
|
||||||
var g_speed_in_years = 1
|
var g_speed_in_years = 1
|
||||||
|
|
||||||
|
var g_entities: Dictionary[String, OwniverseEntity] = {}
|
||||||
|
|
||||||
|
func init_enitities() -> void:
|
||||||
|
for entity_id in Global.OwniverseEntities:
|
||||||
|
var entity = OwniverseEntity.new()
|
||||||
|
entity.init_entity(Global.OwniverseEntities[entity_id])
|
||||||
|
g_entities[entity_id] = entity
|
||||||
|
|
||||||
func add_time_delta(delta) -> float:
|
func add_time_delta(delta) -> float:
|
||||||
var year_delta:float = delta * g_speed_in_years
|
var year_delta:float = delta * g_speed_in_years
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user