Exemplo n.º 1
0
        public bool MoveFrom(IThing thing)
        {
            if (!ThingInventory.Contains(thing))
            {
                return(false);
            }

            ThingInventory.Remove(thing);
            thing.Position = null;
            UpsertToLiveWorldCache();

            return(true);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Move an entity into a named container in this
        /// </summary>
        /// <param name="thing">the entity to add</param>
        /// <returns>errors</returns>
        public bool MoveInto(IThing thing)
        {
            if (ThingInventory.Contains(thing))
            {
                return(false);
            }

            ThingInventory.Add(thing);
            thing.Position = this;
            thing.Save();
            Save();

            return(true);
        }