Structure.cs 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. using System;
  2. using System.Collections.Generic;
  3. using SOTF_Struct.Data;
  4. namespace SOTF_Struct.Generic {
  5. public class Structure {
  6. /// <summary>
  7. /// The structures ID
  8. /// </summary>
  9. public int Id { get; set; }
  10. /// <summary>
  11. /// The structure Position
  12. /// </summary>
  13. public Position Pos { get; set; }
  14. /// <summary>
  15. /// The structure rotation
  16. /// </summary>
  17. public Rotation Rot { get; set; }
  18. /// <summary>
  19. /// The structures storage
  20. /// </summary>
  21. public List<ItemInstance> Storages { get; set; }
  22. /// <summary>
  23. /// How many ressources have been used to build this structure
  24. /// This is only used during the blue print.
  25. /// </summary>
  26. public int? Added { get; set; } = null;
  27. /// <summary>
  28. /// Returns the Display Name for this structure
  29. /// </summary>
  30. /// <returns>String with the Display Name. If the Structure Type wasn't found, it returns 'STRUCTURE_id'</returns>
  31. public string GetDisplayName() {
  32. if (this.Id == 0) return "Bird House";
  33. if (this.Id == 20) return "Chair";
  34. if (this.Id == 21) return "Bone maker trap";
  35. if (this.Id == 22) return "Bed";
  36. if (this.Id == 22) return "Wall planter";
  37. //if (this.Id == 23) return "";
  38. if (this.Id == 24) return "Bone Chandelier";
  39. if (this.Id == 25) return "Bone Chair";
  40. if (this.Id == 26) return "Lean to";
  41. if (this.Id == 27) return "Drying Rack";
  42. if (this.Id == 28) return "Tree shelter 2";
  43. if (this.Id == 29) return "Stick Storage";
  44. //if (this.Id == 30) return "";
  45. if (this.Id == 31) return "Stone Storage";
  46. if (this.Id == 32) return "Bone Storage";
  47. //if (this.Id == 33) return "";
  48. //if (this.Id == 34) return "Small log cabine"; (disappeard after building complete, from NodeStructure)
  49. if (this.Id == 35) return "Fish trap";
  50. if (this.Id == 36) return "Mannequin";
  51. if (this.Id == 37) return "Log Storage";
  52. if (this.Id == 38) return "Watch Tower";
  53. if (this.Id == 39) return "Scarecrow";
  54. if (this.Id == 40) return "Standing planter";
  55. if (this.Id == 41) return "Tree platform 2";
  56. if (this.Id == 42) return "Small animal trap";
  57. if (this.Id == 43) return "Tree platform 1";
  58. if (this.Id == 44) return "Tree shelter 1";
  59. if (this.Id == 45) return "Fly swatter trap";
  60. //if (this.Id == 46) return "";
  61. if (this.Id == 47) return "Hunting shelter";
  62. if (this.Id == 48) return "Table";
  63. if (this.Id == 49) return "Shelf";
  64. //if (this.Id == 50) return "";
  65. if (this.Id == 51) return "Wall Shelf";
  66. if (this.Id == 52) return "Bench";
  67. if (this.Id == 53) return "Torch";
  68. if (this.Id == 54) return "Skull Lamp";
  69. //if (this.Id == 55) return ""; // Storeage: 0
  70. if (this.Id == 56) return "Rain catcher"; // Storeage: 0
  71. return "STRUCTURE_" + Id.ToString();
  72. }
  73. }
  74. }