Skip to content

OnApartmentRoomUpgrade

Usage

  • Return a non-null value to override default behavior

Example Autogenerated

csharp
private object OnApartmentRoomUpgrade( ApartmentRoom playerApartment, BasePlayer player, ApartmentSize size, ApartmentBuilding instance )
{
    Puts( "OnApartmentRoomUpgrade works!" );
    return null;
}

Location

  • ApartmentBuilding::TryUpgradeRoom(BasePlayer player, ApartmentSize size)
csharp
//---
	{
		Debug.LogError("Trying to upgrade room for player " + player.displayName + " but no current room was found!");
	}
	else
	{
		if (Interface.CallHook("OnApartmentRoomUpgrade", playerApartment, player, size, this) != null)
		{
			return;
		}
		ApartmentRoom apartmentRoom = FetchClosestUnoccupiedRoom(size);
		if (apartmentRoom == null)
//---

Released under the MIT License.