about summary refs log tree commit diff stats
path: root/data/maps/the_congruent/connections.txtpb
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-09-07 15:42:00 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-09-07 15:42:00 -0400
commitd79984b099c3f762b95d3b4257bef113d3a8d6ee (patch)
treebcb647c4734b9ddecb465f818e06efc899482f4e /data/maps/the_congruent/connections.txtpb
parent8ab6132f99e9a033c170310b2d88a7312e46a153 (diff)
downloadlingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.gz
lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.tar.bz2
lingo2-archipelago-d79984b099c3f762b95d3b4257bef113d3a8d6ee.zip
Added door groups
Diffstat (limited to 'data/maps/the_congruent/connections.txtpb')
0 files changed, 0 insertions, 0 deletions
-05-25 15:37:05 -0400 Block access to terminal without Red Key' href='/anodyne-archipelago/commit/AnodyneArchipelago/Patches/PatchHelper.cs?id=6a518ca7bdb787ef6d37469d26648afb8385c987'>6a518ca ^
605e866 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
                               

                            
             
                                 
                        
                                         









                                                                                                             











                                                                                                                      

     
using AnodyneSharp.Entities;
using AnodyneSharp.MapData;
using AnodyneSharp.Registry;
using System;
using System.Collections.Generic;
using System.Reflection;
using Layer = AnodyneSharp.MapData.Layer;

namespace AnodyneArchipelago.Patches
{
    internal class PatchHelper
    {
        public static EntityPreset GetEntityPreset(Type type, object instance)
        {
            FieldInfo presetField = type.GetField("_preset", BindingFlags.NonPublic | BindingFlags.Instance);
            return presetField.GetValue(instance) as EntityPreset;
        }

        public static void SetMapTile(int x, int y, int value, Layer layer)
        {
            FieldInfo layersField = typeof(Map).GetField("mapLayers", BindingFlags.NonPublic | BindingFlags.Instance);
            TileMap[] mapLayers = (TileMap[])layersField.GetValue(GlobalState.Map);
            TileMap mapLayer = mapLayers[(int)layer];

            FieldInfo tilesField = typeof(TileMap).GetField("tiles", BindingFlags.NonPublic | BindingFlags.Instance);
            List<int> tiles = (List<int>)tilesField.GetValue(mapLayer);

            tiles[x + y * mapLayer.Width] = value;
        }
    }
}