コード例 #1
0
ファイル: ItemCapability.cs プロジェクト: Gartley/ss13remake
 public void AddVerb(int priority, ItemCapabilityVerb verb)
 {
     if (verbs.ContainsKey(priority))
         //Shuffle the list to insert the specified verb and move the one in that spot down.
     {
         ItemCapabilityVerb tverb = verbs[priority];
         RemoveVerb(priority);
         AddVerb(priority, verb);
         AddVerb(priority + 1, tverb);
     }
     else
         verbs.Add(priority, verb);
 }
コード例 #2
0
 public void AddVerb(int priority, ItemCapabilityVerb verb)
 {
     if (verbs.ContainsKey(priority))
     //Shuffle the list to insert the specified verb and move the one in that spot down.
     {
         ItemCapabilityVerb tverb = verbs[priority];
         RemoveVerb(priority);
         AddVerb(priority, verb);
         AddVerb(priority + 1, tverb);
     }
     else
         verbs.Add(priority, verb);
 }