Skip to content

OnStructureDemolish

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnStructureDemolish( DecayEntity instance, BasePlayer player, Unknown Unknown )
{
    Puts( "OnStructureDemolish works!" );
}

Location

  • DecayEntity::DoDemolish(BaseEntity/RPCMessage msg)
  • DecayEntity::DoImmediateDemolish(BaseEntity/RPCMessage msg)
csharp
//---
	}
	if (!this.CanDemolish(msg.player))
	{
		return;
	}
	if (Interface.CallHook("OnStructureDemolish", this, msg.player, false) != null)
	{
		return;
	}
	StabilityEntity stabilityEntity = this as StabilityEntity;
	if (stabilityEntity != null)
//---
csharp
//---
	}
	if (!msg.player.IsAdmin)
	{
		return;
	}
	if (Interface.CallHook("OnStructureDemolish", this, msg.player, true) != null)
	{
		return;
	}
	StabilityEntity stabilityEntity = this as StabilityEntity;
	if (stabilityEntity != null)
//---

Released under the MIT License.