Skip to content

OnWireClear

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private void OnWireClear( BasePlayer ply, IOEntity iOEntity, int clearIndex, IOEntity OxideGen_, bool isInput )
{
    Puts( "OnWireClear works!" );
}

Location

  • WireTool::AttemptClearSlot(BaseNetworkable clearEnt, BasePlayer ply, int clearIndex, bool isInput)
csharp
//---
	if (OxideGen_.connectedTo.Get(true) == null)
	{
		return false;
	}
	OxideGen_ = OxideGen_.connectedTo.Get(true);
	object returnvar = Interface.CallHook("OnWireClear", ply, iOEntity, clearIndex, OxideGen_, isInput);
	if (returnvar is bool)
	{
		return (bool)returnvar;
	}
	return !(iOEntity == null) && (!(ply != null) || WireTool.CanModifyEntity(ply, iOEntity)) && iOEntity.Disconnect(clearIndex, isInput);
//---

Released under the MIT License.