package ru.dbotthepony.mc.otm.core.multiblock

enum class MultiblockStatus {
	/**
	 * Multiblock is functional, configuration is valid
	 */
	VALID,

	/**
	 * Multiblock status is unknown because it require to check
	 */
	NOT_LOADED,

	/**
	 * Multiblock is invalid
	 */
	INVALID;

	fun or(other: MultiblockStatus): MultiblockStatus {
		if (ordinal <= other.ordinal) {
			return this
		} else {
			return other
		}
	}

	companion object {
		fun valid(status: Boolean): MultiblockStatus {
			return if (status) VALID else INVALID
		}
	}
}
