2024-05-21 17:59:04 +00:00
|
|
|
import { SaveServer } from "@spt/servers/SaveServer";
|
|
|
|
import { TimeUtil } from "@spt/utils/TimeUtil";
|
2024-07-23 11:12:53 -04:00
|
|
|
import { inject, injectable } from "tsyringe";
|
2023-03-03 15:23:46 +00:00
|
|
|
|
|
|
|
@injectable()
|
2024-07-23 11:12:53 -04:00
|
|
|
export class MatchLocationService {
|
2023-03-03 15:23:46 +00:00
|
|
|
protected locations = {};
|
|
|
|
|
2023-12-27 22:01:30 +00:00
|
|
|
constructor(
|
|
|
|
@inject("TimeUtil") protected timeUtil: TimeUtil,
|
|
|
|
@inject("SaveServer") protected saveServer: SaveServer,
|
2024-07-23 11:12:53 -04:00
|
|
|
) {}
|
2023-03-03 15:23:46 +00:00
|
|
|
|
2024-07-23 11:12:53 -04:00
|
|
|
public deleteGroup(info: any): void {
|
|
|
|
for (const locationID in this.locations) {
|
|
|
|
for (const groupID in this.locations[locationID].groups) {
|
|
|
|
if (groupID === info.groupId) {
|
2023-03-03 15:23:46 +00:00
|
|
|
delete this.locations[locationID].groups[groupID];
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-11-15 20:35:05 -05:00
|
|
|
}
|