• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

FreeTrainの進化系を目指す


Commit MetaInfo

Revision36 (tree)
Time2015-06-14 17:30:37
Authorc477

Log Message

細かな不具合修正

Change Summary

Incremental Difference

--- trunk/core/core/controller/BuildTool.cs (nonexistent)
+++ trunk/core/core/controller/BuildTool.cs (revision 36)
@@ -0,0 +1,13 @@
1+using nft.contributions.game;
2+using System;
3+using System.Collections.Generic;
4+using System.Diagnostics;
5+using System.Text;
6+
7+namespace nft.core.controller {
8+ public class BuildTool {
9+ public BuildTool(CtbGameTool contrib) {
10+ Debug.WriteLine("I'm here!");
11+ }
12+ }
13+}
--- trunk/framework/framework/plugin/PluginManager.cs (revision 35)
+++ trunk/framework/framework/plugin/PluginManager.cs (revision 36)
@@ -662,27 +662,21 @@
662662
663663 internal class ContributionEnumerator<T> : IEnumerable<T> where T : Contribution
664664 {
665- readonly Type type;
665+ readonly Type enumtype;
666666 readonly bool hideDisabled;
667667
668668 public ContributionEnumerator() : this(true) { }
669669
670670 public ContributionEnumerator(bool hideDisable) {
671- this.type = this.type.GetGenericArguments()[0];
671+ this.enumtype = this.GetType().GetGenericArguments()[0];
672672 this.hideDisabled = hideDisable;
673673 }
674674
675675 public IEnumerator<T> GetEnumerator() {
676- if (type == null) {
677- foreach (T c in PluginManager.theInstance.contributionMap.Values)
676+ foreach (Contribution c in PluginManager.theInstance.contributionMap.Values) {
677+ if (enumtype.IsInstanceOfType(c)) {
678678 if (!hideDisabled || c.IsAttached)
679- yield return c;
680- } else {
681- foreach (T c in PluginManager.theInstance.contributionMap.Values) {
682- if (type.IsInstanceOfType(c)) {
683- if (!hideDisabled || c.IsAttached)
684- yield return c;
685- }
679+ yield return (T)c;
686680 }
687681 }
688682 }
--- trunk/framework/ui/command/CommandManager.cs (revision 35)
+++ trunk/framework/ui/command/CommandManager.cs (revision 36)
@@ -50,8 +50,11 @@
5050
5151 public void RegisterCommand(string name, IHasNameAndID owner, CommandUI cui) {
5252 string key = MakePath(owner, name);
53+ if (commands.ContainsKey(key)) {
54+ Debug.WriteLine("command key="+key+" will be overwritten.");
55+ }
5356 try {
54- commands.Add(key, cui);
57+ commands[key] = cui;
5558 } catch (Exception e) {
5659 Debug.WriteLine(cui);
5760 }
--- trunk/framework/util/ContribListControlHelper.cs (revision 35)
+++ trunk/framework/util/ContribListControlHelper.cs (revision 36)
@@ -94,7 +94,7 @@
9494
9595 public int Set(ComboBox combo, bool hideDisabled, IListContribFilter filter) {
9696 int n = 0;
97- foreach (T c in GetArray(hideDisabled))
97+ foreach (T c in GetEnumerable(hideDisabled))
9898 if (filter.IsValid(c)) {
9999 combo.Items.Add(new AbstractItem(c));
100100 n++;
@@ -140,7 +140,7 @@
140140 }
141141 }
142142
143- private IEnumerable<T> GetArray(bool hideDisabled) {
143+ private IEnumerable<T> GetEnumerable(bool hideDisabled) {
144144 PluginManager pm = PluginManager.theInstance;
145145 return pm.EnumContributions<T>(hideDisabled);
146146 }