mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
(sorry for making this all one commit)
Fiddled with the backbone for scripts some more. VCS are now suppported in sets but configuration/non-svn-systems missing Linux build now uses precompiled headers (build time--) A couple warning fixes too. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1427 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
+5
-1
@@ -29,11 +29,13 @@ DECLARE_TYPEOF_NO_REV(IndexMap<FieldP COMMA ValueP>);
|
||||
|
||||
Set::Set()
|
||||
: script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
{}
|
||||
|
||||
Set::Set(const GameP& game)
|
||||
: game(game)
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
{
|
||||
data.init(game->set_fields);
|
||||
}
|
||||
@@ -42,6 +44,7 @@ Set::Set(const StyleSheetP& stylesheet)
|
||||
: game(stylesheet->game)
|
||||
, stylesheet(stylesheet)
|
||||
, script_manager(new SetScriptManager(*this))
|
||||
, vcs (new_intrusive<VCS>())
|
||||
{
|
||||
data.init(game->set_fields);
|
||||
}
|
||||
@@ -186,6 +189,7 @@ IMPLEMENT_REFLECTION(Set) {
|
||||
REFLECT(pack_types);
|
||||
}
|
||||
reflect_set_info_get_member(tag,data);
|
||||
REFLECT_NO_SCRIPT_N("version control", vcs);
|
||||
REFLECT(apprentice_code);
|
||||
}
|
||||
|
||||
@@ -206,7 +210,7 @@ void Set::reflect_cards<Writer> (Writer& tag) {
|
||||
int i = 0;
|
||||
|
||||
while (used.find(full_name) != used.end()) {
|
||||
full_name = filename << _(".") << ++i;
|
||||
full_name = String(filename) << _(".") << ++i;
|
||||
}
|
||||
used.insert(full_name);
|
||||
|
||||
|
||||
@@ -61,6 +61,7 @@ class Set : public Packaged {
|
||||
|
||||
ActionStack actions; ///< Actions performed on this set and the cards in it
|
||||
KeywordDatabase keyword_db; ///< Database for matching keywords, must be cleared when keywords change
|
||||
VCSP vcs; ///< The version control system to use
|
||||
|
||||
/// A context for performing scripts
|
||||
/** Should only be used from the main thread! */
|
||||
@@ -119,6 +120,11 @@ class Set : public Packaged {
|
||||
Version fileVersion() const;
|
||||
/// Validate that the set is correctly loaded
|
||||
virtual void validate(Version = app_version);
|
||||
|
||||
protected:
|
||||
virtual VCSP getVCS() {
|
||||
return vcs;
|
||||
}
|
||||
|
||||
private:
|
||||
DECLARE_REFLECTION();
|
||||
|
||||
Reference in New Issue
Block a user