Ejemplo n.º 1
0
        public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
        {
            go.GetComponent <KPrefabID>().AddTag(RoomConstraints.ConstraintTags.RecBuilding, false);
            Storage storage = go.AddOrGet <Storage>();

            storage.SetDefaultStoredItemModifiers(Storage.StandardFabricatorStorage);
            ConduitConsumer conduitConsumer = go.AddOrGet <ConduitConsumer>();

            conduitConsumer.conduitType        = ConduitType.Liquid;
            conduitConsumer.capacityTag        = ElementLoader.FindElementByHash(SimHashes.Ethanol).tag;
            conduitConsumer.capacityKG         = 20f;
            conduitConsumer.wrongElementResult = ConduitConsumer.WrongElementResult.Dump;
            ManualDeliveryKG manualDeliveryKg = go.AddOrGet <ManualDeliveryKG>();

            manualDeliveryKg.SetStorage(storage);
            manualDeliveryKg.requestedItemTag = GrapeberryConfig.Id.ToTag();
            manualDeliveryKg.capacity         = 4f;
            manualDeliveryKg.refillMass       = 1f;
            manualDeliveryKg.minimumMass      = 0.5f;
            manualDeliveryKg.choreTypeIDHash  = Db.Get().ChoreTypes.MachineFetch.IdHash;
            go.AddOrGet <ChampagneFillerWorkable>().basePriority = RELAXATION.PRIORITY.TIER5;
            ChampagneFiller champagneFiller = go.AddOrGet <ChampagneFiller>();

            champagneFiller.specificEffect       = "SodaFountain";
            champagneFiller.trackingEffect       = "RecentlyRecDrink";
            champagneFiller.ingredientTag        = GrapeberryConfig.Id.ToTag();
            champagneFiller.ingredientMassPerUse = 1f;
            champagneFiller.ethanolMassPerUse    = 5f;
            RoomTracker roomTracker = go.AddOrGet <RoomTracker>();

            roomTracker.requiredRoomType = Db.Get().RoomTypes.RecRoom.Id;
            roomTracker.requirement      = RoomTracker.Requirement.Recommended;
        }
Ejemplo n.º 2
0
 protected override void OnPrefabInit()
 {
     base.OnPrefabInit();
     overrideAnims = new KAnimFile[1]
     {
         Assets.GetAnim("anim_interacts_champagnefiller_kanim")
     };
     showProgressBar     = true;
     resetProgressOnStop = true;
     synchronizeAnims    = false;
     SetWorkTime(30f);
     champagneFiller = GetComponent <ChampagneFiller>();
 }