public MyDefinitionId(Sandbox.Common.ObjectBuilders.MyObjectBuilderType type) { TypeId = type; SubtypeName = (string)null; }
public MyDefinitionId(Sandbox.Common.ObjectBuilders.MyObjectBuilderType type, string subtypeName) { TypeId = type; SubtypeName = subtypeName; }
public override bool CanStack(MyObjectBuilderType typeId, VRage.Library.Utils.MyStringId subtypeId, MyItemFlags flags) { return(false); }
public static string ToString(Sandbox.Common.ObjectBuilders.MyObjectBuilderType typeId) { return(typeId.ToString().Split('_')[1]); }
public override bool CanStack(MyObjectBuilderType type, MyStringHash subtypeId, MyItemFlags flags) { return(false); // weapons shouldn't stack }
public bool Equals(MyObjectBuilderType type) { return(type.m_type == this.m_type); }
internal static void RegisterLegacyName(MyObjectBuilderType type, string legacyName) { m_typeByLegacyName.Add(legacyName, type); }
public static bool TryParse(string value, out MyObjectBuilderType result) { return(m_typeByName.TryGetValue(value, out result)); }
public static MyObjectBuilder_CubeBlock Upgrade(MyObjectBuilder_CubeBlock cubeBlock, MyObjectBuilderType newType, string newSubType) { var upgraded = MyObjectBuilderSerializer.CreateNewObject(newType, newSubType) as MyObjectBuilder_CubeBlock; if (upgraded == null) { Debug.Fail("Cannot upgrade cube block, upgraded block is not derived from " + typeof(MyObjectBuilder_CubeBlock).Name); return(null); } upgraded.EntityId = cubeBlock.EntityId; upgraded.Min = cubeBlock.Min; upgraded.m_orientation = cubeBlock.m_orientation; upgraded.IntegrityPercent = cubeBlock.IntegrityPercent; upgraded.BuildPercent = cubeBlock.BuildPercent; upgraded.BlockOrientation = cubeBlock.BlockOrientation; upgraded.ConstructionInventory = cubeBlock.ConstructionInventory; upgraded.ColorMaskHSV = cubeBlock.ColorMaskHSV; return(upgraded); }