function gadget:GetInfo()
	return {
		name = "Neutralizer",
		desc = "Neutralizes certain Units",
		author = "Argh",
		date = "January 28th, 2008",
		license = "GPL, v. 2 or later, 2008",
		layer = 1,
		enabled = true,
	}
end

local neutralAlways = {}

if (gadgetHandler:IsSyncedCode()) then
--------------------------------------------------------------------------------
--  SYNCED
--------------------------------------------------------------------------------
local ud = 0
---------------------------------------------------------SWITCH OUT ON FRAME 30
---------------------------------------------------------AFTER WORLD BUILDER RUNS
	function gadget:GameFrame(f)
  		if (f == 30) then

			for _,u in ipairs(Spring.GetTeamUnits(Spring.GetGaiaTeamID())) do
				ud = Spring.GetUnitDefID(u)
				Spring.SetUnitAlwaysVisible(u,false)
				if tonumber(UnitDefs[ud].customParams.draw_in_los) == 1 then
					Spring.SetUnitNeutral(u, true)
					Spring.SetUnitNoMinimap(u,true)
					Spring.SetUnitNoSelect(u,true)
				end
				if tonumber(UnitDefs[ud].customParams.never_draw) == 1 then
					Spring.SetUnitNeutral(u, true)
					Spring.SetUnitNoMinimap(u,true)
					Spring.SetUnitNoSelect(u,true)
					Spring.SetUnitAlwaysVisible(u,false)
				end
				if tonumber(UnitDefs[ud].customParams.draw_always) == 1 then
					Spring.SetUnitNeutral(u, true)
					Spring.SetUnitNoMinimap(u,true)
					Spring.SetUnitNoSelect(u,true)
					Spring.SetUnitAlwaysVisible(u,true)
					--Spring.SetUnitLosState(u, 0, { los = true, radar = false })
					--Spring.SetUnitLosMask(u, 0, { los = true, radar = false })
				end
				if tonumber(UnitDefs[ud].customParams.draw_always_selectable) == 1 then
					Spring.SetUnitNeutral(u, true)
					Spring.SetUnitNoMinimap(u,true)
					Spring.SetUnitNoSelect(u,false)
					Spring.SetUnitAlwaysVisible(u,true)
					--Spring.SetUnitLosState(u, 0, { los = true, radar = false })
					--Spring.SetUnitLosMask(u, 0, { los = true, radar = false })
				end
				if tonumber(UnitDefs[ud].customParams.road) == 1 then
					Spring.SetUnitBlocking(u,true)
				end
---------------------------------------------------------END HANDLER FUNCTION
			end
		end
	if (f == 33) then Spring.Echo("Removing Neutralizer Gadget") gadgetHandler:RemoveCallIn("GameFrame")  end
	end

	function gadget:Initialize()
		for i,k in ipairs(UnitDefs) do
			if k.customParams.always_neutral == 'yes' then
				table.insert(neutralAlways,i,1)
			end
		end
	end

	function gadget:UnitGiven(unitID, unitDefID, unitTeam, oldTeam)
		if neutralAlways[unitDefID] then
			Spring.SetUnitNeutral(unitID,true)
			return true
		end
	end

	function gadget:UnitTaken(unitID, unitDefID, unitTeam, oldTeam)
		if neutralAlways[unitDefID] then
			Spring.Echo("neutral set")
			Spring.SetUnitNeutral(unitID,true)
			return true
		end
	end
end