public string UnPromoteJob(string s) { var jobID = JobID.Tourist1; if (!s.IsEmptyOrNull()) { if (JobID.ContainsID(s)) //Enum.IsDefined(typeof(JobID), s)) { { jobID = JobID.GetValue(s); // (JobID)Enum.Parse(typeof(JobID), s); } } if (s == "all") { var all_enums = JobID.GetValues(); foreach (var id in all_enums) { var job = new IDJobRef(new JobID(id)); job.PlayerDataInstance.Promoted = false; } return("un promoted all jobs"); } var jr = new IDJobRef(jobID); jr.PlayerDataInstance.Promoted = false; return("unpromoted " + jobID); }
public string PromoteJob(string s) { var jobID = JobID.Tourist1; if (!s.IsEmptyOrNull()) { if (JobID.ContainsID(s)) { jobID = JobID.GetValue(s); } } if (s == "all") { var all_enums = JobID.GetValues(); foreach (var id in all_enums) { var job = new IDJobRef(new JobID(id)); job.PlayerDataInstance.Promoted = true; } return("promoted all jobs"); } var jr = new IDJobRef(jobID); jr.PlayerDataInstance.Promoted = true; return("promoted " + jobID); }
public string ClearReptitions(string s) { var jobID = JobID.Tourist1; if (!s.IsEmptyOrNull()) { if (JobID.ContainsID(s)) //num.IsDefined(typeof(JobID), s)) { { jobID = JobID.GetValue(s); } } var jr = new IDJobRef(jobID); jr.PlayerDataInstance.Days = 0; return("cleared days of " + jobID); }
public string AddReptitions(string s) { var jobID = JobID.Tourist1; if (!s.IsEmptyOrNull()) { if (JobID.ContainsID(s)) { jobID = JobID.GetValue(s); } } var jr = new IDJobRef(jobID); jr.PlayerDataInstance.Days += 1000; return("added 1000 days to " + jobID); }