common
{
	// Simulate Doom brightness levels (turn this off for linear lighting)
	doomlightlevels = true;

	// Enables support for long (> 8 chars) texture names
	// WARNING: this should only be enabled for UDMF game configurations!
	// WARNING: enabling this will make maps incompatible with Doom Builder 2 and can lead to problems in Slade 3!
	longtexturenames = false;

	// These directory names are ignored when loading PK3/PK7/Directory resources
	ignoreddirectories = ".svn .git";

	// Files with these extensions are ignored when loading PK3/PK7/Directory resources
	ignoredextensions = "wad pk3 pk7 bak backup1 backup2 backup3 zip rar 7z";

	// Default testing parameters
	testparameters = "-folder \"%AF\" -file \"%AA\" \"%F\" -warp %L";
	testshortpaths = true;

	// Action special help
	actionspecialhelp = "https://wiki.srb2.org/wiki/Linedef_type_%K";

	// Generalized actions
	generalizedlinedefs = false;
	generalizedsectors = true;

	// Maximum safe map size check (0 means skip check)
	safeboundary = 0;

	// Map boundaries. Map objects can only be placed within these boundaries
	leftboundary = -32768;
	rightboundary = 32767;
	topboundary = 32767;
	bottomboundary = -32768;

	// Texture loading options
	mixtexturesflats = true;
	defaulttexturescale = 1.0f;
	defaultflatscale = 1.0f;
	scaledtextureoffsets = true;
	scaledflatoffsets = true;

	// Colormap/fade related options
	maxcolormapalpha = 25;
	// TODO: change to 255;

	// Thing number for start position in 3D Mode
	start3dmode = 3328;

	// Texture sources
	textures
	{
		include("SRB222_misc.cfg", "textures");
	}

	// Patch sources
	patches
	{
		include("SRB222_misc.cfg", "patches");
	}

	// Sprite sources
	sprites
	{
		include("SRB222_misc.cfg", "sprites");
	}

	// Flat sources
	flats
	{
		include("SRB222_misc.cfg", "flats");
	}
}

mapformat_udmf
{
	// The format interface handles the map data format
	formatinterface = "UniversalMapSetIO";

	// Default nodebuilder configurations
	defaultsavecompiler = "zdbsp_udmf_normal";
	defaulttestcompiler = "zdbsp_udmf_fast";

	// Determines the textmap namespace
	engine = "srb2";

	maplumpnames
	{
		include("UDMF_misc.cfg", "udmfmaplumpnames_begin");
		include("SRB222_misc.cfg", "udmfmaplumpnames");
		include("UDMF_misc.cfg", "udmfmaplumpnames_end");
	}

	universalfields
	{
		include("SRB222_misc.cfg", "universalfields");
	}
	
	// Disable Doom-related modes that don't make sense for SRB2
	soundsupport = false;
	automapsupport = false;

	// When this is set to true, sectors with the same tag will light up when a line is highlighted
	linetagindicatesectors = false;

	// Enables support for individual offsets of upper/middle/lower sidedef textures
	localsidedeftextureoffsets = true;

	// Enables support for plane equation slopes
	planeequationsupport = true;

	// Enables support for vertex heights
	vertexheightsupport = true;

	// Enables setting distinct brightness for floor, ceiling, and walls
	distinctfloorandceilingbrightness = true;
	distinctwallbrightness = true;

	// Enables setting distinct brightness for upper, middle, and lower sidedef parts
	distinctsidedefpartbrightness = false;

	// Special linedefs
	include("SRB222_misc.cfg", "speciallinedefs_udmf");

	// Default flags for first new thing
	defaultthingflags
	{
	}

	// SECTOR FLAGS
	sectorflags
	{
		include("SRB222_misc.cfg", "sectorflags");
	}

	sectorflagscategories
	{
		include("SRB222_misc.cfg", "sectorflagscategories");
	}

	// DEFAULT SECTOR BRIGHTNESS LEVELS
	sectorbrightness
	{
		include("SRB222_misc.cfg", "sectorbrightness");
	}

	damagetypes = "Generic Water Fire Lava Electric Spike DeathPitTilt DeathPitNoTilt Instakill SpecialStage";
	triggerertypes = "Player AllPlayers Mobj";

	// LINEDEF FLAGS
	linedefflags
	{
		include("SRB222_misc.cfg", "linedefflags_udmf");
	}

	linedefflagstranslation
	{
		include("SRB222_misc.cfg", "linedefflagstranslation");
	}

	// LINEDEF RENDERSTYLES
	linedefrenderstyles
	{
		include("SRB222_misc.cfg", "linedefrenderstyles");
	}

	// THING FLAGS
	thingflags
	{
		include("SRB222_misc.cfg", "thingflags_udmf");
	}

	// Thing flags UDMF translation table
	// This is needed for copy/paste and prefabs to work properly
	// When the UDMF field name is prefixed with ! it is inverted
	thingflagstranslation
	{
		include("SRB222_misc.cfg", "thingflagstranslation");
	}

	// How to compare thing flags (for the stuck things error checker)
	thingflagscompare
	{
	}

	// THING TYPES
	thingtypes
	{
		include("SRB222_things.cfg", "udmf");
	}

	// LINEDEF TYPES
	linedeftypes
	{
		include("SRB222_linedefs.cfg", "udmf");
	}
}