@@ -242,7 +242,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
242242 Globals . MouseButton = 0 ;
243243 if ( Globals . CurrentTool == EditingTool . Dropper )
244244 {
245- foreach ( var layer in Enumerable . Reverse ( Options . Instance . MapOpts . Layers . All ) )
245+ foreach ( var layer in Enumerable . Reverse ( Options . Instance . Map . Layers . All ) )
246246 {
247247 if ( tmpMap . Layers [ layer ] [ Globals . CurTileX , Globals . CurTileY ] . TilesetId != Guid . Empty )
248248 {
@@ -322,7 +322,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
322322 {
323323 Globals . MapEditorWindow . SmartFillAttributes ( Globals . CurTileX , Globals . CurTileY ) ;
324324 }
325- else if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
325+ else if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
326326 {
327327 Globals . MapEditorWindow . SmartFillLayer ( Globals . CurTileX , Globals . CurTileY ) ;
328328 }
@@ -335,7 +335,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
335335 {
336336 Globals . MapEditorWindow . SmartEraseAttributes ( Globals . CurTileX , Globals . CurTileY ) ;
337337 }
338- else if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
338+ else if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
339339 {
340340 Globals . MapEditorWindow . SmartEraseLayer ( Globals . CurTileX , Globals . CurTileY ) ;
341341 }
@@ -358,7 +358,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
358358 else if ( Globals . CurrentLayer == LayerOptions . Events ) //Events
359359 {
360360 }
361- else if ( Globals . CurrentLayer == LayerOptions . Instance . Npcs ) //NPCS
361+ else if ( Globals . CurrentLayer == LayerOptions . Npcs ) //NPCS
362362 {
363363 }
364364 else
@@ -420,7 +420,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
420420
421421 if ( Globals . CurrentTool == EditingTool . Fill )
422422 {
423- if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
423+ if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
424424 {
425425 Globals . MapEditorWindow . FillLayer ( ) ;
426426 }
@@ -429,7 +429,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
429429 }
430430 else if ( Globals . CurrentTool == EditingTool . Erase )
431431 {
432- if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
432+ if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
433433 {
434434 Globals . MapEditorWindow . EraseLayer ( ) ;
435435 }
@@ -475,7 +475,7 @@ private void picMap_MouseDown(object sender, MouseEventArgs e)
475475 mMapChanged = true ;
476476 }
477477 }
478- else if ( Globals . CurrentLayer == LayerOptions . Instance . Npcs )
478+ else if ( Globals . CurrentLayer == LayerOptions . Npcs )
479479 {
480480 }
481481 else
@@ -676,7 +676,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e)
676676 else if ( Globals . CurrentLayer == LayerOptions . Events )
677677 {
678678 }
679- else if ( Globals . CurrentLayer == LayerOptions . Instance . Npcs )
679+ else if ( Globals . CurrentLayer == LayerOptions . Npcs )
680680 {
681681 if ( Globals . MapLayersWindow . rbDeclared . Checked == true && Globals . MapLayersWindow . lstMapNpcs . Items . Count > 0 )
682682 {
@@ -778,7 +778,7 @@ private void picMap_MouseMove(object sender, MouseEventArgs e)
778778 {
779779 Globals . MapLayersWindow . RemoveAttribute ( tmpMap , Globals . CurTileX , Globals . CurTileY ) ;
780780 }
781- else if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
781+ else if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
782782 {
783783 if ( Globals . CurrentTool == EditingTool . Brush )
784784 {
@@ -891,7 +891,7 @@ public void picMap_MouseUp(object sender, MouseEventArgs e)
891891 else if ( Globals . CurrentLayer == LayerOptions . Events )
892892 {
893893 }
894- else if ( Globals . CurrentLayer == LayerOptions . Instance . Npcs )
894+ else if ( Globals . CurrentLayer == LayerOptions . Npcs )
895895 {
896896 }
897897 else
@@ -1244,7 +1244,7 @@ private void picMap_DoubleClick(object sender, EventArgs e)
12441244 }
12451245
12461246 //NPCS
1247- case LayerOptions . Instance . Npcs :
1247+ case LayerOptions . Npcs :
12481248 {
12491249 var spawnIndex = Globals . MapLayersWindow . lstMapNpcs . SelectedIndex ;
12501250 var spawn = - 1 < spawnIndex && spawnIndex < currentMap . Spawns . Count
@@ -1320,7 +1320,7 @@ public void FillLayer()
13201320 Globals . CurrentMap , Globals . CurTileX , Globals . CurTileY
13211321 ) ;
13221322 }
1323- else if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
1323+ else if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
13241324 {
13251325 if ( Globals . Autotilemode == 0 )
13261326 {
@@ -1407,7 +1407,7 @@ public void EraseLayer()
14071407 Globals . CurrentMap , Globals . CurTileX , Globals . CurTileY
14081408 ) ;
14091409 }
1410- else if ( Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) )
1410+ else if ( Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) )
14111411 {
14121412 tmpMap . Layers [ Globals . CurrentLayer ] [ Globals . CurTileX , Globals . CurTileY ] . TilesetId =
14131413 Guid . Empty ;
@@ -1810,10 +1810,10 @@ public void ProcessSelectionMovement(MapInstance tmpMap, bool ignoreMouse = fals
18101810 }
18111811 }
18121812
1813- var layers = Options . Instance . MapOpts . Layers . All ;
1813+ var layers = Options . Instance . Map . Layers . All ;
18141814 if ( Globals . SelectionType == ( int ) SelectionTypes . CurrentLayer )
18151815 {
1816- layers = Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) ? new List < string > ( ) { Globals . CurrentLayer } : new List < string > ( ) ;
1816+ layers = Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) ? new List < string > ( ) { Globals . CurrentLayer } : new List < string > ( ) ;
18171817 }
18181818
18191819 //Finish by copying the source tiles over
@@ -1861,7 +1861,7 @@ public void ProcessSelectionMovement(MapInstance tmpMap, bool ignoreMouse = fals
18611861 //Spawns
18621862 NpcSpawn spawnCopy ;
18631863 if ( Globals . SelectionType != ( int ) SelectionTypes . CurrentLayer ||
1864- Globals . CurrentLayer == LayerOptions . Instance . Npcs )
1864+ Globals . CurrentLayer == LayerOptions . Npcs )
18651865 {
18661866 if ( Globals . SelectionSource . FindSpawnAt ( x0 - dragxoffset , y0 - dragyoffset ) != null )
18671867 {
@@ -1962,10 +1962,10 @@ private void WipeCurrentSelection(MapBase tmpMap)
19621962 }
19631963 }
19641964
1965- var layers = Options . Instance . MapOpts . Layers . All ;
1965+ var layers = Options . Instance . Map . Layers . All ;
19661966 if ( Globals . SelectionType == ( int ) SelectionTypes . CurrentLayer )
19671967 {
1968- layers = Options . Instance . MapOpts . Layers . All . Contains ( Globals . CurrentLayer ) ? new List < string > ( ) { Globals . CurrentLayer } : new List < string > ( ) ;
1968+ layers = Options . Instance . Map . Layers . All . Contains ( Globals . CurrentLayer ) ? new List < string > ( ) { Globals . CurrentLayer } : new List < string > ( ) ;
19691969 }
19701970
19711971 //start by deleting the source tiles
@@ -2018,7 +2018,7 @@ private void WipeCurrentSelection(MapBase tmpMap)
20182018
20192019 //Spawns
20202020 if ( Globals . SelectionType != ( int ) SelectionTypes . CurrentLayer ||
2021- Globals . CurrentLayer == LayerOptions . Instance . Npcs )
2021+ Globals . CurrentLayer == LayerOptions . Npcs )
20222022 {
20232023 for ( var w = 0 ; w < tmpMap . Spawns . Count ; w ++ )
20242024 {
@@ -2107,7 +2107,7 @@ public void FlipVertical()
21072107 {
21082108 for ( var y = 0 ; y <= selH ; y ++ )
21092109 {
2110- foreach ( var layer in Options . Instance . MapOpts . Layers . All )
2110+ foreach ( var layer in Options . Instance . Map . Layers . All )
21112111 {
21122112 Globals . CurrentMap . Layers [ layer ] [ selX + x , selY + y ] = tmpMap . Layers [ layer ] [ selX + x , selY + selH - y ] ;
21132113 }
@@ -2181,7 +2181,7 @@ public void FlipHorizontal()
21812181 {
21822182 for ( var y = 0 ; y <= selH ; y ++ )
21832183 {
2184- foreach ( var layer in Options . Instance . MapOpts . Layers . All )
2184+ foreach ( var layer in Options . Instance . Map . Layers . All )
21852185 {
21862186 Globals . CurrentMap . Layers [ layer ] [ selX + x , selY + y ] = tmpMap . Layers [ layer ] [ selX + selW - x , selY + y ] ;
21872187 }
0 commit comments