OnItemDeployed
Usage
- No return behavior
Example Autogenerated
csharp
private void OnItemDeployed( Deployer instance, ItemModDeployable modDeployable, BaseEntity baseEntity )
{
Puts( "OnItemDeployed works!" );
}
csharp
private void OnItemDeployed( Deployer instance, BaseEntity baseEntity, BaseEntity modDeployable )
{
Puts( "OnItemDeployed works!" );
}
Location
- Deployer::DoDeploy_Regular(Deployable deployable, UnityEngine.Ray ray)
- Deployer::DoDeploy_Slot(Deployable deployable, UnityEngine.Ray ray, NetworkableId entityID)
csharp
//---
baseEntity.skinID = ownerItem.skin;
baseEntity.SendMessage("SetDeployedBy", ownerPlayer, SendMessageOptions.DontRequireReceiver);
baseEntity.OwnerID = ownerPlayer.userID;
baseEntity.Spawn();
modDeployable.OnDeployed(baseEntity, ownerPlayer);
Interface.CallHook("OnItemDeployed", this, modDeployable, baseEntity);
Facepunch.Rust.Analytics.Azure.OnEntityBuilt(baseEntity, ownerPlayer);
base.UseItemAmount(1);
}
csharp
//---
IntIdentifier = base.GetOwnerItemDefinition().itemid
}, 1f);
}
}
modDeployable.OnDeployed(baseEntity2, ownerPlayer);
Interface.CallHook("OnItemDeployed", this, baseEntity, baseEntity2);
Facepunch.Rust.Analytics.Azure.OnEntityBuilt(baseEntity2, ownerPlayer);
if (!ownerPlayer.IsInCreativeMode || !Creative.freeBuild)
{
base.UseItemAmount(1);
}
//---