This is the first pass of ESLint on the codebase. ESLint formatting is less strict when it comes to line-length and line-breaks then dprint/biome, so if you see formatting that you don't like... fix it! It shouldn't require a configuration change. - This should merge clean into master (when the time comes). - This will not merge clean into `3.9.0-DEV`, but the conflicts aren't that bad.
32 lines
886 B
TypeScript
32 lines
886 B
TypeScript
import { inject, injectable } from "tsyringe";
|
|
import { ICreateGroupRequestData } from "@spt-aki/models/eft/match/ICreateGroupRequestData";
|
|
import { SaveServer } from "@spt-aki/servers/SaveServer";
|
|
import { TimeUtil } from "@spt-aki/utils/TimeUtil";
|
|
|
|
@injectable()
|
|
export class MatchLocationService
|
|
{
|
|
protected locations = {};
|
|
|
|
constructor(
|
|
@inject("TimeUtil") protected timeUtil: TimeUtil,
|
|
@inject("SaveServer") protected saveServer: SaveServer,
|
|
)
|
|
{}
|
|
|
|
public deleteGroup(info: any): void
|
|
{
|
|
for (const locationID in this.locations)
|
|
{
|
|
for (const groupID in this.locations[locationID].groups)
|
|
{
|
|
if (groupID === info.groupId)
|
|
{
|
|
delete this.locations[locationID].groups[groupID];
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|