ScheduleBase.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. using System;
  2. using UnityEngine;
  3. namespace Schedule
  4. {
  5. public class ScheduleBase
  6. {
  7. public ScheduleBase(ScheduleType workType, Slot slot, int workId)
  8. {
  9. this.workType = workType;
  10. this._slot = slot;
  11. this._id = workId;
  12. string text = ScheduleCSVData.AllData[this.id].icon;
  13. if (text == null)
  14. {
  15. text = "CM3D2_scheduleicon_saihou";
  16. }
  17. this._icon = slot.textureBank.GetTexture(text);
  18. if (DailyMgr.IsLegacy && ScheduleCSVData.WorkLegacyDisableId.Contains(this.id))
  19. {
  20. this.legacyDisable = true;
  21. }
  22. }
  23. public Slot slot
  24. {
  25. get
  26. {
  27. return this._slot;
  28. }
  29. }
  30. public Maid maid
  31. {
  32. get
  33. {
  34. if (this.slot != null)
  35. {
  36. return this.slot.maid;
  37. }
  38. return null;
  39. }
  40. }
  41. public int id
  42. {
  43. get
  44. {
  45. return this._id;
  46. }
  47. }
  48. public Texture2D icon
  49. {
  50. get
  51. {
  52. return this._icon;
  53. }
  54. }
  55. public string icon_name
  56. {
  57. get
  58. {
  59. return ScheduleCSVData.AllData[this.id].icon;
  60. }
  61. }
  62. public string name
  63. {
  64. get
  65. {
  66. return ScheduleCSVData.AllData[this.id].name;
  67. }
  68. }
  69. public ScheduleType workType;
  70. protected Slot _slot;
  71. public bool enabled = true;
  72. protected int _id;
  73. protected Texture2D _icon;
  74. protected bool legacyDisable;
  75. }
  76. }