public ModuleSpecification UnregisterModule( CommandEvaluationContext context, string moduleName) { var moduleSpecification = GetModule(context, moduleName); if (moduleSpecification == null) { return(null); } var r = ModuleCommandManager.UnregisterModuleCommands(context, moduleName); _modules.Remove(moduleSpecification.Key); return(r); }
public void Collapse(Module module) { if (this.Collapsed) { Debug.LogWarning("Trying to collapse already collapsed slot."); return; } this.mapGenerator.History.Push(new HistoryItem()); this.Module = module; var toRemove = new ModuleSet(this.Modules); toRemove.Remove(module); this.RemoveModules(toRemove); this.mapGenerator.MarkSlotComplete(this); }