private static void ExtractVanillaItems(SweetBridgeDog bridge) { AnankeContext.Current.ItemsRegistry.Reset(); IEnumerable <Tuple <string, int> > pairs = bridge.CollectBuiltinItemTypes(); var enumerable = pairs as Tuple <string, int>[] ?? pairs.ToArray(); IEnumerable <Tuple <int, Type> > typeProbe = bridge.ProbeTypesOfCreatedObjects(enumerable.Select(p => p.Item2)); foreach (var pair in enumerable) { var assoc = typeProbe.FirstOrDefault(p => p.Item1 == pair.Item2); Type type = null; if (assoc != null) { type = assoc.Item2; } ItemActivator activator; if (type == null) { activator = new ItemActivator(() => null); } else { activator = new ItemActivator( () => (InventoryItem)Activator.CreateInstance(type) ); } var definition = new VanillaItemDefinition(pair.Item2, pair.Item1, activator); AnankeContext.Current.ItemsRegistry.Add(definition); } }
// -------------------------------------------------- void Start() { itemActivatorObject = GameObject.Find("ItemActivatorObject"); activationScript = itemActivatorObject.GetComponent <ItemActivator>(); StartCoroutine("AddToList"); }
public override void Activate(PipelineComponent target) { var ui = new ArgumentCollectionUI(); ui.Setup(ItemActivator, target, target.GetClassAsSystemType(), ItemActivator.RepositoryLocator.CatalogueRepository); ItemActivator.ShowWindow(ui, true); }
public void Test_DeletePinnedObject_PinClears() { var ti = WhenIHaveA <TableInfo>(); var collection = AndLaunch <TableInfoCollectionUI>(); //nothing selected to start with Assert.IsNull(collection.CommonTreeFunctionality.Tree.SelectedObject); //emphasise and pin it (like Ctrl+F to object) ItemActivator.RequestItemEmphasis(this, new EmphasiseRequest(ti) { Pin = true }); //the TableInfo should now be selected Assert.AreEqual(ti, collection.CommonTreeFunctionality.Tree.SelectedObject); //and pinned Assert.AreEqual(ti, collection.CommonTreeFunctionality.CurrentlyPinned); //delete the object ItemActivator.DeleteWithConfirmation(ti); //selection should now be cleared Assert.IsNull(collection.CommonTreeFunctionality.Tree.SelectedObject); //as should the pin Assert.IsNull(collection.CommonTreeFunctionality.CurrentlyPinned); }
public override void Activate(ExtractionConfiguration target) { if (!target.IsReleased) { ItemActivator.Activate <ExecuteExtractionUI, ExtractionConfiguration>(target); } }
// Start is called before the first frame update void Start() { itemActivatorObject = GameObject.Find("WorldGenerator"); activationScript = itemActivatorObject.GetComponent <ItemActivator>(); item = new ActivatorItem { item = this.gameObject, itemPos = transform.position }; StartCoroutine("AddToList"); }
public override void Activate(PermissionWindowUsedByCacheProgressNode target) { if (target.DirectionIsCacheToPermissionWindow) { ItemActivator.Activate <PermissionWindowUI, PermissionWindow>(target.PermissionWindow); } else { ItemActivator.Activate <CacheProgressUI, CacheProgress>(target.CacheProgress); } }
private void Awake() { //enforce singleton if (Instance == null) { Instance = this; } else if (Instance != this) { Destroy(gameObject); } }
public override void Activate(ProcessTask processTask) { if (processTask.IsPluginType()) { ItemActivator.Activate <PluginProcessTaskUI, ProcessTask>(processTask); } if (processTask.ProcessTaskType == ProcessTaskType.Executable) { ItemActivator.Activate <ExeProcessTaskUI, ProcessTask>(processTask); } if (processTask.ProcessTaskType == ProcessTaskType.SQLFile) { ItemActivator.Activate <SqlProcessTaskUI, ProcessTask>(processTask); } }
void Start() { itemActivatorObj = GameObject.FindGameObjectWithTag("Player"); activationScript = itemActivatorObj.GetComponent <ItemActivator>(); StartCoroutine("addToList"); }
public override void Activate(ConnectionStringKeyword target) { ItemActivator.Activate <ConnectionStringKeywordUI, ConnectionStringKeyword>(target); }
public override void Activate(ConcreteFilter target) { ItemActivator.Activate <ExtractionFilterUI, ConcreteFilter>(target); }
public override void Activate(Catalogue c) { ItemActivator.Activate <CatalogueUI, Catalogue>(c); }
public override void Activate(TableInfo target) { ItemActivator.Activate <TableInfoUI, TableInfo>(target); }
public override void Activate(AggregateConfiguration target) { ItemActivator.Activate <AggregateEditorUI, AggregateConfiguration>(target); }
public override void Activate(RemoteRDMP target) { ItemActivator.Activate <RemoteRDMPUI, RemoteRDMP>(target); }
public override void Activate(Lookup target) { ItemActivator.Activate <LookupUI, Lookup>(target); }
public override void Activate(PreLoadDiscardedColumn target) { ItemActivator.Activate <PreLoadDiscardedColumnUI, PreLoadDiscardedColumn>(target); }
public override void Activate(CohortIdentificationConfiguration target) { ItemActivator.Activate <CohortIdentificationConfigurationUI, CohortIdentificationConfiguration>(target); }
public override void Activate(CacheProgress target) { ItemActivator.Activate <ExecuteCacheProgressUI, CacheProgress>(target); }
public VanillaItemDefinition(long id, string mnemonic, ItemActivator activator) : base(id, mnemonic, activator) { }
public override void Activate(GovernancePeriod target) { ItemActivator.Activate <GovernancePeriodUI, GovernancePeriod>(target); }
public override void Activate(GovernanceDocument target) { ItemActivator.Activate <GovernanceDocumentUI, GovernanceDocument>(target); }
public override void Activate(PermissionWindow target) { ItemActivator.Activate <PermissionWindowUI, PermissionWindow>(target); }
public override void Activate(Project target) { ItemActivator.Activate <ProjectUI.ProjectUI, Project>(target); }
public override void Activate(SelectedDataSets target) { ItemActivator.Activate <ConfigureDatasetUI, SelectedDataSets>(target); }
public override void Activate(ANOTable target) { ItemActivator.Activate <ANOTableUI, ANOTable>(target); }
public override void Activate(DashboardLayout target) { ItemActivator.Activate <DashboardLayoutUI, DashboardLayout>(target); }
public override void Activate(DataAccessCredentialUsageNode target) { ItemActivator.Activate <DataAccessCredentialsUI, DataAccessCredentials>(target.Credentials); }
public override void Activate(ExternalDatabaseServer target) { ItemActivator.Activate <ExternalDatabaseServerUI, ExternalDatabaseServer>(target); }