forked from mirror/openmw-tes3mp
allow project scope scripts
This commit is contained in:
parent
89000f6196
commit
bf6150d009
3 changed files with 14 additions and 3 deletions
|
@ -23,6 +23,9 @@ CSMDoc::Saving::Saving (Document& document, const boost::filesystem::path& proje
|
|||
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::DebugProfile> > (
|
||||
mDocument.getData().getDebugProfiles(), mState, CSMWorld::Scope_Project));
|
||||
|
||||
appendStage (new WriteCollectionStage<CSMWorld::IdCollection<ESM::Script> > (
|
||||
mDocument.getData().getScripts(), mState, CSMWorld::Scope_Project));
|
||||
|
||||
appendStage (new CloseSaveStage (mState));
|
||||
|
||||
// save content file
|
||||
|
|
|
@ -33,7 +33,6 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
|||
CSMWorld::UniversalId::Type_Factions,
|
||||
CSMWorld::UniversalId::Type_Races,
|
||||
CSMWorld::UniversalId::Type_Sounds,
|
||||
CSMWorld::UniversalId::Type_Scripts,
|
||||
CSMWorld::UniversalId::Type_Regions,
|
||||
CSMWorld::UniversalId::Type_Birthsigns,
|
||||
CSMWorld::UniversalId::Type_Spells,
|
||||
|
@ -89,6 +88,9 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
|||
// Other stuff (combined record tables)
|
||||
manager.add (CSMWorld::UniversalId::Type_RegionMap, new CSVDoc::SubViewFactory<RegionMapSubView>);
|
||||
|
||||
manager.add (CSMWorld::UniversalId::Type_Scene, new CSVDoc::SubViewFactory<SceneSubView>);
|
||||
|
||||
// More other stuff
|
||||
manager.add (CSMWorld::UniversalId::Type_Filters,
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView,
|
||||
CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> >);
|
||||
|
@ -97,7 +99,9 @@ void CSVWorld::addSubViewFactories (CSVDoc::SubViewFactoryManager& manager)
|
|||
new CSVDoc::SubViewFactoryWithCreator<TableSubView,
|
||||
CreatorFactory<GenericCreator, CSMWorld::Scope_Project | CSMWorld::Scope_Session> >);
|
||||
|
||||
manager.add (CSMWorld::UniversalId::Type_Scene, new CSVDoc::SubViewFactory<SceneSubView>);
|
||||
manager.add (CSMWorld::UniversalId::Type_Scripts,
|
||||
new CSVDoc::SubViewFactoryWithCreator<TableSubView, CreatorFactory<GenericCreator,
|
||||
CSMWorld::Scope_Project | CSMWorld::Scope_Content> >);
|
||||
|
||||
// Dialogue subviews
|
||||
static const CSMWorld::UniversalId::Type sTableTypes2[] =
|
||||
|
|
|
@ -110,7 +110,11 @@ void Script::save(ESMWriter &esm) const
|
|||
|
||||
mVarNames.clear();
|
||||
mScriptData.clear();
|
||||
mScriptText = "Begin " + mId + "\n\nEnd " + mId + "\n";
|
||||
|
||||
if (mId.find ("::")!=std::string::npos)
|
||||
mScriptText = "Begin \"" + mId + "\"\n\nEnd " + mId + "\n";
|
||||
else
|
||||
mScriptText = "Begin " + mId + "\n\nEnd " + mId + "\n";
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue