示例#1
0
        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);
        }
示例#2
0
    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);
    }