mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-03-27 11:12:44 +01:00
Add assertion that game version is provided in campaigns
Signed-off-by: Reece Dunham <me@rdil.rocks>
This commit is contained in:
parent
3421ee385b
commit
a1961521fd
@ -29,6 +29,7 @@ import type {
|
||||
import { log, LogLevel } from "../loggingInterop"
|
||||
import { getConfig } from "../configSwizzleManager"
|
||||
import { fastClone } from "../utils"
|
||||
import assert from "assert"
|
||||
|
||||
/* eslint-disable prefer-const */
|
||||
|
||||
@ -37,6 +38,15 @@ const genSingleMissionFactory = (userId: string): GenSingleMissionFunc => {
|
||||
contractId: string,
|
||||
gameVersion: GameVersion,
|
||||
): ICampaignMission {
|
||||
assert.ok(
|
||||
contractId,
|
||||
"Plugin tried to generate mission with no contract ID",
|
||||
)
|
||||
assert.ok(
|
||||
gameVersion,
|
||||
"Plugin tried to generate mission with no game version",
|
||||
)
|
||||
|
||||
const actualContractData = controller.resolveContract(contractId)
|
||||
|
||||
if (!actualContractData) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user