// public override void Tick()
        // {
        // base.Tick();
        // //Put on backpack
        // if (postWearer == null && wearer != null)
        // {
        // postWearer = wearer;
        // }
        // //Put off backpack. Should drop all from postWearer
        // else if (postWearer != null && wearer == null)
        // {
        // slotsComp.slots.TryDropAll(postWearer.Position, ThingPlaceMode.Near);
        // postWearer = null;
        // numOfSavedItems = 0;
        // }
        // if (wearer != null && numOfSavedItems > slotsComp.slots.Count)
        // numOfSavedItems = slotsComp.slots.Count;
        // }
        public override IEnumerable <Gizmo> GetWornGizmos()
        {
            // Designator_PutInInventory designator = new Designator_PutInInventory();
            // designator.backpack = this;
            // designator.icon = ContentFinder<Texture2D>.Get("UI/Commands/IconPutIn");
            // designator.defaultLabel = DesignatorPutInInventoryDefaultLabel + "(" + wearer.inventory.innerContainer.Count + "/" + MaxItem + ")";
            // designator.defaultDesc = DesignatorPutInInventoryDefaultDesc + wearer.inventory.innerContainer.Count + "/" + MaxItem;
            // designator.hotKey = KeyBindingDef.Named("CommandPutInInventory");
            // designator.activateSound = SoundDef.Named("Click");
            // yield return designator;
            Designator_PutInBackpackSlot designator2 =
                new Designator_PutInBackpackSlot
            {
                SlotsBackpackComp = this.SlotsComp,
                defaultLabel      =
                    string.Format(
                        "Put in ({0}/{1})",
                        this.SlotsComp.slots.Count,
                        this.MaxItem),
                defaultDesc   = string.Format("Put thing in {0}.", this.Label),
                hotKey        = KeyBindingDef.Named("CommandPutInInventory"),
                activateSound = SoundDef.Named("Click"),
                icon          = this.def.uiIcon,
                MaxItem       = this.MaxItem
            };

            // not used, but need to be defined, so that gizmo could accept actions
            yield return(designator2);

            Gizmo_BackpackEquipment gizmo = new Gizmo_BackpackEquipment {
                backpack = this
            };

            yield return(gizmo);
        }
Example #2
0
        public override IEnumerable <Gizmo> GetWornGizmos()
        {
            Designator_PutInInventory designator = new Designator_PutInInventory();

            designator.backpack = this;
            designator.icon     = ContentFinder <Texture2D> .Get("UI/Commands/IconPutIn");

            designator.defaultLabel  = DesignatorPutInInventoryDefaultLabel + "(" + wearer.inventory.container.Count + "/" + MaxItem + ")";
            designator.defaultDesc   = DesignatorPutInInventoryDefaultDesc + wearer.inventory.container.Count + "/" + MaxItem;
            designator.hotKey        = KeyBindingDef.Named("CommandPutInInventory");
            designator.activateSound = SoundDef.Named("Click");

            yield return(designator);

            Gizmo_BackpackEquipment gizmo = new Gizmo_BackpackEquipment();

            gizmo.backpack = this;
            yield return(gizmo);
        }
Example #3
0
        public override IEnumerable<Gizmo> GetWornGizmos()
        {
            Designator_PutInInventory designator = new Designator_PutInInventory();

            designator.backpack = this;
            designator.icon = ContentFinder<Texture2D>.Get("UI/Commands/IconPutIn");
            designator.defaultLabel = DesignatorPutInInventoryDefaultLabel + "(" + wearer.inventory.container.Count + "/" + MaxItem + ")";
            designator.defaultDesc = DesignatorPutInInventoryDefaultDesc + wearer.inventory.container.Count + "/" + MaxItem;
            designator.hotKey = KeyBindingDef.Named("CommandPutInInventory");
            designator.activateSound = SoundDef.Named("Click");

            yield return designator;

            Gizmo_BackpackEquipment gizmo = new Gizmo_BackpackEquipment();

            gizmo.backpack = this;
            yield return gizmo;
        }