package ru.dbotthepony.mc.otm.config

object ServerCompatConfig : AbstractConfig("compat-server") {
	object AdAstra {
		init {
			builder.push("AD_ASTRA")
		}

		val ANDROIDS_DO_NOT_NEED_OXYGEN: Boolean by builder
			.comment("Android do not need oxygen in space")
			.define("ANDROIDS_DO_NOT_NEED_OXYGEN", true)

		val WHATS_UP_WITH_TEMPERATURE: Boolean by builder
			.comment("Disables temperature mechanics on planets without atmosphere.")
			.comment("I attended physics classes in middle school, and this kills me.")
			.define("WHATS_UP_WITH_TEMPERATURE", true)

		val ANDROID_COSMIC_RAYS: Boolean by builder
			.comment("Androids without spacesuit will get damaged over time by cosmic radiation")
			.comment("on planets without atmosphere.")
			.define("ANDROID_COSMIC_RAYS", true)

		val ANDROID_COSMIC_RAYS_CHANCE: Double by builder
			.comment("Chance in percent android will be damaged this tick per missing piece of spacesuit")
			.comment("Max chance in tick of damage is this value multiplied by 4 (spacesuit is completely missing)")
			.defineInRange("ANDROID_COSMIC_RAYS_CHANCE", 0.015, 0.0, 1.0)

		val TRITANIUM_ARMOR_PROTECTS_AGAINST_COSMIC_RAYS: Boolean by builder
			.comment("Should androids get 3/4th protection from cosmic rays per piece of tritanium armor")
			.define("TRITANIUM_ARMOR_PROTECTS_AGAINST_COSMIC_RAYS", true)

		init {
			builder.pop()
		}
	}

	init {
		AdAstra
	}
}
