示例#1
0
        private static string BuildMeshId(ClientMain game, ItemStack stack)
        {
            string       result = stack.Item.Code.ToString().Replace(':', '.');
            IModularItem item   = stack.Item as IModularItem;

            if (item != null)
            {
                var slots = ModularItemHelper.GetSlots(stack, game);

                foreach (var slot in slots)
                {
                    if (slot.Value != null)
                    {
                        result = result + "." + BuildMeshId(game, slot.Value);
                    }
                }
            }
            return(result);
        }
示例#2
0
 public Dictionary <string, ItemStack> GetSlots(IItemStack stack)
 {
     return(ModularItemHelper.GetSlots(stack, api.World));
 }