forked from OpenWF/SpaceNinjaServer
fix: don't provide syndicate missions in advance (#1979)
Closes #1975 Reviewed-on: OpenWF/SpaceNinjaServer#1979 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
parent
238af294fe
commit
cfa3586f64
@ -193,6 +193,12 @@ const pushSyndicateMissions = (
|
||||
idSuffix: string,
|
||||
syndicateTag: string
|
||||
): void => {
|
||||
const dayStart = getSortieTime(day);
|
||||
if (Date.now() >= dayStart) {
|
||||
return; // The client does not seem to respect activation.
|
||||
}
|
||||
const dayEnd = getSortieTime(day + 1);
|
||||
|
||||
const nodeOptions: string[] = [...syndicateMissions];
|
||||
|
||||
const rng = new CRng(seed);
|
||||
@ -203,8 +209,6 @@ const pushSyndicateMissions = (
|
||||
nodeOptions.splice(index, 1);
|
||||
}
|
||||
|
||||
const dayStart = getSortieTime(day);
|
||||
const dayEnd = getSortieTime(day + 1);
|
||||
worldState.SyndicateMissions.push({
|
||||
_id: { $oid: ((dayStart / 1000) & 0xffffffff).toString(16).padStart(8, "0") + idSuffix },
|
||||
Activation: { $date: { $numberLong: dayStart.toString() } },
|
||||
|
Loading…
x
Reference in New Issue
Block a user