Skip to content

OnTurretIdentifierSet

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnTurretIdentifierSet( AutoTurret instance, BasePlayer player, string newID )
{
    Puts( "OnTurretIdentifierSet works!" );
    return null;
}

Location

  • AutoTurret::SetID(BasePlayer player, string oldID, string newID, bool bypassChecks)
csharp
public void SetID(BasePlayer player, string oldID, string newID, bool bypassChecks = false)
{
	if ((CanChangeID(player) || bypassChecks) && (string.IsNullOrEmpty(oldID) || ComputerStation.IsValidIdentifier(oldID)) && ComputerStation.IsValidIdentifier(newID) && oldID == GetIdentifier() && Interface.CallHook("OnTurretIdentifierSet", this, player, newID) == null)
	{
		Debug.Log("SetID success!");
		UpdateIdentifier(newID);
	}
}

Released under the MIT License.