/// <summary> /// Copies data from a place to an entity /// </summary> /// <param name="toSelector">The entity to copy the data to</param> /// <param name="toDataPath">The data path to copy to</param> /// <param name="dataLocation">The place to copy the data from</param> /// <param name="modifierType">The way to add the data</param> public void Copy(BaseSelector toSelector, string toDataPath, ID.EntityDataModifierType modifierType, IDataLocation dataLocation) { toSelector.LimitSelector(); ForFunction.AddCommand(new DataModifyWithLocationCommand(new EntityDataLocation(toSelector, toDataPath), modifierType, dataLocation)); }
/// <summary> /// Adds the <paramref name="copyData"/> to the entity's data at the specified data path /// </summary> /// <param name="toSelector">The entity to copy to</param> /// <param name="toDataPath">The data path to copy to</param> /// <param name="copyData">The data to insert</param> /// <param name="modifierType">The way to add the data</param> public void Change(BaseSelector toSelector, string toDataPath, ID.EntityDataModifierType modifierType, Data.SimpleDataHolder copyData) { toSelector.LimitSelector(); ForFunction.AddCommand(new DataModifyWithDataCommand(new EntityDataLocation(toSelector, toDataPath), modifierType, copyData)); }
/// <summary> /// Copies data into the block at given location /// </summary> /// <param name="storage">the <see cref="Storage"/> to copy the data to</param> /// <param name="toDataPath">the datapath to copy to</param> /// <param name="modifierType">The way to data should be copied in</param> /// <param name="dataLocation">The place to copy the data from</param> public void Copy(Storage storage, string toDataPath, ID.EntityDataModifierType modifierType, IDataLocation dataLocation) { function.AddCommand(new DataModifyWithLocationCommand(new StorageDataLocation(storage, toDataPath), modifierType, dataLocation)); }
/// <summary> /// Copies data into the <see cref="SharpCraft.Block"/> /// </summary> /// <param name="storage">the <see cref="Storage"/> to copy the data to</param> /// <param name="toDataPath">the datapath to copy to</param> /// <param name="modifierType">The way to data should be copied in</param> /// <param name="copyData">The data to insert</param> public void Change(Storage storage, string toDataPath, ID.EntityDataModifierType modifierType, Data.SimpleDataHolder copyData) { function.AddCommand(new DataModifyWithDataCommand(new StorageDataLocation(storage, toDataPath), modifierType, copyData)); }
/// <summary> /// Copies data into the block at given location /// </summary> /// <param name="toBlock">the coords of the <see cref="SharpCraft.Block"/> to copy the data to</param> /// <param name="toDataPath">the datapath to copy to</param> /// <param name="modifierType">The way to data should be copied in</param> /// <param name="dataLocation">The place to copy the data from</param> public void Copy(Vector toBlock, string toDataPath, ID.EntityDataModifierType modifierType, IDataLocation dataLocation) { ForFunction.AddCommand(new DataModifyWithLocationCommand(new BlockDataLocation(toBlock, toDataPath), modifierType, dataLocation)); }
/// <summary> /// Copies data into the <see cref="SharpCraft.Block"/> /// </summary> /// <param name="toBlock">the coords of the <see cref="SharpCraft.Block"/> to copy the data to</param> /// <param name="toDataPath">the datapath to copy to</param> /// <param name="modifierType">The way to data should be copied in</param> /// <param name="copyData">The data to insert</param> public void Change(Vector toBlock, string toDataPath, ID.EntityDataModifierType modifierType, Data.SimpleDataHolder copyData) { ForFunction.AddCommand(new DataModifyWithDataCommand(new BlockDataLocation(toBlock, toDataPath), modifierType, copyData)); }