Skip to content

Commit 6d2b337

Browse files
committed
few missing methods
1 parent ce66012 commit 6d2b337

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

csharp/uwapi/map.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,21 @@ public static IReadOnlyList<Vector3> Positions()
3939
return positions;
4040
}
4141

42+
public static Vector3 Position(uint position)
43+
{
44+
return positions[(int)position];
45+
}
46+
4247
public static IReadOnlyList<Vector3> Ups()
4348
{
4449
return ups;
4550
}
4651

52+
public static Vector3 Up(uint position)
53+
{
54+
return ups[(int)position];
55+
}
56+
4757
public static IReadOnlyList<IReadOnlyList<uint>> Neighbors()
4858
{
4959
return neighbors;
@@ -59,11 +69,21 @@ public static IReadOnlyList<byte> Terrains()
5969
return terrains;
6070
}
6171

72+
public static byte Terrain(uint position)
73+
{
74+
return terrains[(int)position];
75+
}
76+
6277
public static IReadOnlyList<OverviewFlags> Overview()
6378
{
6479
return overview;
6580
}
6681

82+
public static OverviewFlags Overview(uint position)
83+
{
84+
return overview[(int)position];
85+
}
86+
6787
public static uint[] Entities(uint position)
6888
{
6989
Interop.UwIds ns = new Interop.UwIds();

csharp/uwapi/prototypes.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ public class ProtoConstruction : ProtoCommon
4747

4848
public class ProtoUnit : ProtoCommon
4949
{
50-
public List<uint> recipes;
50+
public List<uint> recipes; // ids of recipes available for processing by this unit
51+
public List<uint> upgrades; // ids of upgrades applicable to this unit
5152
public bool vital; // a force loses when it loses last vital unit
5253
public bool cargo; // the unit may carry resources
5354
public bool logistics; // vehicle that is automatically controlled by the logistics system

0 commit comments

Comments
 (0)