Closed DomicidalDesigns closed 10 months ago
I will try to review it today! đ
Hey, I been quite busy so I haven't had chance to review it yet, sorry about it. I will get try to review the PR asap. Also, there doesn't seem to be default.json
among edited files. Did you run the project after adding records to the localization dictionary? Because it should have exported new records to the said file (and git should have catched it).
Hey, I been quite busy so I haven't had chance to review it yet, sorry about it. I will get try to review the PR asap.
No worries, take your time :)
Also, there doesn't seem to be default.json among edited files. Did you run the project after adding records to the localization dictionary? Because it should have exported new records to the said file (and git should have catched it).
Oh, I was not running the exe in the Release folder (oops) since my zomboid server files were not there. I ran it in the Release folder now and see the default.json file showing in git and just committed it to this branch.
I moved the zomboid server files to the Release folder so that shouldn't happen in the future :)
Thank you for reviewing! đ Changes
Everything is looking good, perfect. Thank you!
This adds the feature requested in #89.
Command Changes
ServerRestartScheduleType
config option to choose between interval or time for automatic server restarts!set_restart_schedule_type
)!set_restart_time
)!get_settings
commandScheduler Changes
GetIntervalFromTimes()
method to return interval for the next restart timeBotSettings Changes
GetServerRestartSchedule()
method to supply Scheduler with the correct milliseconds interval (time based or interval based), this is based on theServerRestartScheduleType
setting being "interval" or "time".Localization & README
Note: added
new JsonSerializerSettings{ObjectCreationHandling = ObjectCreationHandling.Replace}
toJsonConvert.DeserializeObject()
in Program.cs because in my testing the default list of restart times was being added to the config list of times instead of being replaced. This is due to Json serializer default behavior.