Revert "[ongeki] Fix play reception time lockout"

This reverts commit 535af15e6a.
This commit is contained in:
Dom Eori
2021-10-07 02:51:21 +09:00
parent 535af15e6a
commit e12be524a4

View File

@@ -12,8 +12,6 @@ import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Map; import java.util.Map;
/** /**
@@ -38,29 +36,17 @@ public class GetGameSettingHandler implements BaseHandler {
@Override @Override
public String handle(Map<String, Object> request) throws JsonProcessingException { public String handle(Map<String, Object> request) throws JsonProcessingException {
/*
PropertyEntry start = propertyEntryRepository.findByPropertyKey("reboot_start_time") PropertyEntry start = propertyEntryRepository.findByPropertyKey("reboot_start_time")
.orElseGet(() -> new PropertyEntry("reboot_start_time", "2020-01-01 23:59:00.0")); .orElseGet(() -> new PropertyEntry("reboot_start_time", "2020-01-01 23:59:00.0"));
PropertyEntry end = propertyEntryRepository.findByPropertyKey("reboot_end_time") PropertyEntry end = propertyEntryRepository.findByPropertyKey("reboot_end_time")
.orElseGet(() -> new PropertyEntry("reboot_end_time", "2020-01-01 23:59:00.0")); .orElseGet(() -> new PropertyEntry("reboot_end_time", "2020-01-01 23:59:00.0"));
*/
/*
Ongeki is picky about reboot time value, and fixed one doesn't work very well.
So let's not use fixed value. Instead, give a dynamically adjusted time.
*/
LocalDateTime rebootTime = LocalDateTime.now().minusHours(2); // taken from some fork of minime.
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("uuuu-MM-dd HH:mm:ss");
String strRebootTime = rebootTime.format(formatter);
GameSetting gameSetting = new GameSetting( GameSetting gameSetting = new GameSetting(
"1.05.00", "1.05.00",
false, false,
10, 10,
strRebootTime, start.getPropertyValue(),
strRebootTime, end.getPropertyValue(),
false, false,
300, 300,
300, 300,