ActionTypes.cs (2614B)
1 // 2 // Copyright 2020 Electronic Arts Inc. 3 // 4 // The Command & Conquer Map Editor and corresponding source code is free 5 // software: you can redistribute it and/or modify it under the terms of 6 // the GNU General Public License as published by the Free Software Foundation, 7 // either version 3 of the License, or (at your option) any later version. 8 9 // The Command & Conquer Map Editor and corresponding source code is distributed 10 // in the hope that it will be useful, but with permitted additional restrictions 11 // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT 12 // distributed with this program. You should have received a copy of the 13 // GNU General Public License along with permitted additional restrictions 14 // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection 15 using System.Collections.Generic; 16 using System.Linq; 17 using System.Reflection; 18 19 namespace MobiusEditor.TiberianDawn 20 { 21 public static class ActionTypes 22 { 23 public const string ACTION_NONE = "None"; 24 public const string ACTION_WIN = "Win"; 25 public const string ACTION_LOSE = "Lose"; 26 public const string ACTION_BEGIN_PRODUCTION = "Production"; 27 public const string ACTION_CREATE_TEAM = "Create Team"; 28 public const string ACTION_DESTROY_TEAM = "Dstry Teams"; 29 public const string ACTION_ALL_HUNT = "All to Hunt"; 30 public const string ACTION_REINFORCEMENTS = "Reinforce."; 31 public const string ACTION_DZ = "DZ at 'Z'"; 32 public const string ACTION_AIRSTRIKE = "Airstrike"; 33 public const string ACTION_NUKE = "Nuclear Missile"; 34 public const string ACTION_ION = "Ion Cannon"; 35 public const string ACTION_DESTROY_XXXX = "Dstry Trig 'XXXX'"; 36 public const string ACTION_DESTROY_YYYY = "Dstry Trig 'YYYY'"; 37 public const string ACTION_DESTROY_ZZZZ = "Dstry Trig 'ZZZZ'"; 38 public const string ACTION_AUTOCREATE = "Autocreate"; 39 public const string ACTION_WINLOSE = "Cap=Win/Des=Lose"; 40 public const string ACTION_ALLOWWIN = "Allow Win"; 41 42 private static readonly string[] Types; 43 44 static ActionTypes() 45 { 46 Types = 47 (from field in typeof(ActionTypes).GetFields(BindingFlags.Static | BindingFlags.Public) 48 where field.IsLiteral && !field.IsInitOnly && typeof(string).IsAssignableFrom(field.FieldType) 49 select field.GetValue(null) as string).ToArray(); 50 } 51 52 public static IEnumerable<string> GetTypes() 53 { 54 return Types; 55 } 56 } 57 }