mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-21 08:23:53 +00:00
Reduce difference with the master branch where possible.
This commit is contained in:
parent
6d6ff8c6a4
commit
727b68dd15
13 changed files with 75 additions and 13 deletions
|
@ -19,7 +19,7 @@ opencs_hdrs_noqt (model/doc
|
|||
|
||||
opencs_units (model/world
|
||||
idtable idtableproxymodel regionmap data commanddispatcher
|
||||
idtablebase resourcetable nestedtablemodel
|
||||
idtablebase resourcetable nestedtablemodel
|
||||
)
|
||||
|
||||
|
||||
|
@ -41,6 +41,7 @@ opencs_units (model/tools
|
|||
opencs_units_noqt (model/tools
|
||||
mandatoryid skillcheck classcheck factioncheck racecheck soundcheck regioncheck
|
||||
birthsigncheck spellcheck referencecheck referenceablecheck scriptcheck bodypartcheck
|
||||
startscriptcheck
|
||||
)
|
||||
|
||||
|
||||
|
@ -64,7 +65,7 @@ opencs_units (view/world
|
|||
cellcreator referenceablecreator referencecreator scenesubview
|
||||
infocreator scriptedit dialoguesubview previewsubview regionmap dragrecordtable nestedtable
|
||||
)
|
||||
|
||||
|
||||
opencs_units_noqt (view/world
|
||||
subviews enumdelegate vartypedelegate recordstatusdelegate idtypedelegate datadisplaydelegate
|
||||
scripthighlighter idvalidator dialoguecreator physicssystem
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
#include <cassert>
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
|
||||
#include <boost/filesystem.hpp>
|
||||
|
||||
|
@ -2243,7 +2242,7 @@ void CSMDoc::Document::createBase()
|
|||
record.blank();
|
||||
|
||||
getData().getMagicEffects().add (record);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
||||
|
@ -2265,7 +2264,7 @@ CSMDoc::Document::Document (const Files::ConfigurationManager& configuration,
|
|||
{
|
||||
boost::filesystem::path customFiltersPath (configuration.getUserDataPath());
|
||||
customFiltersPath /= "defaultfilters";
|
||||
|
||||
|
||||
std::ofstream destination (mProjectPath.string().c_str(), std::ios::binary);
|
||||
|
||||
if (boost::filesystem::exists (customFiltersPath))
|
||||
|
|
31
apps/opencs/model/tools/startscriptcheck.cpp
Normal file
31
apps/opencs/model/tools/startscriptcheck.cpp
Normal file
|
@ -0,0 +1,31 @@
|
|||
|
||||
#include "startscriptcheck.hpp"
|
||||
|
||||
#include <components/misc/stringops.hpp>
|
||||
|
||||
CSMTools::StartScriptCheckStage::StartScriptCheckStage (
|
||||
const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
||||
const CSMWorld::IdCollection<ESM::Script>& scripts)
|
||||
: mStartScripts (startScripts), mScripts (scripts)
|
||||
{}
|
||||
|
||||
void CSMTools::StartScriptCheckStage::perform(int stage, CSMDoc::Messages& messages)
|
||||
{
|
||||
const CSMWorld::Record<ESM::StartScript>& record = mStartScripts.getRecord (stage);
|
||||
|
||||
if (record.isDeleted())
|
||||
return;
|
||||
|
||||
std::string scriptId = record.get().mId;
|
||||
|
||||
CSMWorld::UniversalId id (CSMWorld::UniversalId::Type_StartScript, scriptId);
|
||||
|
||||
if (mScripts.searchId (Misc::StringUtils::lowerCase (scriptId))==-1)
|
||||
messages.push_back (
|
||||
std::make_pair (id, "Start script " + scriptId + " does not exist"));
|
||||
}
|
||||
|
||||
int CSMTools::StartScriptCheckStage::setup()
|
||||
{
|
||||
return mStartScripts.getSize();
|
||||
}
|
28
apps/opencs/model/tools/startscriptcheck.hpp
Normal file
28
apps/opencs/model/tools/startscriptcheck.hpp
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef CSM_TOOLS_STARTSCRIPTCHECK_H
|
||||
#define CSM_TOOLS_STARTSCRIPTCHECK_H
|
||||
|
||||
#include <components/esm/loadsscr.hpp>
|
||||
#include <components/esm/loadscpt.hpp>
|
||||
|
||||
#include "../doc/stage.hpp"
|
||||
|
||||
#include "../world/idcollection.hpp"
|
||||
|
||||
namespace CSMTools
|
||||
{
|
||||
class StartScriptCheckStage : public CSMDoc::Stage
|
||||
{
|
||||
const CSMWorld::IdCollection<ESM::StartScript>& mStartScripts;
|
||||
const CSMWorld::IdCollection<ESM::Script>& mScripts;
|
||||
|
||||
public:
|
||||
|
||||
StartScriptCheckStage (const CSMWorld::IdCollection<ESM::StartScript>& startScripts,
|
||||
const CSMWorld::IdCollection<ESM::Script>& scripts);
|
||||
|
||||
virtual void perform(int stage, CSMDoc::Messages& messages);
|
||||
virtual int setup();
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
|
@ -24,6 +24,7 @@
|
|||
#include "scriptcheck.hpp"
|
||||
#include "bodypartcheck.hpp"
|
||||
#include "referencecheck.hpp"
|
||||
#include "startscriptcheck.hpp"
|
||||
|
||||
CSMDoc::Operation *CSMTools::Tools::get (int type)
|
||||
{
|
||||
|
@ -84,6 +85,8 @@ CSMDoc::Operation *CSMTools::Tools::getVerifier()
|
|||
|
||||
mVerifier->appendStage (new ScriptCheckStage (mDocument));
|
||||
|
||||
mVerifier->appendStage (new StartScriptCheckStage (mData.getStartScripts(), mData.getScripts()));
|
||||
|
||||
mVerifier->appendStage(
|
||||
new BodyPartCheckStage(
|
||||
mData.getBodyParts(),
|
||||
|
|
|
@ -2,13 +2,11 @@
|
|||
#define CSM_WOLRD_COLLECTION_H
|
||||
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <cctype>
|
||||
#include <stdexcept>
|
||||
#include <functional>
|
||||
#include <cassert>
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
|
@ -94,7 +92,7 @@ namespace CSMWorld
|
|||
virtual void purge();
|
||||
///< Remove records that are flagged as erased.
|
||||
|
||||
virtual void removeRows (int index, int count);
|
||||
virtual void removeRows (int index, int count) ;
|
||||
|
||||
virtual void appendBlankRecord (const std::string& id,
|
||||
UniversalId::Type type = UniversalId::Type_None);
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
#include "collectionbase.hpp"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <cassert>
|
||||
|
||||
#include "columnbase.hpp"
|
||||
|
||||
|
@ -29,4 +28,4 @@ int CSMWorld::CollectionBase::findColumnIndex (Columns::ColumnId id) const
|
|||
throw std::logic_error ("invalid column index");
|
||||
|
||||
return index;
|
||||
}
|
||||
}
|
|
@ -6,7 +6,6 @@
|
|||
#include <stdexcept>
|
||||
|
||||
#include <boost/lexical_cast.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include <QColor>
|
||||
|
||||
|
|
|
@ -46,6 +46,7 @@ QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent,
|
|||
const QModelIndex& index) const
|
||||
{
|
||||
return createEditor(parent, option, index, CSMWorld::ColumnBase::Display_None);
|
||||
//overloading virtual functions is HARD
|
||||
}
|
||||
|
||||
QWidget *CSVWorld::EnumDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem& option,
|
||||
|
|
|
@ -186,7 +186,7 @@ QWidget *CSVWorld::CommandDelegate::createEditor (QWidget *parent, const QStyleO
|
|||
}
|
||||
|
||||
case CSMWorld::ColumnBase::Display_Boolean:
|
||||
|
||||
|
||||
return new QCheckBox(parent);
|
||||
|
||||
case CSMWorld::ColumnBase::Display_String:
|
||||
|
|
|
@ -185,7 +185,7 @@ namespace MWMechanics
|
|||
bool missing = true;
|
||||
for (std::vector<ActiveEffect>::const_iterator iter(addTo.begin()); iter != addTo.end(); ++iter)
|
||||
{
|
||||
if (effect->mEffectId == iter->mEffectId)
|
||||
if ((effect->mEffectId == iter->mEffectId) && (effect->mArg == iter->mArg))
|
||||
{
|
||||
missing = false;
|
||||
break;
|
||||
|
|
|
@ -316,6 +316,7 @@ namespace MWScript
|
|||
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
||||
if(!cell)
|
||||
{
|
||||
runtime.getContext().report ("unknown cell (" + cellID + ")");
|
||||
std::cerr << "unknown cell (" << cellID << ")\n";
|
||||
}
|
||||
}
|
||||
|
@ -428,6 +429,7 @@ namespace MWScript
|
|||
store = MWBase::Environment::get().getWorld()->getExterior(cx,cy);
|
||||
if(!cell)
|
||||
{
|
||||
runtime.getContext().report ("unknown cell (" + cellID + ")");
|
||||
std::cerr << "unknown cell (" << cellID << ")\n";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,6 +183,7 @@ void ContentSelectorView::ContentSelector::setGameFileSelected(int index, bool s
|
|||
|
||||
void ContentSelectorView::ContentSelector::slotAddonTableItemActivated(const QModelIndex &index)
|
||||
{
|
||||
// toggles check state when an AddOn file is double clicked or activated by keyboard
|
||||
QModelIndex sourceIndex = mAddonProxyModel->mapToSource (index);
|
||||
|
||||
if (!mContentModel->isEnabled (sourceIndex))
|
||||
|
|
Loading…
Reference in a new issue