Commit ce9a9cff authored by nanahira's avatar nanahira

add setOverrideWinMatchCount

parent 6fe7fe95
......@@ -132,12 +132,22 @@ export class Room {
.get(() => DefaultHostInfoProvider)
.parseHostinfo(this.name, this.partialHostinfo);
get winMatchCount() {
get hostinfoWinMatchCount() {
const firstbit = this.hostinfo.mode & 0x1;
const remainingBits = (this.hostinfo.mode & 0xfc) >>> 1;
return (firstbit | remainingBits) + 1;
}
get winMatchCount() {
return this.overrideWinMatchCount ?? this.hostinfoWinMatchCount;
}
private overrideWinMatchCount?: number;
setOverrideWinMatchCount(value: number) {
this.overrideWinMatchCount = value;
}
get isTag() {
return (this.hostinfo.mode & 0x2) !== 0;
}
......@@ -1285,7 +1295,7 @@ export class Room {
...this.resourceLoader.extraScriptPaths,
];
const isMatchMode = this.winMatchCount > 1;
const isMatchMode = this.hostinfoWinMatchCount > 1;
const duelMode = this.isTag ? 'tag' : isMatchMode ? 'match' : 'single';
const registry: Record<string, string> = {
...this.registry,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment