try to add triggers to ADeditor

This commit is contained in:
unknown
2010-08-28 19:16:32 +04:00
parent 6ef9adea57
commit aaecd51f2a
12 changed files with 917 additions and 526 deletions

View File

@@ -2,27 +2,28 @@
# Project created by QtCreator 2010-08-22T13:42:02 # Project created by QtCreator 2010-08-22T13:42:02
# ------------------------------------------------- # -------------------------------------------------
QT += xml \ QT += xml \
xmlpatterns xmlpatterns
TARGET = ADeditor TARGET = ADeditor
TEMPLATE = app TEMPLATE = app
SOURCES += main.cpp \ SOURCES += main.cpp \
mainwindow.cpp \ mainwindow.cpp \
../loader.cpp \ ../loader.cpp \
alienmodel.cpp \ alienmodel.cpp \
towermodel.cpp \ towermodel.cpp \
splashmodel.cpp \ splashmodel.cpp \
../map.cpp \ ../map.cpp \
../game_data.cpp ../game_data.cpp \
triggermodel.cpp
HEADERS += mainwindow.h \ HEADERS += mainwindow.h \
../loader.h \ ../loader.h \
alienmodel.h \ alienmodel.h \
towermodel.h \ towermodel.h \
splashmodel.h \ splashmodel.h \
../base_types.h \ ../base_types.h \
../map.h \ ../map.h \
../game_data.h ../game_data.h \
triggermodel.h
FORMS += mainwindow.ui FORMS += mainwindow.ui
TRANSLATIONS += adeditor_ru.ts TRANSLATIONS += adeditor_ru.ts
RESOURCES += \ RESOURCES += ADeditor.qrc
ADeditor.qrc

View File

@@ -16,63 +16,76 @@
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Настольный компьютер</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Настольный компьютер</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value> <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value> <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap"> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value> <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
</valuemap> </valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap"> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString"></value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value> <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"> <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<value type="QString">clean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value> <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
<value type="QString">clean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value> <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/> <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Debug</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Отладка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/peri4/pprojects/aliendefender/ADeditor</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/build-ADeditor</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">9</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value> <valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap"> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value> <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">No deployment</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
<value type="QString">clean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Релиз</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/aliendefender/ADeditor-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">9</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value> <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">ADeditor</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">ADeditor</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
@@ -83,8 +96,8 @@
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/> <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">true</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString">C:\Users\Andrey\Desktop\aliendefender</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value> <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
</valuemap> </valuemap>
@@ -93,12 +106,8 @@
<variable>ProjectExplorer.Project.TargetCount</variable> <variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value> <value type="int">1</value>
</data> </data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{4d5b06df-4184-42d4-9dfd-5c7caaa07ab2}</value>
</data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">8</value> <value type="int">4</value>
</data> </data>
</qtcreator> </qtcreator>

Binary file not shown.

View File

@@ -6,162 +6,97 @@
<message> <message>
<location filename="../loader.cpp" line="250"/> <location filename="../loader.cpp" line="250"/>
<source>Error Level %1 not found!</source> <source>Error Level %1 not found!</source>
<translation type="unfinished"></translation> <translation>Ошибка уровень %1 не найден!</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="253"/> <location filename="../loader.cpp" line="253"/>
<source>Loading level %1 ...</source> <source>Loading level %1 ...</source>
<translation type="unfinished"></translation> <translation>Загружается уровень %1 ...</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="260"/> <location filename="../loader.cpp" line="260"/>
<source>Error no waves on level!</source> <source>Error no waves on level!</source>
<translation type="unfinished"></translation> <translation>Ошибка в уровне нету волн!</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="276"/> <location filename="../loader.cpp" line="276"/>
<source>Error wave %1 is empty!</source> <source>Error wave %1 is empty!</source>
<translation type="unfinished"></translation> <translation>Ошибка волна %1 пустая!</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="295"/> <location filename="../loader.cpp" line="295"/>
<source>load wave #%1 prise=%2 timeout=%3</source> <source>load wave #%1 prise=%2 timeout=%3</source>
<translation type="unfinished"></translation> <translation>загружена волна %1 награда=%2 таймаут=%3</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="311"/> <location filename="../loader.cpp" line="311"/>
<source>Alien %1 #%2 </source> <source>Alien %1 #%2 </source>
<translation type="unfinished"></translation> <translation>Монстр %1 %2</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="340"/> <location filename="../loader.cpp" line="340"/>
<source>Tower %1 trig=%2 splash=%3</source> <source>Tower %1 trig=%2 splash=%3</source>
<translation type="unfinished"></translation> <translation>Башня %1 триггер=%2 снаряд=%3</translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="340"/> <location filename="../loader.cpp" line="340"/>
<source>chain lenght %1</source> <source>chain lenght %1</source>
<translation type="unfinished"></translation> <translation>длина цепочки %1</translation>
</message>
<message>
<location filename="../loader.cpp" line="451"/>
<source>Alien %1 id=%2 health=%3 speed=%4 prise=%5 imgType=%6 armor=%7 regeneration=%8 score=%10</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="454"/> <location filename="../loader.cpp" line="454"/>
<source>Found %1 aliens</source> <source>Found %1 aliens</source>
<translation type="unfinished"></translation> <translation>Найдено %1 монстров</translation>
</message>
<message>
<location filename="../loader.cpp" line="472"/>
<source>Wave %1 prise=%2 timeout=%3</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="475"/> <location filename="../loader.cpp" line="475"/>
<source>Found %1 waves</source> <source>Found %1 waves</source>
<translation type="unfinished"></translation> <translation>найдено %1 волн</translation>
</message>
<message>
<location filename="../loader.cpp" line="505"/>
<source>Wave=%1 alien=%2 count=%3</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="509"/> <location filename="../loader.cpp" line="509"/>
<source>Found %1 waveParts</source> <source>Found %1 waveParts</source>
<translation type="unfinished"></translation> <translation>Найдео %1 составляющих волны</translation>
</message>
<message>
<location filename="../loader.cpp" line="553"/>
<source>Tower=%1 parent=%2 child=%3 trigger=%4</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="557"/> <location filename="../loader.cpp" line="557"/>
<source>Found %1 chains</source> <source>Found %1 chains</source>
<translation type="unfinished"></translation> <translation>Найдено %1 цепочек</translation>
</message>
<message>
<location filename="../loader.cpp" line="586"/>
<source>level=%1 wave=%2</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="590"/> <location filename="../loader.cpp" line="590"/>
<source>Found %1 Waves On Level</source> <source>Found %1 Waves On Level</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../loader.cpp" line="619"/>
<source>level=%1 tower=%2</source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../loader.cpp" line="623"/> <location filename="../loader.cpp" line="623"/>
<source>Found %1 Towers On Level</source> <source>Found %1 Towers On Level</source>
<translation type="unfinished"></translation> <translation type="unfinished"></translation>
</message> </message>
<message>
<location filename="../loader.cpp" line="649"/>
<source>Level %1 id=%2 map=%3 </source>
<translation type="unfinished"></translation>
</message>
<message> <message>
<location filename="../loader.cpp" line="653"/> <location filename="../loader.cpp" line="653"/>
<source>Found %1 levels</source> <source>Found %1 levels</source>
<translation type="unfinished"></translation> <translation>найдено %1 уровней</translation>
</message>
<message>
<location filename="../loader.cpp" line="695"/>
<source>Trigger %1 id=%2 damage=%3 radius=%4 delParent=%5 timer=%6</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../loader.cpp" line="696"/>
<source>count=%1 chance=%2 randomPosRadius=%3 type=%4 childAim=%5</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="699"/> <location filename="../loader.cpp" line="699"/>
<source>Found %1 triggers</source> <source>Found %1 triggers</source>
<translation type="unfinished"></translation> <translation>Найдено %1 триггеров</translation>
</message>
<message>
<location filename="../loader.cpp" line="722"/>
<source>Splash %1 id=%2 speed=%3 imgType=%4 autoControl=%5 lifetime=%6</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="725"/> <location filename="../loader.cpp" line="725"/>
<source>Found %1 splashes</source> <source>Found %1 splashes</source>
<translation type="unfinished"></translation> <translation>найдено %1 снарядов</translation>
</message>
<message>
<location filename="../loader.cpp" line="759"/>
<source>Tower %1 id=%2 radius=%3 cost=%4 reload=%5 buildTime=%6 splash=%7</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../loader.cpp" line="760"/>
<source>imgType=%1 expByKill=%2 expByShot=%3 expByDamage=%4</source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="764"/> <location filename="../loader.cpp" line="764"/>
<source>Found %1 towers</source> <source>Found %1 towers</source>
<translation type="unfinished"></translation> <translation type="unfinished">Найдено %1 башень</translation>
</message>
<message>
<location filename="../loader.cpp" line="786"/>
<source>Map %1 id=%2 imgType=%3 maxPlayers=%5 data=%6 </source>
<translation type="unfinished"></translation>
</message> </message>
<message> <message>
<location filename="../loader.cpp" line="789"/> <location filename="../loader.cpp" line="789"/>
<source>Found %1 maps</source> <source>Found %1 maps</source>
<translation type="unfinished"></translation> <translation>Найдено %1 карт</translation>
</message> </message>
</context> </context>
<context> <context>
@@ -169,7 +104,7 @@
<message> <message>
<location filename="mainwindow.ui" line="14"/> <location filename="mainwindow.ui" line="14"/>
<source>MainWindow</source> <source>MainWindow</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="34"/> <location filename="mainwindow.ui" line="34"/>
@@ -178,8 +113,8 @@
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="76"/> <location filename="mainwindow.ui" line="76"/>
<location filename="mainwindow.ui" line="436"/> <location filename="mainwindow.ui" line="430"/>
<location filename="mainwindow.ui" line="881"/> <location filename="mainwindow.ui" line="863"/>
<source>Name</source> <source>Name</source>
<translation>Имя</translation> <translation>Имя</translation>
</message> </message>
@@ -200,7 +135,7 @@
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="198"/> <location filename="mainwindow.ui" line="198"/>
<location filename="mainwindow.ui" line="904"/> <location filename="mainwindow.ui" line="886"/>
<source>Speed</source> <source>Speed</source>
<translation>Скорость</translation> <translation>Скорость</translation>
</message> </message>
@@ -221,105 +156,108 @@
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="320"/> <location filename="mainwindow.ui" line="320"/>
<location filename="mainwindow.ui" line="718"/> <location filename="mainwindow.ui" line="712"/>
<location filename="mainwindow.ui" line="1012"/> <location filename="mainwindow.ui" line="991"/>
<source>Image</source> <source>Image</source>
<translation>Картинка</translation> <translation>Картинка</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="345"/> <location filename="mainwindow.ui" line="345"/>
<location filename="mainwindow.ui" line="775"/> <location filename="mainwindow.ui" line="766"/>
<location filename="mainwindow.ui" line="1069"/> <location filename="mainwindow.ui" line="1045"/>
<source>...</source> <source>...</source>
<translation type="unfinished"></translation> <translation>...</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="384"/> <location filename="mainwindow.ui" line="381"/>
<location filename="mainwindow.ui" line="801"/> <location filename="mainwindow.ui" line="789"/>
<location filename="mainwindow.ui" line="1095"/> <location filename="mainwindow.ui" line="1068"/>
<source>Add</source> <source>Add</source>
<translation>Добавить</translation> <translation>Добавить</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="397"/> <location filename="mainwindow.ui" line="394"/>
<location filename="mainwindow.ui" line="817"/> <location filename="mainwindow.ui" line="802"/>
<location filename="mainwindow.ui" line="1111"/> <location filename="mainwindow.ui" line="1081"/>
<source>Delete</source> <source>Delete</source>
<translation>Удалить</translation> <translation>Удалить</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="407"/> <location filename="mainwindow.ui" line="404"/>
<source>Towers</source> <source>Towers</source>
<translation>Башни</translation> <translation>Башни</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="459"/> <location filename="mainwindow.ui" line="453"/>
<source>Build time</source> <source>Build time</source>
<translation>Время постройки</translation> <translation>Время постройки</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="495"/> <location filename="mainwindow.ui" line="489"/>
<source>Cost</source> <source>Cost</source>
<translation>Цена</translation> <translation>Цена</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="525"/> <location filename="mainwindow.ui" line="1106"/>
<source>splash</source> <source>Cancel</source>
<translation>снаряд</translation> <translation>Отменить изменения</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="548"/> <source>splash</source>
<translation type="obsolete">снаряд</translation>
</message>
<message>
<location filename="mainwindow.ui" line="542"/>
<source>Edit</source> <source>Edit</source>
<translation>Ред.</translation> <translation>Ред.</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="565"/> <location filename="mainwindow.ui" line="559"/>
<location filename="mainwindow.ui" line="1139"/>
<source>Reload</source> <source>Reload</source>
<translation>Перезарядка</translation> <translation>Перезарядка</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="595"/> <location filename="mainwindow.ui" line="589"/>
<source>Radius</source> <source>Radius</source>
<translation>Радиус</translation> <translation>Радиус</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="628"/> <location filename="mainwindow.ui" line="622"/>
<source>ExpbyShot</source> <source>ExpbyShot</source>
<translation>Опыт за выстрел</translation> <translation>Опыт за выстрел</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="658"/> <location filename="mainwindow.ui" line="652"/>
<source>ExpbyDam</source> <source>ExpbyDam</source>
<translation>Опыт за урон</translation> <translation>Опыт за урон</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="688"/> <location filename="mainwindow.ui" line="682"/>
<source>ExpbyKill</source> <source>ExpbyKill</source>
<translation>Опыт за убийство</translation> <translation>Опыт за убийство</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="827"/> <location filename="mainwindow.ui" line="812"/>
<source>Splashes</source> <source>Splashes</source>
<translation>Снаряды</translation> <translation>Снаряды</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="943"/> <location filename="mainwindow.ui" line="925"/>
<source>LifeTime</source> <source>LifeTime</source>
<translation>Время жизни</translation> <translation>Время жизни</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="982"/> <location filename="mainwindow.ui" line="961"/>
<source>AutoControl</source> <source>AutoControl</source>
<translation>Самонаведение</translation> <translation>Самонаведение</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="1121"/> <location filename="mainwindow.ui" line="1091"/>
<source>Tab 2</source> <source>Tab 2</source>
<translation type="unfinished"></translation> <translation></translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="1132"/> <location filename="mainwindow.ui" line="1099"/>
<source>Save</source> <source>Save</source>
<translation>Сохранить</translation> <translation>Сохранить</translation>
</message> </message>
@@ -344,7 +282,7 @@
<message> <message>
<location filename="mainwindow.cpp" line="230"/> <location filename="mainwindow.cpp" line="230"/>
<source>Alien</source> <source>Alien</source>
<translation type="unfinished"></translation> <translation>Монстр</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.cpp" line="249"/> <location filename="mainwindow.cpp" line="249"/>
@@ -362,6 +300,7 @@
<translation>Удалить башню %1 id=%2</translation> <translation>Удалить башню %1 id=%2</translation>
</message> </message>
<message> <message>
<location filename="mainwindow.ui" line="519"/>
<location filename="mainwindow.cpp" line="407"/> <location filename="mainwindow.cpp" line="407"/>
<source>Splash</source> <source>Splash</source>
<translation>Снаряд</translation> <translation>Снаряд</translation>

View File

@@ -5,109 +5,130 @@
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
ui(new Ui::MainWindow) ui(new Ui::MainWindow)
{ {
ui->setupUi(this); ui->setupUi(this);
adloader = new Loader(this); adloader = new Loader(this);
adloader->load("data2.xml"); adloader->load("data2.xml");
alModel = new AlienModel(adloader->aliens.values()); alModel = new AlienModel(adloader->aliens.values());
ui->lvAliens->setModel((QAbstractItemModel * )alModel); ui->lvAliens->setModel((QAbstractItemModel * )alModel);
connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex))); connect(ui->lvAliens->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvAliens_select(QModelIndex, QModelIndex)));
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
splModel = new SplashModel(adloader->splashes.values()); splModel = new SplashModel(adloader->splashes.values());
ui->lvSplashes->setModel((QAbstractItemModel * )splModel); ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
connect(ui->lvSplashes->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvSplashes_select(QModelIndex, QModelIndex))); connect(ui->lvSplashes->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvSplashes_select(QModelIndex, QModelIndex)));
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
twModel = new TowerModel(adloader->towers.values()); twModel = new TowerModel(adloader->towers.values());
ui->lvTowers->setModel((QAbstractItemModel * )twModel); ui->lvTowers->setModel((QAbstractItemModel * )twModel);
connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex))); connect(ui->lvTowers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTowers_select(QModelIndex, QModelIndex)));
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel); ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
trigModel = new TriggerModel(adloader->triggers.values());
ui->lvTriggers->setModel((QAbstractItemModel * )trigModel);
connect(ui->lvTriggers->selectionModel(),SIGNAL(currentChanged(QModelIndex, QModelIndex)),this,SLOT(lvTriggers_select(QModelIndex,QModelIndex)));
ui->lvTriggers->selectionModel()->setCurrentIndex(ui->lvTriggers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
} }
MainWindow::~MainWindow() MainWindow::~MainWindow()
{ {
delete ui; delete ui;
} }
void MainWindow::changeEvent(QEvent *e) void MainWindow::changeEvent(QEvent *e)
{ {
QMainWindow::changeEvent(e); QMainWindow::changeEvent(e);
switch (e->type()) { switch (e->type()) {
case QEvent::LanguageChange: case QEvent::LanguageChange:
ui->retranslateUi(this); ui->retranslateUi(this);
break; break;
default: default:
break; break;
} }
} }
void MainWindow::on_cbAlArmor_toggled(bool checked) void MainWindow::on_cbAlArmor_toggled(bool checked)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
ui->sbAlArmor->setEnabled(checked); ui->sbAlArmor->setEnabled(checked);
if (checked) adloader->aliens[id].armor = ui->sbAlArmor->value(); if (checked) adloader->aliens[id].armor = ui->sbAlArmor->value();
else adloader->aliens[id].armor = 0; else adloader->aliens[id].armor = 0;
} }
void MainWindow::on_cbAlRegeneration_toggled(bool checked) void MainWindow::on_cbAlRegeneration_toggled(bool checked)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
ui->sbAlregeneration->setEnabled(checked); ui->sbAlregeneration->setEnabled(checked);
if (checked) adloader->aliens[id].regeneration = ui->sbAlregeneration->value(); if (checked) adloader->aliens[id].regeneration = ui->sbAlregeneration->value();
else adloader->aliens[id].regeneration = 0; else adloader->aliens[id].regeneration = 0;
} }
void MainWindow::lvAliens_select(QModelIndex index, QModelIndex) void MainWindow::lvAliens_select(QModelIndex index, QModelIndex)
{ {
tbAlien al = adloader->aliens.values().at(index.row()); tbAlien al = adloader->aliens.values().at(index.row());
ui->leAlName->setText(al.name); ui->leAlName->setText(al.name);
ui->sbAlHealth->setValue(al.health); ui->sbAlHealth->setValue(al.health);
ui->sbAlArmor->setValue(al.armor); ui->sbAlArmor->setValue(al.armor);
if (al.armor > 0) ui->cbAlArmor->setChecked(true); if (al.armor > 0) ui->cbAlArmor->setChecked(true);
else ui->cbAlArmor->setChecked(false); else ui->cbAlArmor->setChecked(false);
ui->sbAlSpeed->setValue(al.speed); ui->sbAlSpeed->setValue(al.speed);
ui->sbAlPrise->setValue(al.prise); ui->sbAlPrise->setValue(al.prise);
ui->sbAlregeneration->setValue(al.regeneration); ui->sbAlregeneration->setValue(al.regeneration);
if (al.regeneration > 0) ui->cbAlRegeneration->setChecked(true); if (al.regeneration > 0) ui->cbAlRegeneration->setChecked(true);
else ui->cbAlRegeneration->setChecked(false); else ui->cbAlRegeneration->setChecked(false);
ui->sbAlScore->setValue(al.score); ui->sbAlScore->setValue(al.score);
ui->cbAlIsFly->setChecked(al.isFlying); ui->cbAlIsFly->setChecked(al.isFlying);
} }
void MainWindow::lvTowers_select(QModelIndex index, QModelIndex) void MainWindow::lvTowers_select(QModelIndex index, QModelIndex)
{ {
tbTower tw = adloader->towers.values().at(index.row()); tbTower tw = adloader->towers.values().at(index.row());
ui->sbTwBuildTime->setValue(tw.buildTime); ui->sbTwBuildTime->setValue(tw.buildTime);
ui->sbTwCost->setValue(tw.cost); ui->sbTwCost->setValue(tw.cost);
ui->sbTwExpByDam->setValue(tw.expByDamage); ui->sbTwExpByDam->setValue(tw.expByDamage);
ui->sbTwExpByKill->setValue(tw.expByKill); ui->sbTwExpByKill->setValue(tw.expByKill);
ui->sbTwExpByShot->setValue(tw.expByShot); ui->sbTwExpByShot->setValue(tw.expByShot);
ui->leTwName->setText(tw.name); ui->leTwName->setText(tw.name);
ui->sbTwRadius->setValue(tw.radius); ui->sbTwRadius->setValue(tw.radius);
ui->sbTwReload->setValue(tw.reload); ui->sbTwReload->setValue(tw.reload);
ui->cbTwSplash->setCurrentIndex(adloader->splashes.keys().indexOf(tw.splashId)); ui->cbTwSplash->setCurrentIndex(adloader->splashes.keys().indexOf(tw.splashId));
} }
void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex) void MainWindow::lvSplashes_select(QModelIndex index, QModelIndex)
{ {
tbSplash spl = adloader->splashes.values().at(index.row()); tbSplash spl = adloader->splashes.values().at(index.row());
ui->sbSplLifeTime->setValue(spl.lifetime); ui->sbSplLifeTime->setValue(spl.lifetime);
ui->sbSplSpeed->setValue(spl.speed); ui->sbSplSpeed->setValue(spl.speed);
ui->cbSplAutoControl->setChecked(spl.autoControl); ui->cbSplAutoControl->setChecked(spl.autoControl);
ui->leSplName->setText(spl.name); ui->leSplName->setText(spl.name);
}
void MainWindow::lvTriggers_select(QModelIndex index, QModelIndex)
{
tbTrigger trig = adloader->triggers.values().at(index.row());
ui->sbTrigCount->setValue(trig.count);
ui->sbTrigDamage->setValue(trig.damage);
ui->sbTrigDamRadius->setValue(trig.radius);
ui->sbTrigChance->setValue(trig.chance);
if (trig.chance == 100)
ui->cbTrigChance->setChecked(false);
else
ui->cbTrigChance->setChecked(true);
ui->sbTrigRandomRadius->setValue(trig.randomPosRadius);
ui->sbTrigTimer->setValue(trig.timer);
ui->leTrigName->setText(trig.name);
} }
@@ -134,7 +155,9 @@ void MainWindow::closeEvent(QCloseEvent *event)
void MainWindow::on_pbSave_clicked() void MainWindow::on_pbSave_clicked()
{ {
adloader->save("data2.xml"); adloader->save("data2.xml");
adloader->load("data2.xml");
adloader->save("data2.xml");
} }
@@ -164,79 +187,79 @@ void MainWindow::on_pbReload_clicked()
void MainWindow::on_sbAlHealth_valueChanged(double value) void MainWindow::on_sbAlHealth_valueChanged(double value)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].health = value; adloader->aliens[id].health = value;
} }
void MainWindow::on_sbAlArmor_valueChanged(double value) void MainWindow::on_sbAlArmor_valueChanged(double value)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].armor = value; adloader->aliens[id].armor = value;
} }
void MainWindow::on_sbAlregeneration_valueChanged(double value) void MainWindow::on_sbAlregeneration_valueChanged(double value)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].regeneration = value; adloader->aliens[id].regeneration = value;
} }
void MainWindow::on_sbAlSpeed_valueChanged(double value) void MainWindow::on_sbAlSpeed_valueChanged(double value)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].speed = value; adloader->aliens[id].speed = value;
} }
void MainWindow::on_sbAlPrise_valueChanged(int val) void MainWindow::on_sbAlPrise_valueChanged(int val)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].prise = val; adloader->aliens[id].prise = val;
} }
void MainWindow::on_sbAlScore_valueChanged(int val) void MainWindow::on_sbAlScore_valueChanged(int val)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].score = val; adloader->aliens[id].score = val;
} }
void MainWindow::on_cbAlIsFly_clicked(bool checked) void MainWindow::on_cbAlIsFly_clicked(bool checked)
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].isFlying = checked; adloader->aliens[id].isFlying = checked;
} }
void MainWindow::on_leAlName_editingFinished() void MainWindow::on_leAlName_editingFinished()
{ {
int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id; int id = adloader->aliens.values().at(ui->lvAliens->currentIndex().row()).id;
adloader->aliens[id].name = ui->leAlName->text(); adloader->aliens[id].name = ui->leAlName->text();
alModel->refresh(adloader->aliens.values()); alModel->refresh(adloader->aliens.values());
ui->lvAliens->setModel((QAbstractItemModel * )alModel); ui->lvAliens->setModel((QAbstractItemModel * )alModel);
ui->lvAliens->repaint(); ui->lvAliens->repaint();
} }
void MainWindow::on_pbAlAdd_clicked() void MainWindow::on_pbAlAdd_clicked()
{ {
int i = 1; int i = 1;
while (adloader->aliens.contains(i)) i++; while (adloader->aliens.contains(i)) i++;
tbAlien al; tbAlien al;
al.id = i; al.id = i;
al.name = tr("Alien"); al.name = tr("Alien");
al.health = 1; al.health = 1;
al.prise = 0; al.prise = 0;
al.score = 1; al.score = 1;
al.speed = 1; al.speed = 1;
adloader->aliens.insert(al.id,al); adloader->aliens.insert(al.id,al);
int index = adloader->aliens.keys().indexOf(i); int index = adloader->aliens.keys().indexOf(i);
alModel->refresh(adloader->aliens.values()); alModel->refresh(adloader->aliens.values());
ui->lvAliens->setModel((QAbstractItemModel * )alModel); ui->lvAliens->setModel((QAbstractItemModel * )alModel);
ui->lvAliens->reset(); ui->lvAliens->reset();
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::ClearAndSelect); ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
} }
@@ -244,105 +267,105 @@ void MainWindow::on_pbAlAdd_clicked()
void MainWindow::on_pbAlDel_clicked() void MainWindow::on_pbAlDel_clicked()
{ {
if (adloader->aliens.size() < 2) return; if (adloader->aliens.size() < 2) return;
QMessageBox msgBox; QMessageBox msgBox;
int id = adloader->aliens.keys().at(ui->lvAliens->currentIndex().row()); int id = adloader->aliens.keys().at(ui->lvAliens->currentIndex().row());
msgBox.setText(tr("Delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id)); msgBox.setText(tr("Delete alien %1 id=%2").arg(adloader->aliens.value(id).name).arg(id));
msgBox.setInformativeText(tr("Are you sure?")); msgBox.setInformativeText(tr("Are you sure?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok);
int ret = msgBox.exec(); int ret = msgBox.exec();
if (ret == QMessageBox::Ok) if (ret == QMessageBox::Ok)
{ {
adloader->aliens.remove(id); adloader->aliens.remove(id);
alModel->refresh(adloader->aliens.values()); alModel->refresh(adloader->aliens.values());
ui->lvAliens->setModel((QAbstractItemModel * )alModel); ui->lvAliens->setModel((QAbstractItemModel * )alModel);
ui->lvAliens->reset(); ui->lvAliens->reset();
ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvAliens->selectionModel()->setCurrentIndex(ui->lvAliens->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
} }
} }
void MainWindow::on_leTwName_editingFinished() void MainWindow::on_leTwName_editingFinished()
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].name = ui->leTwName->text(); adloader->towers[id].name = ui->leTwName->text();
twModel->refresh(adloader->towers.values()); twModel->refresh(adloader->towers.values());
ui->lvTowers->setModel((QAbstractItemModel * )twModel); ui->lvTowers->setModel((QAbstractItemModel * )twModel);
} }
void MainWindow::on_sbTwBuildTime_valueChanged(int val) void MainWindow::on_sbTwBuildTime_valueChanged(int val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].buildTime = val; adloader->towers[id].buildTime = val;
} }
void MainWindow::on_sbTwCost_valueChanged(int val) void MainWindow::on_sbTwCost_valueChanged(int val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].cost = val; adloader->towers[id].cost = val;
} }
void MainWindow::on_cbTwSplash_currentIndexChanged(int index) void MainWindow::on_cbTwSplash_currentIndexChanged(int index)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].splashId = adloader->splashes.values().at(index).id; adloader->towers[id].splashId = adloader->splashes.values().at(index).id;
} }
void MainWindow::on_sbTwReload_valueChanged(int val) void MainWindow::on_sbTwReload_valueChanged(int val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].reload = val; adloader->towers[id].reload = val;
} }
void MainWindow::on_sbTwRadius_valueChanged(double val) void MainWindow::on_sbTwRadius_valueChanged(double val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].radius = val; adloader->towers[id].radius = val;
} }
void MainWindow::on_sbTwExpByShot_valueChanged(double val) void MainWindow::on_sbTwExpByShot_valueChanged(double val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].expByShot = val; adloader->towers[id].expByShot = val;
} }
void MainWindow::on_sbTwExpByDam_valueChanged(double val) void MainWindow::on_sbTwExpByDam_valueChanged(double val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].expByDamage = val; adloader->towers[id].expByDamage = val;
} }
void MainWindow::on_sbTwExpByKill_valueChanged(double val) void MainWindow::on_sbTwExpByKill_valueChanged(double val)
{ {
int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id; int id = adloader->towers.values().at(ui->lvTowers->currentIndex().row()).id;
adloader->towers[id].expByKill = val; adloader->towers[id].expByKill = val;
} }
void MainWindow::on_pbTwAdd_clicked() void MainWindow::on_pbTwAdd_clicked()
{ {
int i = 1; int i = 1;
while (adloader->towers.contains(i)) i++; while (adloader->towers.contains(i)) i++;
tbTower tw; tbTower tw;
tw.id = i; tw.id = i;
tw.name = tr("Tower"); tw.name = tr("Tower");
tw.splashId = adloader->splashes.keys().at(0); tw.splashId = adloader->splashes.keys().at(0);
tw.buildTime = 1; tw.buildTime = 1;
tw.cost = 1; tw.cost = 1;
tw.radius = 1; tw.radius = 1;
tw.reload = 1; tw.reload = 1;
adloader->towers.insert(tw.id,tw); adloader->towers.insert(tw.id,tw);
int index = adloader->towers.keys().indexOf(i); int index = adloader->towers.keys().indexOf(i);
twModel->refresh(adloader->towers.values()); twModel->refresh(adloader->towers.values());
ui->lvTowers->setModel((QAbstractItemModel * )twModel); ui->lvTowers->setModel((QAbstractItemModel * )twModel);
ui->lvTowers->reset(); ui->lvTowers->reset();
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(index,0),QItemSelectionModel::ClearAndSelect); ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
} }
@@ -351,77 +374,77 @@ void MainWindow::on_pbTwDel_clicked()
{ {
if (adloader->towers.size() < 2) return; if (adloader->towers.size() < 2) return;
QMessageBox msgBox; QMessageBox msgBox;
int id = adloader->towers.keys().at(ui->lvTowers->currentIndex().row()); int id = adloader->towers.keys().at(ui->lvTowers->currentIndex().row());
msgBox.setText(tr("Delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id)); msgBox.setText(tr("Delete tower %1 id=%2").arg(adloader->towers.value(id).name).arg(id));
msgBox.setInformativeText(tr("Are you sure?")); msgBox.setInformativeText(tr("Are you sure?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok);
int ret = msgBox.exec(); int ret = msgBox.exec();
if (ret == QMessageBox::Ok) if (ret == QMessageBox::Ok)
{ {
adloader->towers.remove(id); adloader->towers.remove(id);
twModel->refresh(adloader->towers.values()); twModel->refresh(adloader->towers.values());
ui->lvTowers->setModel((QAbstractItemModel * )twModel); ui->lvTowers->setModel((QAbstractItemModel * )twModel);
ui->lvTowers->reset(); ui->lvTowers->reset();
ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvTowers->selectionModel()->setCurrentIndex(ui->lvTowers->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
} }
} }
void MainWindow::on_leSplName_editingFinished() void MainWindow::on_leSplName_editingFinished()
{ {
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id; int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
adloader->splashes[id].name = ui->leSplName->text(); adloader->splashes[id].name = ui->leSplName->text();
splModel->refresh(adloader->splashes.values()); splModel->refresh(adloader->splashes.values());
ui->lvSplashes->setModel((QAbstractItemModel * )splModel); ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel); ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
} }
void MainWindow::on_sbSplSpeed_valueChanged(double val) void MainWindow::on_sbSplSpeed_valueChanged(double val)
{ {
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id; int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
adloader->splashes[id].speed = val; adloader->splashes[id].speed = val;
} }
void MainWindow::on_cbSplAutoControl_toggled(bool checked) void MainWindow::on_cbSplAutoControl_toggled(bool checked)
{ {
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id; int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
adloader->splashes[id].autoControl = checked; adloader->splashes[id].autoControl = checked;
} }
void MainWindow::on_sbSplLifeTime_valueChanged(int val) void MainWindow::on_sbSplLifeTime_valueChanged(int val)
{ {
int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id; int id = adloader->splashes.values().at(ui->lvSplashes->currentIndex().row()).id;
adloader->splashes[id].lifetime = val; adloader->splashes[id].lifetime = val;
} }
void MainWindow::on_pbSplAdd_clicked() void MainWindow::on_pbSplAdd_clicked()
{ {
int i = 1; int i = 1;
while (adloader->splashes.contains(i)) i++; while (adloader->splashes.contains(i)) i++;
tbSplash spl; tbSplash spl;
spl.id = i; spl.id = i;
spl.name = tr("Splash"); spl.name = tr("Splash");
spl.lifetime = 1; spl.lifetime = 1;
spl.speed = 1; spl.speed = 1;
adloader->splashes.insert(spl.id,spl); adloader->splashes.insert(spl.id,spl);
int index = adloader->splashes.keys().indexOf(i); int index = adloader->splashes.keys().indexOf(i);
splModel->refresh(adloader->splashes.values()); splModel->refresh(adloader->splashes.values());
ui->lvSplashes->setModel((QAbstractItemModel * )splModel); ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
ui->lvSplashes->reset(); ui->lvSplashes->reset();
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(index,0),QItemSelectionModel::ClearAndSelect); ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(index,0),QItemSelectionModel::ClearAndSelect);
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel); ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
} }
void MainWindow::on_pbSlpDel_clicked() void MainWindow::on_pbSlpDel_clicked()
{ {
if (adloader->splashes.size() < 2) return; if (adloader->splashes.size() < 2) return;
QMessageBox msgBox; QMessageBox msgBox;
int id = adloader->splashes.keys().at(ui->lvSplashes->currentIndex().row()); int id = adloader->splashes.keys().at(ui->lvSplashes->currentIndex().row());
for (int i=0; i<adloader->towers.size(); i++) for (int i=0; i<adloader->towers.size(); i++)
{ {
if (adloader->towers.values().at(i).splashId == id) if (adloader->towers.values().at(i).splashId == id)
@@ -433,20 +456,20 @@ void MainWindow::on_pbSlpDel_clicked()
return; return;
} }
} }
msgBox.setText(tr("Delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id)); msgBox.setText(tr("Delete splash %1 id=%2").arg(adloader->splashes.value(id).name).arg(id));
msgBox.setInformativeText(tr("Are you sure?")); msgBox.setInformativeText(tr("Are you sure?"));
msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel); msgBox.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
msgBox.setDefaultButton(QMessageBox::Ok); msgBox.setDefaultButton(QMessageBox::Ok);
int ret = msgBox.exec(); int ret = msgBox.exec();
if (ret == QMessageBox::Ok) if (ret == QMessageBox::Ok)
{ {
adloader->splashes.remove(id); adloader->splashes.remove(id);
splModel->refresh(adloader->splashes.values()); splModel->refresh(adloader->splashes.values());
ui->lvSplashes->setModel((QAbstractItemModel * )splModel); ui->lvSplashes->setModel((QAbstractItemModel * )splModel);
ui->lvSplashes->reset(); ui->lvSplashes->reset();
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect); ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(0,0),QItemSelectionModel::ClearAndSelect);
ui->cbTwSplash->setModel((QAbstractItemModel * )splModel); ui->cbTwSplash->setModel((QAbstractItemModel * )splModel);
} }
} }
@@ -456,3 +479,12 @@ void MainWindow::on_pushButton_clicked()
ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(splIndex,0),QItemSelectionModel::ClearAndSelect); ui->lvSplashes->selectionModel()->setCurrentIndex(ui->lvSplashes->model()->index(splIndex,0),QItemSelectionModel::ClearAndSelect);
ui->tabWidget->setCurrentWidget(ui->tabSplashes); ui->tabWidget->setCurrentWidget(ui->tabSplashes);
} }
void MainWindow::on_cbTrigChance_clicked(bool checked)
{
int id = adloader->triggers.values().at(ui->lvTriggers->currentIndex().row()).id;
ui->sbTrigChance->setEnabled(checked);
if (checked) adloader->triggers[id].chance = ui->sbTrigChance->value();
else adloader->triggers[id].chance = 100;
}

View File

@@ -9,64 +9,68 @@
#include "alienmodel.h" #include "alienmodel.h"
#include "towermodel.h" #include "towermodel.h"
#include "splashmodel.h" #include "splashmodel.h"
#include "triggermodel.h"
namespace Ui { namespace Ui {
class MainWindow; class MainWindow;
} }
class MainWindow : public QMainWindow { class MainWindow : public QMainWindow {
Q_OBJECT Q_OBJECT
public: public:
MainWindow(QWidget *parent = 0); MainWindow(QWidget *parent = 0);
~MainWindow(); ~MainWindow();
protected: protected:
void changeEvent(QEvent *e); void changeEvent(QEvent *e);
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;
Loader * adloader; Loader * adloader;
AlienModel * alModel; AlienModel * alModel;
TowerModel * twModel; TowerModel * twModel;
SplashModel * splModel; SplashModel * splModel;
TriggerModel* trigModel;
void closeEvent(QCloseEvent *); void closeEvent(QCloseEvent *);
private slots: private slots:
void on_pbReload_clicked(); void on_cbTrigChance_clicked(bool checked);
void on_pbReload_clicked();
void on_pushButton_clicked(); void on_pushButton_clicked();
void on_pbSlpDel_clicked(); void on_pbSlpDel_clicked();
void on_pbSplAdd_clicked(); void on_pbSplAdd_clicked();
void on_sbSplLifeTime_valueChanged(int ); void on_sbSplLifeTime_valueChanged(int );
void on_cbSplAutoControl_toggled(bool checked); void on_cbSplAutoControl_toggled(bool checked);
void on_sbSplSpeed_valueChanged(double ); void on_sbSplSpeed_valueChanged(double );
void on_leSplName_editingFinished(); void on_leSplName_editingFinished();
void on_pbTwDel_clicked(); void on_pbTwDel_clicked();
void on_sbTwExpByKill_valueChanged(double ); void on_sbTwExpByKill_valueChanged(double );
void on_sbTwExpByDam_valueChanged(double ); void on_sbTwExpByDam_valueChanged(double );
void on_sbTwExpByShot_valueChanged(double ); void on_sbTwExpByShot_valueChanged(double );
void on_sbTwRadius_valueChanged(double ); void on_sbTwRadius_valueChanged(double );
void on_sbTwReload_valueChanged(int ); void on_sbTwReload_valueChanged(int );
void on_cbTwSplash_currentIndexChanged(int index); void on_cbTwSplash_currentIndexChanged(int index);
void on_sbTwCost_valueChanged(int ); void on_sbTwCost_valueChanged(int );
void on_sbTwBuildTime_valueChanged(int ); void on_sbTwBuildTime_valueChanged(int );
void on_pbTwAdd_clicked(); void on_pbTwAdd_clicked();
void on_leTwName_editingFinished(); void on_leTwName_editingFinished();
void on_pbAlDel_clicked(); void on_pbAlDel_clicked();
void on_pbAlAdd_clicked(); void on_pbAlAdd_clicked();
void on_leAlName_editingFinished(); void on_leAlName_editingFinished();
void on_cbAlIsFly_clicked(bool checked); void on_cbAlIsFly_clicked(bool checked);
void on_sbAlScore_valueChanged(int ); void on_sbAlScore_valueChanged(int );
void on_sbAlPrise_valueChanged(int ); void on_sbAlPrise_valueChanged(int );
void on_sbAlSpeed_valueChanged(double ); void on_sbAlSpeed_valueChanged(double );
void on_sbAlregeneration_valueChanged(double ); void on_sbAlregeneration_valueChanged(double );
void on_sbAlArmor_valueChanged(double ); void on_sbAlArmor_valueChanged(double );
void on_sbAlHealth_valueChanged(double ); void on_sbAlHealth_valueChanged(double );
void on_pbSave_clicked(); void on_pbSave_clicked();
void lvAliens_select(QModelIndex, QModelIndex); void lvAliens_select(QModelIndex, QModelIndex);
void lvTowers_select(QModelIndex, QModelIndex); void lvTowers_select(QModelIndex, QModelIndex);
void lvSplashes_select(QModelIndex, QModelIndex); void lvSplashes_select(QModelIndex, QModelIndex);
void on_cbAlRegeneration_toggled(bool checked); void lvTriggers_select(QModelIndex, QModelIndex);
void on_cbAlArmor_toggled(bool checked); void on_cbAlRegeneration_toggled(bool checked);
void on_cbAlArmor_toggled(bool checked);
}; };
#endif // MAINWINDOW_H #endif // MAINWINDOW_H

View File

@@ -27,19 +27,13 @@
<item row="3" column="0"> <item row="3" column="0">
<widget class="QTabWidget" name="tabWidget"> <widget class="QTabWidget" name="tabWidget">
<property name="currentIndex"> <property name="currentIndex">
<number>2</number> <number>3</number>
</property> </property>
<widget class="QWidget" name="tabAliens"> <widget class="QWidget" name="tabAliens">
<attribute name="title"> <attribute name="title">
<string>Aliens</string> <string>Aliens</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout_4" columnstretch="1,2"> <layout class="QGridLayout" name="gridLayout_4" columnstretch="1,2">
<property name="margin">
<number>2</number>
</property>
<property name="spacing">
<number>2</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QListView" name="lvAliens"> <widget class="QListView" name="lvAliens">
<property name="editTriggers"> <property name="editTriggers">
@@ -56,12 +50,6 @@
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>2</number>
</property>
<property name="margin">
<number>2</number>
</property>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item> <item>
@@ -361,6 +349,19 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer_4">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@@ -516,7 +517,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>splash</string> <string>Splash</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>
@@ -611,7 +612,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_31"> <layout class="QHBoxLayout" name="horizontalLayout_31">
<item> <item>
<widget class="QLabel" name="label_24"> <widget class="QCheckBox" name="cbTwExpByShot">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -619,10 +620,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>ExpbyShot</string> <string>ExpByShot</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@@ -641,7 +639,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_34"> <layout class="QHBoxLayout" name="horizontalLayout_34">
<item> <item>
<widget class="QLabel" name="label_27"> <widget class="QCheckBox" name="cbTwExpByDam">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -649,10 +647,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>ExpbyDam</string> <string>ExpByDam</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@@ -671,7 +666,7 @@
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_32"> <layout class="QHBoxLayout" name="horizontalLayout_32">
<item> <item>
<widget class="QLabel" name="label_26"> <widget class="QCheckBox" name="cbTwExpByKill">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed"> <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch> <horstretch>0</horstretch>
@@ -679,10 +674,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="text"> <property name="text">
<string>ExpbyKill</string> <string>ExpByKill</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@@ -769,6 +761,19 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@@ -836,7 +841,7 @@
<property name="frameShadow"> <property name="frameShadow">
<enum>QFrame::Raised</enum> <enum>QFrame::Raised</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0,0,0,0"> <layout class="QVBoxLayout" name="verticalLayout_7" stretch="0,0,0,0,0,0">
<property name="sizeConstraint"> <property name="sizeConstraint">
<enum>QLayout::SetDefaultConstraint</enum> <enum>QLayout::SetDefaultConstraint</enum>
</property> </property>
@@ -1048,6 +1053,19 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@@ -1086,10 +1104,334 @@
</item> </item>
</layout> </layout>
</widget> </widget>
<widget class="QWidget" name="tab_2"> <widget class="QWidget" name="tabTriggers">
<attribute name="title"> <attribute name="title">
<string>Tab 2</string> <string>Triggers</string>
</attribute> </attribute>
<layout class="QGridLayout" name="gridLayout" columnstretch="1,2">
<item row="0" column="0">
<widget class="QListView" name="lvTriggers"/>
</item>
<item row="0" column="1" rowspan="2">
<widget class="QFrame" name="frame_3">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_27">
<item>
<widget class="QLabel" name="label_30">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Name</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QLineEdit" name="leTrigName"/>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_38">
<item>
<widget class="QLabel" name="label_33">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Count</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbTrigCount">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_45">
<item>
<widget class="QCheckBox" name="cbTrigRandRadius">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Random radius</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="sbTrigRandomRadius">
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_16">
<item>
<widget class="QCheckBox" name="cbTrigChance">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Chance</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbTrigChance">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>100</number>
</property>
<property name="value">
<number>100</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="cbTrigDelPar">
<property name="text">
<string>Delete parent</string>
</property>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_40">
<item>
<widget class="QLabel" name="label_35">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Child aim</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbTrigChildAim">
<property name="duplicatesEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_39">
<item>
<widget class="QLabel" name="label_34">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Type</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="cbTrigType">
<property name="duplicatesEnabled">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_37">
<item>
<widget class="QLabel" name="lbTrigTimer">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Timer</string>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="sbTrigTimer">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>999999999</number>
</property>
<property name="singleStep">
<number>50</number>
</property>
<property name="value">
<number>50</number>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_43">
<item>
<widget class="QCheckBox" name="cbTrigDamage">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Damage</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="sbTrigDamage">
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_44">
<item>
<widget class="QCheckBox" name="cbTrigDamRad">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Damage radius</string>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="sbTrigDamRadius">
<property name="decimals">
<number>3</number>
</property>
<property name="maximum">
<double>999999999.000000000000000</double>
</property>
</widget>
</item>
</layout>
</item>
<item>
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="1" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_15" stretch="2,1">
<property name="spacing">
<number>20</number>
</property>
<item>
<widget class="QPushButton" name="pbTrigAdd">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="pbTrigDel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Delete</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget> </widget>
</widget> </widget>
</item> </item>
@@ -1103,7 +1445,7 @@
<item row="4" column="0"> <item row="4" column="0">
<widget class="QPushButton" name="pbReload"> <widget class="QPushButton" name="pbReload">
<property name="text"> <property name="text">
<string>Reload</string> <string>Cancel</string>
</property> </property>
</widget> </widget>
</item> </item>

35
ADeditor/triggermodel.cpp Normal file
View File

@@ -0,0 +1,35 @@
#include "triggermodel.h"
TriggerModel::TriggerModel(QList<tbTrigger> mtriggers, QObject *parent) :
QAbstractListModel(parent)
{
triggers = mtriggers;
}
void TriggerModel::refresh(QList<tbTrigger> mtriggers)
{
triggers = mtriggers;
}
int TriggerModel::rowCount(const QModelIndex &) const
{
return triggers.count();
}
QVariant TriggerModel::data(const QModelIndex &index, int role) const
{
if (!index.isValid())
return QVariant();
if (index.row() >= triggers.size())
return QVariant();
if (role == Qt::DisplayRole)
{
return triggers.at(index.row()).name;
}
return QVariant();
}

22
ADeditor/triggermodel.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef TRIGGERMODEL_H
#define TRIGGERMODEL_H
#include <QAbstractListModel>
#include "../loader.h"
class TriggerModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit TriggerModel(QList <tbTrigger> triggers, QObject *parent = 0);
int rowCount(const QModelIndex &parent = QModelIndex()) const;
QVariant data(const QModelIndex &index, int role) const;
void refresh(QList <tbTrigger> triggers);
signals:
public slots:
private:
QList <tbTrigger> triggers;
};
#endif // TRIGGERMODEL_H

View File

@@ -16,65 +16,76 @@
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Настольный компьютер</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Настольный компьютер</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Target.DesktopTarget</value>
<value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value> <value key="ProjectExplorer.Target.ActiveBuildConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveDeployConfiguration" type="int">0</value>
<value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value> <value key="ProjectExplorer.Target.ActiveRunConfiguration" type="int">0</value>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.BuildConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap"> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value> <valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList">
<value type="QString">QMLINSPECTOR_PATH=/usr/share/qtcreator/qmljsdebugger</value>
</valuelist>
</valuemap>
<valuemap key="ProjectExplorer.BuildStepList.Step.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">2</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Build</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Build</value>
</valuemap> </valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.1" type="QVariantMap"> <valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildStepList.Step.0" type="QVariantMap"> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value> <value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value> <valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"> <value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
<value type="QString">distclean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Clean</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Clean</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">2</value> <value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
<value type="QString">clean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Отладка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/build-AD</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">9</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap>
<valuemap key="ProjectExplorer.Target.BuildConfiguration.1" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">qmake</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">QtProjectManager.QMakeBuildStep</value>
<valuelist key="QtProjectManager.QMakeBuildStep.QMakeArguments" type="QVariantList"/>
</valuemap>
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStep.1" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">false</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList"/>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepsCount" type="int">2</value>
<valuemap key="ProjectExplorer.BuildConfiguration.CleanStep.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Сборка</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.MakeStep</value>
<value key="Qt4ProjectManager.MakeStep.Clean" type="bool">true</value>
<valuelist key="Qt4ProjectManager.MakeStep.MakeArguments" type="QVariantList">
<value type="QString">clean</value>
</valuelist>
<value key="Qt4ProjectManager.MakeStep.MakeCommand" type="QString"></value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.CleanStepsCount" type="int">1</value>
<value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value> <value key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment" type="bool">false</value>
<valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/> <valuelist key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Релиз</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Релиз</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">2</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration" type="int">0</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">/home/peri4/pprojects/aliendefender</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory" type="QString">C:/Users/Andrey/Desktop/aliendefender-build-desktop</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">2</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId" type="int">9</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">0</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.ToolChain" type="int">2</value>
<value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value> <value key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild" type="bool">true</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">1</value> <value key="ProjectExplorer.Target.BuildConfigurationCount" type="int">2</value>
<valuemap key="ProjectExplorer.Target.DeployConfiguration.0" type="QVariantMap">
<valuemap key="ProjectExplorer.BuildConfiguration.BuildStepList.0" type="QVariantMap">
<value key="ProjectExplorer.BuildStepList.StepsCount" type="int">0</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">Deploy</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.BuildSteps.Deploy</value>
</valuemap>
<value key="ProjectExplorer.BuildConfiguration.BuildStepListCount" type="int">1</value>
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">No deployment</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap>
<value key="ProjectExplorer.Target.DeployConfigurationCount" type="int">1</value>
<valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap"> <valuemap key="ProjectExplorer.Target.RunConfiguration.0" type="QVariantMap">
<value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">aliendefender</value> <value key="ProjectExplorer.ProjectConfiguration.DisplayName" type="QString">aliendefender</value>
<value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value> <value key="ProjectExplorer.ProjectConfiguration.Id" type="QString">Qt4ProjectManager.Qt4RunConfiguration</value>
@@ -85,8 +96,8 @@
<value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal" type="bool">false</value>
<valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/> <valuelist key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges" type="QVariantList"/>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetName" type="bool">false</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">false</value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserSetWorkingDirectory" type="bool">true</value>
<value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString"></value> <value key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory" type="QString">C:\Users\Andrey\Desktop\aliendefender</value>
</valuemap> </valuemap>
<value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value> <value key="ProjectExplorer.Target.RunConfigurationCount" type="int">1</value>
</valuemap> </valuemap>
@@ -95,12 +106,8 @@
<variable>ProjectExplorer.Project.TargetCount</variable> <variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value> <value type="int">1</value>
</data> </data>
<data>
<variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
<value type="QString">{4d5b06df-4184-42d4-9dfd-5c7caaa07ab2}</value>
</data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
<value type="int">8</value> <value type="int">4</value>
</data> </data>
</qtcreator> </qtcreator>

View File

@@ -3,8 +3,8 @@
<aliens> <aliens>
<alien flying="true" speed="0.3" imageType="31" prise="15" id="2" score="12" name="Monstr" health="150"/> <alien flying="true" speed="0.3" imageType="31" prise="15" id="2" score="12" name="Monstr" health="150"/>
<alien flying="true" speed="0.15" imageType="-1078580008" prise="1" id="4" score="10" name="test" health="60"/> <alien flying="true" speed="0.15" imageType="-1078580008" prise="1" id="4" score="10" name="test" health="60"/>
<alien speed="0.6" imageType="1" prise="4" id="10" score="99" name="first" health="100"/> <alien speed="0.21" imageType="1" prise="4" id="10" score="99" name="first" health="100"/>
<alien regeneration="3" speed="0.5" imageType="1" prise="10" armor="1.5" id="12" score="99" name="MONSTR" health="99.99"/> <alien regeneration="3" speed="0.5" imageType="1" prise="10" armor="1.5" id="12" score="99" name="MONSTR" health="100"/>
</aliens> </aliens>
<maps> <maps>
<map width="16" imageType="1" height="16" id="1" data="AAAERHicY2BgEGAA4v///0hQgmFmAGlGcjCxZuCTHzUDuxkMDOr85JrBwKC0A8kMJlwYagYOeYgZ+NXgNwMtPEbNINIMIsynOO8DAG0r1Q0=" name="My Map" maxPlayers="2"/> <map width="16" imageType="1" height="16" id="1" data="AAAERHicY2BgEGAA4v///0hQgmFmAGlGcjCxZuCTHzUDuxkMDOr85JrBwKC0A8kMJlwYagYOeYgZ+NXgNwMtPEbNINIMIsynOO8DAG0r1Q0=" name="My Map" maxPlayers="2"/>
@@ -23,42 +23,42 @@
<wave prise="220" timeout="5" id="11"/> <wave prise="220" timeout="5" id="11"/>
</waves> </waves>
<levels> <levels>
<level map="1" id="1" score="152654352" name="First Level"/> <level map="1" id="1" score="265630088" name="First Level"/>
</levels> </levels>
<waveParts> <waveParts>
<wavePart alien="10" count="5" wave="1"/>
<wavePart alien="12" count="6" wave="1"/>
<wavePart alien="10" count="4" wave="1"/> <wavePart alien="10" count="4" wave="1"/>
<wavePart alien="12" count="6" wave="1"/>
<wavePart alien="10" count="5" wave="1"/>
<wavePart alien="10" count="9" wave="2"/> <wavePart alien="10" count="9" wave="2"/>
<wavePart alien="10" count="1" wave="3"/>
<wavePart alien="10" count="2" wave="3"/>
<wavePart alien="12" count="3" wave="3"/>
<wavePart alien="12" count="4" wave="3"/> <wavePart alien="12" count="4" wave="3"/>
<wavePart alien="12" count="3" wave="3"/>
<wavePart alien="10" count="2" wave="3"/>
<wavePart alien="10" count="1" wave="3"/>
<wavePart alien="2" count="20" wave="4"/> <wavePart alien="2" count="20" wave="4"/>
<wavePart alien="4" count="6" wave="5"/> <wavePart alien="4" count="6" wave="5"/>
<wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/> <wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/> <wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/> <wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/> <wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="12" count="1" wave="6"/> <wavePart alien="12" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/> <wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/> <wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/> <wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/> <wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/>
<wavePart alien="4" count="1" wave="6"/>
<wavePart alien="10" count="1" wave="6"/>
</waveParts> </waveParts>
<wavesOnLevels> <wavesOnLevels>
<waveOnLevel wave="1" level="1"/>
<waveOnLevel wave="2" level="1"/>
<waveOnLevel wave="3" level="1"/>
<waveOnLevel wave="4" level="1"/>
<waveOnLevel wave="5" level="1"/>
<waveOnLevel wave="6" level="1"/> <waveOnLevel wave="6" level="1"/>
<waveOnLevel wave="5" level="1"/>
<waveOnLevel wave="4" level="1"/>
<waveOnLevel wave="3" level="1"/>
<waveOnLevel wave="2" level="1"/>
<waveOnLevel wave="1" level="1"/>
</wavesOnLevels> </wavesOnLevels>
<splashes> <splashes>
<splash speed="0.2" imageType="1" lifetime="9999" id="1" name="rocket"/> <splash speed="0.2" imageType="1" lifetime="9999" id="1" name="rocket"/>
@@ -78,15 +78,15 @@
<trigger childAim="noAim" count="1" type="onTimer" id="4" name="smoke"/> <trigger childAim="noAim" count="1" type="onTimer" id="4" name="smoke"/>
</triggers> </triggers>
<chains> <chains>
<chain tower="1" trigger="3" child="4" parent="1"/>
<chain tower="1" trigger="4" child="5" parent="1"/> <chain tower="1" trigger="4" child="5" parent="1"/>
<chain tower="1" trigger="3" child="4" parent="1"/>
<chain tower="2" trigger="2" parent="3"/> <chain tower="2" trigger="2" parent="3"/>
<chain tower="3" trigger="3" child="4" parent="2"/>
<chain tower="3" trigger="4" child="5" parent="2"/> <chain tower="3" trigger="4" child="5" parent="2"/>
<chain tower="3" trigger="3" child="4" parent="2"/>
</chains> </chains>
<towersOnLevels> <towersOnLevels>
<towerOnLevel tower="1" level="1"/>
<towerOnLevel tower="2" level="1"/>
<towerOnLevel tower="3" level="1"/> <towerOnLevel tower="3" level="1"/>
<towerOnLevel tower="2" level="1"/>
<towerOnLevel tower="1" level="1"/>
</towersOnLevels> </towersOnLevels>
</ADdata> </ADdata>

View File

@@ -110,8 +110,8 @@
<xsd:complexType name="triggerType"> <xsd:complexType name="triggerType">
<xsd:attribute name="name" type="xsd:string" use="required"/> <xsd:attribute name="name" type="xsd:string" use="required"/>
<xsd:attribute name="id" type="xsd:positiveInteger" use="required"/> <xsd:attribute name="id" type="xsd:positiveInteger" use="required"/>
<xsd:attribute name="count" type="xsd:positiveInteger" use="optional"/> <xsd:attribute name="count" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute name="timer" type="xsd:positiveInteger" use="optional"/> <xsd:attribute name="timer" type="xsd:nonNegativeInteger" use="optional"/>
<xsd:attribute name="chance" type="xsd:positiveInteger" use="optional"/> <xsd:attribute name="chance" type="xsd:positiveInteger" use="optional"/>
<xsd:attribute name="randomPosRadius" type="xsd:float" use="optional"/> <xsd:attribute name="randomPosRadius" type="xsd:float" use="optional"/>
<xsd:attribute name="damage" type="xsd:float" use="optional"/> <xsd:attribute name="damage" type="xsd:float" use="optional"/>