internal static void FixBlockUnlockTable(CustomBlock block) { BlockUnlockTable blockList = ManLicenses.inst.GetBlockUnlockTable(); BlockUnlockTable.CorpBlockData corpData = blockList.GetCorpBlockData((int)block.Faction); BlockUnlockTable.UnlockData[] unlocked = corpData.m_GradeList[block.Grade].m_BlockList; Array.Resize(ref unlocked, unlocked.Length + 1); unlocked[unlocked.Length - 1] = new BlockUnlockTable.UnlockData { m_BlockType = (BlockTypes)block.RuntimeID, m_BasicBlock = true, m_DontRewardOnLevelUp = true, //m_HideOnLevelUpScreen = true // Could parameterize }; corpData.m_GradeList[block.Grade].m_BlockList = unlocked; (BlockLoader.m_CorpBlockLevelLookup.GetValue(blockList) as Dictionary <int, Dictionary <BlockTypes, int> >)[(int)block.Faction].Add((BlockTypes)block.RuntimeID, block.Grade); ManLicenses.inst.DiscoverBlock((BlockTypes)block.RuntimeID); }
public void CallBlockPrefabBuilder(float time, BlockPrefabBuilder PrefabToRegister, CustomBlock CustomBlock) { prefabToRegister = PrefabToRegister; customBlock = CustomBlock; Invoke("RunBlock", time); }