コード例 #1
0
        public int?GetOrder(ToggleableModProxy mod)
        {
            var name = mod.GetSerializationString().ToLower();

            return(Orders.ContainsKey(name)
                ? (int?)Orders[name]
                : null);
        }
コード例 #2
0
        void MakeRequired(ToggleableModProxy mod)
        {
            var serializationString = mod.GetSerializationString();

            RequiredMods.AddWhenMissing(serializationString);
            OptionalMods.RemoveLocked(serializationString);
            mod.IsRequired = true;
        }
コード例 #3
0
        public Dependency GetDesiredModVersion(ToggleableModProxy mod)
        {
            var name = mod.GetSerializationString().ToLower();

            return(Versions.ContainsKey(name)
                ? new Dependency(name, Versions[name])
                : new GlobalDependency(name));
        }
コード例 #4
0
 public void SetRequired(ToggleableModProxy toggleableModProxy, bool b)
 {
     if (b)
     {
         MakeRequired(toggleableModProxy);
     }
     else
     {
         MakeUnrequired(toggleableModProxy);
     }
 }
コード例 #5
0
 static CollectionVersionDependencyModel Convert(ToggleableModProxy x) => new CollectionVersionDependencyModel
 {
     Dependency = x.Name,
     Constraint = x.GetDesiredOrGlobal(),
     IsRequired = x.IsRequired
 };