OnStructureDemolish
Usage
- Return a non-null value to override default behavior
Example Autogenerated
csharp
private void OnStructureDemolish( StabilityEntity instance, BasePlayer player, Unknown Unknown )
{
Puts( "OnStructureDemolish works!" );
}
Location
- StabilityEntity::DoDemolish(BaseEntity/RPCMessage msg)
- StabilityEntity::DoImmediateDemolish(BaseEntity/RPCMessage msg)
csharp
//---
}
if (!this.CanDemolish(msg.player))
{
return;
}
if (Interface.CallHook("OnStructureDemolish", this, msg.player, null) != null)
{
return;
}
Facepunch.Rust.Analytics.Azure.OnBuildingBlockDemolished(msg.player, this);
base.Kill(BaseNetworkable.DestroyMode.Gib);
//---
csharp
//---
}
if (!msg.player.IsAdmin)
{
return;
}
if (Interface.CallHook("OnStructureDemolish", this, msg.player, null) != null)
{
return;
}
Facepunch.Rust.Analytics.Azure.OnBuildingBlockDemolished(msg.player, this);
base.Kill(BaseNetworkable.DestroyMode.Gib);
//---