Skip to content

CanBuild

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void CanBuild( Planner instance, Construction construction, Target deployable )
{
    Puts( "CanBuild works!" );
}

Location

  • Planner::DoBuild(ProtoBuf.CreateBuilding msg)
csharp
//---
	target.normal = msg.normal;
	target.rotation = msg.rotation;
	target.player = ownerPlayer;
	target.isHoldingShift = msg.isHoldingShift;
	target.valid = true;
	if (Interface.CallHook("CanBuild", this, construction, target) != null)
	{
		return;
	}
	if (this.ShouldParent(target.entity, deployable))
	{
//---

Released under the MIT License.