Merge pull request #1406 from colobot/dev-gameplus
Add Missions+ gamemode, add new CBOT categories and functions, update Snifferspyro-refactor
commit
fabbdda964
2
data
2
data
|
@ -1 +1 @@
|
|||
Subproject commit 069fc5bd15b87aaf5b1b301a787f05a99dfc3856
|
||||
Subproject commit 87aeb32afbc7e4135a5a3533998a9274d9de30a3
|
|
@ -84,6 +84,9 @@ msgstr ""
|
|||
msgid "Load a saved mission"
|
||||
msgstr ""
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr ""
|
||||
|
||||
msgid "Mods"
|
||||
msgstr ""
|
||||
|
||||
|
@ -399,6 +402,9 @@ msgstr ""
|
|||
msgid "<< Back \\Back to the previous screen"
|
||||
msgstr ""
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "Play\\Start mission!"
|
||||
msgstr ""
|
||||
|
||||
|
@ -660,6 +666,15 @@ msgstr ""
|
|||
msgid "Invert\\Invert values on this axis"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "\\New player name"
|
||||
msgstr ""
|
||||
|
||||
|
@ -831,7 +846,7 @@ msgstr ""
|
|||
msgid "Build a exchange post"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Show if the ground is flat"
|
||||
|
|
24
po/cs.po
24
po/cs.po
|
@ -32,6 +32,9 @@ msgstr "Chybí \"]\""
|
|||
msgid "%s: %d pts"
|
||||
msgstr "%s: %d bodů"
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "...za sebou"
|
||||
|
||||
|
@ -200,9 +203,6 @@ msgstr "Postavit obrannou věž"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Postavit vrtnou věž"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Postavit drtič"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Postavit komunikační stanici"
|
||||
|
||||
|
@ -275,6 +275,9 @@ msgstr "Vyrobit pásový kanón"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Vyrobit pásový detektor"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -928,6 +931,9 @@ msgstr "Mise"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Mise na této planetě:"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Mise+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Mise\\Vyberte misi"
|
||||
|
||||
|
@ -1513,6 +1519,15 @@ msgstr "Zvukové efekty:\\Hlasitost motorů, hlasů, střelby, atd."
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Zvuk\\Hlasitost hudby a zvukových efektů"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Raketa"
|
||||
|
||||
|
@ -1998,3 +2013,6 @@ msgstr "colobot.info"
|
|||
|
||||
msgid "epsitec.com"
|
||||
msgstr "epsitec.com"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Postavit drtič"
|
||||
|
|
24
po/de.po
24
po/de.po
|
@ -33,6 +33,9 @@ msgstr "Es fehlt eine geschlossene eckige Klammer \" ] \""
|
|||
msgid "%s: %d pts"
|
||||
msgstr ""
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "..hinten"
|
||||
|
||||
|
@ -201,9 +204,6 @@ msgstr "Baut einen Geschützturm"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Baut einen Bohrturm"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Baue einen Zerstörer"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Baut einen Infoserver"
|
||||
|
||||
|
@ -276,6 +276,9 @@ msgstr "Baut einen Kettenshooter"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Baut einen Kettenschnüffler"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -944,6 +947,9 @@ msgstr "Missionen"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Liste der Missionen des Planeten:"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Missionen+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Missionen\\Aufbruch ins Weltall"
|
||||
|
||||
|
@ -1530,6 +1536,15 @@ msgstr "Geräusche:\\Lautstärke Motoren, Stimmen, usw."
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Geräusche\\Lautstärke Geräusche und Musik"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Raumschiff"
|
||||
|
||||
|
@ -2029,6 +2044,9 @@ msgstr "epsitec.com"
|
|||
#~ msgid "3D sound\\3D positioning of the sound"
|
||||
#~ msgstr "3D-Geräusche\\Orten der Geräusche im Raum"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Baue einen Zerstörer"
|
||||
|
||||
#~ msgid "Building too close"
|
||||
#~ msgstr "Gebäude zu nahe"
|
||||
|
||||
|
|
24
po/fr.po
24
po/fr.po
|
@ -32,6 +32,9 @@ msgstr "\" ] \" manquant"
|
|||
msgid "%s: %d pts"
|
||||
msgstr "%s: %d points"
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "..derrière"
|
||||
|
||||
|
@ -203,9 +206,6 @@ msgstr "Construire une tour"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Construire un derrick"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Construire un destructeur"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Construire une station relais"
|
||||
|
||||
|
@ -278,6 +278,9 @@ msgstr "Fabriquer un tireur à chenilles"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Fabriquer un renifleur à chenilles"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -946,6 +949,9 @@ msgstr "Missions"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Liste des missions du chapitre :"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Missions+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Missions\\La grande aventure"
|
||||
|
||||
|
@ -1532,6 +1538,15 @@ msgstr "Sons :\\Volume des moteurs, voix, etc."
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Son\\Volumes des sons & musiques"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Vaisseau spatial"
|
||||
|
||||
|
@ -2028,6 +2043,9 @@ msgstr "epsitec.com"
|
|||
#~ msgid "3D sound\\3D positioning of the sound"
|
||||
#~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Construire un destructeur"
|
||||
|
||||
#~ msgid "Building too close"
|
||||
#~ msgstr "Bâtiment trop proche"
|
||||
|
||||
|
|
24
po/pl.po
24
po/pl.po
|
@ -31,6 +31,9 @@ msgstr "Brak \" ] \""
|
|||
msgid "%s: %d pts"
|
||||
msgstr "%s: %d pkt"
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "..za"
|
||||
|
||||
|
@ -199,9 +202,6 @@ msgstr "Zbuduj wieżę obronną"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Zbuduj kopalnię"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Zbuduj niszczarkę"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Zbuduj stację przekaźnikową"
|
||||
|
||||
|
@ -274,6 +274,9 @@ msgstr "Zbuduj działo na gąsienicach"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Zbuduj szperacz na gąsienicach"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -927,6 +930,9 @@ msgstr "Misje"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Misje na tej planecie:"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Misje+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Misje\\Wybierz misję"
|
||||
|
||||
|
@ -1512,6 +1518,15 @@ msgstr "Efekty dźwiękowe:\\Głośność silników, głosów, strzałów, itp."
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Dźwięk\\Głośność muzyki i dźwięków gry"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Statek kosmiczny"
|
||||
|
||||
|
@ -2007,6 +2022,9 @@ msgstr "epsitec.com"
|
|||
#~ msgid "3D sound\\3D positioning of the sound"
|
||||
#~ msgstr "Dźwięk 3D\\Przestrzenne pozycjonowanie dźwięków"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Zbuduj niszczarkę"
|
||||
|
||||
#~ msgid "Building too close"
|
||||
#~ msgstr "Budynek za blisko"
|
||||
|
||||
|
|
24
po/pt.po
24
po/pt.po
|
@ -29,6 +29,9 @@ msgstr "\" ] \" faltando"
|
|||
msgid "%s: %d pts"
|
||||
msgstr ""
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "..atrás"
|
||||
|
||||
|
@ -197,9 +200,6 @@ msgstr "Construir uma torre de defesa"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Construir um extrator"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Construir um destruidor"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Construir um posto de troca"
|
||||
|
||||
|
@ -272,6 +272,9 @@ msgstr "Construir um atirador com esteiras"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Construir um farejador com esteiras"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -941,6 +944,9 @@ msgstr "Missões"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Lista de missões neste planeta:"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Missões+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Missões\\Selecione uma missão"
|
||||
|
||||
|
@ -1527,6 +1533,15 @@ msgstr "Efeitos sonoros:\\Volume dos motores, voz, tiros, etc."
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Som\\Volume do som das músicas e do jogo"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Nave espacial"
|
||||
|
||||
|
@ -2026,6 +2041,9 @@ msgstr "epsitec.com"
|
|||
#~ msgid "3D sound\\3D positioning of the sound"
|
||||
#~ msgstr "Bruitages 3D\\Positionnement sonore dans l'espace"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Construir um destruidor"
|
||||
|
||||
#~ msgid "Building too close"
|
||||
#~ msgstr "Bâtiment trop proche"
|
||||
|
||||
|
|
24
po/ru.po
24
po/ru.po
|
@ -31,6 +31,9 @@ msgstr "Отсутствует \"]\" "
|
|||
msgid "%s: %d pts"
|
||||
msgstr ""
|
||||
|
||||
msgid "+\\Missions with bonus content and optional challenges"
|
||||
msgstr ""
|
||||
|
||||
msgid "..behind"
|
||||
msgstr "Сзади"
|
||||
|
||||
|
@ -200,9 +203,6 @@ msgstr "Построить защитную башню"
|
|||
msgid "Build a derrick"
|
||||
msgstr "Построить буровую вышку"
|
||||
|
||||
msgid "Build a destroyer"
|
||||
msgstr "Построить уничтожитель"
|
||||
|
||||
msgid "Build a exchange post"
|
||||
msgstr "Построить пост по обмену сообщениями"
|
||||
|
||||
|
@ -275,6 +275,9 @@ msgstr "Собрать гусеничного стрелка"
|
|||
msgid "Build a tracked sniffer"
|
||||
msgstr "Собрать гусеничного искателя"
|
||||
|
||||
msgid "Build a vault"
|
||||
msgstr ""
|
||||
|
||||
msgid "Build a wheeled builder"
|
||||
msgstr ""
|
||||
|
||||
|
@ -950,6 +953,9 @@ msgstr "Миссии"
|
|||
msgid "Missions on this planet:"
|
||||
msgstr "Миссии на этой планете:"
|
||||
|
||||
msgid "Missions+"
|
||||
msgstr "Миссии+"
|
||||
|
||||
msgid "Missions\\Select mission"
|
||||
msgstr "Миссии\\Выбор миссии"
|
||||
|
||||
|
@ -1542,6 +1548,15 @@ msgstr "Общий звук:\\Гормкость двигателя, голос
|
|||
msgid "Sound\\Music and game sound volume"
|
||||
msgstr "Звук\\Громкость музыки и звуков"
|
||||
|
||||
msgid "Space Explorer\\Disables astronaut abilities"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Programmer\\Disables radio-control"
|
||||
msgstr ""
|
||||
|
||||
msgid "Space Researcher\\Disables using all previously researched technologies"
|
||||
msgstr ""
|
||||
|
||||
msgid "Spaceship"
|
||||
msgstr "Космический корабль"
|
||||
|
||||
|
@ -2042,6 +2057,9 @@ msgstr "epsitec.com"
|
|||
#~ msgid "3D sound\\3D positioning of the sound"
|
||||
#~ msgstr "3D-звук\\Стерео звук"
|
||||
|
||||
#~ msgid "Build a destroyer"
|
||||
#~ msgstr "Построить уничтожитель"
|
||||
|
||||
#~ msgid "Building too close"
|
||||
#~ msgstr "Здание слишком близко"
|
||||
|
||||
|
|
|
@ -190,6 +190,7 @@ void InitializeEventTypeTexts()
|
|||
EVENT_TYPE_TEXT[EVENT_INTERFACE_ABORT] = "EVENT_INTERFACE_ABORT";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_USER] = "EVENT_INTERFACE_USER";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_SATCOM] = "EVENT_INTERFACE_SATCOM";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_PLUS] = "EVENT_INTERFACE_PLUS";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_MODS] = "EVENT_INTERFACE_MODS";
|
||||
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_CHAP] = "EVENT_INTERFACE_CHAP";
|
||||
|
@ -273,6 +274,10 @@ void InitializeEventTypeTexts()
|
|||
EVENT_TYPE_TEXT[EVENT_INTERFACE_JOYSTICK_CAM_Y_INVERT]= "EVENT_INTERFACE_JOYSTICK_CAM_Y_INVERT";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_JOYSTICK_CAM_Z_INVERT]= "EVENT_INTERFACE_JOYSTICK_CAM_Z_INVERT";
|
||||
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_PLUS_TRAINER] = "EVENT_INTERFACE_PLUS_TRAINER";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_PLUS_RESEARCH] = "EVENT_INTERFACE_PLUS_RESEARCH";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_PLUS_EXPLORER] = "EVENT_INTERFACE_PLUS_EXPLORER";
|
||||
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_MOD_LIST] = "EVENT_INTERFACE_MOD_LIST";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_WORKSHOP] = "EVENT_INTERFACE_WORKSHOP";
|
||||
EVENT_TYPE_TEXT[EVENT_INTERFACE_MODS_DIR] = "EVENT_INTERFACE_MODS_DIR";
|
||||
|
@ -416,7 +421,7 @@ void InitializeEventTypeTexts()
|
|||
EVENT_TYPE_TEXT[EVENT_OBJECT_BNUCLEAR] = "EVENT_OBJECT_BNUCLEAR";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BPARA] = "EVENT_OBJECT_BPARA";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BINFO] = "EVENT_OBJECT_BINFO";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BDESTROYER] = "EVENT_OBJECT_BDESTROYER";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_BSAFE] = "EVENT_OBJECT_BSAFE";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_GFLAT] = "EVENT_OBJECT_GFLAT";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FCREATE] = "EVENT_OBJECT_FCREATE";
|
||||
EVENT_TYPE_TEXT[EVENT_OBJECT_FDELETE] = "EVENT_OBJECT_FDELETE";
|
||||
|
|
|
@ -225,6 +225,7 @@ enum EventType
|
|||
EVENT_INTERFACE_ABORT = 412,
|
||||
EVENT_INTERFACE_USER = 413,
|
||||
EVENT_INTERFACE_SATCOM = 414,
|
||||
EVENT_INTERFACE_PLUS = 415,
|
||||
EVENT_INTERFACE_MODS = 416,
|
||||
|
||||
EVENT_INTERFACE_CHAP = 420,
|
||||
|
@ -312,6 +313,10 @@ enum EventType
|
|||
EVENT_INTERFACE_JOYSTICK_CAM_Y_INVERT = 573,
|
||||
EVENT_INTERFACE_JOYSTICK_CAM_Z_INVERT = 574,
|
||||
|
||||
EVENT_INTERFACE_PLUS_TRAINER = 575,
|
||||
EVENT_INTERFACE_PLUS_RESEARCH = 576,
|
||||
EVENT_INTERFACE_PLUS_EXPLORER = 577,
|
||||
|
||||
EVENT_INTERFACE_MOD_LIST = 580,
|
||||
EVENT_INTERFACE_WORKSHOP = 581,
|
||||
EVENT_INTERFACE_MODS_DIR = 582,
|
||||
|
@ -481,7 +486,7 @@ enum EventType
|
|||
EVENT_OBJECT_BNUCLEAR = 1060,
|
||||
EVENT_OBJECT_BPARA = 1061,
|
||||
EVENT_OBJECT_BINFO = 1062,
|
||||
EVENT_OBJECT_BDESTROYER = 1063,
|
||||
EVENT_OBJECT_BSAFE = 1063,
|
||||
EVENT_OBJECT_GFLAT = 1070,
|
||||
EVENT_OBJECT_FCREATE = 1071,
|
||||
EVENT_OBJECT_FDELETE = 1072,
|
||||
|
|
|
@ -77,6 +77,7 @@ void InitializeRestext()
|
|||
stringsText[RT_TITLE_PERSO] = TR("Customize your appearance");
|
||||
stringsText[RT_TITLE_WRITE] = TR("Save the current mission");
|
||||
stringsText[RT_TITLE_READ] = TR("Load a saved mission");
|
||||
stringsText[RT_TITLE_PLUS] = TR("Missions+");
|
||||
stringsText[RT_TITLE_MODS] = TR("Mods");
|
||||
|
||||
stringsText[RT_PLAY_CHAP_CHAPTERS] = TR("Chapters:");
|
||||
|
@ -199,6 +200,7 @@ void InitializeRestext()
|
|||
stringsEvent[EVENT_INTERFACE_ABORT] = TR("\\Return to Colobot: Gold Edition");
|
||||
stringsEvent[EVENT_INTERFACE_QUIT] = TR("Quit\\Quit Colobot: Gold Edition");
|
||||
stringsEvent[EVENT_INTERFACE_BACK] = TR("<< Back \\Back to the previous screen");
|
||||
stringsEvent[EVENT_INTERFACE_PLUS] = TR("+\\Missions with bonus content and optional challenges");
|
||||
stringsEvent[EVENT_INTERFACE_PLAY] = TR("Play\\Start mission!");
|
||||
stringsEvent[EVENT_INTERFACE_WORKSHOP] = TR("Workshop\\Open the workshop to search for mods");
|
||||
stringsEvent[EVENT_INTERFACE_MODS_DIR] = TR("Open Directory\\Open the mods directory");
|
||||
|
@ -299,6 +301,10 @@ void InitializeRestext()
|
|||
stringsEvent[EVENT_INTERFACE_JOYSTICK_CAM_Y_INVERT] = TR("Invert\\Invert values on this axis");
|
||||
stringsEvent[EVENT_INTERFACE_JOYSTICK_CAM_Z_INVERT] = TR("Invert\\Invert values on this axis");
|
||||
|
||||
stringsEvent[EVENT_INTERFACE_PLUS_TRAINER] = TR("Space Programmer\\Disables radio-control");
|
||||
stringsEvent[EVENT_INTERFACE_PLUS_RESEARCH] = TR("Space Researcher\\Disables using all previously researched technologies");
|
||||
stringsEvent[EVENT_INTERFACE_PLUS_EXPLORER] = TR("Space Explorer\\Disables astronaut abilities");
|
||||
|
||||
stringsEvent[EVENT_INTERFACE_NEDIT] = TR("\\New player name");
|
||||
stringsEvent[EVENT_INTERFACE_NOK] = TR("OK\\Choose the selected player");
|
||||
stringsEvent[EVENT_INTERFACE_NDELETE] = TR("Delete player\\Deletes the player from the list");
|
||||
|
@ -365,7 +371,7 @@ void InitializeRestext()
|
|||
stringsEvent[EVENT_OBJECT_BNUCLEAR] = TR("Build a nuclear power plant");
|
||||
stringsEvent[EVENT_OBJECT_BPARA] = TR("Build a lightning conductor");
|
||||
stringsEvent[EVENT_OBJECT_BINFO] = TR("Build a exchange post");
|
||||
stringsEvent[EVENT_OBJECT_BDESTROYER] = TR("Build a destroyer");
|
||||
stringsEvent[EVENT_OBJECT_BSAFE] = TR("Build a vault");
|
||||
stringsEvent[EVENT_OBJECT_GFLAT] = TR("Show if the ground is flat");
|
||||
stringsEvent[EVENT_OBJECT_FCREATE] = TR("Plant a flag");
|
||||
stringsEvent[EVENT_OBJECT_FDELETE] = TR("Remove a flag");
|
||||
|
|
|
@ -71,6 +71,7 @@ enum ResTextType
|
|||
RT_TITLE_WRITE = 50,
|
||||
RT_TITLE_READ = 51,
|
||||
RT_TITLE_USER = 52,
|
||||
RT_TITLE_PLUS = 53,
|
||||
RT_TITLE_MODS = 54,
|
||||
|
||||
RT_PLAY_CHAP_CHAPTERS = 60,
|
||||
|
|
|
@ -41,7 +41,8 @@ enum BuildType
|
|||
BUILD_LABO = (1<<10), //! < AutoLab
|
||||
BUILD_PARA = (1<<11), //! < PowerCaptor
|
||||
BUILD_INFO = (1<<12), //! < ExchangePost
|
||||
BUILD_DESTROYER = (1<<13), //! < Destroyer
|
||||
BUILD_SAFE = (1<<13), //! < Vault
|
||||
BUILD_DESTROYER = (1<<14), //! < Destroyer
|
||||
BUILD_GFLAT = (1<<16), //! < checking flat ground
|
||||
BUILD_FLAG = (1<<17) //! < putting / removing flags
|
||||
};
|
||||
|
|
|
@ -25,10 +25,11 @@
|
|||
// TODO: I'm not sure about "challenges" + "custom". It may be messing things up already right now.
|
||||
const std::map<LevelCategory, std::string> CATEGORY_DIR_MAP = {
|
||||
{ LevelCategory::Missions, "missions" },
|
||||
{ LevelCategory::FreeGame, "freemissions" },
|
||||
{ LevelCategory::FreeGame, "free" },
|
||||
{ LevelCategory::Exercises, "exercises" },
|
||||
{ LevelCategory::Challenges, "challenges" },
|
||||
{ LevelCategory::CodeBattles, "battles" },
|
||||
{ LevelCategory::GamePlus, "plus" },
|
||||
{ LevelCategory::CustomLevels, "custom" },
|
||||
};
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ enum class LevelCategory
|
|||
Missions,
|
||||
FreeGame,
|
||||
CodeBattles,
|
||||
GamePlus,
|
||||
CustomLevels,
|
||||
Max,
|
||||
};
|
||||
|
|
|
@ -885,6 +885,7 @@ int CLevelParserParam::ToBuildFlag(std::string value)
|
|||
if (value == "AutoLab" ) return BUILD_LABO;
|
||||
if (value == "PowerCaptor" ) return BUILD_PARA;
|
||||
if (value == "ExchangePost" ) return BUILD_INFO;
|
||||
if (value == "Vault" ) return BUILD_SAFE;
|
||||
if (value == "Destroyer" ) return BUILD_DESTROYER;
|
||||
if (value == "FlatGround" ) return BUILD_GFLAT;
|
||||
if (value == "Flag" ) return BUILD_FLAG;
|
||||
|
|
|
@ -2462,6 +2462,7 @@ bool CRobotMain::EventFrame(const Event &event)
|
|||
{
|
||||
if (m_levelCategory == LevelCategory::Missions ||
|
||||
m_levelCategory == LevelCategory::FreeGame ||
|
||||
m_levelCategory == LevelCategory::GamePlus ||
|
||||
m_levelCategory == LevelCategory::CustomLevels)
|
||||
{
|
||||
if (!IOIsBusy() && m_missionType != MISSION_CODE_BATTLE)
|
||||
|
@ -3784,6 +3785,12 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject)
|
|||
m_build |= BUILD_FLAG;
|
||||
}
|
||||
|
||||
if (m_levelCategory == LevelCategory::GamePlus && !m_ui->GetPlusResearch() && !resetObject) // new game plus?
|
||||
{
|
||||
m_researchDone[0] |= m_playerProfile->GetFreeGameResearchUnlock();
|
||||
m_build |= m_playerProfile->GetFreeGameBuildUnlock();
|
||||
}
|
||||
|
||||
if (!resetObject)
|
||||
{
|
||||
m_short->SetMode(false); // vehicles?
|
||||
|
@ -5351,6 +5358,16 @@ bool CRobotMain::GetTrainerPilot()
|
|||
return m_cheatTrainerPilot;
|
||||
}
|
||||
|
||||
bool CRobotMain::GetPlusTrainer()
|
||||
{
|
||||
return m_ui->GetPlusTrainer();
|
||||
}
|
||||
|
||||
bool CRobotMain::GetPlusExplorer()
|
||||
{
|
||||
return m_ui->GetPlusExplorer();
|
||||
}
|
||||
|
||||
//! Indicates whether the scene is fixed, without interaction
|
||||
bool CRobotMain::GetFixScene()
|
||||
{
|
||||
|
@ -5874,6 +5891,7 @@ bool CRobotMain::IsBuildingEnabled(ObjectType type)
|
|||
if(type == OBJECT_NUCLEAR) return IsBuildingEnabled(BUILD_NUCLEAR);
|
||||
if(type == OBJECT_INFO) return IsBuildingEnabled(BUILD_INFO);
|
||||
if(type == OBJECT_PARA) return IsBuildingEnabled(BUILD_PARA);
|
||||
if(type == OBJECT_SAFE) return IsBuildingEnabled(BUILD_SAFE);
|
||||
if(type == OBJECT_DESTROYER) return IsBuildingEnabled(BUILD_DESTROYER);
|
||||
|
||||
return false;
|
||||
|
@ -5944,6 +5962,8 @@ Error CRobotMain::CanFactoryError(ObjectType type, int team)
|
|||
if (type == OBJECT_MOBILEst && !IsResearchDone(RESEARCH_SUBM, team)) return ERR_BUILD_DISABLED;
|
||||
if (type == OBJECT_MOBILEtg && !IsResearchDone(RESEARCH_TARGET, team)) return ERR_BUILD_RESEARCH;
|
||||
|
||||
if (tool == ToolType::Other && drive == DriveType::Other && type != OBJECT_MOBILEtg) return ERR_WRONG_OBJ;
|
||||
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -267,6 +267,8 @@ public:
|
|||
const std::string& GetScriptName();
|
||||
const std::string& GetScriptFile();
|
||||
bool GetTrainerPilot();
|
||||
bool GetPlusTrainer();
|
||||
bool GetPlusExplorer();
|
||||
bool GetFixScene();
|
||||
bool GetShowSoluce();
|
||||
bool GetSceneSoluce();
|
||||
|
|
|
@ -27,21 +27,22 @@ std::string TraceColorName(TraceColor color)
|
|||
{
|
||||
switch(color)
|
||||
{
|
||||
case TraceColor::Blue: return "Blue";
|
||||
case TraceColor::Red: return "Red";
|
||||
case TraceColor::Green: return "Green";
|
||||
case TraceColor::Yellow: return "Yellow";
|
||||
case TraceColor::Violet: return "Violet";
|
||||
case TraceColor::White: return "White";
|
||||
case TraceColor::Black: return "Black";
|
||||
case TraceColor::Gray: return "Gray";
|
||||
case TraceColor::LightGray: return "LightGray";
|
||||
case TraceColor::Red: return "Red";
|
||||
case TraceColor::Pink: return "Pink";
|
||||
case TraceColor::Purple: return "Purple";
|
||||
case TraceColor::Orange: return "Orange";
|
||||
case TraceColor::Yellow: return "Yellow";
|
||||
case TraceColor::Beige: return "Beige";
|
||||
case TraceColor::Brown: return "Brown";
|
||||
case TraceColor::Skin: return "Skin";
|
||||
case TraceColor::Green: return "Green";
|
||||
case TraceColor::LightGreen: return "LightGreen";
|
||||
case TraceColor::Blue: return "Blue";
|
||||
case TraceColor::LightBlue: return "LightBlue";
|
||||
case TraceColor::RedArrow: return "RedArrow";
|
||||
case TraceColor::BlackArrow: return "BlackArrow";
|
||||
|
@ -55,21 +56,22 @@ Gfx::Color TraceColorColor(TraceColor color)
|
|||
{
|
||||
switch(color)
|
||||
{
|
||||
case TraceColor::Blue: return Gfx::Color(0.000f, 0.000f, 0.753f, 1.0f);
|
||||
case TraceColor::Red: return Gfx::Color(1.000f, 0.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Green: return Gfx::Color(0.000f, 0.627f, 0.000f, 1.0f);
|
||||
case TraceColor::Yellow: return Gfx::Color(1.000f, 1.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Violet: return Gfx::Color(0.820f, 0.000f, 0.997f, 1.0f);
|
||||
case TraceColor::White: return Gfx::Color(1.000f, 1.000f, 1.000f, 1.0f);
|
||||
case TraceColor::Black: return Gfx::Color(0.000f, 0.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Gray: return Gfx::Color(0.549f, 0.549f, 0.549f, 1.0f);
|
||||
case TraceColor::LightGray: return Gfx::Color(0.753f, 0.753f, 0.753f, 1.0f);
|
||||
case TraceColor::Red: return Gfx::Color(1.000f, 0.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Pink: return Gfx::Color(1.000f, 0.627f, 0.753f, 1.0f);
|
||||
case TraceColor::Purple: return Gfx::Color(0.878f, 0.000f, 0.753f, 1.0f);
|
||||
case TraceColor::Orange: return Gfx::Color(1.000f, 0.627f, 0.000f, 1.0f);
|
||||
case TraceColor::Yellow: return Gfx::Color(1.000f, 1.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Beige: return Gfx::Color(0.878f, 0.753f, 0.000f, 1.0f);
|
||||
case TraceColor::Brown: return Gfx::Color(0.627f, 0.361f, 0.000f, 1.0f);
|
||||
case TraceColor::Skin: return Gfx::Color(0.961f, 0.839f, 0.714f, 1.0f);
|
||||
case TraceColor::Green: return Gfx::Color(0.000f, 0.627f, 0.000f, 1.0f);
|
||||
case TraceColor::LightGreen: return Gfx::Color(0.000f, 1.000f, 0.000f, 1.0f);
|
||||
case TraceColor::Blue: return Gfx::Color(0.000f, 0.000f, 0.753f, 1.0f);
|
||||
case TraceColor::LightBlue: return Gfx::Color(0.000f, 0.871f, 1.000f, 1.0f);
|
||||
case TraceColor::BlackArrow: return TraceColorColor(TraceColor::Black);
|
||||
case TraceColor::RedArrow: return TraceColorColor(TraceColor::Red); //TODO: We could probably have all the colors available as arrows now
|
||||
|
|
|
@ -32,24 +32,25 @@ enum class TraceColor
|
|||
{
|
||||
Default = -1,
|
||||
|
||||
White = 0,
|
||||
Black = 1,
|
||||
Gray = 2,
|
||||
LightGray = 3,
|
||||
Red = 4,
|
||||
Pink = 5,
|
||||
Purple = 6,
|
||||
Orange = 7,
|
||||
Yellow = 8,
|
||||
Beige = 9,
|
||||
Brown = 10,
|
||||
Skin = 11,
|
||||
Green = 12,
|
||||
LightGreen = 13,
|
||||
Blue = 14,
|
||||
LightBlue = 15,
|
||||
BlackArrow = 16,
|
||||
RedArrow = 17,
|
||||
Blue = 0,
|
||||
Red = 1,
|
||||
Green = 2,
|
||||
Yellow = 3,
|
||||
Violet = 4,
|
||||
White = 5,
|
||||
Black = 6,
|
||||
Gray = 7,
|
||||
LightGray = 8,
|
||||
Pink = 9,
|
||||
Purple = 10,
|
||||
Orange = 11,
|
||||
Beige = 12,
|
||||
Brown = 13,
|
||||
Skin = 14,
|
||||
LightGreen = 15,
|
||||
LightBlue = 16,
|
||||
BlackArrow = 17,
|
||||
RedArrow = 18,
|
||||
Max,
|
||||
};
|
||||
//! Convert TraceColor to a std::string
|
||||
|
|
|
@ -314,7 +314,7 @@ void CMotionHuman::Create(Math::Vector pos, float angle, ObjectType type,
|
|||
m_object->SetPartRotation(13, Math::Vector(10.0f*Math::PI/180.0f, -5.0f*Math::PI/180.0f, 5.0f*Math::PI/180.0f));
|
||||
|
||||
// Creates the neutron gun.
|
||||
if ( option != 2 ) // with backpack?
|
||||
if ( option != 2 && !m_main->GetPlusExplorer()) // with backpack?
|
||||
{
|
||||
rank = m_engine->CreateObject();
|
||||
m_engine->SetObjectType(rank, Gfx::ENG_OBJTYPE_DESCENDANT);
|
||||
|
|
|
@ -315,7 +315,7 @@ std::vector<CObject*> CObjectManager::RadarAll(CObject* pThis, Math::Vector this
|
|||
oType == OBJECT_RUINmobiler1 ||
|
||||
oType == OBJECT_RUINmobiler2 )
|
||||
{
|
||||
oType = OBJECT_RUINmobilew1; // any ruin
|
||||
oType = OBJECT_RUINmobilew1; // any wreck
|
||||
}
|
||||
|
||||
if ( oType == OBJECT_BARRIER2 ||
|
||||
|
@ -325,6 +325,33 @@ std::vector<CObject*> CObjectManager::RadarAll(CObject* pThis, Math::Vector this
|
|||
{
|
||||
oType = OBJECT_BARRIER1; // any barrier
|
||||
}
|
||||
|
||||
if ( oType == OBJECT_RUINdoor ||
|
||||
oType == OBJECT_RUINsupport ||
|
||||
oType == OBJECT_RUINradar ||
|
||||
oType == OBJECT_RUINconvert ) // ruins?
|
||||
{
|
||||
oType = OBJECT_RUINfactory; // any ruin
|
||||
}
|
||||
|
||||
if ( oType == OBJECT_PLANT1 ||
|
||||
oType == OBJECT_PLANT2 ||
|
||||
oType == OBJECT_PLANT3 ||
|
||||
oType == OBJECT_PLANT4 ||
|
||||
oType == OBJECT_PLANT15 ||
|
||||
oType == OBJECT_PLANT16 ||
|
||||
oType == OBJECT_PLANT17 ||
|
||||
oType == OBJECT_PLANT18 ) // bushes?
|
||||
{
|
||||
oType = OBJECT_PLANT0; // any bush
|
||||
}
|
||||
|
||||
if ( oType == OBJECT_QUARTZ1 ||
|
||||
oType == OBJECT_QUARTZ2 ||
|
||||
oType == OBJECT_QUARTZ3 ) // crystals?
|
||||
{
|
||||
oType = OBJECT_QUARTZ0; // any crystal
|
||||
}
|
||||
// END OF TODO
|
||||
}
|
||||
|
||||
|
|
|
@ -1627,6 +1627,11 @@ bool COldObject::GetTrainer()
|
|||
return m_bTrainer;
|
||||
}
|
||||
|
||||
bool COldObject::GetPlusTrainer()
|
||||
{
|
||||
return m_main->GetPlusTrainer();
|
||||
}
|
||||
|
||||
void COldObject::SetToy(bool bEnable)
|
||||
{
|
||||
m_bToy = bEnable;
|
||||
|
|
|
@ -165,6 +165,7 @@ public:
|
|||
|
||||
void SetTrainer(bool bEnable) override;
|
||||
bool GetTrainer() override;
|
||||
bool GetPlusTrainer();
|
||||
|
||||
void SetToy(bool bEnable);
|
||||
bool GetToy();
|
||||
|
|
|
@ -64,7 +64,7 @@ std::unique_ptr<CBaseBuilding> CBaseBuilding::Create(
|
|||
{
|
||||
auto obj = MakeUnique<CBaseBuilding>(params.id, params.type);
|
||||
|
||||
obj->SetTrainer(params.trainer);
|
||||
obj->SetTrainer(params.trainer || obj->GetPlusTrainer());
|
||||
obj->SetTeam(params.team);
|
||||
|
||||
float height = params.height;
|
||||
|
|
|
@ -65,7 +65,7 @@ std::unique_ptr<CBaseRobot> CBaseRobot::Create(
|
|||
}
|
||||
else
|
||||
{
|
||||
obj->SetTrainer(params.trainer);
|
||||
obj->SetTrainer(params.trainer || obj->GetPlusTrainer());
|
||||
}
|
||||
|
||||
obj->SetToy(params.toy);
|
||||
|
|
|
@ -52,7 +52,7 @@ std::unique_ptr<CShielder> CShielder::Create(
|
|||
auto obj = MakeUnique<CShielder>(params.id);
|
||||
|
||||
obj->SetTeam(params.team);
|
||||
obj->SetTrainer(params.trainer);
|
||||
obj->SetTrainer(params.trainer || obj->GetPlusTrainer());
|
||||
obj->SetToy(params.toy);
|
||||
|
||||
auto physics = MakeUnique<CPhysics>(obj.get());
|
||||
|
|
|
@ -111,6 +111,7 @@ void CTaskBuild::CreateBuilding(Math::Vector pos, float angle, bool trainer)
|
|||
if ( m_type == OBJECT_NUCLEAR ) m_buildingHeight = 40.0f;
|
||||
if ( m_type == OBJECT_PARA ) m_buildingHeight = 68.0f;
|
||||
if ( m_type == OBJECT_INFO ) m_buildingHeight = 19.0f;
|
||||
if ( m_type == OBJECT_SAFE ) m_buildingHeight = 16.0f;
|
||||
if ( m_type == OBJECT_DESTROYER) m_buildingHeight = 35.0f;
|
||||
if ( m_type == OBJECT_HUSTON ) m_buildingHeight = 45.0f;
|
||||
m_buildingHeight *= 0.25f;
|
||||
|
@ -682,6 +683,7 @@ Error CTaskBuild::FlatFloor()
|
|||
if ( m_type == OBJECT_NUCLEAR ) radius = 20.0f;
|
||||
if ( m_type == OBJECT_PARA ) radius = 20.0f;
|
||||
if ( m_type == OBJECT_INFO ) radius = 5.0f;
|
||||
if ( m_type == OBJECT_SAFE ) radius = 20.0f;
|
||||
if ( m_type == OBJECT_DESTROYER) radius = 20.0f;
|
||||
//if ( radius == 0.0f ) return ERR_UNKNOWN;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include "common/global.h"
|
||||
|
||||
#include "graphics/engine/particle.h"
|
||||
#include "graphics/engine/pyro_manager.h"
|
||||
#include "graphics/engine/terrain.h"
|
||||
|
||||
#include "level/robotmain.h"
|
||||
|
@ -88,6 +89,6 @@ void CTaskDeleteMark::DeleteMark()
|
|||
|
||||
if (obj != nullptr)
|
||||
{
|
||||
CObjectManager::GetInstancePointer()->DeleteObject(obj);
|
||||
m_engine->GetPyroManager()->Create(Gfx::PT_WPCHECK, obj);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,6 +61,24 @@ bool CTaskFlag::EventProcess(const Event &event)
|
|||
|
||||
m_time += event.rTime;
|
||||
|
||||
ObjectType type = m_object->GetType();
|
||||
if ( type == OBJECT_MOBILEfs ||
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEws ||
|
||||
type == OBJECT_MOBILEis )
|
||||
{
|
||||
float angle = 110.0f*Math::PI/180.0f;
|
||||
float diff = -10.0f*Math::PI/180.0f;
|
||||
if ( m_time <= 0.5f )
|
||||
{
|
||||
m_object->SetPartRotationZ(1, angle+diff*m_time*2.0f);
|
||||
}
|
||||
else if ( m_time >= 1.5f && m_time < 2.0f )
|
||||
{
|
||||
m_object->SetPartRotationZ(1, angle+diff*(2.0f-m_time)*2.0f);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -104,7 +122,32 @@ Error CTaskFlag::Start(TaskFlagOrder order, int rank)
|
|||
|
||||
m_bError = false;
|
||||
|
||||
m_motion->SetAction(MHS_FLAG); // sets/removes flag
|
||||
switch ( m_object->GetType() ) // sets/removes flag
|
||||
{
|
||||
case OBJECT_HUMAN:
|
||||
case OBJECT_TECH:
|
||||
m_motion->SetAction(MHS_FLAG);
|
||||
break;
|
||||
|
||||
case OBJECT_MOBILEws:
|
||||
case OBJECT_MOBILEts:
|
||||
case OBJECT_MOBILEfs:
|
||||
case OBJECT_MOBILEis:
|
||||
{
|
||||
int i = m_sound->Play(SOUND_MANIP, m_object->GetPosition(), 0.0f, 0.3f, true);
|
||||
m_sound->AddEnvelope(i, 0.5f, 1.0f, 0.1f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.5f, 1.0f, 0.3f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.0f, 0.3f, 0.1f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.0f, 0.3f, 1.0f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.5f, 1.0f, 0.1f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.5f, 1.0f, 0.3f, SOPER_CONTINUE);
|
||||
m_sound->AddEnvelope(i, 0.0f, 0.3f, 0.1f, SOPER_STOP);
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_camera->StartCentering(m_object, Math::PI*0.3f, 99.9f, 0.0f, 0.5f);
|
||||
|
||||
return ERR_OK;
|
||||
|
@ -127,7 +170,23 @@ Error CTaskFlag::IsEnded()
|
|||
|
||||
bool CTaskFlag::Abort()
|
||||
{
|
||||
m_motion->SetAction(-1);
|
||||
switch ( m_object->GetType() )
|
||||
{
|
||||
case OBJECT_HUMAN:
|
||||
case OBJECT_TECH:
|
||||
m_motion->SetAction(-1);
|
||||
break;
|
||||
|
||||
case OBJECT_MOBILEws:
|
||||
case OBJECT_MOBILEts:
|
||||
case OBJECT_MOBILEfs:
|
||||
case OBJECT_MOBILEis:
|
||||
m_object->SetPartRotationZ(1, 110.0f*Math::PI/180.0f);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
m_camera->StopCentering(m_object, 2.0f);
|
||||
return true;
|
||||
}
|
||||
|
@ -190,7 +249,18 @@ Error CTaskFlag::CreateFlag(int rank)
|
|||
};
|
||||
|
||||
Math::Matrix* mat = m_object->GetWorldMatrix(0);
|
||||
Math::Vector pos = Transform(*mat, Math::Vector(4.0f, 0.0f, 0.0f));
|
||||
Math::Vector pos;
|
||||
switch ( m_object->GetType() )
|
||||
{
|
||||
case OBJECT_HUMAN:
|
||||
case OBJECT_TECH:
|
||||
pos = Transform(*mat, Math::Vector(4.0f, 0.0f, 0.0f));
|
||||
break;
|
||||
|
||||
default:
|
||||
pos = Transform(*mat, Math::Vector(6.0f, 0.0f, 0.0f));
|
||||
break;
|
||||
}
|
||||
|
||||
CObject* pObj = SearchNearest(pos, OBJECT_NULL);
|
||||
if ( pObj != nullptr )
|
||||
|
|
|
@ -125,6 +125,12 @@ const char* GetObjectName(ObjectType type)
|
|||
if ( type == OBJECT_BEE ) return "AlienWasp";
|
||||
if ( type == OBJECT_WORM ) return "AlienWorm";
|
||||
if ( type == OBJECT_RUINmobilew1) return "Wreck";
|
||||
if ( type == OBJECT_RUINfactory ) return "Ruin";
|
||||
if ( type == OBJECT_PLANT0 ) return "Bush";
|
||||
if ( type == OBJECT_ROOT5 ) return "GraviPlant";
|
||||
if ( type == OBJECT_QUARTZ0 ) return "Crystal";
|
||||
if ( type == OBJECT_MUSHROOM1 ) return "BrownMushroom";
|
||||
if ( type == OBJECT_MUSHROOM2 ) return "GreenMushroom";
|
||||
return "";
|
||||
}
|
||||
|
||||
|
@ -233,6 +239,12 @@ std::string GetHelpFilename(ObjectType type)
|
|||
if ( type == OBJECT_BEE ) helpfile = "object/wasp";
|
||||
if ( type == OBJECT_WORM ) helpfile = "object/worm";
|
||||
if ( type == OBJECT_RUINmobilew1) helpfile = "object/wreck";
|
||||
if ( type == OBJECT_RUINfactory ) helpfile = "object/ruin";
|
||||
if ( type == OBJECT_PLANT0 ) helpfile = "object/bush";
|
||||
if ( type == OBJECT_ROOT5 ) helpfile = "object/gravi";
|
||||
if ( type == OBJECT_QUARTZ0 ) helpfile = "object/crystal";
|
||||
if ( type == OBJECT_MUSHROOM1 ) helpfile = "object/bromush";
|
||||
if ( type == OBJECT_MUSHROOM2 ) helpfile = "object/gremush";
|
||||
|
||||
if (helpfile.empty())
|
||||
return "";
|
||||
|
@ -310,6 +322,8 @@ std::string GetHelpFilename(const char *token)
|
|||
if ( strcmp(token, "researched" ) == 0 ) helpfile = "cbot/researched";
|
||||
if ( strcmp(token, "buildingenabled") == 0 ) helpfile = "cbot/buildingenabled";
|
||||
if ( strcmp(token, "build" ) == 0 ) helpfile = "cbot/build";
|
||||
if ( strcmp(token, "flag" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "deflag" ) == 0 ) helpfile = "cbot/deflag";
|
||||
if ( strcmp(token, "wait" ) == 0 ) helpfile = "cbot/wait";
|
||||
if ( strcmp(token, "move" ) == 0 ) helpfile = "cbot/move";
|
||||
if ( strcmp(token, "turn" ) == 0 ) helpfile = "cbot/turn";
|
||||
|
@ -332,23 +346,24 @@ std::string GetHelpFilename(const char *token)
|
|||
if ( strcmp(token, "topo" ) == 0 ) helpfile = "cbot/topo";
|
||||
if ( strcmp(token, "message" ) == 0 ) helpfile = "cbot/message";
|
||||
if ( strcmp(token, "abstime" ) == 0 ) helpfile = "cbot/abstime";
|
||||
if ( strcmp(token, "Blue" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "Red" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "Green" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "Yellow" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "Violet" ) == 0 ) helpfile = "cbot/flag";
|
||||
if ( strcmp(token, "BlackArrow" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "RedArrow" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "White" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Black" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Gray" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "LightGray" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Red" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Pink" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Purple" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Orange" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Yellow" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Beige" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Brown" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Skin" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Green" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "LightGreen" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "Blue" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "LightBlue" ) == 0 ) helpfile = "cbot/pendown";
|
||||
if ( strcmp(token, "InFront" ) == 0 ) helpfile = "cbot/grab";
|
||||
if ( strcmp(token, "Behind" ) == 0 ) helpfile = "cbot/grab";
|
||||
|
@ -470,6 +485,8 @@ bool IsFunction(const char *token)
|
|||
if ( strcmp(token, "researched" ) == 0 ) return true;
|
||||
if ( strcmp(token, "buildingenabled") == 0 ) return true;
|
||||
if ( strcmp(token, "build" ) == 0 ) return true;
|
||||
if ( strcmp(token, "flag" ) == 0 ) return true;
|
||||
if ( strcmp(token, "deflag" ) == 0 ) return true;
|
||||
if ( strcmp(token, "wait" ) == 0 ) return true;
|
||||
if ( strcmp(token, "move" ) == 0 ) return true;
|
||||
if ( strcmp(token, "turn" ) == 0 ) return true;
|
||||
|
@ -576,6 +593,8 @@ const char* GetHelpText(const char *token)
|
|||
if ( strcmp(token, "researched" ) == 0 ) return "researched ( research );";
|
||||
if ( strcmp(token, "buildingenabled") == 0 ) return "buildingenabled ( category );";
|
||||
if ( strcmp(token, "build" ) == 0 ) return "build ( category );";
|
||||
if ( strcmp(token, "flag" ) == 0 ) return "flag ( color );";
|
||||
if ( strcmp(token, "deflag" ) == 0 ) return "deflag ( );";
|
||||
if ( strcmp(token, "wait" ) == 0 ) return "wait ( time );";
|
||||
if ( strcmp(token, "move" ) == 0 ) return "move ( distance );";
|
||||
if ( strcmp(token, "turn" ) == 0 ) return "turn ( angle );";
|
||||
|
|
|
@ -595,7 +595,8 @@ bool CScriptFunctions::rResearch(CBotVar* var, CBotVar* result, int& exception,
|
|||
{
|
||||
bool ok = false;
|
||||
if ( type == RESEARCH_iPAW ||
|
||||
type == RESEARCH_iGUN )
|
||||
type == RESEARCH_iGUN ||
|
||||
type == RESEARCH_TARGET )
|
||||
{
|
||||
if ( center->GetType() != OBJECT_LABO )
|
||||
err = ERR_WRONG_OBJ;
|
||||
|
@ -1443,6 +1444,102 @@ bool CScriptFunctions::rBuild(CBotVar* var, CBotVar* result, int& exception, voi
|
|||
|
||||
}
|
||||
|
||||
// Instruction "flag(color)"
|
||||
|
||||
bool CScriptFunctions::rFlag(CBotVar* var, CBotVar* result, int& exception, void* user)
|
||||
{
|
||||
CScript* script = static_cast<CScript*>(user);
|
||||
CObject* pThis = script->m_object;
|
||||
ObjectType oType;
|
||||
int color;
|
||||
Error err;
|
||||
|
||||
exception = 0;
|
||||
|
||||
if ( !script->m_taskExecutor->IsForegroundTask() )
|
||||
{
|
||||
oType = pThis->GetType();
|
||||
if ( oType != OBJECT_MOBILEfs && // allowed only for sniffer bots && humans
|
||||
oType != OBJECT_MOBILEts &&
|
||||
oType != OBJECT_MOBILEws &&
|
||||
oType != OBJECT_MOBILEis &&
|
||||
oType != OBJECT_HUMAN &&
|
||||
oType != OBJECT_TECH )
|
||||
{
|
||||
err = ERR_WRONG_BOT; // Wrong object
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( var == nullptr )
|
||||
{
|
||||
color = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
color = var->GetValInt();
|
||||
if ( color < 0 || color > static_cast<int>(TraceColor::Violet) ) color = 0;
|
||||
}
|
||||
err = script->m_taskExecutor->StartTaskFlag(TFL_CREATE, color);
|
||||
}
|
||||
|
||||
if ( err != ERR_OK )
|
||||
{
|
||||
script->m_taskExecutor->StopForegroundTask();
|
||||
result->SetValInt(err); // shows the error
|
||||
if ( script->m_errMode == ERM_STOP )
|
||||
{
|
||||
exception = err;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return WaitForForegroundTask(script, result, exception);
|
||||
}
|
||||
|
||||
// Instruction "deflag()"
|
||||
|
||||
bool CScriptFunctions::rDeflag(CBotVar* var, CBotVar* result, int& exception, void* user)
|
||||
{
|
||||
CScript* script = static_cast<CScript*>(user);
|
||||
CObject* pThis = script->m_object;
|
||||
ObjectType oType;
|
||||
Error err;
|
||||
|
||||
exception = 0;
|
||||
|
||||
if ( !script->m_taskExecutor->IsForegroundTask() )
|
||||
{
|
||||
oType = pThis->GetType();
|
||||
if ( oType != OBJECT_MOBILEfs && // allowed only for sniffer bots && humans
|
||||
oType != OBJECT_MOBILEts &&
|
||||
oType != OBJECT_MOBILEws &&
|
||||
oType != OBJECT_MOBILEis &&
|
||||
oType != OBJECT_HUMAN &&
|
||||
oType != OBJECT_TECH )
|
||||
{
|
||||
err = ERR_WRONG_BOT; // Wrong object
|
||||
}
|
||||
else
|
||||
{
|
||||
err = script->m_taskExecutor->StartTaskFlag(TFL_DELETE, 0);
|
||||
}
|
||||
|
||||
if ( err != ERR_OK )
|
||||
{
|
||||
script->m_taskExecutor->StopForegroundTask();
|
||||
result->SetValInt(err); // shows the error
|
||||
if ( script->m_errMode == ERM_STOP )
|
||||
{
|
||||
exception = err;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return WaitForForegroundTask(script, result, exception);
|
||||
}
|
||||
|
||||
// Compilation of the instruction "produce(pos, angle, type[, scriptName[, power]])"
|
||||
// or "produce(type[, power])".
|
||||
|
||||
|
@ -3377,6 +3474,7 @@ void CScriptFunctions::Init()
|
|||
CBotProgram::DefineNum("BuildAutoLab", BUILD_LABO);
|
||||
CBotProgram::DefineNum("BuildPowerCaptor", BUILD_PARA);
|
||||
CBotProgram::DefineNum("BuildExchangePost", BUILD_INFO);
|
||||
CBotProgram::DefineNum("BuildVault", BUILD_SAFE);
|
||||
CBotProgram::DefineNum("BuildDestroyer", BUILD_DESTROYER);
|
||||
CBotProgram::DefineNum("FlatGround", BUILD_GFLAT);
|
||||
CBotProgram::DefineNum("UseFlags", BUILD_FLAG);
|
||||
|
@ -3444,6 +3542,8 @@ void CScriptFunctions::Init()
|
|||
CBotProgram::AddFunction("buildingenabled", rBuildingEnabled, cOneIntReturnBool);
|
||||
|
||||
CBotProgram::AddFunction("build", rBuild, cOneInt);
|
||||
CBotProgram::AddFunction("flag", rFlag, cGrabDrop);
|
||||
CBotProgram::AddFunction("deflag", rDeflag, cNull);
|
||||
|
||||
CBotProgram::AddFunction("retobject", rGetObject, cGetObject);
|
||||
CBotProgram::AddFunction("retobjectbyid", rGetObjectById, cGetObject);
|
||||
|
|
|
@ -110,6 +110,8 @@ private:
|
|||
static bool rResearched(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rBuildingEnabled(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rBuild(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rFlag(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rDeflag(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rProduce(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rDistance(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
static bool rDistance2d(CBot::CBotVar* var, CBot::CBotVar* result, int& exception, void* user);
|
||||
|
|
|
@ -201,6 +201,7 @@ void CMainDialog::StartPauseMenu()
|
|||
|
||||
if ( (m_main->GetLevelCategory() == LevelCategory::Missions || // missions ?
|
||||
m_main->GetLevelCategory() == LevelCategory::FreeGame || // free games?
|
||||
m_main->GetLevelCategory() == LevelCategory::GamePlus || // new game plus?
|
||||
m_main->GetLevelCategory() == LevelCategory::CustomLevels ) && // user ?
|
||||
m_main->GetMissionType() != MISSION_CODE_BATTLE )
|
||||
{
|
||||
|
|
|
@ -769,6 +769,21 @@ bool CMainUserInterface::GetSceneSoluce()
|
|||
return m_screenLevelList->GetSceneSoluce();
|
||||
}
|
||||
|
||||
bool CMainUserInterface::GetPlusTrainer()
|
||||
{
|
||||
return m_screenLevelList->GetPlusTrainer();
|
||||
}
|
||||
|
||||
bool CMainUserInterface::GetPlusResearch()
|
||||
{
|
||||
return m_screenLevelList->GetPlusResearch();
|
||||
}
|
||||
|
||||
bool CMainUserInterface::GetPlusExplorer()
|
||||
{
|
||||
return m_screenLevelList->GetPlusExplorer();
|
||||
}
|
||||
|
||||
bool CMainUserInterface::GetGamerOnlyHead()
|
||||
{
|
||||
if (m_phase == PHASE_APPERANCE)
|
||||
|
|
|
@ -77,6 +77,9 @@ public:
|
|||
void ChangePhase(Phase phase);
|
||||
|
||||
bool GetSceneSoluce();
|
||||
bool GetPlusTrainer();
|
||||
bool GetPlusResearch();
|
||||
bool GetPlusExplorer();
|
||||
|
||||
void UpdateChapterPassed();
|
||||
void NextMission();
|
||||
|
|
|
@ -536,9 +536,9 @@ bool CObjectInterface::EventProcess(const Event &event)
|
|||
{
|
||||
err = m_taskExecutor->StartTaskBuild(OBJECT_INFO);
|
||||
}
|
||||
if ( action == EVENT_OBJECT_BDESTROYER )
|
||||
if ( action == EVENT_OBJECT_BSAFE )
|
||||
{
|
||||
err = m_taskExecutor->StartTaskBuild(OBJECT_DESTROYER);
|
||||
err = m_taskExecutor->StartTaskBuild(OBJECT_SAFE);
|
||||
}
|
||||
|
||||
if ( action == EVENT_OBJECT_GFLAT )
|
||||
|
@ -943,8 +943,9 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
}
|
||||
}
|
||||
|
||||
if ( type == OBJECT_HUMAN ||
|
||||
type == OBJECT_TECH )
|
||||
if ( (type == OBJECT_HUMAN ||
|
||||
type == OBJECT_TECH ) &&
|
||||
!m_main->GetPlusExplorer() )
|
||||
{
|
||||
pos.x = ox+sx*7.7f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
|
@ -986,7 +987,7 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
DefaultEnter(pw, EVENT_OBJECT_MTAKE);
|
||||
}
|
||||
|
||||
if ( type == OBJECT_HUMAN ) // builder?
|
||||
if ( type == OBJECT_HUMAN && !m_main->GetPlusExplorer()) // builder?
|
||||
{
|
||||
pos.x = 1.0f/640.0f;
|
||||
pos.y = 4.0f/480.0f;
|
||||
|
@ -1064,8 +1065,8 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
|
||||
pos.x = ox+sx*5.4f;
|
||||
pos.y = oy+sy*0.1f;
|
||||
pw->CreateButton(pos, ddim, 128+41, EVENT_OBJECT_BDESTROYER);
|
||||
DeadInterface(pw, EVENT_OBJECT_BDESTROYER, m_main->CanBuild(OBJECT_DESTROYER, m_object->GetTeam()));
|
||||
pw->CreateButton(pos, ddim, 128+47, EVENT_OBJECT_BSAFE);
|
||||
DeadInterface(pw, EVENT_OBJECT_BSAFE, m_main->CanBuild(OBJECT_SAFE, m_object->GetTeam()));
|
||||
|
||||
if ( m_main->IsBuildingEnabled(BUILD_GFLAT) )
|
||||
{
|
||||
|
@ -1116,16 +1117,39 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
pw->CreateButton(pos, dim, 40, EVENT_OBJECT_SEARCH);
|
||||
DefaultEnter(pw, EVENT_OBJECT_SEARCH);
|
||||
|
||||
if ( m_main->IsBuildingEnabled(BUILD_GFLAT) )
|
||||
{
|
||||
pos.x = ox+sx*9.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 111, EVENT_OBJECT_GFLAT);
|
||||
}
|
||||
|
||||
pos.x = ox+sx*10.1f;
|
||||
pos.x = ox+sx*9.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 11, EVENT_OBJECT_DELSEARCH);
|
||||
|
||||
if ( m_main->IsBuildingEnabled(BUILD_FLAG) )
|
||||
{
|
||||
pos.x = ox+sx*10.1f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+54, EVENT_OBJECT_FCREATE);
|
||||
|
||||
pos.x = ox+sx*11.1f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+55, EVENT_OBJECT_FDELETE);
|
||||
|
||||
ddim.x = dim.x*0.4f;
|
||||
ddim.y = dim.y*0.4f;
|
||||
pos.x = ox+sx*10.1f;
|
||||
pos.y = oy+sy*2.0f-ddim.y;
|
||||
pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORb);
|
||||
pc->SetColor(Gfx::Color(0.28f, 0.56f, 1.0f, 0.0f));
|
||||
pos.x += ddim.x;
|
||||
pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORr);
|
||||
pc->SetColor(Gfx::Color(1.0f, 0.0f, 0.0f, 0.0f));
|
||||
pos.x += ddim.x;
|
||||
pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORg);
|
||||
pc->SetColor(Gfx::Color(0.0f, 0.8f, 0.0f, 0.0f));
|
||||
pos.x += ddim.x;
|
||||
pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORy);
|
||||
pc->SetColor(Gfx::Color(1.0f, 0.93f, 0.0f, 0.0f)); //0x00ffec00
|
||||
pos.x += ddim.x;
|
||||
pc = pw->CreateColor(pos, ddim, -1, EVENT_OBJECT_FCOLORv);
|
||||
pc->SetColor(Gfx::Color(0.82f, 0.004f, 0.99f, 0.0f)); //0x00d101fe
|
||||
}
|
||||
}
|
||||
|
||||
if ( type == OBJECT_MOBILErt && // Terraformer?
|
||||
|
@ -1496,9 +1520,15 @@ bool CObjectInterface::CreateInterface(bool bSelect)
|
|||
DeadInterface(pw, EVENT_OBJECT_BPARA, m_main->CanBuild(OBJECT_PARA, m_object->GetTeam()));
|
||||
|
||||
pos.x = ox+sx*5.4f;
|
||||
pw->CreateButton(pos, ddim, 128+41, EVENT_OBJECT_BDESTROYER);
|
||||
DeadInterface(pw, EVENT_OBJECT_BDESTROYER, m_main->CanBuild(OBJECT_DESTROYER, m_object->GetTeam()));
|
||||
pw->CreateButton(pos, ddim, 128+47, EVENT_OBJECT_BSAFE);
|
||||
DeadInterface(pw, EVENT_OBJECT_BSAFE, m_main->CanBuild(OBJECT_SAFE, m_object->GetTeam()));
|
||||
|
||||
if ( m_main->IsBuildingEnabled(BUILD_GFLAT) )
|
||||
{
|
||||
pos.x = ox+sx*9.0f;
|
||||
pos.y = oy+sy*0.5f;
|
||||
pw->CreateButton(pos, dim, 64+47, EVENT_OBJECT_GFLAT);
|
||||
}
|
||||
}
|
||||
UpdateInterface();
|
||||
m_lastUpdateTime = 0.0f;
|
||||
|
@ -1793,11 +1823,15 @@ void CObjectInterface::UpdateInterface()
|
|||
EnableInterface(pw, EVENT_OBJECT_BNUCLEAR, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_BPARA, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_BINFO, bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_BDESTROYER,bEnable);
|
||||
EnableInterface(pw, EVENT_OBJECT_BSAFE, bEnable);
|
||||
}
|
||||
|
||||
if ( type == OBJECT_HUMAN || // builder?
|
||||
type == OBJECT_TECH )
|
||||
if ( type == OBJECT_HUMAN || // can create flags?
|
||||
type == OBJECT_TECH ||
|
||||
type == OBJECT_MOBILEfs ||
|
||||
type == OBJECT_MOBILEts ||
|
||||
type == OBJECT_MOBILEws ||
|
||||
type == OBJECT_MOBILEis )
|
||||
{
|
||||
CheckInterface(pw, EVENT_OBJECT_FCOLORb, m_flagColor==0);
|
||||
CheckInterface(pw, EVENT_OBJECT_FCOLORr, m_flagColor==1);
|
||||
|
@ -1866,7 +1900,7 @@ void CObjectInterface::UpdateInterface()
|
|||
pb->SetState(STATE_VISIBLE, m_buildInterface);
|
||||
pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BPARA));
|
||||
pb->SetState(STATE_VISIBLE, m_buildInterface);
|
||||
pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BDESTROYER));
|
||||
pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BSAFE));
|
||||
pb->SetState(STATE_VISIBLE, m_buildInterface);
|
||||
pb = static_cast< CButton* >(pw->SearchControl(EVENT_OBJECT_BINFO));
|
||||
pb->SetState(STATE_VISIBLE, m_buildInterface);
|
||||
|
|
|
@ -48,6 +48,9 @@ CScreenLevelList::CScreenLevelList(CMainDialog* mainDialog)
|
|||
: m_dialog(mainDialog),
|
||||
m_category{},
|
||||
m_sceneSoluce{false},
|
||||
m_plusTrainer{false},
|
||||
m_plusResearch{false},
|
||||
m_plusExplorer{false},
|
||||
m_maxList{0},
|
||||
m_accessChap{0}
|
||||
{
|
||||
|
@ -86,6 +89,7 @@ void CScreenLevelList::CreateInterface()
|
|||
if ( m_category == LevelCategory::Missions ) res = RT_TITLE_MISSION;
|
||||
if ( m_category == LevelCategory::FreeGame ) res = RT_TITLE_FREE;
|
||||
if ( m_category == LevelCategory::CodeBattles ) res = RT_TITLE_CODE_BATTLES;
|
||||
if ( m_category == LevelCategory::GamePlus ) res = RT_TITLE_PLUS;
|
||||
if ( m_category == LevelCategory::CustomLevels ) res = RT_TITLE_USER;
|
||||
GetResource(RES_TEXT, res, name);
|
||||
pw->SetName(name);
|
||||
|
@ -109,6 +113,7 @@ void CScreenLevelList::CreateInterface()
|
|||
res = RT_PLAY_CHAP_CHAPTERS;
|
||||
if ( m_category == LevelCategory::Missions ) res = RT_PLAY_CHAP_PLANETS;
|
||||
if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_CHAP_PLANETS;
|
||||
if ( m_category == LevelCategory::GamePlus ) res = RT_PLAY_CHAP_PLANETS;
|
||||
if ( m_category == LevelCategory::CustomLevels ) res = RT_PLAY_CHAP_USERLVL;
|
||||
GetResource(RES_TEXT, res, name);
|
||||
pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL11, name);
|
||||
|
@ -138,6 +143,7 @@ void CScreenLevelList::CreateInterface()
|
|||
if ( m_category == LevelCategory::Challenges ) res = RT_PLAY_LIST_CHALLENGES;
|
||||
if ( m_category == LevelCategory::Missions ) res = RT_PLAY_LIST_MISSIONS;
|
||||
if ( m_category == LevelCategory::FreeGame ) res = RT_PLAY_LIST_FREEGAME;
|
||||
if ( m_category == LevelCategory::GamePlus ) res = RT_PLAY_LIST_MISSIONS;
|
||||
GetResource(RES_TEXT, res, name);
|
||||
pl = pw->CreateLabel(pos, ddim, 0, EVENT_LABEL12, name);
|
||||
pl->SetTextAlign(Gfx::TEXT_ALIGN_LEFT);
|
||||
|
@ -179,6 +185,7 @@ void CScreenLevelList::CreateInterface()
|
|||
|
||||
// Button displays the "soluce":
|
||||
if ( m_category != LevelCategory::Exercises &&
|
||||
m_category != LevelCategory::GamePlus &&
|
||||
m_category != LevelCategory::FreeGame )
|
||||
{
|
||||
pos.x = ox+sx*9.5f;
|
||||
|
@ -191,10 +198,36 @@ void CScreenLevelList::CreateInterface()
|
|||
}
|
||||
m_sceneSoluce = false;
|
||||
|
||||
if ( m_category == LevelCategory::GamePlus )
|
||||
{
|
||||
pos.x = ox+sx*9.5f;
|
||||
pos.y = oy+sy*6.1f;
|
||||
ddim.x = dim.x*3.4f;
|
||||
ddim.y = dim.y*0.5f;
|
||||
pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_PLUS_TRAINER);
|
||||
pc->SetState(STATE_SHADOW);
|
||||
pc->ClearState(STATE_CHECK);
|
||||
|
||||
pos.y = oy+sy*5.5f;
|
||||
pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_PLUS_RESEARCH);
|
||||
pc->SetState(STATE_SHADOW);
|
||||
pc->ClearState(STATE_CHECK);
|
||||
|
||||
pos.x = ox+sx*12.9f;
|
||||
pos.y = oy+sy*6.1f;
|
||||
pc = pw->CreateCheck(pos, ddim, -1, EVENT_INTERFACE_PLUS_EXPLORER);
|
||||
pc->SetState(STATE_SHADOW);
|
||||
pc->ClearState(STATE_CHECK);
|
||||
}
|
||||
m_plusTrainer = false;
|
||||
m_plusResearch = false;
|
||||
m_plusExplorer = false;
|
||||
|
||||
UpdateSceneResume(m_chap[m_category]+1, m_sel[m_category]+1);
|
||||
|
||||
if ( m_category == LevelCategory::Missions ||
|
||||
m_category == LevelCategory::FreeGame ||
|
||||
m_category == LevelCategory::GamePlus ||
|
||||
m_category == LevelCategory::CustomLevels )
|
||||
{
|
||||
pos.x = ox+sx*9.5f;
|
||||
|
@ -295,6 +328,27 @@ bool CScreenLevelList::EventProcess(const Event &event)
|
|||
pb->SetState(STATE_CHECK, m_sceneSoluce);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_PLUS_TRAINER:
|
||||
pb = static_cast<CButton*>(pw->SearchControl(EVENT_INTERFACE_PLUS_TRAINER));
|
||||
if ( pb == nullptr ) break;
|
||||
m_plusTrainer = !m_plusTrainer;
|
||||
pb->SetState(STATE_CHECK, m_plusTrainer);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_PLUS_RESEARCH:
|
||||
pb = static_cast<CButton*>(pw->SearchControl(EVENT_INTERFACE_PLUS_RESEARCH));
|
||||
if ( pb == nullptr ) break;
|
||||
m_plusResearch = !m_plusResearch;
|
||||
pb->SetState(STATE_CHECK, m_plusResearch);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_PLUS_EXPLORER:
|
||||
pb = static_cast<CButton*>(pw->SearchControl(EVENT_INTERFACE_PLUS_EXPLORER));
|
||||
if ( pb == nullptr ) break;
|
||||
m_plusExplorer = !m_plusExplorer;
|
||||
pb->SetState(STATE_CHECK, m_plusExplorer);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_PLAY:
|
||||
m_main->SetLevel(m_category, m_chap[m_category]+1, m_sel[m_category]+1);
|
||||
m_main->ChangePhase(PHASE_SIMUL);
|
||||
|
@ -331,6 +385,21 @@ bool CScreenLevelList::GetSceneSoluce()
|
|||
return m_sceneSoluce;
|
||||
}
|
||||
|
||||
bool CScreenLevelList::GetPlusTrainer()
|
||||
{
|
||||
return m_plusTrainer;
|
||||
}
|
||||
|
||||
bool CScreenLevelList::GetPlusResearch()
|
||||
{
|
||||
return m_plusResearch;
|
||||
}
|
||||
|
||||
bool CScreenLevelList::GetPlusExplorer()
|
||||
{
|
||||
return m_plusExplorer;
|
||||
}
|
||||
|
||||
// Updates the chapters of exercises or missions.
|
||||
|
||||
void CScreenLevelList::UpdateSceneChap(int &chap)
|
||||
|
@ -392,7 +461,7 @@ void CScreenLevelList::UpdateSceneChap(int &chap)
|
|||
pl->SetCheck(j, bPassed);
|
||||
pl->SetEnable(j, true);
|
||||
|
||||
if ( m_category == LevelCategory::Missions && !m_main->GetShowAll() && !bPassed )
|
||||
if ( (m_category == LevelCategory::Missions || m_category == LevelCategory::GamePlus) && !m_main->GetShowAll() && !bPassed )
|
||||
{
|
||||
j ++;
|
||||
break;
|
||||
|
@ -459,7 +528,7 @@ void CScreenLevelList::UpdateSceneList(int chap, int &sel)
|
|||
pl->SetCheck(j, bPassed);
|
||||
pl->SetEnable(j, true);
|
||||
|
||||
if ( m_category == LevelCategory::Missions && !m_main->GetShowAll() && !bPassed )
|
||||
if ( (m_category == LevelCategory::Missions || m_category == LevelCategory::GamePlus) && !m_main->GetShowAll() && !bPassed )
|
||||
{
|
||||
readAll = false;
|
||||
}
|
||||
|
|
|
@ -43,6 +43,9 @@ public:
|
|||
void SetSelection(LevelCategory category, int chap, int rank);
|
||||
|
||||
bool GetSceneSoluce();
|
||||
bool GetPlusTrainer();
|
||||
bool GetPlusResearch();
|
||||
bool GetPlusExplorer();
|
||||
|
||||
void AllMissionUpdate();
|
||||
void ShowSoluceUpdate();
|
||||
|
@ -65,6 +68,9 @@ protected:
|
|||
LevelCategory m_category;
|
||||
|
||||
bool m_sceneSoluce;
|
||||
bool m_plusTrainer;
|
||||
bool m_plusResearch;
|
||||
bool m_plusExplorer;
|
||||
|
||||
std::map<LevelCategory, int> m_chap; // selected chapter (0..8)
|
||||
std::map<LevelCategory, int> m_sel; // chosen mission (0..98)
|
||||
|
|
|
@ -91,14 +91,22 @@ void CScreenMainMenu::CreateInterface()
|
|||
pg = pw->CreateGroup(pos, ddim, 26, EVENT_LABEL1); // quit
|
||||
pg->SetState(STATE_SHADOW);
|
||||
|
||||
ddim.x = 0.18f;
|
||||
ddim.x = 0.12f;
|
||||
ddim.y = dim.y*0.8f;
|
||||
pos.x = 0.41f;
|
||||
|
||||
pos.y = oy+sy*10.5f;
|
||||
|
||||
pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_MISSION);
|
||||
pb->SetState(STATE_SHADOW);
|
||||
|
||||
ddim.x = 0.06f;
|
||||
pos.x = 0.53f;
|
||||
pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_PLUS);
|
||||
pb->SetState(STATE_SHADOW);
|
||||
|
||||
ddim.x = 0.18f;
|
||||
pos.x = 0.41f;
|
||||
|
||||
pos.y = oy+sy*9.6f;
|
||||
pb = pw->CreateButton(pos, ddim, -1, EVENT_INTERFACE_FREE);
|
||||
pb->SetState(STATE_SHADOW);
|
||||
|
@ -225,6 +233,11 @@ bool CScreenMainMenu::EventProcess(const Event &event)
|
|||
m_main->ChangePhase(PHASE_LEVEL_LIST);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_PLUS:
|
||||
m_main->SetLevel(LevelCategory::GamePlus, 0, 0);
|
||||
m_main->ChangePhase(PHASE_LEVEL_LIST);
|
||||
break;
|
||||
|
||||
case EVENT_INTERFACE_USER:
|
||||
m_main->SetLevel(LevelCategory::CustomLevels, 0, 0);
|
||||
m_main->ChangePhase(PHASE_LEVEL_LIST);
|
||||
|
|
Loading…
Reference in New Issue