Skip to content

Commit

Permalink
feat: pass region to c++ to improve point picking visualization
Browse files Browse the repository at this point in the history
  • Loading branch information
PeenScreeker authored and tsa96 committed Aug 28, 2024
1 parent 6625e6f commit af806d4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/pages/zoning/zoning.ts
Original file line number Diff line number Diff line change
Expand Up @@ -496,13 +496,17 @@ class ZoneMenu {
if (!this.selectedZone || !this.selectedZone.zone) return;

this.pointPick = PickType.corner;
const index = this.panels.regionSelect.GetSelected().GetAttributeInt('value', -1);
const region = this.selectedZone.zone.regions[index];
if (GameInterfaceAPI.GetSettingBool('mom_zone_two_click')) {
const index = this.panels.regionSelect.GetSelected().GetAttributeInt('value', -1);
this.selectedZone.zone.regions[index].points.length = 0;
region.points.length = 0;
this.panels.pointsList.RemoveAndDeleteChildren();
}
//@ts-expect-error function name
this.panels.zoningMenu.startPointPick(true);

//@ts-expect-error function name
this.panels.zoningMenu.setCornersFromRegion(region);
}

static addPointToList(i: number, point: number[]) {
Expand Down

0 comments on commit af806d4

Please sign in to comment.