mirror of
https://github.com/OMGeeky/andors-trail.git
synced 2025-12-30 16:33:33 +01:00
52 lines
1.1 KiB
JavaScript
52 lines
1.1 KiB
JavaScript
var ATEditor = (function(ATEditor, DataStore, FieldList, _) {
|
|
|
|
var model = {
|
|
actorConditions: new DataStore({
|
|
name: 'Actor Conditions'
|
|
,id: 'actorcondition'
|
|
,iconIDField: 'iconID'
|
|
})
|
|
,quests: new DataStore({
|
|
name: 'Quests'
|
|
,id: 'quest'
|
|
})
|
|
,items: new DataStore({
|
|
name: 'Items'
|
|
,id: 'item'
|
|
,iconIDField: 'iconID'
|
|
})
|
|
,droplists: new DataStore({
|
|
name: 'Droplists'
|
|
,id: 'droplist'
|
|
,nameField: 'id'
|
|
})
|
|
,dialogue: new DataStore({
|
|
name: 'Dialogue'
|
|
,id: 'dialogue'
|
|
,nameField: 'id'
|
|
})
|
|
,monsters: new DataStore({
|
|
name: 'Monsters'
|
|
,id: 'monster'
|
|
,iconIDField: 'iconID'
|
|
})
|
|
,itemCategories: new DataStore({
|
|
name: 'Item Categories'
|
|
,id: 'itemcategory'
|
|
})
|
|
};
|
|
|
|
var sections = [];
|
|
var sectionIds = {};
|
|
for (var key in model) {
|
|
var ds = model[key];
|
|
sections.push(ds);
|
|
sectionIds[ds.id] = ds;
|
|
}
|
|
model.sections = sections;
|
|
model.getSectionFromID = function(id) { return sectionIds[id]; };
|
|
|
|
ATEditor.model = ATEditor.model || model;
|
|
return ATEditor;
|
|
})(ATEditor, ATEditor.DataStore, ATEditor.FieldList, _);
|