forked from xmnovotny/VoxelTycoon-ScheduleStopwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuildingHelper.cs
35 lines (32 loc) · 811 Bytes
/
BuildingHelper.cs
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
32
33
34
35
using System;
using System.Collections.Generic;
using System.Text;
using VoxelTycoon.Buildings;
using VoxelTycoon.Researches;
using VoxelTycoon.Tracks;
namespace ScheduleStopwatch
{
public class BuildingHelper
{
public static string GetBuildingName(Building building)
{
if (building == null)
{
return "";
}
if (building is Lab lab)
{
return lab.Name;
}
if (building is VehicleStation station && station.Location != null)
{
return station.Location.Name;
}
if (building is VehicleDepot depot)
{
return depot.Name;
}
return building.DisplayName;
}
}
}