1
mirror of https://github.com/thepeacockproject/Peacock synced 2025-02-23 03:35:25 +01:00

fix(contracts): difficulty not set to normal on first contract load

This commit is contained in:
Alexandre Sanchez 2023-01-21 23:07:35 +01:00
parent d6cae91a0f
commit 873df1de89
No known key found for this signature in database

@ -234,6 +234,18 @@ export function newSession(
throw new Error("no ct")
}
if (
difficulty === 0 &&
(contract.Metadata.Type === "creation" ||
contract.Metadata.Type === "usercreated")
) {
log(
LogLevel.DEBUG,
`Difficulty not set for user created contract ${contractId}, setting to 2`,
)
difficulty = 2
}
swapToLocationStatus(
contract.Metadata.ScenePath,
contract.Metadata.Type,