コード例 #1
0
    public void mod(IModable modable)
    {
        if (modable.GetType() != GetType())
        {
            Debug.LogError($"Type mismatch in mod(): {modable.GetType()} != {GetType()}");
            return;
        }

        ModableObjectSortedDictionary <V> modData = (ModableObjectSortedDictionary <V>)modable;

        foreach (KeyValuePair <string, V> entry in modData)
        {
            if (!ContainsKey(entry.Key))
            {
                this[entry.Key] = Modable.copyDeep(entry.Value);
                continue;
            }

            this[entry.Key] = Modable.mod(this[entry.Key], entry.Value);
        }
    }
コード例 #2
0
ファイル: CommandSet.cs プロジェクト: GermanWithSherman/BER2
 private void mod(CommandSet original, CommandSet mod)
 {
     Values            = Modable.mod(original.Values, mod.Values);
     ValuesFromLists   = Modable.mod(original.ValuesFromLists, mod.ValuesFromLists);
     ValuesFromSetters = Modable.mod(original.ValuesFromSetters, mod.ValuesFromSetters);
 }