mirror of
https://github.com/SWG-Source/dsrc.git
synced 2026-10-21 12:03:08 -04:00
Scripting Alarm Clock Refactor
This commit is contained in:
@@ -5,6 +5,8 @@ import script.library.events;
|
||||
import script.library.holiday;
|
||||
import script.obj_id;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class planet_event_handler extends script.base_script
|
||||
{
|
||||
public planet_event_handler()
|
||||
@@ -72,7 +74,7 @@ public class planet_event_handler extends script.base_script
|
||||
removeObjVar(self, "lifeday");
|
||||
setObjVar(self, "lifeday.emptyScoreBoard", "true");
|
||||
newTimeStamp(self);
|
||||
createDailyAlarmClock(self, "lifeDayDailyAlarm", null, 10, 0, 0);
|
||||
timedMessageToDaily(self, "lifeDayDailyAlarm", null, LocalTime.of(10, 0, 0));
|
||||
}
|
||||
}
|
||||
private boolean newDay(obj_id self) throws InterruptedException
|
||||
@@ -91,7 +93,7 @@ public class planet_event_handler extends script.base_script
|
||||
int secondsUntil = secondsUntilNextDailyTime(10, 0, 0);
|
||||
int then = now + secondsUntil;
|
||||
setObjVar(self, EVENT_TIMESTAMP, then);
|
||||
createDailyAlarmClock(self, "lifeDayDailyAlarm", null, 10, 0, 0);
|
||||
timedMessageToDaily(self, "lifeDayDailyAlarm", null, LocalTime.of(10, 0, 0));
|
||||
}
|
||||
public int setUpEventLeaderBoard(obj_id self, dictionary params) throws InterruptedException
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user