ScheduleWork.cs 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. namespace Schedule
  3. {
  4. public class ScheduleWork : ScheduleTraining
  5. {
  6. public ScheduleWork(ScheduleType workType, Slot slot, int workId) : base(workType, slot, workId)
  7. {
  8. this.workType = workType;
  9. this._slot = slot;
  10. this._id = workId;
  11. this.enabled = true;
  12. this.visible = true;
  13. if (this.legacyDisable)
  14. {
  15. this.visible = false;
  16. }
  17. if (ScheduleCSVData.WorkData.ContainsKey(workId))
  18. {
  19. ScheduleCSVData.Work work = ScheduleCSVData.WorkData[workId];
  20. if (!work.facility.isBusiness && work.workTyp != ScheduleCSVData.WorkType.PowerUp)
  21. {
  22. this.visible = false;
  23. }
  24. if (GameMain.Instance.CharacterMgr.status.lockNTRPlay && !work.facility.isEnableNTR)
  25. {
  26. this.visible = false;
  27. }
  28. if (this.visible && base.maid != null && ScheduleCSVData.WorkData.ContainsKey(base.id))
  29. {
  30. ScheduleCSVData.Work work2 = ScheduleCSVData.WorkData[base.id];
  31. if ((work2.isNewBodyBlock && base.maid.IsCrcBody) || !work2.CheckMainHeroineBodyTypeMatch(base.maid))
  32. {
  33. this.enabled = false;
  34. }
  35. }
  36. }
  37. }
  38. }
  39. }