public void Construct() { #region Veteran Rewards foreach (AddonComponent c in AddonComponents) { c.Addon = null; c.Delete(); } #endregion AddonComponents.Clear(); MiniHouseInfo info = MiniHouseInfo.GetInfo(m_Type); int size = (int)Math.Sqrt(info.Graphics.Length); int num = 0; for (int y = 0; y < size; ++y) { for (int x = 0; x < size; ++x) { if (info.Graphics[num] != 0x1) // Veteran Rewards Mod { AddComponent(new AddonComponent(info.Graphics[num++]), size - x - 1, size - y - 1, 0); } } } }
public void Construct() { Components.Clear(); MiniHouseInfo info = MiniHouseInfo.GetInfo(m_Type); if (m_Type == MiniHouseType.ChurchAtNight) { AddComponent(new AddonComponent(info.Graphics[0]), 0, 0, 0); AddComponent(new AddonComponent(info.Graphics[1]), -1, 0, 0); AddComponent(new AddonComponent(info.Graphics[2]), 0, -1, 0); return; } else if (m_Type == MiniHouseType.GingerBreadHouse) { AddComponent(new AddonComponent(info.Graphics[0]), 0, 0, 0); AddComponent(new AddonComponent(info.Graphics[1]), 1, 0, 0); AddComponent(new AddonComponent(info.Graphics[2]), 1, -1, 0); return; } int size = (int)Math.Sqrt(info.Graphics.Length); int num = 0; for (int y = 0; y < size; ++y) { for (int x = 0; x < size; ++x) { AddComponent(new AddonComponent(info.Graphics[num++]), size - x - 1, size - y - 1, 0); } } }
public void Construct() { foreach (AddonComponent c in Components) { c.Addon = null; c.Delete(); } Components.Clear(); MiniHouseInfo info = MiniHouseInfo.GetInfo(m_Type); if (m_Type == MiniHouseType.GingerBreadHouse) { AddComponent(new AddonComponent(info.Graphics[0]), 0, 0, 0); AddComponent(new AddonComponent(info.Graphics[1]), 1, 0, 0); AddComponent(new AddonComponent(info.Graphics[2]), 1, -1, 0); return; } int size = (int)Math.Sqrt(info.Graphics.Length); int num = 0; for (int y = 0; y < size; ++y) { for (int x = 0; x < size; ++x) { if (info.Graphics[num] != 0x1) // Veteran Rewards Mod { AddComponent(new AddonComponent(info.Graphics[num++]), size - x - 1, size - y - 1, 0); } } } }
public void Construct() { Components.Clear(); MiniHouseInfo info = MiniHouseInfo.GetInfo( m_Type ); bool ischurch = (m_Type == MiniHouseType.ChurchAtNight); // Mini house "Church At Night" includes 3 components, so we don't have integer value for size if ( ischurch ) { AddComponent( new AddonComponent( info.Graphics[ 0 ] ), 0, 0, 0 ); AddComponent( new AddonComponent( info.Graphics[ 1 ] ), -1, 0, 0 ); AddComponent( new AddonComponent( info.Graphics[ 2 ] ), 0, -1, 0 ); return; } int size = (int) Math.Sqrt( info.Graphics.Length ); int num = 0; for ( int y = 0; y < size; ++y ) { for ( int x = 0; x < size; ++x ) { AddComponent( new AddonComponent( info.Graphics[ num++ ] ), size - x - 1, size - y - 1, 0 ); } } }
public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); list.Add(MiniHouseInfo.GetInfo(m_Type).LabelNumber); if (m_Type == MiniHouseType.MalasMountainPass) { list.Add(1062693); // Contest Winning Custom House Design } if (m_Type == MiniHouseType.ChurchAtNight) { list.Add(1072215); // Contest 2004 winning house design } }
public void Construct() { Components.Clear(); MiniHouseInfo info = MiniHouseInfo.GetInfo(m_Type); int size = (int)Math.Sqrt(info.Graphics.Length); int num = 0; for (int y = 0; y < size; ++y) { for (int x = 0; x < size; ++x) { AddComponent(new AddonComponent(info.Graphics[num++]), size - x - 1, size - y - 1, 0); } } }
} // a mini house deed public override void GetProperties(ObjectPropertyList list) { base.GetProperties(list); list.Add(MiniHouseInfo.GetInfo(m_Type).LabelNumber); }