@@ -7,7 +7,7 @@ import World from "@/systems/World"
77export type ZoneType = "scoring" | "protected"
88
99/**
10- * Checks if a zone was originally placed by dev tools by comparing it with the cached dev tool data.
10+ * Checks if a zone was originally defined in the field file by comparing it with the cached field data.
1111 */
1212export function isZoneFromDevtools (
1313 zone : ScoringZonePreferences | ProtectedZonePreferences ,
@@ -33,14 +33,14 @@ export function isZoneFromDevtools(
3333 JSON . stringify ( devZone . deltaTransformation ) === JSON . stringify ( zone . deltaTransformation )
3434 )
3535 } else {
36- // For protected zones, we'd need to add dev tool support first
37- // For now, return false as protected zones don't have dev tool support yet
36+ // For protected zones, we'd need to add field file support first
37+ // For now, return false as protected zones don't have field file support yet
3838 return false
3939 }
4040}
4141
4242/**
43- * Removes a zone from dev tools cache permanently.
43+ * Removes a zone from the field file cache permanently.
4444 */
4545export async function removeZoneFromDevtools (
4646 zone : ScoringZonePreferences | ProtectedZonePreferences ,
@@ -58,7 +58,7 @@ export async function removeZoneFromDevtools(
5858 const devtoolZones = editor . getUserData ( "devtool:scoring_zones" ) as ScoringZonePreferences [ ] | undefined
5959 if ( ! devtoolZones ) return
6060
61- // Remove the zone from dev tool data
61+ // Remove the zone from field file data
6262 const filteredZones = devtoolZones . filter (
6363 devZone =>
6464 ! (
@@ -69,14 +69,14 @@ export async function removeZoneFromDevtools(
6969 )
7070 )
7171
72- // Update the dev tool data
72+ // Update the field file data
7373 if ( filteredZones . length === 0 ) {
7474 editor . removeUserData ( "devtool:scoring_zones" )
7575 } else {
7676 editor . setUserData ( "devtool:scoring_zones" , filteredZones )
7777 }
7878
79- // Update field preferences to match the filtered dev tool data
79+ // Update field preferences to match the filtered field file data
8080 if ( field . fieldPreferences ) {
8181 field . fieldPreferences . scoringZones = filteredZones
8282 PreferencesSystem . savePreferences ?.( )
@@ -93,12 +93,12 @@ export async function removeZoneFromDevtools(
9393 }
9494 }
9595 } else {
96- throw new Error ( "Protected zone dev tool removal not yet implemented" )
96+ throw new Error ( "Protected zone field file removal not yet implemented" )
9797 }
9898}
9999
100100/**
101- * Gets all zones that exist in dev tools for a given type.
101+ * Gets all zones that exist in the field file for a given type.
102102 */
103103export function getDevtoolZones ( zoneType : ZoneType ) : ScoringZonePreferences [ ] | ProtectedZonePreferences [ ] | undefined {
104104 const field = World . sceneRenderer . mirabufSceneObjects . getField ( )
0 commit comments