forked from romen-h/ONI-Mods
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDumpingSignConfig.cs
More file actions
69 lines (54 loc) · 1.93 KB
/
DumpingSignConfig.cs
File metadata and controls
69 lines (54 loc) · 1.93 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
using RomenH.Common;
using UnityEngine;
namespace RomenH.DumpingSign
{
public class DumpingSignConfig : IBuildingConfig
{
public const string ID = "RomenH_DumpingSign";
public static readonly LocString Name = StringUtils.BuildingName(ID, "Dumping Sign");
public static readonly LocString Desc = StringUtils.BuildingDesc(ID, "");
public static readonly LocString Effect = StringUtils.BuildingEffect(ID, "Allows Duplicants to deliver materials to this sign which drops them on the ground immediately.");
public static readonly Tag CopyGroupTag = TagManager.Create(ID);
public override BuildingDef CreateBuildingDef()
{
var def = BuildingTemplates.CreateBuildingDef(
id: ID,
width: 1,
height: 1,
anim: "dumping_sign_kanim",
hitpoints: 20,
construction_time: 5f,
construction_mass: TUNING.BUILDINGS.CONSTRUCTION_MASS_KG.TIER0,
construction_materials: TUNING.MATERIALS.RAW_MINERALS,
melting_point: 1600f,
build_location_rule: BuildLocationRule.Anywhere,
decor: TUNING.DECOR.NONE,
noise: TUNING.NOISE_POLLUTION.NONE
);
def.Floodable = false;
def.Entombable = true;
def.Overheatable = false;
return def;
}
public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
{
Prioritizable.AddRef(go);
Storage storage = go.AddComponent<Storage>();
storage.showInUI = true;
storage.allowItemRemoval = false;
storage.storageFilters = TUNING.STORAGEFILTERS.NOT_EDIBLE_SOLIDS;
storage.fetchCategory = Storage.FetchCategory.StorageSweepOnly;
storage.showCapacityStatusItem = false;
storage.showCapacityAsMainStatus = false;
storage.capacityKg = 10000;
go.AddOrGet<TreeFilterable>();
go.AddOrGet<CopyBuildingSettings>().copyGroupTag = CopyGroupTag;
go.AddOrGet<UserNameable>();
go.AddOrGet<DumpingSign>();
}
public override void DoPostConfigureComplete(GameObject go)
{
//SymbolOverrideControllerUtil.AddToPrefab(go);
}
}
}