EventTypes.cs (2556B)
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 EventTypes 22 { 23 public const string EVENT_NONE = "None"; 24 public const string EVENT_PLAYER_ENTERED = "Player Enters"; 25 public const string EVENT_DISCOVERED = "Discovered"; 26 public const string EVENT_ATTACKED = "Attacked"; 27 public const string EVENT_DESTROYED = "Destroyed"; 28 public const string EVENT_ANY = "Any"; 29 public const string EVENT_HOUSE_DISCOVERED = "House Discov."; 30 public const string EVENT_UNITS_DESTROYED = "Units Destr."; 31 public const string EVENT_BUILDINGS_DESTROYED = "Bldgs Destr."; 32 public const string EVENT_ALL_DESTROYED = "All Destr."; 33 public const string EVENT_CREDITS = "Credits"; 34 public const string EVENT_TIME = "Time"; 35 public const string EVENT_NBUILDINGS_DESTROYED = "# Bldgs Dstr."; 36 public const string EVENT_NUNITS_DESTROYED = "# Units Dstr."; 37 public const string EVENT_NOFACTORIES = "No Factories"; 38 public const string EVENT_EVAC_CIVILIAN = "Civ. Evac."; 39 public const string EVENT_BUILD = "Built It"; 40 41 private static readonly string[] Types; 42 43 static EventTypes() 44 { 45 Types = 46 (from field in typeof(EventTypes).GetFields(BindingFlags.Static | BindingFlags.Public) 47 where field.IsLiteral && !field.IsInitOnly && typeof(string).IsAssignableFrom(field.FieldType) 48 select field.GetValue(null) as string).ToArray(); 49 } 50 51 public static IEnumerable<string> GetTypes() 52 { 53 return Types; 54 } 55 } 56 }