Example #1
0
        protected void MoveItemsToStorage(params Item[] itemsToReserve)
        {
            StorageEid.ThrowIfEqual(0, ErrorCodes.ServerError);

            foreach (var item in itemsToReserve)
            {
                item.Parent = StorageEid;
                item.Save();
            }
        }
Example #2
0
        public IDictionary <string, object> ReturnReservedItems(ProductionInProgress productionInProgress)
        {
            StorageEid.ThrowIfEqual(0, ErrorCodes.WTFErrorMedicalAttentionSuggested);

            var replyDict = new Dictionary <string, object>(1);

            var itemsDict = new Dictionary <string, object>();

            var counter = 0;

            //put the reserved items into the public container
            foreach (var item in productionInProgress.GetReservedItems())
            {
                item.Parent = PublicContainerEid;
                item.Save();

                itemsDict.Add("r" + counter++, item.ToDictionary());
            }

            replyDict.Add(k.items, itemsDict);
            return(replyDict);
        }