Experimental re-imagining of Pixi with less C#
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.5KB

  1. using System.Runtime.InteropServices;
  2. namespace NPort.Bindings
  3. {
  4. public static class Robocraft
  5. {
  6. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
  7. public struct FactoryRobotListInfo{
  8. public uint item_id;
  9. public string item_name;
  10. public string item_description;
  11. public string thumbnail; // url
  12. public string added_by;
  13. public string added_by_display_name;
  14. public string added_date; // ISO date
  15. public string expiry_date; // ISO date
  16. public uint cpu;
  17. public uint total_robot_ranking;
  18. public uint rent_count;
  19. public uint buy_count;
  20. public uint buyable; // bool
  21. public string removed_date;
  22. public string ban_date;
  23. public uint featured; // bool
  24. public string banner_message;
  25. public float combat_rating;
  26. public float cosmetic_rating;
  27. public string cube_amounts; // JSON as str
  28. }
  29. [DllImport("libfj.dll", CallingConvention = CallingConvention.Cdecl)]
  30. static extern void get_factory_front_page(uint size, [In,Out] FactoryRobotListInfo[] array_ptr);
  31. public static FactoryRobotListInfo[] GetFactoryFrontPage()
  32. {
  33. uint size = 100;
  34. FactoryRobotListInfo[] arr = new FactoryRobotListInfo[size];
  35. get_factory_front_page(size, arr);
  36. return arr;
  37. }
  38. }
  39. }